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;
28 class RandomEngine;
31 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,
53  const RandomEngine* engine);
55 
56  // Does the real job
57  void reconstruct();
58 
59  // Return the address of the Calorimeter
61 
62  // load container from edm::Event
64 
66 
68 
70 
72 
73  private:
74  // Simulation of electromagnetic showers in PS, ECAL, HCAL
75  void EMShowerSimulation(const FSimTrack& myTrack);
76 
77  void reconstructHCAL(const FSimTrack& myTrack);
78 
79  void MuonMipSimulation(const FSimTrack & myTrack);
80 
82  void HDShowerSimulation(const FSimTrack& myTrack);
83 
84  // Read the parameters
85  void readParameters(const edm::ParameterSet& fastCalo);
86 
87  void updateECAL(const std::map<CaloHitID,float>& hitMap, int onEcal, int trackID=0, float corr=1.0);
88  void updateHCAL(const std::map<CaloHitID,float>& hitMap, int trackID=0, float corr=1.0);
89  void updatePreshower(const std::map<CaloHitID,float>& hitMap, int trackID=0, float corr=1.0);
90 
91  void respCorr(double);
92 
93  void clean();
94 
95  private:
96 
99 
102 
103 
106 
107  std::vector<std::pair<CaloHitID,float> > EBMapping_;
108  std::vector<std::pair<CaloHitID,float> > EEMapping_;
109  std::vector<std::pair<CaloHitID,float> > HMapping_;
110  std::vector<std::pair<CaloHitID,float> > ESMapping_;
111 
112  bool debug_;
113  bool useDQM_;
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_;
147  //FR
150  //RF
151 
152  // Famos Random Engine
156 
157  static std::vector<std::pair<int, float> > myZero_;
158 
159  // RespCorrP p, k_e(p), k_h(p) vectors and evaluated for each p
160  // ecorr and hcorr
161  std::vector<double> rsp;
162  std::vector<double> p_knots;
163  std::vector<double> k_e;
164  std::vector<double> k_h;
165  double ecorr;
166  double hcorr;
167 
168  // Used to check if the calorimeters was initialized
170 
171  std::vector<FSimTrack> muonSimTracks;
172  MaterialEffects* theMuonEcalEffects; // material effects for muons in ECAL
173  MaterialEffects* theMuonHcalEffects; // material effects for muons in HCAL
174 
175 
176  // If set to true the simulation in ECAL would be done 1X0 by 1X0
177  // this is slow but more adapted to detailed studies.
178  // Otherwise roughty 5 steps are used.
179  // This variable is transferred to EMShower
181 
182  //Gflash
187 };
188 #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_
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 readParameters(const edm::ParameterSet &fastCalo)
void HDShowerSimulation(const FSimTrack &myTrack)
Hadronic Shower Simulation.
void MuonMipSimulation(const FSimTrack &myTrack)
std::vector< double > timeShiftHF_
std::vector< double > p_knots
std::vector< std::pair< CaloHitID, float > > EBMapping_
std::vector< FSimTrack > muonSimTracks
const RandomEngine * random
const LandauFluctuationGenerator * aLandauGenerator
std::vector< double > samplingHF_
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:11
CaloGeometryHelper * myCalorimeter_
std::vector< double > timeShiftHB_
std::vector< double > theCoreIntervals_
void loadFromHcal(edm::PCaloHitContainer &c) const
void EMShowerSimulation(const FSimTrack &myTrack)
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 reconstructHCAL(const FSimTrack &myTrack)
std::vector< double > timeShiftHE_
void loadFromEcalBarrel(edm::PCaloHitContainer &c) const