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
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 CaloGeometryHelper;
27 class Histos;
28 class HSParameters;
31 class MaterialEffects;
33 //Gflash
38 // FastHFshowerLibrary
40 
41 namespace edm {
42  class ParameterSet;
43 }
44 
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
56  void initialize(RandomEngineAndDistribution const* random);
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 
78 
79 private:
80  // Simulation of electromagnetic showers in PS, ECAL, HCAL
81  void EMShowerSimulation(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
82 
83  void reconstructHCAL(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
84 
85  void MuonMipSimulation(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
86 
88  void HDShowerSimulation(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
89 
90  // Read the parameters
91  void readParameters(const edm::ParameterSet& fastCalo);
92 
93  void updateECAL(const std::map<CaloHitID, float>& hitMap, int onEcal, int trackID = 0, float corr = 1.0);
94  void updateHCAL(const std::map<CaloHitID, float>& hitMap, int trackID = 0, float corr = 1.0);
95  void updatePreshower(const std::map<CaloHitID, float>& hitMap, int trackID = 0, float corr = 1.0);
96 
97  void respCorr(double);
98 
99  void clean();
100 
101 private:
104 
106 
109 
110  std::vector<std::pair<CaloHitID, float> > EBMapping_;
111  std::vector<std::pair<CaloHitID, float> > EEMapping_;
112  std::vector<std::pair<CaloHitID, float> > HMapping_;
113  std::vector<std::pair<CaloHitID, float> > ESMapping_;
114 
115  bool debug_;
116  std::vector<unsigned int> evtsToDebug_;
117 
119 
120  //Digitizer
123  std::vector<double> samplingHBHE_;
124  std::vector<double> samplingHF_;
125  std::vector<double> samplingHO_;
127  std::vector<double> timeShiftHB_;
128  std::vector<double> timeShiftHE_;
129  std::vector<double> timeShiftHF_;
130  std::vector<double> timeShiftHO_;
131 
136 
137  // Parameters
141  // double radiusFactor_;
143  std::vector<double> radiusPreshowerCorrections_;
144  double aTerm, bTerm;
145  std::vector<double> mipValues_;
147  std::vector<double> theCoreIntervals_, theTailIntervals_;
149  //FR
152  //RF
153 
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  std::vector<FSimTrack> savedMuonSimTracks;
173  MaterialEffects* theMuonEcalEffects; // material effects for muons in ECAL
174  MaterialEffects* theMuonHcalEffects; // material effects for muons in HCAL
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  // HFShowerLibrary
192 
193  std::unique_ptr<KKCorrectionFactors> ecalCorrection;
194 };
195 #endif
CalorimetryManager::hdGridSize_
int hdGridSize_
Definition: CalorimetryManager.h:150
CalorimetryManager::hdSimMethod_
int hdSimMethod_
Definition: CalorimetryManager.h:150
CalorimetryManager::myPosi
RawParticle myPosi
Definition: CalorimetryManager.h:134
PreshowerHitMaker.h
CalorimetryManager::myElec
RawParticle myElec
A few pointers to save time.
Definition: CalorimetryManager.h:133
RawParticle
Definition: RawParticle.h:37
CalorimetryManager::aGammaGenerator
GammaFunctionGenerator * aGammaGenerator
Definition: CalorimetryManager.h:155
FSimEvent
Definition: FSimEvent.h:29
CalorimetryManager::useShowerLibrary
bool useShowerLibrary
Definition: CalorimetryManager.h:189
CalorimetryManager::myHSParameters_
HSParameters * myHSParameters_
Definition: CalorimetryManager.h:108
CalorimetryManager::~CalorimetryManager
~CalorimetryManager()
Definition: CalorimetryManager.cc:128
CalorimetryManager::theMuonEcalEffects
MaterialEffects * theMuonEcalEffects
Definition: CalorimetryManager.h:173
CalorimetryManager::harvestMuonSimTracks
void harvestMuonSimTracks(edm::SimTrackContainer &m) const
Definition: CalorimetryManager.cc:1224
edm
HLT enums.
Definition: AlignableModifier.h:19
CalorimetryManager::loadFromEcalEndcap
void loadFromEcalEndcap(edm::PCaloHitContainer &c) const
Definition: CalorimetryManager.cc:1174
CalorimetryManager::EcalDigitizer_
bool EcalDigitizer_
Definition: CalorimetryManager.h:121
CalorimetryManager::myHistos
Histos * myHistos
Definition: CalorimetryManager.h:105
CalorimetryManager::thePiKProfile
GflashPiKShowerProfile * thePiKProfile
Definition: CalorimetryManager.h:184
CalorimetryManager::theMuonHcalEffects
MaterialEffects * theMuonHcalEffects
Definition: CalorimetryManager.h:174
CalorimetryManager::aTerm
double aTerm
Definition: CalorimetryManager.h:144
CalorimetryManager::myPart
RawParticle myPart
Definition: CalorimetryManager.h:135
CalorimetryManager::HcalDigitizer_
bool HcalDigitizer_
Definition: CalorimetryManager.h:122
CalorimetryManager::muonSimTracks
std::vector< FSimTrack > muonSimTracks
Definition: CalorimetryManager.h:171
CalorimetryManager::simulatePreshower_
bool simulatePreshower_
Definition: CalorimetryManager.h:151
CalorimetryManager::samplingHF_
std::vector< double > samplingHF_
Definition: CalorimetryManager.h:124
CaloHitID.h
MaterialEffects
Definition: MaterialEffects.h:51
CalorimetryManager::loadFromHcal
void loadFromHcal(edm::PCaloHitContainer &c) const
Definition: CalorimetryManager.cc:1184
CalorimetryManager::theHFShowerLibrary
FastHFShowerLibrary * theHFShowerLibrary
Definition: CalorimetryManager.h:191
GammaFunctionGenerator
Definition: GammaFunctionGenerator.h:21
CalorimetryManager::samplingHBHE_
std::vector< double > samplingHBHE_
Definition: CalorimetryManager.h:123
EcalHitMaker.h
HcalHitMaker.h
CalorimetryManager::optionHDSim_
int optionHDSim_
Definition: CalorimetryManager.h:150
CalorimetryManager::gridSize_
int gridSize_
Definition: CalorimetryManager.h:146
CalorimetryManager::RCFactor_
double RCFactor_
Definition: CalorimetryManager.h:148
CalorimetryManager::CalorimetryManager
CalorimetryManager()
Definition: CalorimetryManager.cc:71
CalorimetryManager::k_h
std::vector< double > k_h
Definition: CalorimetryManager.h:164
CalorimetryManager::timeShiftHF_
std::vector< double > timeShiftHF_
Definition: CalorimetryManager.h:129
CalorimetryManager::timeShiftHE_
std::vector< double > timeShiftHE_
Definition: CalorimetryManager.h:128
CalorimetryManager::theTailIntervals_
std::vector< double > theTailIntervals_
Definition: CalorimetryManager.h:147
GflashProtonShowerProfile
Definition: GflashProtonShowerProfile.h:6
CalorimetryManager::ecorr
double ecorr
Definition: CalorimetryManager.h:165
CalorimetryManager::pulledPadSurvivalProbability_
double pulledPadSurvivalProbability_
Definition: CalorimetryManager.h:138
CalorimetryManager::reconstructTrack
void reconstructTrack(FSimTrack &myTrack, RandomEngineAndDistribution const *)
Definition: CalorimetryManager.cc:185
CalorimetryManager::loadFromPreshower
void loadFromPreshower(edm::PCaloHitContainer &c) const
Definition: CalorimetryManager.cc:1194
CalorimetryManager::timeShiftHO_
std::vector< double > timeShiftHO_
Definition: CalorimetryManager.h:130
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
CalorimetryManager::radiusPreshowerCorrections_
std::vector< double > radiusPreshowerCorrections_
Definition: CalorimetryManager.h:143
CalorimetryManager::myHDResponse_
HCALResponse * myHDResponse_
Definition: CalorimetryManager.h:107
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
CalorimetryManager::reconstructHCAL
void reconstructHCAL(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
Definition: CalorimetryManager.cc:436
CalorimetryManager::theAntiProtonProfile
GflashAntiProtonShowerProfile * theAntiProtonProfile
Definition: CalorimetryManager.h:186
FamosDebug.h
CalorimetryManager::EEMapping_
std::vector< std::pair< CaloHitID, float > > EEMapping_
Definition: CalorimetryManager.h:111
CalorimetryManager::mipValues_
std::vector< double > mipValues_
Definition: CalorimetryManager.h:145
CalorimetryManager::ietaShiftHF_
int ietaShiftHF_
Definition: CalorimetryManager.h:126
CalorimetryManager::readParameters
void readParameters(const edm::ParameterSet &fastCalo)
Definition: CalorimetryManager.cc:906
FastHFShowerLibrary
Definition: FastHFShowerLibrary.h:38
CalorimetryManager::updateECAL
void updateECAL(const std::map< CaloHitID, float > &hitMap, int onEcal, int trackID=0, float corr=1.0)
Definition: CalorimetryManager.cc:1068
CalorimetryManager::theProtonProfile
GflashProtonShowerProfile * theProtonProfile
Definition: CalorimetryManager.h:185
CalorimetryManager::ESMapping_
std::vector< std::pair< CaloHitID, float > > ESMapping_
Definition: CalorimetryManager.h:113
edm::ParameterSet
Definition: ParameterSet.h:36
ParameterSet
Definition: Functions.h:16
CalorimetryManager
Definition: CalorimetryManager.h:45
CalorimetryManager::HDShowerSimulation
void HDShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
Hadronic Shower Simulation.
Definition: CalorimetryManager.cc:487
CalorimetryManager::aLandauGenerator
const LandauFluctuationGenerator * aLandauGenerator
Definition: CalorimetryManager.h:154
CalorimetryManager::ietaShiftHO_
int ietaShiftHO_
Definition: CalorimetryManager.h:126
CalorimetryManager::getHFShowerLibrary
FastHFShowerLibrary * getHFShowerLibrary() const
Definition: CalorimetryManager.h:64
CalorimetryManager::p_knots
std::vector< double > p_knots
Definition: CalorimetryManager.h:162
CalorimetryManager::RTFactor_
double RTFactor_
Definition: CalorimetryManager.h:148
CalorimetryManager::theCoreIntervals_
std::vector< double > theCoreIntervals_
Definition: CalorimetryManager.h:147
CalorimetryManager::bTerm
double bTerm
Definition: CalorimetryManager.h:144
CalorimetryManager::EMShowerSimulation
void EMShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
Definition: CalorimetryManager.cc:226
CalorimetryManager::initialized_
bool initialized_
Definition: CalorimetryManager.h:169
HCALResponse.h
CalorimetryManager::useCorrectionSL
bool useCorrectionSL
Definition: CalorimetryManager.h:190
CalorimetryManager::myCalorimeter_
CaloGeometryHelper * myCalorimeter_
Definition: CalorimetryManager.h:103
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
CalorimetryManager::loadFromEcalBarrel
void loadFromEcalBarrel(edm::PCaloHitContainer &c) const
Definition: CalorimetryManager.cc:1164
CalorimetryManager::rsp
std::vector< double > rsp
Definition: CalorimetryManager.h:161
CalorimetryManager::reconstruct
void reconstruct(RandomEngineAndDistribution const *)
Definition: CalorimetryManager.cc:146
CalorimetryManager::ecalCorrection
std::unique_ptr< KKCorrectionFactors > ecalCorrection
Definition: CalorimetryManager.h:193
GflashAntiProtonShowerProfile
Definition: GflashAntiProtonShowerProfile.h:6
HSParameters
Definition: HSParameters.h:12
CalorimetryManager::initialize
void initialize(RandomEngineAndDistribution const *random)
Definition: CalorimetryManager.cc:166
CalorimetryManager::radiusFactorEB_
double radiusFactorEB_
Definition: CalorimetryManager.h:142
CalorimetryManager::debug_
bool debug_
Definition: CalorimetryManager.h:115
CalorimetryManager::radiusFactorEE_
double radiusFactorEE_
Definition: CalorimetryManager.h:142
CalorimetryManager::loadMuonSimTracks
void loadMuonSimTracks(edm::SimTrackContainer &m) const
Definition: CalorimetryManager.cc:1206
CalorimetryManager::respCorr
void respCorr(double)
Definition: CalorimetryManager.cc:1028
CalorimetryManager::bFixedLength_
bool bFixedLength_
Definition: CalorimetryManager.h:180
edm::SimTrackContainer
std::vector< SimTrack > SimTrackContainer
Definition: SimTrackContainer.h:12
CalorimetryManager::timeShiftHB_
std::vector< double > timeShiftHB_
Definition: CalorimetryManager.h:127
KKCorrectionFactors.h
DetId.h
Histos
Definition: Histos.h:19
RawParticle.h
CalorimetryManager::clean
void clean()
Definition: CalorimetryManager.cc:119
CalorimetryManager::ietaShiftHE_
int ietaShiftHE_
Definition: CalorimetryManager.h:126
CalorimetryManager::myZero_
static std::vector< std::pair< int, float > > myZero_
Definition: CalorimetryManager.h:157
edm::PCaloHitContainer
std::vector< PCaloHit > PCaloHitContainer
Definition: PCaloHitContainer.h:8
CalorimetryManager::mySimEvent
FSimEvent * mySimEvent
Definition: CalorimetryManager.h:102
PCaloHitContainer.h
CalorimetryManager::samplingHO_
std::vector< double > samplingHO_
Definition: CalorimetryManager.h:125
CalorimetryManager::evtsToDebug_
std::vector< unsigned int > evtsToDebug_
Definition: CalorimetryManager.h:116
CalorimetryManager::savedMuonSimTracks
std::vector< FSimTrack > savedMuonSimTracks
Definition: CalorimetryManager.h:172
FSimTrack
Definition: FSimTrack.h:30
HCALResponse
Definition: HCALResponse.h:29
CalorimetryManager::theProfile
GflashHadronShowerProfile * theProfile
Definition: CalorimetryManager.h:183
CalorimetryManager::spotFraction_
double spotFraction_
Definition: CalorimetryManager.h:140
CalorimetryManager::ietaShiftHB_
int ietaShiftHB_
Definition: CalorimetryManager.h:126
GflashHadronShowerProfile
Definition: GflashHadronShowerProfile.h:15
CalorimetryManager::MuonMipSimulation
void MuonMipSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
Definition: CalorimetryManager.cc:724
CalorimetryManager::EBMapping_
std::vector< std::pair< CaloHitID, float > > EBMapping_
Definition: CalorimetryManager.h:110
CalorimetryManager::unfoldedMode_
bool unfoldedMode_
Definition: CalorimetryManager.h:118
CaloGeometryHelper
Definition: CaloGeometryHelper.h:18
CalorimetryManager::updateHCAL
void updateHCAL(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
Definition: CalorimetryManager.cc:1100
CalorimetryManager::getCalorimeter
CaloGeometryHelper * getCalorimeter() const
Definition: CalorimetryManager.h:61
LandauFluctuationGenerator
Definition: LandauFluctuationGenerator.h:20
SimTrackContainer.h
CalorimetryManager::crackPadSurvivalProbability_
double crackPadSurvivalProbability_
Definition: CalorimetryManager.h:139
CalorimetryManager::hcorr
double hcorr
Definition: CalorimetryManager.h:166
CalorimetryManager::updatePreshower
void updatePreshower(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
Definition: CalorimetryManager.cc:1148
GflashPiKShowerProfile
Definition: GflashPiKShowerProfile.h:6
CalorimetryManager::HMapping_
std::vector< std::pair< CaloHitID, float > > HMapping_
Definition: CalorimetryManager.h:112
CalorimetryManager::k_e
std::vector< double > k_e
Definition: CalorimetryManager.h:163
RandomEngineAndDistribution
Definition: RandomEngineAndDistribution.h:18