MarlinPandora  03.00.00
 All Classes Functions Variables
CaloHitCreator.h
1 
9 #ifndef CALO_HIT_CREATOR_H
10 #define CALO_HIT_CREATOR_H 1
11 
12 #include "EVENT/CalorimeterHit.h"
13 
14 #include "gear/LayerLayout.h"
15 
16 #include "Api/PandoraApi.h"
17 
18 #include <string>
19 
20 typedef std::vector<CalorimeterHit *> CalorimeterHitVector;
21 
26 {
27 public:
28  typedef std::vector<std::string> StringVector;
29 
33  class Settings
34  {
35  public:
39  Settings();
40 
41  StringVector m_eCalCaloHitCollections;
42  StringVector m_hCalCaloHitCollections;
43  StringVector m_lCalCaloHitCollections;
45  StringVector m_muonCaloHitCollections;
46 
53 
54  float m_eCalToMip;
55  float m_hCalToMip;
56  float m_muonToMip;
60 
61  float m_eCalToEMGeV;
64  float m_hCalToEMGeV;
68 
72 
75 
76  // For Strip Splitting method and hybrid ECAL.
79  float m_eCalSiToMip;
80  float m_eCalScToMip;
89  };
90 
97  CaloHitCreator(const Settings &settings, const pandora::Pandora *const pPandora);
98 
102  ~CaloHitCreator();
103 
109  pandora::StatusCode CreateCaloHits(const LCEvent *const pLCEvent);
110 
116  const CalorimeterHitVector &GetCalorimeterHitVector() const;
117 
121  void Reset();
122 
123 private:
129  pandora::StatusCode CreateECalCaloHits(const EVENT::LCEvent *const pLCEvent);
130 
136  pandora::StatusCode CreateHCalCaloHits(const EVENT::LCEvent *const pLCEvent);
137 
143  pandora::StatusCode CreateMuonCaloHits(const EVENT::LCEvent *const pLCEvent);
144 
150  pandora::StatusCode CreateLCalCaloHits(const EVENT::LCEvent *const pLCEvent);
151 
157  pandora::StatusCode CreateLHCalCaloHits(const EVENT::LCEvent *const pLCEvent);
158 
165  void GetCommonCaloHitProperties(const EVENT::CalorimeterHit *const pCaloHit, PandoraApi::CaloHit::Parameters &caloHitParameters) const;
166 
175  void GetEndCapCaloHitProperties(const EVENT::CalorimeterHit *const pCaloHit, const gear::LayerLayout &layerLayout,
176  PandoraApi::CaloHit::Parameters &caloHitParameters, float &absorberCorrection) const;
177 
189  void GetBarrelCaloHitProperties(const EVENT::CalorimeterHit *const pCaloHit, const gear::LayerLayout &layerLayout,
190  unsigned int barrelSymmetryOrder, float barrelPhi0, unsigned int staveNumber, PandoraApi::CaloHit::Parameters &caloHitParameters,
191  float &absorberCorrection) const;
192 
198  int GetNLayersFromEdge(const EVENT::CalorimeterHit *const pCaloHit) const;
199 
209  float GetMaximumRadius(const EVENT::CalorimeterHit *const pCaloHit, const unsigned int symmetryOrder, const float phi0) const;
210 
218  std::string GetLayerCoding(const std::string &encodingString) const;
219 
227  std::string GetStaveCoding(const std::string &encodingString) const;
228 
229  const Settings m_settings;
230 
231  const pandora::Pandora *m_pPandora;
232 
233  const float m_eCalBarrelOuterZ;
234  const float m_hCalBarrelOuterZ;
235  const float m_muonBarrelOuterZ;
236  const float m_coilOuterR;
237 
238  const float m_eCalBarrelInnerPhi0;
239  const unsigned int m_eCalBarrelInnerSymmetry;
240  const float m_hCalBarrelInnerPhi0;
241  const unsigned int m_hCalBarrelInnerSymmetry;
242  const float m_muonBarrelInnerPhi0;
243  const unsigned int m_muonBarrelInnerSymmetry;
244 
245  const float m_hCalEndCapOuterR;
246  const float m_hCalEndCapOuterZ;
247  const float m_hCalBarrelOuterR;
248  const float m_hCalBarrelOuterPhi0;
249  const unsigned int m_hCalBarrelOuterSymmetry;
250 
251  float m_hCalBarrelLayerThickness;
252  float m_hCalEndCapLayerThickness;
253 
254  CalorimeterHitVector m_calorimeterHitVector;
255 };
256 
257 //------------------------------------------------------------------------------------------------------------------------------------------
258 
259 inline const CalorimeterHitVector &CaloHitCreator::GetCalorimeterHitVector() const
260 {
261  return m_calorimeterHitVector;
262 }
263 
264 //------------------------------------------------------------------------------------------------------------------------------------------
265 
267 {
268  m_calorimeterHitVector.clear();
269 }
270 
271 #endif // #ifndef CALO_HIT_CREATOR_H
StringVector m_muonCaloHitCollections
The muon calorimeter hit collections.
Definition: CaloHitCreator.h:45
int m_useEcalScLayers
To use scintillator layers ~ hybrid ECAL, this should be true (default is false)
Definition: CaloHitCreator.h:78
float m_eCalSiToMip
The calibration from deposited Si-layer energy to mip.
Definition: CaloHitCreator.h:79
const CalorimeterHitVector & GetCalorimeterHitVector() const
Get the calorimeter hit vector.
Definition: CaloHitCreator.h:259
float m_layersFromEdgeMaxRearDistance
Maximum number of layers from candidate outer layer hit to rear of detector.
Definition: CaloHitCreator.h:71
float m_eCalScToHadGeVEndCap
The calibration from deposited Sc-layer energy on the endcaps to hadronic energy. ...
Definition: CaloHitCreator.h:88
float m_maxHCalHitHadronicEnergy
The maximum hadronic energy allowed for a single hcal hit.
Definition: CaloHitCreator.h:69
float m_muonHitEnergy
The energy for a digital muon calorimeter hit, units GeV.
Definition: CaloHitCreator.h:67
float m_hCalEndCapInnerPhiCoordinate
HCal end cap inner phi coordinate (missing from ILD00 gear file)
Definition: CaloHitCreator.h:74
CaloHitCreator(const Settings &settings, const pandora::Pandora *const pPandora)
Constructor.
Definition: CaloHitCreator.cc:30
float m_eCalSiMipThreshold
Threshold for creating calo hits in the Si-layers of ECAL, units mip.
Definition: CaloHitCreator.h:81
pandora::StatusCode CreateCaloHits(const LCEvent *const pLCEvent)
Create calo hits.
Definition: CaloHitCreator.cc:75
StringVector m_eCalCaloHitCollections
The ecal calorimeter hit collections.
Definition: CaloHitCreator.h:41
float m_hCalToHadGeV
The calibration from deposited HCal energy to hadronic energy.
Definition: CaloHitCreator.h:65
int m_hCalEndCapInnerSymmetryOrder
HCal end cap inner symmetry order (missing from ILD00 gear file)
Definition: CaloHitCreator.h:73
float m_eCalSiToHadGeVEndCap
The calibration from deposited Si-layer energy on the enecaps to hadronic energy. ...
Definition: CaloHitCreator.h:87
StringVector m_lHCalCaloHitCollections
The lhcal calorimeter hit collections.
Definition: CaloHitCreator.h:44
float m_eCalToEMGeV
The calibration from deposited ECal energy to EM energy.
Definition: CaloHitCreator.h:61
int m_stripSplittingOn
To use SSA, this should be true (default is false)
Definition: CaloHitCreator.h:77
StringVector m_lCalCaloHitCollections
The lcal calorimeter hit collections.
Definition: CaloHitCreator.h:43
float m_eCalScToMip
The calibration from deposited Sc-layer energy to mip.
Definition: CaloHitCreator.h:80
float m_absorberIntLengthECal
The absorber interaction length in the ECal.
Definition: CaloHitCreator.h:48
float m_eCalMipThreshold
Threshold for creating calo hits in the ECal, units mip.
Definition: CaloHitCreator.h:57
float m_hCalMipThreshold
Threshold for creating calo hits in the HCal, units mip.
Definition: CaloHitCreator.h:58
float m_absorberRadLengthECal
The absorber radiation length in the ECal.
Definition: CaloHitCreator.h:47
float m_absorberIntLengthHCal
The absorber interaction length in the HCal.
Definition: CaloHitCreator.h:50
float m_absorberRadLengthOther
The absorber radiation length in other detector regions.
Definition: CaloHitCreator.h:51
float m_eCalToHadGeVEndCap
The calibration from deposited ECal endcap energy to hadronic energy.
Definition: CaloHitCreator.h:63
float m_eCalScMipThreshold
Threshold for creating calo hits in the Sc-layers of ECAL, units mip.
Definition: CaloHitCreator.h:82
float m_eCalSiToEMGeV
The calibration from deposited Si-layer energy to EM energy.
Definition: CaloHitCreator.h:83
int m_muonDigitalHits
Muon hits are treated as digital (energy from hit count)
Definition: CaloHitCreator.h:66
void Reset()
Reset the calo hit creator.
Definition: CaloHitCreator.h:266
float m_eCalScToHadGeVBarrel
The calibration from deposited Sc-layer energy on the endcaps to hadronic energy. ...
Definition: CaloHitCreator.h:86
float m_eCalSiToHadGeVBarrel
The calibration from deposited Si-layer energy on the enecaps to hadronic energy. ...
Definition: CaloHitCreator.h:85
CaloHitCreator class.
Definition: CaloHitCreator.h:25
float m_muonMipThreshold
Threshold for creating calo hits in the HCal, units mip.
Definition: CaloHitCreator.h:59
float m_muonToMip
The calibration from deposited Muon energy to mip.
Definition: CaloHitCreator.h:56
float m_hCalToEMGeV
The calibration from deposited HCal energy to EM energy.
Definition: CaloHitCreator.h:64
StringVector m_hCalCaloHitCollections
The hcal calorimeter hit collections.
Definition: CaloHitCreator.h:42
float m_absorberIntLengthOther
The absorber interaction length in other detector regions.
Definition: CaloHitCreator.h:52
int m_nOuterSamplingLayers
Number of layers from edge for hit to be flagged as an outer layer hit.
Definition: CaloHitCreator.h:70
float m_absorberRadLengthHCal
The absorber radiation length in the HCal.
Definition: CaloHitCreator.h:49
~CaloHitCreator()
Destructor.
Definition: CaloHitCreator.cc:69
float m_eCalToMip
The calibration from deposited ECal energy to mip.
Definition: CaloHitCreator.h:54
float m_eCalToHadGeVBarrel
The calibration from deposited ECal barrel energy to hadronic energy.
Definition: CaloHitCreator.h:62
float m_eCalScToEMGeV
The calibration from deposited Sc-layer energy to EM energy.
Definition: CaloHitCreator.h:84
float m_hCalToMip
The calibration from deposited HCal energy to mip.
Definition: CaloHitCreator.h:55
Settings class.
Definition: CaloHitCreator.h:33
Settings()
Default constructor.
Definition: CaloHitCreator.cc:755