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 
18 // For the uint32_t
19 //#include <boost/cstdint.hpp>
20 #include <map>
21 #include <algorithm>
22 
23 class FSimEvent;
24 class FSimTrack;
25 class CaloGeometryHelper;
26 class Histos;
27 class HSParameters;
30 class MaterialEffects;
32 //Gflash
37 // FastHFshowerLibrary
39 
40 namespace edm {
41  class ParameterSet;
42 }
43 
45 public:
47  CalorimetryManager(FSimEvent* aSimEvent,
48  const edm::ParameterSet& fastCalo,
49  const edm::ParameterSet& MuonECALPars,
50  const edm::ParameterSet& MuonHCALPars,
51  const edm::ParameterSet& fastGflash);
53 
54  // Does the real job
55  void initialize(RandomEngineAndDistribution const* random);
58 
59  // Return the address of the Calorimeter
61 
62  // Return the address of the FastHFShowerLibrary
64 
65  // load container from edm::Event
67 
69 
71 
73 
75 
77 
78 private:
79  // Simulation of electromagnetic showers in PS, ECAL, HCAL
80  void EMShowerSimulation(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
81 
82  void reconstructHCAL(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
83 
84  void MuonMipSimulation(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
85 
87  void HDShowerSimulation(const FSimTrack& myTrack, RandomEngineAndDistribution const*);
88 
89  // Read the parameters
90  void readParameters(const edm::ParameterSet& fastCalo);
91 
92  void updateECAL(const std::map<CaloHitID, float>& hitMap, int onEcal, int trackID = 0, float corr = 1.0);
93  void updateHCAL(const std::map<CaloHitID, float>& hitMap, int trackID = 0, float corr = 1.0);
94  void updatePreshower(const std::map<CaloHitID, float>& hitMap, int trackID = 0, float corr = 1.0);
95 
96  void respCorr(double);
97 
98  void clean();
99 
100 private:
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_;
146  std::vector<double> theCoreIntervals_, theTailIntervals_;
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  std::vector<FSimTrack> savedMuonSimTracks;
172  MaterialEffects* theMuonEcalEffects; // material effects for muons in ECAL
173  MaterialEffects* theMuonHcalEffects; // material effects for muons in HCAL
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 #endif
CalorimetryManager::hdGridSize_
int hdGridSize_
Definition: CalorimetryManager.h:149
CalorimetryManager::hdSimMethod_
int hdSimMethod_
Definition: CalorimetryManager.h:149
CalorimetryManager::myPosi
RawParticle myPosi
Definition: CalorimetryManager.h:133
PreshowerHitMaker.h
CalorimetryManager::myElec
RawParticle myElec
A few pointers to save time.
Definition: CalorimetryManager.h:132
RawParticle
Definition: RawParticle.h:37
CalorimetryManager::aGammaGenerator
GammaFunctionGenerator * aGammaGenerator
Definition: CalorimetryManager.h:154
FSimEvent
Definition: FSimEvent.h:29
CalorimetryManager::useShowerLibrary
bool useShowerLibrary
Definition: CalorimetryManager.h:188
CalorimetryManager::myHSParameters_
HSParameters * myHSParameters_
Definition: CalorimetryManager.h:107
CalorimetryManager::~CalorimetryManager
~CalorimetryManager()
Definition: CalorimetryManager.cc:131
CalorimetryManager::theMuonEcalEffects
MaterialEffects * theMuonEcalEffects
Definition: CalorimetryManager.h:172
CalorimetryManager::harvestMuonSimTracks
void harvestMuonSimTracks(edm::SimTrackContainer &m) const
Definition: CalorimetryManager.cc:1227
edm
HLT enums.
Definition: AlignableModifier.h:19
CalorimetryManager::loadFromEcalEndcap
void loadFromEcalEndcap(edm::PCaloHitContainer &c) const
Definition: CalorimetryManager.cc:1177
CalorimetryManager::EcalDigitizer_
bool EcalDigitizer_
Definition: CalorimetryManager.h:120
CalorimetryManager::myHistos
Histos * myHistos
Definition: CalorimetryManager.h:104
CalorimetryManager::thePiKProfile
GflashPiKShowerProfile * thePiKProfile
Definition: CalorimetryManager.h:183
CalorimetryManager::theMuonHcalEffects
MaterialEffects * theMuonHcalEffects
Definition: CalorimetryManager.h:173
CalorimetryManager::aTerm
double aTerm
Definition: CalorimetryManager.h:143
CalorimetryManager::myPart
RawParticle myPart
Definition: CalorimetryManager.h:134
CalorimetryManager::HcalDigitizer_
bool HcalDigitizer_
Definition: CalorimetryManager.h:121
CalorimetryManager::muonSimTracks
std::vector< FSimTrack > muonSimTracks
Definition: CalorimetryManager.h:170
CalorimetryManager::simulatePreshower_
bool simulatePreshower_
Definition: CalorimetryManager.h:150
CalorimetryManager::samplingHF_
std::vector< double > samplingHF_
Definition: CalorimetryManager.h:123
CaloHitID.h
MaterialEffects
Definition: MaterialEffects.h:51
CalorimetryManager::loadFromHcal
void loadFromHcal(edm::PCaloHitContainer &c) const
Definition: CalorimetryManager.cc:1187
CalorimetryManager::theHFShowerLibrary
FastHFShowerLibrary * theHFShowerLibrary
Definition: CalorimetryManager.h:190
GammaFunctionGenerator
Definition: GammaFunctionGenerator.h:21
CalorimetryManager::samplingHBHE_
std::vector< double > samplingHBHE_
Definition: CalorimetryManager.h:122
EcalHitMaker.h
HcalHitMaker.h
CalorimetryManager::optionHDSim_
int optionHDSim_
Definition: CalorimetryManager.h:149
CalorimetryManager::gridSize_
int gridSize_
Definition: CalorimetryManager.h:145
CalorimetryManager::RCFactor_
double RCFactor_
Definition: CalorimetryManager.h:147
CalorimetryManager::CalorimetryManager
CalorimetryManager()
Definition: CalorimetryManager.cc:74
CalorimetryManager::k_h
std::vector< double > k_h
Definition: CalorimetryManager.h:163
CalorimetryManager::timeShiftHF_
std::vector< double > timeShiftHF_
Definition: CalorimetryManager.h:128
CalorimetryManager::timeShiftHE_
std::vector< double > timeShiftHE_
Definition: CalorimetryManager.h:127
CalorimetryManager::theTailIntervals_
std::vector< double > theTailIntervals_
Definition: CalorimetryManager.h:146
GflashProtonShowerProfile
Definition: GflashProtonShowerProfile.h:6
CalorimetryManager::ecorr
double ecorr
Definition: CalorimetryManager.h:164
CalorimetryManager::pulledPadSurvivalProbability_
double pulledPadSurvivalProbability_
Definition: CalorimetryManager.h:137
CalorimetryManager::reconstructTrack
void reconstructTrack(FSimTrack &myTrack, RandomEngineAndDistribution const *)
Definition: CalorimetryManager.cc:188
CalorimetryManager::loadFromPreshower
void loadFromPreshower(edm::PCaloHitContainer &c) const
Definition: CalorimetryManager.cc:1197
CalorimetryManager::timeShiftHO_
std::vector< double > timeShiftHO_
Definition: CalorimetryManager.h:129
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
CalorimetryManager::radiusPreshowerCorrections_
std::vector< double > radiusPreshowerCorrections_
Definition: CalorimetryManager.h:142
CalorimetryManager::myHDResponse_
HCALResponse * myHDResponse_
Definition: CalorimetryManager.h:106
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
CalorimetryManager::reconstructHCAL
void reconstructHCAL(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
Definition: CalorimetryManager.cc:439
CalorimetryManager::theAntiProtonProfile
GflashAntiProtonShowerProfile * theAntiProtonProfile
Definition: CalorimetryManager.h:185
FamosDebug.h
CalorimetryManager::EEMapping_
std::vector< std::pair< CaloHitID, float > > EEMapping_
Definition: CalorimetryManager.h:110
CalorimetryManager::mipValues_
std::vector< double > mipValues_
Definition: CalorimetryManager.h:144
CalorimetryManager::ietaShiftHF_
int ietaShiftHF_
Definition: CalorimetryManager.h:125
CalorimetryManager::readParameters
void readParameters(const edm::ParameterSet &fastCalo)
Definition: CalorimetryManager.cc:909
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:1071
CalorimetryManager::theProtonProfile
GflashProtonShowerProfile * theProtonProfile
Definition: CalorimetryManager.h:184
CalorimetryManager::ESMapping_
std::vector< std::pair< CaloHitID, float > > ESMapping_
Definition: CalorimetryManager.h:112
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
CalorimetryManager
Definition: CalorimetryManager.h:44
CalorimetryManager::HDShowerSimulation
void HDShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
Hadronic Shower Simulation.
Definition: CalorimetryManager.cc:490
CalorimetryManager::aLandauGenerator
const LandauFluctuationGenerator * aLandauGenerator
Definition: CalorimetryManager.h:153
CalorimetryManager::ietaShiftHO_
int ietaShiftHO_
Definition: CalorimetryManager.h:125
CalorimetryManager::getHFShowerLibrary
FastHFShowerLibrary * getHFShowerLibrary() const
Definition: CalorimetryManager.h:63
CalorimetryManager::p_knots
std::vector< double > p_knots
Definition: CalorimetryManager.h:161
CalorimetryManager::RTFactor_
double RTFactor_
Definition: CalorimetryManager.h:147
CalorimetryManager::theCoreIntervals_
std::vector< double > theCoreIntervals_
Definition: CalorimetryManager.h:146
CalorimetryManager::bTerm
double bTerm
Definition: CalorimetryManager.h:143
CalorimetryManager::EMShowerSimulation
void EMShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
Definition: CalorimetryManager.cc:229
CalorimetryManager::initialized_
bool initialized_
Definition: CalorimetryManager.h:168
HCALResponse.h
CalorimetryManager::useCorrectionSL
bool useCorrectionSL
Definition: CalorimetryManager.h:189
CalorimetryManager::myCalorimeter_
CaloGeometryHelper * myCalorimeter_
Definition: CalorimetryManager.h:102
CalorimetryManager::loadFromEcalBarrel
void loadFromEcalBarrel(edm::PCaloHitContainer &c) const
Definition: CalorimetryManager.cc:1167
CalorimetryManager::rsp
std::vector< double > rsp
Definition: CalorimetryManager.h:160
CalorimetryManager::reconstruct
void reconstruct(RandomEngineAndDistribution const *)
Definition: CalorimetryManager.cc:149
CalorimetryManager::ecalCorrection
std::unique_ptr< KKCorrectionFactors > ecalCorrection
Definition: CalorimetryManager.h:192
GflashAntiProtonShowerProfile
Definition: GflashAntiProtonShowerProfile.h:6
HSParameters
Definition: HSParameters.h:12
CalorimetryManager::initialize
void initialize(RandomEngineAndDistribution const *random)
Definition: CalorimetryManager.cc:169
CalorimetryManager::radiusFactorEB_
double radiusFactorEB_
Definition: CalorimetryManager.h:141
CalorimetryManager::debug_
bool debug_
Definition: CalorimetryManager.h:114
CalorimetryManager::radiusFactorEE_
double radiusFactorEE_
Definition: CalorimetryManager.h:141
CalorimetryManager::loadMuonSimTracks
void loadMuonSimTracks(edm::SimTrackContainer &m) const
Definition: CalorimetryManager.cc:1209
CalorimetryManager::respCorr
void respCorr(double)
Definition: CalorimetryManager.cc:1031
CalorimetryManager::bFixedLength_
bool bFixedLength_
Definition: CalorimetryManager.h:179
edm::SimTrackContainer
std::vector< SimTrack > SimTrackContainer
Definition: SimTrackContainer.h:12
CalorimetryManager::timeShiftHB_
std::vector< double > timeShiftHB_
Definition: CalorimetryManager.h:126
KKCorrectionFactors.h
DetId.h
Histos
Definition: Histos.h:19
CalorimetryManager::clean
void clean()
Definition: CalorimetryManager.cc:122
CalorimetryManager::ietaShiftHE_
int ietaShiftHE_
Definition: CalorimetryManager.h:125
CalorimetryManager::myZero_
static std::vector< std::pair< int, float > > myZero_
Definition: CalorimetryManager.h:156
edm::PCaloHitContainer
std::vector< PCaloHit > PCaloHitContainer
Definition: PCaloHitContainer.h:8
CalorimetryManager::mySimEvent
FSimEvent * mySimEvent
Definition: CalorimetryManager.h:101
PCaloHitContainer.h
CalorimetryManager::samplingHO_
std::vector< double > samplingHO_
Definition: CalorimetryManager.h:124
CalorimetryManager::evtsToDebug_
std::vector< unsigned int > evtsToDebug_
Definition: CalorimetryManager.h:115
CalorimetryManager::savedMuonSimTracks
std::vector< FSimTrack > savedMuonSimTracks
Definition: CalorimetryManager.h:171
FSimTrack
Definition: FSimTrack.h:30
HCALResponse
Definition: HCALResponse.h:29
CalorimetryManager::theProfile
GflashHadronShowerProfile * theProfile
Definition: CalorimetryManager.h:182
CalorimetryManager::spotFraction_
double spotFraction_
Definition: CalorimetryManager.h:139
CalorimetryManager::ietaShiftHB_
int ietaShiftHB_
Definition: CalorimetryManager.h:125
GflashHadronShowerProfile
Definition: GflashHadronShowerProfile.h:15
CalorimetryManager::MuonMipSimulation
void MuonMipSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
Definition: CalorimetryManager.cc:727
CalorimetryManager::EBMapping_
std::vector< std::pair< CaloHitID, float > > EBMapping_
Definition: CalorimetryManager.h:109
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
CalorimetryManager::unfoldedMode_
bool unfoldedMode_
Definition: CalorimetryManager.h:117
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:1103
CalorimetryManager::getCalorimeter
CaloGeometryHelper * getCalorimeter() const
Definition: CalorimetryManager.h:60
LandauFluctuationGenerator
Definition: LandauFluctuationGenerator.h:20
SimTrackContainer.h
CalorimetryManager::crackPadSurvivalProbability_
double crackPadSurvivalProbability_
Definition: CalorimetryManager.h:138
CalorimetryManager::hcorr
double hcorr
Definition: CalorimetryManager.h:165
CalorimetryManager::updatePreshower
void updatePreshower(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
Definition: CalorimetryManager.cc:1151
GflashPiKShowerProfile
Definition: GflashPiKShowerProfile.h:6
CalorimetryManager::HMapping_
std::vector< std::pair< CaloHitID, float > > HMapping_
Definition: CalorimetryManager.h:111
CalorimetryManager::k_e
std::vector< double > k_e
Definition: CalorimetryManager.h:162
RandomEngineAndDistribution
Definition: RandomEngineAndDistribution.h:18