CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CalorimetryManager.h
Go to the documentation of this file.
1 #ifndef CALORIMETRYMANAGER_H
2 #define CALORIMETRYMANAGER_H
3 
6 
7 // FastSimulation headers
16 
18 
19 // For the uint32_t
20 //#include <boost/cstdint.hpp>
21 #include <map>
22 #include <algorithm>
23 
24 class FSimEvent;
25 class FSimTrack;
26 class RawParticle;
27 class CaloGeometryHelper;
28 class Histos;
29 class HSParameters;
32 class MaterialEffects;
34 //Gflash
39 // FastHFshowerLibrary
41 
42 namespace edm {
43  class ParameterSet;
44 }
45 
47 
48  public:
50  CalorimetryManager(FSimEvent* aSimEvent,
51  const edm::ParameterSet& fastCalo,
52  const edm::ParameterSet& MuonECALPars,
53  const edm::ParameterSet& MuonHCALPars,
54  const edm::ParameterSet& fastGflash);
56 
57  // Does the real job
59 
60  // Return the address of the Calorimeter
62 
63  // Return the address of the FastHFShowerLibrary
65 
66  // load container from edm::Event
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:
100 
103 
105 
108 
109  std::vector<std::pair<CaloHitID,float> > EBMapping_;
110  std::vector<std::pair<CaloHitID,float> > EEMapping_;
111  std::vector<std::pair<CaloHitID,float> > HMapping_;
112  std::vector<std::pair<CaloHitID,float> > ESMapping_;
113 
114  bool debug_;
115  std::vector<unsigned int> evtsToDebug_;
116 
118 
119  //Digitizer
122  std::vector<double> samplingHBHE_;
123  std::vector<double> samplingHF_;
124  std::vector<double> samplingHO_;
126  std::vector<double> timeShiftHB_;
127  std::vector<double> timeShiftHE_;
128  std::vector<double> timeShiftHF_;
129  std::vector<double> timeShiftHO_;
130 
135 
136  // Parameters
140  // double radiusFactor_;
142  std::vector<double> radiusPreshowerCorrections_;
143  double aTerm, bTerm;
144  std::vector<double> mipValues_;
148  //FR
151  //RF
152 
155 
156  static std::vector<std::pair<int, float> > myZero_;
157 
158  // RespCorrP p, k_e(p), k_h(p) vectors and evaluated for each p
159  // ecorr and hcorr
160  std::vector<double> rsp;
161  std::vector<double> p_knots;
162  std::vector<double> k_e;
163  std::vector<double> k_h;
164  double ecorr;
165  double hcorr;
166 
167  // Used to check if the calorimeters was initialized
169 
170  std::vector<FSimTrack> muonSimTracks;
171  MaterialEffects* theMuonEcalEffects; // material effects for muons in ECAL
172  MaterialEffects* theMuonHcalEffects; // material effects for muons in HCAL
173 
174 
175  // If set to true the simulation in ECAL would be done 1X0 by 1X0
176  // this is slow but more adapted to detailed studies.
177  // Otherwise roughty 5 steps are used.
178  // This variable is transferred to EMShower
180 
181  //Gflash
186 
187  // HFShowerLibrary
191 
192  std::unique_ptr<KKCorrectionFactors> ecalCorrection;
193 
194 };
195 #endif
std::vector< double > rsp
std::vector< double > k_h
RawParticle myElec
A few pointers to save time.
std::vector< std::pair< CaloHitID, float > > ESMapping_
void reconstructHCAL(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
std::vector< PCaloHit > PCaloHitContainer
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
GflashHadronShowerProfile * theProfile
void loadFromPreshower(edm::PCaloHitContainer &c) const
void updateECAL(const std::map< CaloHitID, float > &hitMap, int onEcal, int trackID=0, float corr=1.0)
CaloGeometryHelper * getCalorimeter() const
void MuonMipSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
void readParameters(const edm::ParameterSet &fastCalo)
std::vector< double > timeShiftHF_
std::vector< double > p_knots
std::vector< std::pair< CaloHitID, float > > EBMapping_
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
FastHFShowerLibrary * getHFShowerLibrary() const
GflashProtonShowerProfile * theProtonProfile
void loadFromEcalEndcap(edm::PCaloHitContainer &c) const
std::vector< double > radiusPreshowerCorrections_
std::vector< double > theTailIntervals_
std::vector< double > samplingHBHE_
void loadMuonSimTracks(edm::SimTrackContainer &m) const
HCALResponse * myHDResponse_
JetCorrectorParameters corr
Definition: classes.h:5
CaloGeometryHelper * myCalorimeter_
std::vector< double > timeShiftHB_
std::vector< double > theCoreIntervals_
void loadFromHcal(edm::PCaloHitContainer &c) const
GammaFunctionGenerator * aGammaGenerator
std::vector< double > mipValues_
static std::vector< std::pair< int, float > > myZero_
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 > > HMapping_
std::vector< double > samplingHO_
FastHFShowerLibrary * theHFShowerLibrary
std::unique_ptr< KKCorrectionFactors > ecalCorrection
HSParameters * myHSParameters_
std::vector< SimTrack > SimTrackContainer
void EMShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
std::vector< double > timeShiftHE_
void loadFromEcalBarrel(edm::PCaloHitContainer &c) const