CMS 3D CMS Logo

CalorimetryManager.h
Go to the documentation of this file.
1 #ifndef CALORIMETRYMANAGER_H
2 #define CALORIMETRYMANAGER_H
3 
6 
7 // FastSimulation headers
15 
17 
19 
20 // For the uint32_t
21 //#include <boost/cstdint.hpp>
22 #include <map>
23 #include <algorithm>
24 
25 class FSimEvent;
26 class FSimTrack;
27 class CaloGeometryHelper;
28 class Histos;
29 class HSParameters;
32 class MaterialEffects;
34 //Gflash
39 // FastHFshowerLibrary
41 
43 public:
45  CalorimetryManager(FSimEvent* aSimEvent,
46  const edm::ParameterSet& fastCalo,
47  const edm::ParameterSet& MuonECALPars,
48  const edm::ParameterSet& MuonHCALPars,
49  const edm::ParameterSet& fastGflash,
52 
53  // Does the real job
54  void initialize(RandomEngineAndDistribution const* random);
57 
58  // Return the address of the Calorimeter
60 
61  // Return the address of the FastHFShowerLibrary
63 
64  // load container from edm::Event
66 
68 
70 
72 
74 
76 
77 private:
78  // Simulation of electromagnetic showers in PS, ECAL, HCAL
79  void EMShowerSimulation(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
80 
81  void reconstructHCAL(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
82 
83  void MuonMipSimulation(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
84 
86  void HDShowerSimulation(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
87 
88  // Read the parameters
89  void readParameters(const edm::ParameterSet& fastCalo);
90 
91  void updateECAL(const std::map<CaloHitID, float>& hitMap, int onEcal, int trackID = 0, float corr = 1.0);
92  void updateHCAL(const std::map<CaloHitID, float>& hitMap, int trackID = 0, float corr = 1.0);
93  void updatePreshower(const std::map<CaloHitID, float>& hitMap, int trackID = 0, float corr = 1.0);
94 
95  void respCorr(double);
96 
97  void clean();
98 
99 private:
102 
104 
107 
108  std::vector<std::pair<CaloHitID, float> > EBMapping_;
109  std::vector<std::pair<CaloHitID, float> > EEMapping_;
110  std::vector<std::pair<CaloHitID, float> > HMapping_;
111  std::vector<std::pair<CaloHitID, float> > ESMapping_;
112 
113  bool debug_;
114  std::vector<unsigned int> evtsToDebug_;
115 
117 
118  //Digitizer
121  std::vector<double> samplingHBHE_;
122  std::vector<double> samplingHF_;
123  std::vector<double> samplingHO_;
125  std::vector<double> timeShiftHB_;
126  std::vector<double> timeShiftHE_;
127  std::vector<double> timeShiftHF_;
128  std::vector<double> timeShiftHO_;
129 
134 
135  // Parameters
139  // double radiusFactor_;
141  std::vector<double> radiusPreshowerCorrections_;
142  double aTerm, bTerm;
143  std::vector<double> mipValues_;
145  std::vector<double> theCoreIntervals_, theTailIntervals_;
147  //FR
150  //RF
151 
154 
155  static std::vector<std::pair<int, float> > myZero_;
156 
157  // RespCorrP p, k_e(p), k_h(p) vectors and evaluated for each p
158  // ecorr and hcorr
159  std::vector<double> rsp;
160  std::vector<double> p_knots;
161  std::vector<double> k_e;
162  std::vector<double> k_h;
163  double ecorr;
164  double hcorr;
165 
166  // Used to check if the calorimeters was initialized
168 
169  std::vector<FSimTrack> muonSimTracks;
170  std::vector<FSimTrack> savedMuonSimTracks;
171  MaterialEffects* theMuonEcalEffects; // material effects for muons in ECAL
172  MaterialEffects* theMuonHcalEffects; // material effects for muons in HCAL
173 
174  // If set to true the simulation in ECAL would be done 1X0 by 1X0
175  // this is slow but more adapted to detailed studies.
176  // Otherwise roughty 5 steps are used.
177  // This variable is transferred to EMShower
179 
180  //Gflash
185 
186  // HFShowerLibrary
190 
191  std::unique_ptr<KKCorrectionFactors> ecalCorrection;
192 };
193 #endif
std::vector< double > rsp
std::vector< double > k_h
RawParticle myElec
A few pointers to save time.
void reconstructHCAL(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
std::vector< PCaloHit > PCaloHitContainer
void loadFromPreshower(edm::PCaloHitContainer &c) const
void updateHCAL(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
GflashPiKShowerProfile * thePiKProfile
std::vector< double > timeShiftHO_
void updatePreshower(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
MaterialEffects * theMuonEcalEffects
MaterialEffects * theMuonHcalEffects
void harvestMuonSimTracks(edm::SimTrackContainer &m) const
GflashHadronShowerProfile * theProfile
void loadFromEcalEndcap(edm::PCaloHitContainer &c) const
void reconstructTrack(FSimTrack &myTrack, RandomEngineAndDistribution const *)
void updateECAL(const std::map< CaloHitID, float > &hitMap, int onEcal, int trackID=0, float corr=1.0)
void MuonMipSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
void readParameters(const edm::ParameterSet &fastCalo)
std::vector< double > timeShiftHF_
std::vector< double > p_knots
std::vector< FSimTrack > muonSimTracks
void HDShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
Hadronic Shower Simulation.
const LandauFluctuationGenerator * aLandauGenerator
std::vector< double > samplingHF_
void reconstruct(RandomEngineAndDistribution const *)
GflashAntiProtonShowerProfile * theAntiProtonProfile
GflashProtonShowerProfile * theProtonProfile
dictionary corr
std::vector< std::pair< CaloHitID, float > > ESMapping_
std::vector< double > radiusPreshowerCorrections_
std::vector< double > theTailIntervals_
void loadFromEcalBarrel(edm::PCaloHitContainer &c) const
std::vector< double > samplingHBHE_
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
std::vector< double > timeShiftHB_
std::vector< std::pair< CaloHitID, float > > HMapping_
void initialize(RandomEngineAndDistribution const *random)
std::vector< double > theCoreIntervals_
CaloGeometryHelper * getCalorimeter() const
GammaFunctionGenerator * aGammaGenerator
std::vector< double > mipValues_
static std::vector< std::pair< int, float > > myZero_
std::vector< FSimTrack > savedMuonSimTracks
std::vector< std::pair< CaloHitID, float > > EEMapping_
std::vector< unsigned int > evtsToDebug_
std::vector< double > k_e
Definition: Histos.h:19
std::vector< std::pair< CaloHitID, float > > EBMapping_
void loadMuonSimTracks(edm::SimTrackContainer &m) const
std::vector< double > samplingHO_
FastHFShowerLibrary * theHFShowerLibrary
std::unique_ptr< KKCorrectionFactors > ecalCorrection
HSParameters * myHSParameters_
std::vector< SimTrack > SimTrackContainer
FastHFShowerLibrary * getHFShowerLibrary() const
void loadFromHcal(edm::PCaloHitContainer &c) const
void EMShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
std::vector< double > timeShiftHE_