k4SimGeant4
Loading...
Searching...
No Matches
SamplingFractionInLayers.h
Go to the documentation of this file.
1#ifndef DETSTUDIES_SAMPLINGFRACTIONINLAYERS_H
2#define DETSTUDIES_SAMPLINGFRACTIONINLAYERS_H
3
4// GAUDI
5#include "Gaudi/Algorithm.h"
6#include "GaudiKernel/ServiceHandle.h"
7
8// FCCSW
9#include "k4FWCore/DataHandle.h"
10class IGeoSvc;
11
12// datamodel
13namespace edm4hep {
14class SimCalorimeterHitCollection;
15}
16
17class TH1F;
18class ITHistSvc;
29class SamplingFractionInLayers : public Gaudi::Algorithm {
30public:
31 explicit SamplingFractionInLayers(const std::string&, ISvcLocator*);
36 virtual StatusCode initialize() final;
40 virtual StatusCode execute(const EventContext&) const final;
44 virtual StatusCode finalize() final;
45
46private:
48 ServiceHandle<ITHistSvc> m_histSvc;
50 ServiceHandle<IGeoSvc> m_geoSvc;
52 mutable k4FWCore::DataHandle<edm4hep::SimCalorimeterHitCollection> m_deposits{"rec/caloHits",
53 Gaudi::DataHandle::Reader, this};
55 Gaudi::Property<std::string> m_activeFieldName{this, "activeFieldName", "", "Identifier of active material"};
57 Gaudi::Property<int> m_activeFieldValue{this, "activeFieldValue", 0, "Value of identifier for active material"};
59 Gaudi::Property<std::string> m_layerFieldName{this, "layerFieldName", "", "Identifier of layers"};
61 Gaudi::Property<uint> m_numLayers{this, "numLayers", 8, "Number of layers"};
63 Gaudi::Property<uint> m_firstLayerId{this, "firstLayerId", 0, "ID of first layer"};
65 Gaudi::Property<std::string> m_readoutName{this, "readoutName", "", "Name of the detector readout"};
66 // Maximum energy for the axis range
67 Gaudi::Property<double> m_energy{this, "energyAxis", 500, "Maximum energy for axis range"};
68 // Histograms of total deposited energy within layer
69 // Layers are numbered starting at 1. Layer 0 includes total energy deposited in cryostat and bath (in front and
70 // behind calo)
71 std::vector<TH1F*> m_totalEnLayers;
72 // Histogram of total deposited energy in the calorimeter (in active and passive material, excluding cryostat and
73 // bath)
75 // Histograms of energy deposited in the active material within layer
76 std::vector<TH1F*> m_activeEnLayers;
77 // Histogram of energy deposited in the active material of the calorimeter
79 // Histograms of sampling fraction (active/total energy) calculated within layer
80 std::vector<TH1F*> m_sfLayers;
81 // Histogram of sampling fraction (active/total energy) calculated for the calorimeter (excluding cryostat and bath)
82 TH1F* m_sf;
83};
84#endif /* DETSTUDIES_SAMPLINGFRACTIONINLAYERS_H */
Histograms of energy deposited in active material and total energy deposited in the calorimeter.
Definition SamplingFractionInLayers.h:29
Gaudi::Property< uint > m_numLayers
Number of layers/cells.
Definition SamplingFractionInLayers.h:61
std::vector< TH1F * > m_totalEnLayers
Definition SamplingFractionInLayers.h:71
Gaudi::Property< std::string > m_layerFieldName
Name of the layer/cell field.
Definition SamplingFractionInLayers.h:59
Gaudi::Property< int > m_activeFieldValue
Value of the active material.
Definition SamplingFractionInLayers.h:57
SamplingFractionInLayers(const std::string &, ISvcLocator *)
Definition SamplingFractionInLayers.cpp:19
k4FWCore::DataHandle< edm4hep::SimCalorimeterHitCollection > m_deposits
Handle for the energy deposits.
Definition SamplingFractionInLayers.h:52
Gaudi::Property< uint > m_firstLayerId
Id of the first layer.
Definition SamplingFractionInLayers.h:63
TH1F * m_totalEnergy
Definition SamplingFractionInLayers.h:74
Gaudi::Property< std::string > m_readoutName
Name of the detector readout.
Definition SamplingFractionInLayers.h:65
virtual StatusCode execute(const EventContext &) const final
Fills the histograms.
Definition SamplingFractionInLayers.cpp:77
ServiceHandle< IGeoSvc > m_geoSvc
Pointer to the geometry service.
Definition SamplingFractionInLayers.h:50
TH1F * m_sf
Definition SamplingFractionInLayers.h:82
ServiceHandle< ITHistSvc > m_histSvc
Pointer to the interface of histogram service.
Definition SamplingFractionInLayers.h:48
virtual StatusCode initialize() final
Initialize.
Definition SamplingFractionInLayers.cpp:27
virtual StatusCode finalize() final
Finalize.
Definition SamplingFractionInLayers.cpp:124
std::vector< TH1F * > m_sfLayers
Definition SamplingFractionInLayers.h:80
Gaudi::Property< double > m_energy
Definition SamplingFractionInLayers.h:67
TH1F * m_totalActiveEnergy
Definition SamplingFractionInLayers.h:78
Gaudi::Property< std::string > m_activeFieldName
Name of the active field.
Definition SamplingFractionInLayers.h:55
std::vector< TH1F * > m_activeEnLayers
Definition SamplingFractionInLayers.h:76
virtual ~SamplingFractionInLayers()
Definition SamplingFractionInLayers.cpp:25
Definition EventInformation.h:10