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 
17 // For the uint32_t
18 //#include <boost/cstdint.hpp>
19 #include <map>
20 #include <algorithm>
21 
22 class FSimEvent;
23 class FSimTrack;
24 class RawParticle;
25 class CaloGeometryHelper;
26 class Histos;
27 class HSParameters;
30 class MaterialEffects;
32 //Gflash
37 
38 class DQMStore;
39 
40 namespace edm {
41  class ParameterSet;
42 }
43 
45 
46  public:
48  CalorimetryManager(FSimEvent* aSimEvent,
49  const edm::ParameterSet& fastCalo,
50  const edm::ParameterSet& MuonECALPars,
51  const edm::ParameterSet& MuonHCALPars,
52  const edm::ParameterSet& fastGflash);
54 
55  // Does the real job
57 
58  // Return the address of the Calorimeter
60 
61  // load container from edm::Event
63 
65 
67 
69 
71 
72  private:
73  // Simulation of electromagnetic showers in PS, ECAL, HCAL
74  void EMShowerSimulation(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
75 
76  void reconstructHCAL(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
77 
78  void MuonMipSimulation(const FSimTrack & myTrack, RandomEngineAndDistribution const*);
79 
81  void HDShowerSimulation(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
82 
83  // Read the parameters
84  void readParameters(const edm::ParameterSet& fastCalo);
85 
86  void updateECAL(const std::map<CaloHitID,float>& hitMap, int onEcal, int trackID=0, float corr=1.0);
87  void updateHCAL(const std::map<CaloHitID,float>& hitMap, int trackID=0, float corr=1.0);
88  void updatePreshower(const std::map<CaloHitID,float>& hitMap, int trackID=0, float corr=1.0);
89 
90  void respCorr(double);
91 
92  void clean();
93 
94  private:
95 
98 
101 
102 
105 
106  std::vector<std::pair<CaloHitID,float> > EBMapping_;
107  std::vector<std::pair<CaloHitID,float> > EEMapping_;
108  std::vector<std::pair<CaloHitID,float> > HMapping_;
109  std::vector<std::pair<CaloHitID,float> > ESMapping_;
110 
111  bool debug_;
112  bool useDQM_;
113  std::vector<unsigned int> evtsToDebug_;
114 
116 
117  //Digitizer
120  std::vector<double> samplingHBHE_;
121  std::vector<double> samplingHF_;
122  std::vector<double> samplingHO_;
124  std::vector<double> timeShiftHB_;
125  std::vector<double> timeShiftHE_;
126  std::vector<double> timeShiftHF_;
127  std::vector<double> timeShiftHO_;
128 
133 
134  // Parameters
138  // double radiusFactor_;
140  std::vector<double> radiusPreshowerCorrections_;
141  double aTerm, bTerm;
142  std::vector<double> mipValues_;
146  //FR
149  //RF
150 
153 
154  static std::vector<std::pair<int, float> > myZero_;
155 
156  // RespCorrP p, k_e(p), k_h(p) vectors and evaluated for each p
157  // ecorr and hcorr
158  std::vector<double> rsp;
159  std::vector<double> p_knots;
160  std::vector<double> k_e;
161  std::vector<double> k_h;
162  double ecorr;
163  double hcorr;
164 
165  // Used to check if the calorimeters was initialized
167 
168  std::vector<FSimTrack> muonSimTracks;
169  MaterialEffects* theMuonEcalEffects; // material effects for muons in ECAL
170  MaterialEffects* theMuonHcalEffects; // material effects for muons in HCAL
171 
172 
173  // If set to true the simulation in ECAL would be done 1X0 by 1X0
174  // this is slow but more adapted to detailed studies.
175  // Otherwise roughty 5 steps are used.
176  // This variable is transferred to EMShower
178 
179  //Gflash
184 };
185 #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
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_
HSParameters * myHSParameters_
std::vector< SimTrack > SimTrackContainer
void EMShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
std::vector< double > timeShiftHE_
void loadFromEcalBarrel(edm::PCaloHitContainer &c) const