CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
CalorimetryManager Class Reference

#include <CalorimetryManager.h>

Public Member Functions

 CalorimetryManager ()
 
 CalorimetryManager (FSimEvent *aSimEvent, const edm::ParameterSet &fastCalo, const edm::ParameterSet &MuonECALPars, const edm::ParameterSet &MuonHCALPars, const edm::ParameterSet &fastGflash, edm::ConsumesCollector &&)
 
CaloGeometryHelpergetCalorimeter () const
 
FastHFShowerLibrarygetHFShowerLibrary () const
 
void harvestMuonSimTracks (edm::SimTrackContainer &m) const
 
void initialize (RandomEngineAndDistribution const *random)
 
void loadFromEcalBarrel (edm::PCaloHitContainer &c) const
 
void loadFromEcalEndcap (edm::PCaloHitContainer &c) const
 
void loadFromHcal (edm::PCaloHitContainer &c) const
 
void loadFromPreshower (edm::PCaloHitContainer &c) const
 
void loadMuonSimTracks (edm::SimTrackContainer &m) const
 
void reconstruct (RandomEngineAndDistribution const *)
 
void reconstructTrack (FSimTrack &myTrack, RandomEngineAndDistribution const *)
 
 ~CalorimetryManager ()
 

Private Member Functions

void clean ()
 
void EMShowerSimulation (const FSimTrack &myTrack, RandomEngineAndDistribution const *)
 
void HDShowerSimulation (const FSimTrack &myTrack, RandomEngineAndDistribution const *)
 Hadronic Shower Simulation. More...
 
void MuonMipSimulation (const FSimTrack &myTrack, RandomEngineAndDistribution const *)
 
void readParameters (const edm::ParameterSet &fastCalo)
 
void reconstructHCAL (const FSimTrack &myTrack, RandomEngineAndDistribution const *)
 
void respCorr (double)
 
void updateECAL (const std::map< CaloHitID, float > &hitMap, int onEcal, int trackID=0, float corr=1.0)
 
void updateHCAL (const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
 
void updatePreshower (const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
 

Private Attributes

GammaFunctionGeneratoraGammaGenerator
 
const LandauFluctuationGeneratoraLandauGenerator
 
double aTerm
 
bool bFixedLength_
 
double bTerm
 
double crackPadSurvivalProbability_
 
bool debug_
 
std::vector< std::pair< CaloHitID, float > > EBMapping_
 
std::unique_ptr< KKCorrectionFactorsecalCorrection
 
bool EcalDigitizer_
 
double ecorr
 
std::vector< std::pair< CaloHitID, float > > EEMapping_
 
std::vector< std::pair< CaloHitID, float > > ESMapping_
 
std::vector< unsigned int > evtsToDebug_
 
int gridSize_
 
bool HcalDigitizer_
 
double hcorr
 
int hdGridSize_
 
int hdSimMethod_
 
std::vector< std::pair< CaloHitID, float > > HMapping_
 
int ietaShiftHB_
 
int ietaShiftHE_
 
int ietaShiftHF_
 
int ietaShiftHO_
 
bool initialized_
 
std::vector< double > k_e
 
std::vector< double > k_h
 
std::vector< double > mipValues_
 
std::vector< FSimTrackmuonSimTracks
 
CaloGeometryHelpermyCalorimeter_
 
RawParticle myElec
 A few pointers to save time. More...
 
HCALResponsemyHDResponse_
 
HistosmyHistos
 
HSParametersmyHSParameters_
 
RawParticle myPart
 
RawParticle myPosi
 
FSimEventmySimEvent
 
int optionHDSim_
 
std::vector< double > p_knots
 
double pulledPadSurvivalProbability_
 
double radiusFactorEB_
 
double radiusFactorEE_
 
std::vector< double > radiusPreshowerCorrections_
 
double RCFactor_
 
std::vector< double > rsp
 
double RTFactor_
 
std::vector< double > samplingHBHE_
 
std::vector< double > samplingHF_
 
std::vector< double > samplingHO_
 
std::vector< FSimTracksavedMuonSimTracks
 
bool simulatePreshower_
 
double spotFraction_
 
GflashAntiProtonShowerProfiletheAntiProtonProfile
 
std::vector< double > theCoreIntervals_
 
FastHFShowerLibrarytheHFShowerLibrary
 
MaterialEffectstheMuonEcalEffects
 
MaterialEffectstheMuonHcalEffects
 
GflashPiKShowerProfilethePiKProfile
 
GflashHadronShowerProfiletheProfile
 
GflashProtonShowerProfiletheProtonProfile
 
std::vector< double > theTailIntervals_
 
std::vector< double > timeShiftHB_
 
std::vector< double > timeShiftHE_
 
std::vector< double > timeShiftHF_
 
std::vector< double > timeShiftHO_
 
bool unfoldedMode_
 
bool useCorrectionSL
 
bool useShowerLibrary
 

Static Private Attributes

static std::vector< std::pair< int, float > > myZero_
 

Detailed Description

Definition at line 42 of file CalorimetryManager.h.

Constructor & Destructor Documentation

◆ CalorimetryManager() [1/2]

CalorimetryManager::CalorimetryManager ( )

Definition at line 72 of file CalorimetryManager.cc.

72 : myCalorimeter_(nullptr), initialized_(false) { ; }
CaloGeometryHelper * myCalorimeter_

◆ CalorimetryManager() [2/2]

CalorimetryManager::CalorimetryManager ( FSimEvent aSimEvent,
const edm::ParameterSet fastCalo,
const edm::ParameterSet MuonECALPars,
const edm::ParameterSet MuonHCALPars,
const edm::ParameterSet fastGflash,
edm::ConsumesCollector &&  iC 
)

Definition at line 74 of file CalorimetryManager.cc.

References aGammaGenerator, aLandauGenerator, ecalCorrection, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), HcalResponse_cfi::HCALResponse, HSParameters_cfi::HSParameters, MaterialEffects_cfi::MaterialEffects, eostools::move(), myCalorimeter_, myHDResponse_, myHSParameters_, readParameters(), theAntiProtonProfile, theHFShowerLibrary, theMuonEcalEffects, theMuonHcalEffects, thePiKProfile, theProfile, and theProtonProfile.

80  : mySimEvent(aSimEvent),
81  initialized_(false),
82  theMuonEcalEffects(nullptr),
83  theMuonHcalEffects(nullptr),
84  bFixedLength_(false) {
87 
88  //Gflash
89  theProfile = new GflashHadronShowerProfile(parGflash);
90  thePiKProfile = new GflashPiKShowerProfile(parGflash);
93 
94  // FastHFShowerLibrary
96 
97  readParameters(fastCalo);
98 
99  myCalorimeter_ = new CaloGeometryHelper(fastCalo);
100  myHDResponse_ = new HCALResponse(fastCalo.getParameter<edm::ParameterSet>("HCALResponse"));
101  myHSParameters_ = new HSParameters(fastCalo.getParameter<edm::ParameterSet>("HSParameters"));
102 
103  // Material Effects for Muons in ECAL (only EnergyLoss implemented so far)
104  if (fastMuECAL.getParameter<bool>("PairProduction") || fastMuECAL.getParameter<bool>("Bremsstrahlung") ||
105  fastMuECAL.getParameter<bool>("MuonBremsstrahlung") || fastMuECAL.getParameter<bool>("EnergyLoss") ||
106  fastMuECAL.getParameter<bool>("MultipleScattering"))
107  theMuonEcalEffects = new MaterialEffects(fastMuECAL);
108 
109  // Material Effects for Muons in HCAL (only EnergyLoss implemented so far)
110  if (fastMuHCAL.getParameter<bool>("PairProduction") || fastMuHCAL.getParameter<bool>("Bremsstrahlung") ||
111  fastMuHCAL.getParameter<bool>("MuonBremsstrahlung") || fastMuHCAL.getParameter<bool>("EnergyLoss") ||
112  fastMuHCAL.getParameter<bool>("MultipleScattering"))
113  theMuonHcalEffects = new MaterialEffects(fastMuHCAL);
114 
115  if (fastCalo.exists("ECALResponseScaling")) {
117  std::make_unique<KKCorrectionFactors>(fastCalo.getParameter<edm::ParameterSet>("ECALResponseScaling"));
118  }
119 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
GflashPiKShowerProfile * thePiKProfile
MaterialEffects * theMuonEcalEffects
MaterialEffects * theMuonHcalEffects
bool exists(std::string const &parameterName) const
checks if a parameter exists
GflashHadronShowerProfile * theProfile
void readParameters(const edm::ParameterSet &fastCalo)
const LandauFluctuationGenerator * aLandauGenerator
GflashAntiProtonShowerProfile * theAntiProtonProfile
GflashProtonShowerProfile * theProtonProfile
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
GammaFunctionGenerator * aGammaGenerator
FastHFShowerLibrary * theHFShowerLibrary
std::unique_ptr< KKCorrectionFactors > ecalCorrection
HSParameters * myHSParameters_
def move(src, dest)
Definition: eostools.py:511

◆ ~CalorimetryManager()

CalorimetryManager::~CalorimetryManager ( )

Definition at line 130 of file CalorimetryManager.cc.

References myCalorimeter_, myHDResponse_, theHFShowerLibrary, theMuonEcalEffects, theMuonHcalEffects, and theProfile.

130  {
131  if (myCalorimeter_)
132  delete myCalorimeter_;
133  if (myHDResponse_)
134  delete myHDResponse_;
135 
136  if (theMuonEcalEffects)
137  delete theMuonEcalEffects;
138  if (theMuonHcalEffects)
139  delete theMuonHcalEffects;
140 
141  if (theProfile)
142  delete theProfile;
143 
144  if (theHFShowerLibrary)
145  delete theHFShowerLibrary;
146 }
MaterialEffects * theMuonEcalEffects
MaterialEffects * theMuonHcalEffects
GflashHadronShowerProfile * theProfile
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
FastHFShowerLibrary * theHFShowerLibrary

Member Function Documentation

◆ clean()

void CalorimetryManager::clean ( )
private

Definition at line 121 of file CalorimetryManager.cc.

References EBMapping_, EEMapping_, ESMapping_, HMapping_, muonSimTracks, and savedMuonSimTracks.

Referenced by initialize().

121  {
122  EBMapping_.clear();
123  EEMapping_.clear();
124  HMapping_.clear();
125  ESMapping_.clear();
126  muonSimTracks.clear();
127  savedMuonSimTracks.clear();
128 }
std::vector< FSimTrack > muonSimTracks
std::vector< std::pair< CaloHitID, float > > ESMapping_
std::vector< std::pair< CaloHitID, float > > HMapping_
std::vector< FSimTrack > savedMuonSimTracks
std::vector< std::pair< CaloHitID, float > > EEMapping_
std::vector< std::pair< CaloHitID, float > > EBMapping_

◆ EMShowerSimulation()

void CalorimetryManager::EMShowerSimulation ( const FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)
private

Definition at line 228 of file CalorimetryManager.cc.

References funct::abs(), aGammaGenerator, aLandauGenerator, aTerm, bFixedLength_, bTerm, EMShower::compute(), crackPadSurvivalProbability_, debug_, LEDCalibrationChannels::depth, L1TDiffHarvesting_cfi::dir1, L1TDiffHarvesting_cfi::dir2, MillePedeFileConverter_cfg::e, RawParticle::e(), ecalCorrection, FSimTrack::ecalEntrance(), Calorimeter::ecalProperties(), fastsim::Constants::eMass, RawParticle::eta(), RandomEngineAndDistribution::flatShoot(), CaloGeometryHelper::getClosestCell(), PreshowerHitMaker::getHits(), HcalHitMaker::getHits(), EcalHitMaker::getHits(), EMShower::getMaximumOfShower(), gridSize_, FSimTrack::hcalEntrance(), Calorimeter::hcalProperties(), FSimTrack::id(), FSimTrack::layer1Entrance(), Calorimeter::layer1Properties(), FSimTrack::layer2Entrance(), Calorimeter::layer2Properties(), dqm-mbProfile::log, particleFlowClusterECALTimeSelected_cfi::maxEnergy, mipValues_, RawParticle::momentum(), myCalorimeter_, myElec, myPart, myPosi, FSimTrack::onEcal(), FSimTrack::onHcal(), FSimTrack::onLayer1(), FSimTrack::onLayer2(), pulledPadSurvivalProbability_, radiusFactorEB_, radiusFactorEE_, ECALProperties::radLenIncm(), RCFactor_, RTFactor_, L1EGammaClusterEmuProducer_cfi::scale, EcalHitMaker::setCrackPadSurvivalProbability(), EMShower::setGrid(), EMShower::setHcal(), PreshowerHitMaker::setMipEnergy(), EMShower::setPreshower(), EcalHitMaker::setPreshowerPresent(), EcalHitMaker::setPulledPadSurvivalProbability(), EcalHitMaker::setRadiusFactor(), EcalHitMaker::setTrackParameters(), RawParticle::setVertex(), simulatePreshower_, findQualityFiles::size, theCoreIntervals_, theTailIntervals_, CoreSimTrack::type(), updateECAL(), updateHCAL(), updatePreshower(), RawParticle::Vect(), and RawParticle::vertex().

Referenced by reconstructTrack().

228  {
229  std::vector<const RawParticle*> thePart;
230  double X0depth;
231 
232  if (debug_) {
233  LogInfo("FastCalorimetry") << " EMShowerSimulation " << myTrack << std::endl;
234  }
235 
236  // The Particle at ECAL entrance
237  myPart = myTrack.ecalEntrance();
238 
239  // protection against infinite loop.
240  if (myTrack.type() == 22 && myPart.e() < 0.055)
241  return;
242 
243  // Barrel or Endcap ?
244  int onEcal = myTrack.onEcal();
245  int onHcal = myTrack.onHcal();
246  int onLayer1 = myTrack.onLayer1();
247  int onLayer2 = myTrack.onLayer2();
248 
249  // The entrance in ECAL
250  XYZPoint ecalentrance = myPart.vertex().Vect();
251 
252  // The preshower
253  PreshowerHitMaker* myPreshower = nullptr;
254  if (simulatePreshower_ && (onLayer1 || onLayer2)) {
255  XYZPoint layer1entrance, layer2entrance;
257  if (onLayer1) {
258  layer1entrance = XYZPoint(myTrack.layer1Entrance().vertex().Vect());
259  dir1 = XYZVector(myTrack.layer1Entrance().Vect().Unit());
260  }
261  if (onLayer2) {
262  layer2entrance = XYZPoint(myTrack.layer2Entrance().vertex().Vect());
263  dir2 = XYZVector(myTrack.layer2Entrance().Vect().Unit());
264  }
265  myPreshower =
266  new PreshowerHitMaker(myCalorimeter_, layer1entrance, dir1, layer2entrance, dir2, aLandauGenerator, random);
267  myPreshower->setMipEnergy(mipValues_[0], mipValues_[1]);
268  }
269 
270  // The ECAL Properties
273  myCalorimeter_->layer1Properties(onLayer1),
274  myCalorimeter_->layer2Properties(onLayer2),
277  RCFactor_,
278  RTFactor_);
279 
280  // Photons : create an e+e- pair
281  if (myTrack.type() == 22) {
282  // Depth for the first e+e- pair creation (in X0)
283  X0depth = -log(random->flatShoot()) * (9. / 7.);
284 
285  // Initialization
286  double eMass = 0.000510998902;
287  double xe = 0;
288  double xm = eMass / myPart.e();
289  double weight = 0.;
290 
291  // Generate electron energy between emass and eGamma-emass
292  do {
293  xe = random->flatShoot() * (1. - 2. * xm) + xm;
294  weight = 1. - 4. / 3. * xe * (1. - xe);
295  } while (weight < random->flatShoot());
296 
297  // Protection agains infinite loop in Famos Shower
298  if (myPart.e() * xe < 0.055 || myPart.e() * (1. - xe) < 0.055) {
299  if (myPart.e() > 0.055)
300  thePart.push_back(&myPart);
301 
302  } else {
303  myElec = (myPart.momentum()) * xe;
304  myPosi = (myPart.momentum()) * (1. - xe);
307  thePart.push_back(&myElec);
308  thePart.push_back(&myPosi);
309  }
310  // Electrons
311  } else {
312  X0depth = 0.;
313  if (myPart.e() > 0.055)
314  thePart.push_back(&myPart);
315  }
316 
317  // After the different protections, this shouldn't happen.
318  if (thePart.empty()) {
319  if (myPreshower == nullptr)
320  return;
321  delete myPreshower;
322  return;
323  }
324 
325  // find the most energetic particle
326  double maxEnergy = -1.;
327  for (unsigned ip = 0; ip < thePart.size(); ++ip)
328  if (thePart[ip]->e() > maxEnergy)
329  maxEnergy = thePart[ip]->e();
330 
331  // Initialize the Grid in ECAL
332  int size = gridSize_;
333  if (maxEnergy > 100)
334  size = 11;
335 
336  EMShower theShower(random, aGammaGenerator, &showerparam, &thePart, nullptr, nullptr, bFixedLength_);
337 
338  double maxShower = theShower.getMaximumOfShower();
339  if (maxShower > 20.)
340  maxShower = 2.; // simple pivot-searching protection
341 
342  double depth((X0depth + maxShower) * myCalorimeter_->ecalProperties(onEcal)->radLenIncm());
343  XYZPoint meanShower = ecalentrance + myPart.Vect().Unit() * depth;
344 
345  // The closest crystal
346  DetId pivot(myCalorimeter_->getClosestCell(meanShower, true, onEcal == 1));
347 
348  if (pivot.subdetId() == 0) { // further protection against avbsence of pivot
349  edm::LogWarning("CalorimetryManager")
350  << "Pivot for egamma e = " << myTrack.hcalEntrance().e() << " is not found at depth " << depth
351  << " and meanShower coordinates = " << meanShower << std::endl;
352  if (myPreshower)
353  delete myPreshower;
354  return;
355  }
356 
357  EcalHitMaker myGrid(myCalorimeter_, ecalentrance, pivot, onEcal, size, 0, random);
358  // ^^^^
359  // for EM showers
360  myGrid.setPulledPadSurvivalProbability(pulledPadSurvivalProbability_);
361  myGrid.setCrackPadSurvivalProbability(crackPadSurvivalProbability_);
362 
363  //maximumdepth dependence of the radiusfactorbehindpreshower
364  //First tuning: Shilpi Jain (Mar-Apr 2010); changed after tuning - Feb-July - Shilpi Jain
365  /* **************
366  myGrid.setRadiusFactor(radiusFactor_);
367  if(onLayer1 || onLayer2)
368  {
369  float b = radiusPreshowerCorrections_[0];
370  float a = radiusFactor_*( 1.+radiusPreshowerCorrections_[1]*radiusPreshowerCorrections_[0] );
371  float maxdepth = X0depth+theShower.getMaximumOfShower();
372  float newRadiusFactor = radiusFactor_;
373  if(myPart.e()<=250.)
374  {
375  newRadiusFactor = a/(1.+b*maxdepth);
376  }
377  myGrid.setRadiusFactor(newRadiusFactor);
378  }
379  else // otherwise use the normal radius factor
380  {
381  myGrid.setRadiusFactor(radiusFactor_);
382  }
383  ************** */
384  if (myTrack.onEcal() == 2) // if on EE
385  {
386  if ((onLayer1 || onLayer2) && myPart.e() <= 250.) {
387  double maxdepth = X0depth + theShower.getMaximumOfShower();
388  double newRadiusFactor = radiusFactorEE_ * aTerm / (1. + bTerm * maxdepth);
389  myGrid.setRadiusFactor(newRadiusFactor);
390  } else // otherwise use the normal radius factor
391  {
392  myGrid.setRadiusFactor(radiusFactorEE_);
393  }
394  } //if(myTrack.onEcal() == 2)
395  else // else if on EB
396  {
397  myGrid.setRadiusFactor(radiusFactorEB_);
398  }
399  //(end of) changed after tuning - Feb-July - Shilpi Jain
400 
401  myGrid.setPreshowerPresent(simulatePreshower_);
402 
403  // The shower simulation
404  myGrid.setTrackParameters(myPart.Vect().Unit(), X0depth, myTrack);
405 
406  if (myPreshower)
407  theShower.setPreshower(myPreshower);
408 
409  HcalHitMaker myHcalHitMaker(myGrid, (unsigned)0);
410 
411  theShower.setGrid(&myGrid);
412  theShower.setHcal(&myHcalHitMaker);
413  theShower.compute();
414 
415  // calculate the total simulated energy for this particle
416  float simE = 0;
417  for (const auto& mapIterator : myGrid.getHits()) {
418  simE += mapIterator.second;
419  }
420 
421  auto scale = ecalCorrection
422  ? ecalCorrection->getScale(myTrack.ecalEntrance().e(), std::abs(myTrack.ecalEntrance().eta()), simE)
423  : 1.;
424 
425  // Save the hits !
426  updateECAL(myGrid.getHits(), onEcal, myTrack.id(), scale);
427 
428  // Now fill the HCAL hits
429  updateHCAL(myHcalHitMaker.getHits(), myTrack.id());
430 
431  // delete the preshower
432  if (myPreshower != nullptr) {
433  updatePreshower(myPreshower->getHits(), myTrack.id());
434  delete myPreshower;
435  }
436 }
size
Write out results.
RawParticle myElec
A few pointers to save time.
double radLenIncm() const override
Radiation length in cm.
DetId getClosestCell(const XYZPoint &point, bool ecal, bool central) const
void updateHCAL(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:146
const PreshowerLayer1Properties * layer1Properties(int onLayer1) const
Preshower Layer1 properties.
Definition: Calorimeter.cc:103
const RawParticle & layer2Entrance() const
The particle at Preshower Layer 2.
Definition: FSimTrack.h:140
void updatePreshower(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
const RawParticle & ecalEntrance() const
The particle at ECAL entrance.
Definition: FSimTrack.h:143
const ECALProperties * ecalProperties(int onEcal) const
ECAL properties.
Definition: Calorimeter.cc:78
const PreshowerLayer2Properties * layer2Properties(int onLayer2) const
Preshower Layer2 properties.
Definition: Calorimeter.cc:110
const std::map< CaloHitID, float > & getHits() override
Definition: weight.py:1
void updateECAL(const std::map< CaloHitID, float > &hitMap, int onEcal, int trackID=0, float corr=1.0)
int onHcal() const
Definition: FSimTrack.h:116
const XYZTLorentzVector & momentum() const
the momentum fourvector
Definition: RawParticle.h:321
static double constexpr eMass
Electron mass[GeV].
Definition: Constants.h:13
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:22
const LandauFluctuationGenerator * aLandauGenerator
math::XYZVector XYZVector
double eta() const
Definition: RawParticle.h:279
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int onLayer2() const
Definition: FSimTrack.h:106
int onLayer1() const
Definition: FSimTrack.h:101
std::vector< double > theTailIntervals_
int onEcal() const
Definition: FSimTrack.h:111
CaloGeometryHelper * myCalorimeter_
std::vector< double > theCoreIntervals_
Log< level::Info, false > LogInfo
XYZVector Vect() const
the momentum threevector
Definition: RawParticle.h:323
Definition: DetId.h:17
GammaFunctionGenerator * aGammaGenerator
std::vector< double > mipValues_
math::XYZVector XYZPoint
void setMipEnergy(double e1, double e2)
Log< level::Warning, false > LogWarning
math::XYZVector XYZVector
Definition: RawParticle.h:26
const RawParticle & layer1Entrance() const
The particle at Preshower Layer 1.
Definition: FSimTrack.h:137
std::unique_ptr< KKCorrectionFactors > ecalCorrection
const HCALProperties * hcalProperties(int onHcal) const
HCAL properties.
Definition: Calorimeter.cc:88
double e() const
energy of the momentum
Definition: RawParticle.h:305
void setVertex(const XYZTLorentzVector &vtx)
set the vertex
Definition: RawParticle.h:325
int id() const
the index in FBaseSimEvent and other vectors
Definition: FSimTrack.h:96
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:320

◆ getCalorimeter()

CaloGeometryHelper* CalorimetryManager::getCalorimeter ( ) const
inline

Definition at line 59 of file CalorimetryManager.h.

References myCalorimeter_.

59 { return myCalorimeter_; }
CaloGeometryHelper * myCalorimeter_

◆ getHFShowerLibrary()

FastHFShowerLibrary* CalorimetryManager::getHFShowerLibrary ( ) const
inline

Definition at line 62 of file CalorimetryManager.h.

References theHFShowerLibrary.

62 { return theHFShowerLibrary; }
FastHFShowerLibrary * theHFShowerLibrary

◆ harvestMuonSimTracks()

void CalorimetryManager::harvestMuonSimTracks ( edm::SimTrackContainer m) const

Definition at line 1226 of file CalorimetryManager.cc.

References HltBtagPostValidation_cff::c, muonSimTracks, savedMuonSimTracks, and HLT_2022v15_cff::track.

1226  {
1227  c.reserve(int(0.2 * muonSimTracks.size() + 0.2 * savedMuonSimTracks.size() + 0.5));
1228  for (const auto& track : muonSimTracks) {
1229  if (track.momentum().perp2() > 1.0 && fabs(track.momentum().eta()) < 3.0 && track.isGlobal())
1230  c.push_back(track);
1231  }
1232  for (const auto& track : savedMuonSimTracks) {
1233  if (track.momentum().perp2() > 1.0 && fabs(track.momentum().eta()) < 3.0 && track.isGlobal())
1234  c.push_back(track);
1235  }
1236  c.shrink_to_fit();
1237 }
std::vector< FSimTrack > muonSimTracks
std::vector< FSimTrack > savedMuonSimTracks

◆ HDShowerSimulation()

void CalorimetryManager::HDShowerSimulation ( const FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)
private

Hadronic Shower Simulation.

Definition at line 489 of file CalorimetryManager.cc.

References funct::abs(), HcalHitMaker::addHit(), ALCARECOTkAlJpsiMuMu_cff::charge, FSimTrack::charge(), HFShower::compute(), HDShower::compute(), HDRShower::computeShower(), HCALResponse::correctHF(), pfMETCorrectionType0_cfi::correction, debug_, RawParticle::e(), FSimTrack::ecalEntrance(), Calorimeter::ecalProperties(), ecorr, dqmMemoryStats::float, Gflash::getCalorimeterNumber(), CaloGeometryHelper::getClosestCell(), GflashHadronShowerProfile::getGflashHitList(), GflashHadronShowerProfile::getGflashShowino(), GflashTrajectory::getGflashTrajectoryPoint(), HCALResponse::getHCALEnergyResponse(), Calorimeter::getHcalGeometry(), GflashShowino::getHelix(), HcalHitMaker::getHits(), FastHFShowerLibrary::getHitsMap(), HDShower::getmip(), HCALResponse::getMIPfraction(), GflashShowino::getPathLengthAtShower(), GflashShowino::getPathLengthOnEcal(), GflashHadronShowerProfile::hadronicParameterization(), FSimTrack::hcalEntrance(), Calorimeter::hcalProperties(), hcorr, hdGridSize_, hdSimMethod_, FSimTrack::id(), GflashHadronShowerProfile::initialize(), Gflash::intLength, Gflash::kENCA, Gflash::kESPM, Gflash::kHB, Gflash::kHE, Gflash::kNULL, GflashHadronShowerProfile::loadParameters(), SiStripPI::max, FSimTrack::momentum(), myCalorimeter_, myHDResponse_, myHSParameters_, myPart, DetId::null(), FSimTrack::onEcal(), FSimTrack::onHcal(), FSimTrack::onVFcal(), optionHDSim_, PbPb_ZMuSkimMuonDPG_cff::particleType, DetId::rawId(), FastHFShowerLibrary::recoHFShowerLibrary(), respCorr(), HCALResponse::responseHCAL(), HcalHitMaker::setDepth(), FastHFShowerLibrary::SetRandom(), HcalHitMaker::setSpotEnergy(), EcalHitMaker::setTrackParameters(), mps_update::status, theAntiProtonProfile, theHFShowerLibrary, thePiKProfile, theProfile, theProtonProfile, CoreSimTrack::type(), updateECAL(), updateHCAL(), useShowerLibrary, RawParticle::Vect(), RawParticle::vertex(), and FSimTrack::vfcalEntrance().

Referenced by reconstructTrack().

489  { //,
490  // const edm::ParameterSet& fastCalo){
491 
492  theHFShowerLibrary->SetRandom(random);
493 
494  // TimeMe t(" FASTEnergyReconstructor::HDShower");
495  const XYZTLorentzVector& moment = myTrack.momentum();
496 
497  if (debug_)
498  LogInfo("FastCalorimetry") << "CalorimetryManager::HDShowerSimulation - track param." << std::endl
499  << " eta = " << moment.eta() << std::endl
500  << " phi = " << moment.phi() << std::endl
501  << " et = " << moment.Et() << std::endl
502  << " e = " << myTrack.hcalEntrance().e() << std::endl;
503 
504  if (debug_) {
505  LogInfo("FastCalorimetry") << " HDShowerSimulation " << myTrack << std::endl;
506  }
507 
508  int hit;
509 
510  XYZTLorentzVector trackPosition;
511  if (myTrack.onEcal()) {
512  trackPosition = myTrack.ecalEntrance().vertex();
513  hit = myTrack.onEcal() - 1; //
514  myPart = myTrack.ecalEntrance();
515  } else if (myTrack.onVFcal()) {
516  trackPosition = myTrack.vfcalEntrance().vertex();
517  hit = 2;
518  myPart = myTrack.vfcalEntrance();
519  } else {
520  LogInfo("FastCalorimetry") << " The particle is not in the acceptance " << std::endl;
521  return;
522  }
523 
524  // int onHCAL = hit + 1; - specially for myCalorimeter->hcalProperties(onHCAL)
525  // (below) to get VFcal properties ...
526  int onHCAL = hit + 1;
527  int onECAL = myTrack.onEcal();
528 
529  double pathEta = trackPosition.eta();
530  double pathPhi = trackPosition.phi();
531 
532  double eint = moment.e();
533  double eGen = myTrack.hcalEntrance().e();
534 
535  double emeas = 0.;
536  double pmip = myHDResponse_->getMIPfraction(eGen, pathEta);
537 
538  //===========================================================================
539  if (eGen > 0.) {
540  // ECAL and HCAL properties to get
541  HDShowerParametrization theHDShowerparam(
543 
544  //Making ECAL Grid (and segments calculation)
545  XYZPoint caloentrance;
546  XYZVector direction;
547  if (myTrack.onEcal()) {
548  caloentrance = myTrack.ecalEntrance().vertex().Vect();
549  direction = myTrack.ecalEntrance().Vect().Unit();
550  } else if (myTrack.onHcal()) {
551  caloentrance = myTrack.hcalEntrance().vertex().Vect();
552  direction = myTrack.hcalEntrance().Vect().Unit();
553  } else {
554  caloentrance = myTrack.vfcalEntrance().vertex().Vect();
555  direction = myTrack.vfcalEntrance().Vect().Unit();
556  }
557 
558  if (debug_)
559  LogInfo("FastCalorimetry") << "CalorimetryManager::HDShowerSimulation - on-calo 1 " << std::endl
560  << " onEcal = " << myTrack.onEcal() << std::endl
561  << " onHcal = " << myTrack.onHcal() << std::endl
562  << " onVFcal = " << myTrack.onVFcal() << std::endl
563  << " position = " << caloentrance << std::endl;
564 
565  DetId pivot;
566  if (myTrack.onEcal()) {
567  pivot = myCalorimeter_->getClosestCell(caloentrance, true, myTrack.onEcal() == 1);
568  } else if (myTrack.onHcal()) {
569  pivot = myCalorimeter_->getClosestCell(caloentrance, false, false);
570  }
571 
572  EcalHitMaker myGrid(
573  myCalorimeter_, caloentrance, pivot, pivot.null() ? 0 : myTrack.onEcal(), hdGridSize_, 1, random);
574  // 1=HAD shower
575 
576  myGrid.setTrackParameters(direction, 0, myTrack);
577  // Build the FAMOS HCAL
578  HcalHitMaker myHcalHitMaker(myGrid, (unsigned)1);
579 
580  // Shower simulation
581  bool status = false;
582  int mip = 2;
583  // Use HFShower for HF
584  if (!myTrack.onEcal() && !myTrack.onHcal()) {
585  // Warning : We give here the particle energy with the response
586  // but without the resolution/gaussian smearing
587  // For HF, the resolution is due to the PE statistic
588 
589  if (useShowerLibrary) {
591  status = true;
592  } else {
593  HFShower theShower(random, &theHDShowerparam, &myGrid, &myHcalHitMaker, onECAL, eGen);
594  // eGen);
595  // e); // PV Warning : temporarly set the energy to the generated E
596 
597  status = theShower.compute();
598  }
599  } else {
600  if (hdSimMethod_ == 0) {
601  HDShower theShower(random, &theHDShowerparam, &myGrid, &myHcalHitMaker, onECAL, eGen, pmip);
602  status = theShower.compute();
603  mip = theShower.getmip();
604  } else if (hdSimMethod_ == 1) {
605  HDRShower theShower(random, &theHDShowerparam, &myGrid, &myHcalHitMaker, onECAL, eGen);
606  status = theShower.computeShower();
607  mip = 2;
608  } else if (hdSimMethod_ == 2) {
609  //dynamically loading a corresponding profile by the particle type
610  int particleType = myTrack.type();
612  if (particleType == -2212)
614  else if (particleType == 2212)
616 
617  //input variables for GflashHadronShowerProfile
618  int showerType = 99 + myTrack.onEcal();
619  double globalTime = 150.0; // a temporary reference hit time in nanosecond
620  float charge = (float)(myTrack.charge());
621  Gflash3Vector gfpos(trackPosition.X(), trackPosition.Y(), trackPosition.Z());
622  Gflash3Vector gfmom(moment.X(), moment.Y(), moment.Z());
623 
624  theProfile->initialize(showerType, eGen, globalTime, charge, gfpos, gfmom);
627 
628  //make hits
629  std::vector<GflashHit>& gflashHitList = theProfile->getGflashHitList();
630  std::vector<GflashHit>::const_iterator spotIter = gflashHitList.begin();
631  std::vector<GflashHit>::const_iterator spotIterEnd = gflashHitList.end();
632 
634 
635  for (; spotIter != spotIterEnd; spotIter++) {
636  double pathLength = theProfile->getGflashShowino()->getPathLengthAtShower() +
637  (30 * 100 / eGen) * (spotIter->getTime() - globalTime);
638 
639  double currentDepth = std::max(0.0, pathLength - theProfile->getGflashShowino()->getPathLengthOnEcal());
640 
641  //find the the showino position at the currentDepth
642  GflashTrajectoryPoint trajectoryPoint;
643  theProfile->getGflashShowino()->getHelix()->getGflashTrajectoryPoint(trajectoryPoint, pathLength);
644  Gflash3Vector positionAtCurrentDepth = trajectoryPoint.getPosition();
645  //find radial distrance
646  Gflash3Vector lateralDisplacement = positionAtCurrentDepth - spotIter->getPosition() / CLHEP::cm;
647  double rShower = lateralDisplacement.r();
648  double azimuthalAngle = lateralDisplacement.phi();
649 
650  whichCalor = Gflash::getCalorimeterNumber(positionAtCurrentDepth);
651 
652  if (whichCalor == Gflash::kESPM || whichCalor == Gflash::kENCA) {
653  bool statusPad = myGrid.getPads(currentDepth, true);
654  if (!statusPad)
655  continue;
656  myGrid.setSpotEnergy(1.2 * spotIter->getEnergy() / CLHEP::GeV);
657  myGrid.addHit(rShower / Gflash::intLength[Gflash::kESPM], azimuthalAngle, 0);
658  } else if (whichCalor == Gflash::kHB || whichCalor == Gflash::kHE) {
659  bool setHDdepth = myHcalHitMaker.setDepth(currentDepth, true);
660  if (!setHDdepth)
661  continue;
662  myHcalHitMaker.setSpotEnergy(1.4 * spotIter->getEnergy() / CLHEP::GeV);
663  myHcalHitMaker.addHit(rShower / Gflash::intLength[Gflash::kHB], azimuthalAngle, 0);
664  }
665  }
666  status = true;
667  } else {
668  edm::LogInfo("FastSimulationCalorimetry") << " SimMethod " << hdSimMethod_ << " is NOT available ";
669  }
670  }
671 
672  if (status) {
673  // Here to switch between simple formulae and parameterized response
674  if (optionHDSim_ == 1) {
675  emeas = myHDResponse_->getHCALEnergyResponse(eGen, hit, random);
676  } else { // optionHDsim == 2
677  emeas = myHDResponse_->responseHCAL(mip, eGen, pathEta, 1, random); // 1=hadron
678  }
679 
680  double correction = emeas / eGen;
681 
682  // RespCorrP factors (ECAL and HCAL separately) calculation
683  respCorr(eint);
684 
685  if (debug_)
686  LogInfo("FastCalorimetry") << "CalorimetryManager::HDShowerSimulation - on-calo 2" << std::endl
687  << " eta = " << pathEta << std::endl
688  << " phi = " << pathPhi << std::endl
689  << " Egen = " << eGen << std::endl
690  << " Emeas = " << emeas << std::endl
691  << " corr = " << correction << std::endl
692  << " mip = " << mip << std::endl;
693 
694  if (myTrack.onEcal() > 0) {
695  // Save ECAL hits
696  updateECAL(myGrid.getHits(), onECAL, myTrack.id(), correction * ecorr);
697  }
698 
699  // Save HCAL hits
700  if (myTrack.onVFcal() && useShowerLibrary) {
701  myHDResponse_->correctHF(eGen, abs(myTrack.type()));
703  } else
704  updateHCAL(myHcalHitMaker.getHits(), myTrack.id(), correction * hcorr);
705 
706  } else { // shower simulation failed
707  if (myTrack.onHcal() || myTrack.onVFcal()) {
708  DetId cell = myCalorimeter_->getClosestCell(trackPosition.Vect(), false, false);
709  double tof =
710  (((HcalGeometry*)(myCalorimeter_->getHcalGeometry()))->getPosition(cell).mag()) / 29.98; //speed of light
711  CaloHitID current_id(cell.rawId(), tof, myTrack.id());
712  std::map<CaloHitID, float> hitMap;
713  hitMap[current_id] = emeas;
714  updateHCAL(hitMap, myTrack.id());
715  if (debug_)
716  LogInfo("FastCalorimetry") << " HCAL simple cell " << cell.rawId() << " added E = " << emeas << std::endl;
717  }
718  }
719 
720  } // e > 0. ...
721 
722  if (debug_)
723  LogInfo("FastCalorimetry") << std::endl << " FASTEnergyReconstructor::HDShowerSimulation finished " << std::endl;
724 }
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
Definition: FSimTrack.h:149
double responseHCAL(int _mip, double energy, double eta, int partype, RandomEngineAndDistribution const *)
DetId getClosestCell(const XYZPoint &point, bool ecal, bool central) const
void updateHCAL(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:146
GflashPiKShowerProfile * thePiKProfile
GflashTrajectory * getHelix()
Definition: GflashShowino.h:33
const RawParticle & ecalEntrance() const
The particle at ECAL entrance.
Definition: FSimTrack.h:143
const ECALProperties * ecalProperties(int onEcal) const
ECAL properties.
Definition: Calorimeter.cc:78
void recoHFShowerLibrary(const FSimTrack &myTrack)
double getHCALEnergyResponse(double e, int hit, RandomEngineAndDistribution const *)
GflashHadronShowerProfile * theProfile
void correctHF(double e, int type)
void updateECAL(const std::map< CaloHitID, float > &hitMap, int onEcal, int trackID=0, float corr=1.0)
int onHcal() const
Definition: FSimTrack.h:116
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:22
constexpr bool null() const
is this a null id ?
Definition: DetId.h:59
const CaloSubdetectorGeometry * getHcalGeometry() const
Definition: Calorimeter.h:56
CalorimeterNumber getCalorimeterNumber(const Gflash3Vector &position)
const XYZTLorentzVector & momentum() const
Temporary (until move of SimTrack to Mathcore) - No! Actually very useful.
Definition: FSimTrack.h:209
GflashAntiProtonShowerProfile * theAntiProtonProfile
GflashProtonShowerProfile * theProtonProfile
double getPathLengthAtShower()
Definition: GflashShowino.h:29
float charge() const
charge
Definition: FSimTrack.h:56
void setTrackParameters(const XYZNormal &normal, double X0depthoffset, const FSimTrack &theTrack)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double getMIPfraction(double energy, double eta)
const std::map< CaloHitID, float > & getHitsMap()
int onVFcal() const
Definition: FSimTrack.h:121
int onEcal() const
Definition: FSimTrack.h:111
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
const double intLength[kNumberCalorimeter]
void getGflashTrajectoryPoint(GflashTrajectoryPoint &point, double s) const
Log< level::Info, false > LogInfo
XYZVector Vect() const
the momentum threevector
Definition: RawParticle.h:323
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
CLHEP::Hep3Vector Gflash3Vector
Definition: Gflash3Vector.h:6
double getPathLengthOnEcal()
Definition: GflashShowino.h:28
void SetRandom(const RandomEngineAndDistribution *)
math::XYZVector XYZPoint
std::vector< GflashHit > & getGflashHitList()
FastHFShowerLibrary * theHFShowerLibrary
math::XYZVector XYZVector
Definition: RawParticle.h:26
const HCALProperties * hcalProperties(int onHcal) const
HCAL properties.
Definition: Calorimeter.cc:88
HSParameters * myHSParameters_
double e() const
energy of the momentum
Definition: RawParticle.h:305
int id() const
the index in FBaseSimEvent and other vectors
Definition: FSimTrack.h:96
void initialize(int showerType, double energy, double globalTime, double charge, Gflash3Vector &position, Gflash3Vector &momentum)
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:320

◆ initialize()

void CalorimetryManager::initialize ( RandomEngineAndDistribution const *  random)

Definition at line 168 of file CalorimetryManager.cc.

References clean(), initialized_, myCalorimeter_, CaloGeometryHelper::preshowerPresent(), FastHFShowerLibrary::SetRandom(), simulatePreshower_, and theHFShowerLibrary.

Referenced by reconstruct().

168  {
169  // Clear the content of the calorimeters
170  if (!initialized_) {
171  theHFShowerLibrary->SetRandom(random);
172 
173  // Check if the preshower is really available
175  edm::LogWarning("CalorimetryManager")
176  << " WARNING: The preshower simulation has been turned on; but no preshower geometry is available "
177  << std::endl;
178  edm::LogWarning("CalorimetryManager") << " Disabling the preshower simulation " << std::endl;
179  simulatePreshower_ = false;
180  }
181 
182  initialized_ = true;
183  }
184  clean();
185 }
bool preshowerPresent() const
CaloGeometryHelper * myCalorimeter_
void SetRandom(const RandomEngineAndDistribution *)
FastHFShowerLibrary * theHFShowerLibrary
Log< level::Warning, false > LogWarning

◆ loadFromEcalBarrel()

void CalorimetryManager::loadFromEcalBarrel ( edm::PCaloHitContainer c) const

Definition at line 1166 of file CalorimetryManager.cc.

References HltBtagPostValidation_cff::c, EBMapping_, dqmdumpme::first, mps_fire::i, edm::second(), and EBDetId::unhashIndex().

1166  {
1167  c.reserve(c.size() + EBMapping_.size());
1168  for (unsigned i = 0; i < EBMapping_.size(); i++) {
1169  c.push_back(PCaloHit(EBDetId::unhashIndex(EBMapping_[i].first.unitID()),
1170  EBMapping_[i].second,
1171  EBMapping_[i].first.timeSlice(),
1172  EBMapping_[i].first.trackID()));
1173  }
1174 }
U second(std::pair< T, U > const &p)
static EBDetId unhashIndex(int hi)
get a DetId from a compact index for arrays
Definition: EBDetId.h:110
std::vector< std::pair< CaloHitID, float > > EBMapping_

◆ loadFromEcalEndcap()

void CalorimetryManager::loadFromEcalEndcap ( edm::PCaloHitContainer c) const

Definition at line 1176 of file CalorimetryManager.cc.

References HltBtagPostValidation_cff::c, EEMapping_, dqmdumpme::first, mps_fire::i, edm::second(), and EEDetId::unhashIndex().

1176  {
1177  c.reserve(c.size() + EEMapping_.size());
1178  for (unsigned i = 0; i < EEMapping_.size(); i++) {
1179  c.push_back(PCaloHit(EEDetId::unhashIndex(EEMapping_[i].first.unitID()),
1180  EEMapping_[i].second,
1181  EEMapping_[i].first.timeSlice(),
1182  EEMapping_[i].first.trackID()));
1183  }
1184 }
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:65
U second(std::pair< T, U > const &p)
std::vector< std::pair< CaloHitID, float > > EEMapping_

◆ loadFromHcal()

void CalorimetryManager::loadFromHcal ( edm::PCaloHitContainer c) const

Definition at line 1186 of file CalorimetryManager.cc.

References HltBtagPostValidation_cff::c, dqmdumpme::first, HMapping_, mps_fire::i, and edm::second().

1186  {
1187  c.reserve(c.size() + HMapping_.size());
1188  for (unsigned i = 0; i < HMapping_.size(); i++) {
1189  c.push_back(PCaloHit(DetId(HMapping_[i].first.unitID()),
1190  HMapping_[i].second,
1191  HMapping_[i].first.timeSlice(),
1192  HMapping_[i].first.trackID()));
1193  }
1194 }
U second(std::pair< T, U > const &p)
std::vector< std::pair< CaloHitID, float > > HMapping_
Definition: DetId.h:17

◆ loadFromPreshower()

void CalorimetryManager::loadFromPreshower ( edm::PCaloHitContainer c) const

Definition at line 1196 of file CalorimetryManager.cc.

References HltBtagPostValidation_cff::c, ESMapping_, dqmdumpme::first, and mps_fire::i.

1196  {
1197  c.reserve(c.size() + ESMapping_.size());
1198  for (unsigned i = 0; i < ESMapping_.size(); i++) {
1199  c.push_back(PCaloHit(ESMapping_[i].first.unitID(),
1200  ESMapping_[i].second,
1201  ESMapping_[i].first.timeSlice(),
1202  ESMapping_[i].first.trackID()));
1203  }
1204 }
std::vector< std::pair< CaloHitID, float > > ESMapping_

◆ loadMuonSimTracks()

void CalorimetryManager::loadMuonSimTracks ( edm::SimTrackContainer m) const

Definition at line 1208 of file CalorimetryManager.cc.

References funct::abs(), mps_fire::i, PDWG_BPHSkim_cff::muons, muonSimTracks, and findQualityFiles::size.

1208  {
1209  unsigned size = muons.size();
1210  for (unsigned i = 0; i < size; ++i) {
1211  int id = muons[i].trackId();
1212  if (!(abs(muons[i].type()) == 13 || abs(muons[i].type()) == 1000024 ||
1213  (abs(muons[i].type()) > 1000100 && abs(muons[i].type()) < 1999999)))
1214  continue;
1215  // identify the corresponding muon in the local collection
1216 
1217  std::vector<FSimTrack>::const_iterator itcheck =
1218  find_if(muonSimTracks.begin(), muonSimTracks.end(), FSimTrackEqual(id));
1219  if (itcheck != muonSimTracks.end()) {
1220  muons[i].setTkPosition(itcheck->trackerSurfacePosition());
1221  muons[i].setTkMomentum(itcheck->trackerSurfaceMomentum());
1222  }
1223  }
1224 }
size
Write out results.
std::vector< FSimTrack > muonSimTracks
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ MuonMipSimulation()

void CalorimetryManager::MuonMipSimulation ( const FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)
private


// /// TEMPORARY First attempt to include HCAL (with straight-line extrapolation):

Definition at line 726 of file CalorimetryManager.cc.

References HcalHitMaker::addHit(), ALCARECOTkAlJpsiMuMu_cff::charge, FSimTrack::charge(), debug_, EnergyLossSimulator::deltaMom(), FSimTrack::ecalEntrance(), HCALHighEnergyHPDFilter_cfi::energy, MaterialEffects::energyLossSimulator(), dqmMemoryStats::float, CaloGeometryHelper::getClosestCell(), HcalHitMaker::getHits(), CaloSegment::HCAL, FSimTrack::hcalEntrance(), hdGridSize_, FSimTrack::id(), rawparticle::makeMuon(), FSimTrack::momentum(), muonSimTracks, myCalorimeter_, myPart, mySimEvent, DetId::null(), FSimTrack::onEcal(), FSimTrack::onHcal(), FSimTrack::onVFcal(), AlCaHLTBitMon_ParallelJobs::p, CaloSegment::PbWO4, reconstructHCAL(), savedMuonSimTracks, HcalHitMaker::setSpotEnergy(), SimTrack::setTkMomentum(), SimTrack::setTkPosition(), EcalHitMaker::setTrackParameters(), theMuonEcalEffects, theMuonHcalEffects, FBaseSimEvent::theTable(), updateECAL(), updateHCAL(), MaterialEffectsSimulator::updateState(), RawParticle::Vect(), RawParticle::vertex(), and FSimTrack::vfcalEntrance().

Referenced by reconstructTrack().

726  {
727  // TimeMe t(" FASTEnergyReconstructor::HDShower");
728  XYZTLorentzVector moment = myTrack.momentum();
729 
730  // Backward compatibility behaviour
731  if (!theMuonHcalEffects) {
732  savedMuonSimTracks.push_back(myTrack);
733 
734  if (myTrack.onHcal() || myTrack.onVFcal())
735  reconstructHCAL(myTrack, random);
736 
737  return;
738  }
739 
740  if (debug_)
741  LogInfo("FastCalorimetry") << "CalorimetryManager::MuonMipSimulation - track param." << std::endl
742  << " eta = " << moment.eta() << std::endl
743  << " phi = " << moment.phi() << std::endl
744  << " et = " << moment.Et() << std::endl;
745 
746  XYZTLorentzVector trackPosition;
747  if (myTrack.onEcal()) {
748  trackPosition = myTrack.ecalEntrance().vertex();
749  myPart = myTrack.ecalEntrance();
750  } else if (myTrack.onVFcal()) {
751  trackPosition = myTrack.vfcalEntrance().vertex();
752  myPart = myTrack.vfcalEntrance();
753  } else {
754  LogInfo("FastCalorimetry") << " The particle is not in the acceptance " << std::endl;
755  return;
756  }
757 
758  // int onHCAL = hit + 1; - specially for myCalorimeter->hcalProperties(onHCAL)
759  // (below) to get VFcal properties ...
760  // not needed ?
761  // int onHCAL = hit + 1;
762  int onECAL = myTrack.onEcal();
763 
764  //===========================================================================
765 
766  // ECAL and HCAL properties to get
767 
768  //Making ECAL Grid (and segments calculation)
769  XYZPoint caloentrance;
770  XYZVector direction;
771  if (myTrack.onEcal()) {
772  caloentrance = myTrack.ecalEntrance().vertex().Vect();
773  direction = myTrack.ecalEntrance().Vect().Unit();
774  } else if (myTrack.onHcal()) {
775  caloentrance = myTrack.hcalEntrance().vertex().Vect();
776  direction = myTrack.hcalEntrance().Vect().Unit();
777  } else {
778  caloentrance = myTrack.vfcalEntrance().vertex().Vect();
779  direction = myTrack.vfcalEntrance().Vect().Unit();
780  }
781 
782  DetId pivot;
783  if (myTrack.onEcal()) {
784  pivot = myCalorimeter_->getClosestCell(caloentrance, true, myTrack.onEcal() == 1);
785  } else if (myTrack.onHcal()) {
786  pivot = myCalorimeter_->getClosestCell(caloentrance, false, false);
787  }
788 
789  EcalHitMaker myGrid(myCalorimeter_, caloentrance, pivot, pivot.null() ? 0 : myTrack.onEcal(), hdGridSize_, 0, random);
790  // 0 =EM shower -> Unit = X0
791 
792  myGrid.setTrackParameters(direction, 0, myTrack);
793 
794  // Now get the path in the Preshower, ECAL and HCAL along a straight line extrapolation
795  // but only those in the ECAL are used
796 
797  const std::vector<CaloSegment>& segments = myGrid.getSegments();
798  unsigned nsegments = segments.size();
799 
800  int ifirstHcal = -1;
801  int ilastEcal = -1;
802 
804  // // Muon brem in ECAL
805  // MuonBremsstrahlungSimulator* muonBremECAL = 0;
806  // if (theMuonEcalEffects) muonBremECAL = theMuonEcalEffects->muonBremsstrahlungSimulator();
807 
808  for (unsigned iseg = 0; iseg < nsegments && ifirstHcal < 0; ++iseg) {
809  // in the ECAL, there are two types of segments: PbWO4 and GAP
810  float segmentSizeinX0 = segments[iseg].X0length();
811 
812  // Martijn - insert your computations here
813  float energy = 0.0;
814  if (segmentSizeinX0 > 0.001 && segments[iseg].material() == CaloSegment::PbWO4) {
815  // The energy loss simulator
816  float charge = (float)(myTrack.charge());
817  RawParticle p = rawparticle::makeMuon(charge < 0, moment, trackPosition);
818  ParticlePropagator theMuon(p, nullptr, nullptr, mySimEvent->theTable());
819  if (energyLossECAL) {
820  energyLossECAL->updateState(theMuon, segmentSizeinX0, random);
821  energy = energyLossECAL->deltaMom().E();
822  moment -= energyLossECAL->deltaMom();
823  }
824  }
825  // that's all for ECAL, Florian
826  // Save the hit only if it is a crystal
827  if (segments[iseg].material() == CaloSegment::PbWO4) {
828  myGrid.getPads(segments[iseg].sX0Entrance() + segmentSizeinX0 * 0.5);
829  myGrid.setSpotEnergy(energy);
830  myGrid.addHit(0., 0.);
831  ilastEcal = iseg;
832  }
833  // Check for end of loop:
834  if (segments[iseg].material() == CaloSegment::HCAL) {
835  ifirstHcal = iseg;
836  }
837  }
838 
839  // Build the FAMOS HCAL
840  HcalHitMaker myHcalHitMaker(myGrid, (unsigned)2);
841  // float mipenergy=0.1;
842  // Create the helix with the stepping helix propagator
843  // to add a hit, just do
844  // myHcalHitMaker.setSpotEnergy(mipenergy);
845  // math::XYZVector hcalEntrance;
846  // if(ifirstHcal>=0) hcalEntrance=segments[ifirstHcal].entrance();
847  // myHcalHitMaker.addHit(hcalEntrance);
851  int ilastHcal = -1;
852  float mipenergy = 0.0;
853 
855  // // Muon Brem effect
856  // MuonBremsstrahlungSimulator* muonBremHCAL = 0;
857  // if (theMuonHcalEffects) muonBremHCAL = theMuonHcalEffects->muonBremsstrahlungSimulator();
858 
859  if (ifirstHcal > 0 && energyLossHCAL) {
860  for (unsigned iseg = ifirstHcal; iseg < nsegments; ++iseg) {
861  float segmentSizeinX0 = segments[iseg].X0length();
862  if (segments[iseg].material() == CaloSegment::HCAL) {
863  ilastHcal = iseg;
864  if (segmentSizeinX0 > 0.001) {
865  // The energy loss simulator
866  float charge = (float)(myTrack.charge());
867  RawParticle p = rawparticle::makeMuon(charge < 0, moment, trackPosition);
868  ParticlePropagator theMuon(p, nullptr, nullptr, mySimEvent->theTable());
869  energyLossHCAL->updateState(theMuon, segmentSizeinX0, random);
870  mipenergy = energyLossHCAL->deltaMom().E();
871  moment -= energyLossHCAL->deltaMom();
872  myHcalHitMaker.setSpotEnergy(mipenergy);
873  myHcalHitMaker.addHit(segments[iseg].entrance());
874  }
875  }
876  }
877  }
878 
879  // Copy the muon SimTrack (Only for Energy loss)
880  FSimTrack muonTrack(myTrack);
881  if (energyLossHCAL && ilastHcal >= 0) {
882  math::XYZVector hcalExit = segments[ilastHcal].exit();
883  muonTrack.setTkPosition(hcalExit);
884  muonTrack.setTkMomentum(moment);
885  } else if (energyLossECAL && ilastEcal >= 0) {
886  math::XYZVector ecalExit = segments[ilastEcal].exit();
887  muonTrack.setTkPosition(ecalExit);
888  muonTrack.setTkMomentum(moment);
889  } // else just leave tracker surface position and momentum...
890 
891  muonSimTracks.push_back(muonTrack);
892 
893  // no need to change below this line
894  std::map<CaloHitID, float>::const_iterator mapitr;
895  std::map<CaloHitID, float>::const_iterator endmapitr;
896  if (myTrack.onEcal() > 0) {
897  // Save ECAL hits
898  updateECAL(myGrid.getHits(), onECAL, myTrack.id());
899  }
900 
901  // Save HCAL hits
902  updateHCAL(myHcalHitMaker.getHits(), myTrack.id());
903 
904  if (debug_)
905  LogInfo("FastCalorimetry") << std::endl << " FASTEnergyReconstructor::MipShowerSimulation finished " << std::endl;
906 }
void reconstructHCAL(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
Definition: FSimTrack.h:149
DetId getClosestCell(const XYZPoint &point, bool ecal, bool central) const
void updateHCAL(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:146
const XYZTLorentzVector & deltaMom() const
Returns the actual energy lost.
const RawParticle & ecalEntrance() const
The particle at ECAL entrance.
Definition: FSimTrack.h:143
MaterialEffects * theMuonEcalEffects
MaterialEffects * theMuonHcalEffects
void updateState(ParticlePropagator &myTrack, double radlen, RandomEngineAndDistribution const *)
Compute the material effect (calls the sub class)
void updateECAL(const std::map< CaloHitID, float > &hitMap, int onEcal, int trackID=0, float corr=1.0)
int onHcal() const
Definition: FSimTrack.h:116
RawParticle makeMuon(bool isParticle, const math::XYZTLorentzVector &p, const math::XYZTLorentzVector &xStart)
Definition: makeMuon.cc:20
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
Definition: FBaseSimEvent.h:54
std::vector< FSimTrack > muonSimTracks
constexpr bool null() const
is this a null id ?
Definition: DetId.h:59
const XYZTLorentzVector & momentum() const
Temporary (until move of SimTrack to Mathcore) - No! Actually very useful.
Definition: FSimTrack.h:209
float charge() const
charge
Definition: FSimTrack.h:56
void setTrackParameters(const XYZNormal &normal, double X0depthoffset, const FSimTrack &theTrack)
int onVFcal() const
Definition: FSimTrack.h:121
int onEcal() const
Definition: FSimTrack.h:111
CaloGeometryHelper * myCalorimeter_
Log< level::Info, false > LogInfo
XYZVector Vect() const
the momentum threevector
Definition: RawParticle.h:323
Definition: DetId.h:17
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
std::vector< FSimTrack > savedMuonSimTracks
math::XYZVector XYZPoint
math::XYZVector XYZVector
Definition: RawParticle.h:26
EnergyLossSimulator * energyLossSimulator() const
Return the Energy Loss engine.
int id() const
the index in FBaseSimEvent and other vectors
Definition: FSimTrack.h:96
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:320

◆ readParameters()

void CalorimetryManager::readParameters ( const edm::ParameterSet fastCalo)
private

Definition at line 908 of file CalorimetryManager.cc.

References aTerm, bFixedLength_, bTerm, crackPadSurvivalProbability_, debug_, EcalDigitizer_, evtsToDebug_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), gridSize_, HcalDigitizer_, hdGridSize_, hdSimMethod_, mps_fire::i, ietaShiftHB_, ietaShiftHE_, ietaShiftHF_, ietaShiftHO_, k_e, k_h, mipValues_, optionHDSim_, p_knots, pulledPadSurvivalProbability_, radiusFactorEB_, radiusFactorEE_, radiusPreshowerCorrections_, RCFactor_, rsp, RTFactor_, samplingHBHE_, samplingHF_, samplingHO_, simulatePreshower_, spotFraction_, theCoreIntervals_, theTailIntervals_, timeShiftHB_, timeShiftHE_, timeShiftHF_, timeShiftHO_, useCorrectionSL, and useShowerLibrary.

Referenced by CalorimetryManager().

908  {
909  edm::ParameterSet ECALparameters = fastCalo.getParameter<edm::ParameterSet>("ECAL");
910 
911  evtsToDebug_ = fastCalo.getUntrackedParameter<std::vector<unsigned int> >("EvtsToDebug", std::vector<unsigned>());
912  debug_ = fastCalo.getUntrackedParameter<bool>("Debug");
913 
914  bFixedLength_ = ECALparameters.getParameter<bool>("bFixedLength");
915 
916  gridSize_ = ECALparameters.getParameter<int>("GridSize");
917  spotFraction_ = ECALparameters.getParameter<double>("SpotFraction");
918  pulledPadSurvivalProbability_ = ECALparameters.getParameter<double>("FrontLeakageProbability");
919  crackPadSurvivalProbability_ = ECALparameters.getParameter<double>("GapLossProbability");
920  theCoreIntervals_ = ECALparameters.getParameter<std::vector<double> >("CoreIntervals");
921  theTailIntervals_ = ECALparameters.getParameter<std::vector<double> >("TailIntervals");
922 
923  RCFactor_ = ECALparameters.getParameter<double>("RCFactor");
924  RTFactor_ = ECALparameters.getParameter<double>("RTFactor");
925  //changed after tuning - Feb-July - Shilpi Jain
926  // radiusFactor_ = ECALparameters.getParameter<double>("RadiusFactor");
927  radiusFactorEE_ = ECALparameters.getParameter<double>("RadiusFactorEE");
928  radiusFactorEB_ = ECALparameters.getParameter<double>("RadiusFactorEB");
929  //(end of) changed after tuning - Feb-July - Shilpi Jain
930  radiusPreshowerCorrections_ = ECALparameters.getParameter<std::vector<double> >("RadiusPreshowerCorrections");
933  mipValues_ = ECALparameters.getParameter<std::vector<double> >("MipsinGeV");
934  simulatePreshower_ = ECALparameters.getParameter<bool>("SimulatePreshower");
935 
936  if (gridSize_ < 1)
937  gridSize_ = 7;
938  if (pulledPadSurvivalProbability_ < 0. || pulledPadSurvivalProbability_ > 1)
940  if (crackPadSurvivalProbability_ < 0. || crackPadSurvivalProbability_ > 1)
942 
943  LogInfo("FastCalorimetry") << " Fast ECAL simulation parameters " << std::endl;
944  LogInfo("FastCalorimetry") << " =============================== " << std::endl;
945  if (simulatePreshower_)
946  LogInfo("FastCalorimetry") << " The preshower is present " << std::endl;
947  else
948  LogInfo("FastCalorimetry") << " The preshower is NOT present " << std::endl;
949  LogInfo("FastCalorimetry") << " Grid Size : " << gridSize_ << std::endl;
950  if (spotFraction_ > 0.)
951  LogInfo("FastCalorimetry") << " Spot Fraction : " << spotFraction_ << std::endl;
952  else {
953  LogInfo("FastCalorimetry") << " Core of the shower " << std::endl;
954  for (unsigned ir = 0; ir < theCoreIntervals_.size() / 2; ++ir) {
955  LogInfo("FastCalorimetry") << " r < " << theCoreIntervals_[ir * 2] << " R_M : " << theCoreIntervals_[ir * 2 + 1]
956  << " ";
957  }
958  LogInfo("FastCalorimetry") << std::endl;
959 
960  LogInfo("FastCalorimetry") << " Tail of the shower " << std::endl;
961  for (unsigned ir = 0; ir < theTailIntervals_.size() / 2; ++ir) {
962  LogInfo("FastCalorimetry") << " r < " << theTailIntervals_[ir * 2] << " R_M : " << theTailIntervals_[ir * 2 + 1]
963  << " ";
964  }
965  //changed after tuning - Feb-July - Shilpi Jain
966  LogInfo("FastCalorimetry") << "Radius correction factors: EB & EE " << radiusFactorEB_ << " : " << radiusFactorEE_
967  << std::endl;
968  //(end of) changed after tuning - Feb-July - Shilpi Jain
969  LogInfo("FastCalorimetry") << std::endl;
970  if (mipValues_.size() > 2) {
971  LogInfo("FastCalorimetry") << "Improper number of parameters for the preshower ; using 95keV" << std::endl;
972  mipValues_.clear();
973  mipValues_.resize(2, 0.000095);
974  }
975  }
976 
977  LogInfo("FastCalorimetry") << " FrontLeakageProbability : " << pulledPadSurvivalProbability_ << std::endl;
978  LogInfo("FastCalorimetry") << " GapLossProbability : " << crackPadSurvivalProbability_ << std::endl;
979 
980  // RespCorrP: p (momentum), ECAL and HCAL corrections = f(p)
981  edm::ParameterSet CalorimeterParam = fastCalo.getParameter<edm::ParameterSet>("CalorimeterProperties");
982 
983  rsp = CalorimeterParam.getParameter<std::vector<double> >("RespCorrP");
984  LogInfo("FastCalorimetry") << " RespCorrP (rsp) size " << rsp.size() << std::endl;
985 
986  if (rsp.size() % 3 != 0) {
987  LogInfo("FastCalorimetry") << " RespCorrP size is wrong -> no corrections applied !!!" << std::endl;
988 
989  p_knots.push_back(14000.);
990  k_e.push_back(1.);
991  k_h.push_back(1.);
992  } else {
993  for (unsigned i = 0; i < rsp.size(); i += 3) {
994  LogInfo("FastCalorimetry") << "i = " << i / 3 << " p = " << rsp[i] << " k_e(p) = " << rsp[i + 1]
995  << " k_e(p) = " << rsp[i + 2] << std::endl;
996 
997  p_knots.push_back(rsp[i]);
998  k_e.push_back(rsp[i + 1]);
999  k_h.push_back(rsp[i + 2]);
1000  }
1001  }
1002 
1003  //FR
1004  edm::ParameterSet HCALparameters = fastCalo.getParameter<edm::ParameterSet>("HCAL");
1005  optionHDSim_ = HCALparameters.getParameter<int>("SimOption");
1006  hdGridSize_ = HCALparameters.getParameter<int>("GridSize");
1007  hdSimMethod_ = HCALparameters.getParameter<int>("SimMethod");
1008  //RF
1009 
1010  EcalDigitizer_ = ECALparameters.getUntrackedParameter<bool>("Digitizer", false);
1011  HcalDigitizer_ = HCALparameters.getUntrackedParameter<bool>("Digitizer", false);
1012  samplingHBHE_ = HCALparameters.getParameter<std::vector<double> >("samplingHBHE");
1013  samplingHF_ = HCALparameters.getParameter<std::vector<double> >("samplingHF");
1014  samplingHO_ = HCALparameters.getParameter<std::vector<double> >("samplingHO");
1015  ietaShiftHB_ = HCALparameters.getParameter<int>("ietaShiftHB");
1016  ietaShiftHE_ = HCALparameters.getParameter<int>("ietaShiftHE");
1017  ietaShiftHF_ = HCALparameters.getParameter<int>("ietaShiftHF");
1018  ietaShiftHO_ = HCALparameters.getParameter<int>("ietaShiftHO");
1019  timeShiftHB_ = HCALparameters.getParameter<std::vector<double> >("timeShiftHB");
1020  timeShiftHE_ = HCALparameters.getParameter<std::vector<double> >("timeShiftHE");
1021  timeShiftHF_ = HCALparameters.getParameter<std::vector<double> >("timeShiftHF");
1022  timeShiftHO_ = HCALparameters.getParameter<std::vector<double> >("timeShiftHO");
1023 
1024  // FastHFShowerLibrary
1025  edm::ParameterSet m_HS = fastCalo.getParameter<edm::ParameterSet>("HFShowerLibrary");
1026  useShowerLibrary = m_HS.getUntrackedParameter<bool>("useShowerLibrary", false);
1027  useCorrectionSL = m_HS.getUntrackedParameter<bool>("useCorrectionSL", false);
1028 }
std::vector< double > rsp
std::vector< double > k_h
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< double > timeShiftHO_
std::vector< double > timeShiftHF_
std::vector< double > p_knots
T getUntrackedParameter(std::string const &, T const &) const
std::vector< double > samplingHF_
std::vector< double > radiusPreshowerCorrections_
std::vector< double > theTailIntervals_
std::vector< double > samplingHBHE_
std::vector< double > timeShiftHB_
std::vector< double > theCoreIntervals_
Log< level::Info, false > LogInfo
std::vector< double > mipValues_
std::vector< unsigned int > evtsToDebug_
std::vector< double > k_e
std::vector< double > samplingHO_
std::vector< double > timeShiftHE_

◆ reconstruct()

void CalorimetryManager::reconstruct ( RandomEngineAndDistribution const *  random)

Definition at line 148 of file CalorimetryManager.cc.

References debug_, edm::EventID::event(), evtsToDebug_, spr::find(), FSimEvent::id(), initialize(), createfilelist::int, mySimEvent, FSimEvent::nTracks(), FBaseSimEvent::print(), reconstructTrack(), and FBaseSimEvent::track().

148  {
149  if (!evtsToDebug_.empty()) {
150  std::vector<unsigned int>::const_iterator itcheck =
151  find(evtsToDebug_.begin(), evtsToDebug_.end(), mySimEvent->id().event());
152  debug_ = (itcheck != evtsToDebug_.end());
153  if (debug_)
154  mySimEvent->print();
155  }
156 
157  initialize(random);
158 
159  LogInfo("FastCalorimetry") << "Reconstructing " << (int)mySimEvent->nTracks() << " tracks." << std::endl;
160  for (int fsimi = 0; fsimi < (int)mySimEvent->nTracks(); ++fsimi) {
161  FSimTrack& myTrack = mySimEvent->track(fsimi);
162 
163  reconstructTrack(myTrack, random);
164  } // particle loop
165 
166 } // reconstruct
FSimTrack & track(int id) const
Return track with given Id.
void reconstructTrack(FSimTrack &myTrack, RandomEngineAndDistribution const *)
unsigned int nTracks() const
Number of tracks.
Definition: FSimEvent.cc:24
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
void print() const
print the FBaseSimEvent in an intelligible way
void initialize(RandomEngineAndDistribution const *random)
Log< level::Info, false > LogInfo
edm::EventID id() const
Method to return the EventId.
Definition: FSimEvent.cc:20
std::vector< unsigned int > evtsToDebug_
EventNumber_t event() const
Definition: EventID.h:40

◆ reconstructHCAL()

void CalorimetryManager::reconstructHCAL ( const FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)
private

Definition at line 438 of file CalorimetryManager.cc.

References funct::abs(), FSimTrack::charge(), debug_, RawParticle::e(), dqmMemoryStats::float, CaloGeometryHelper::getClosestCell(), HCALResponse::getHCALEnergyResponse(), Calorimeter::getHcalGeometry(), FSimTrack::hcalEntrance(), FSimTrack::id(), myCalorimeter_, myHDResponse_, FSimTrack::onHcal(), DetId::rawId(), HCALResponse::responseHCAL(), CoreSimTrack::type(), updateHCAL(), RawParticle::vertex(), and FSimTrack::vfcalEntrance().

Referenced by MuonMipSimulation(), and reconstructTrack().

438  {
439  int hit;
440  int pid = abs(myTrack.type());
441  if (debug_) {
442  LogInfo("FastCalorimetry") << " reconstructHCAL " << myTrack << std::endl;
443  }
444 
445  XYZTLorentzVector trackPosition;
446  if (myTrack.onHcal()) {
447  trackPosition = myTrack.hcalEntrance().vertex();
448  hit = myTrack.onHcal() - 1;
449  } else {
450  trackPosition = myTrack.vfcalEntrance().vertex();
451  hit = 2;
452  }
453 
454  double pathEta = trackPosition.eta();
455  double pathPhi = trackPosition.phi();
456 
457  double EGen = myTrack.hcalEntrance().e();
458  double emeas = 0.;
459 
460  float charge_ = (float)myTrack.charge();
461  if (pid == 13 || pid == 1000024 || (pid > 1000100 && pid < 1999999 && fabs(charge_) > 0.001)) {
462  emeas = myHDResponse_->responseHCAL(0, EGen, pathEta, 2, random); // 2=muon
463  if (debug_)
464  LogInfo("FastCalorimetry") << "CalorimetryManager::reconstructHCAL - MUON !!!" << std::endl;
465  } else if (pid == 22 || pid == 11) {
466  emeas = myHDResponse_->responseHCAL(0, EGen, pathEta, 0, random); // last par. = 0 = e/gamma
467  if (debug_)
468  LogInfo("FastCalorimetry") << "CalorimetryManager::reconstructHCAL - e/gamma !!!" << std::endl;
469  } else {
470  emeas = myHDResponse_->getHCALEnergyResponse(EGen, hit, random);
471  }
472 
473  if (debug_)
474  LogInfo("FastCalorimetry") << "CalorimetryManager::reconstructHCAL - on-calo "
475  << " eta = " << pathEta << " phi = " << pathPhi << " Egen = " << EGen
476  << " Emeas = " << emeas << std::endl;
477 
478  if (emeas > 0.) {
479  DetId cell = myCalorimeter_->getClosestCell(trackPosition.Vect(), false, false);
480  double tof =
481  (((HcalGeometry*)(myCalorimeter_->getHcalGeometry()))->getPosition(cell).mag()) / 29.98; //speed of light
482  CaloHitID current_id(cell.rawId(), tof, myTrack.id());
483  std::map<CaloHitID, float> hitMap;
484  hitMap[current_id] = emeas;
485  updateHCAL(hitMap, myTrack.id());
486  }
487 }
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
Definition: FSimTrack.h:149
double responseHCAL(int _mip, double energy, double eta, int partype, RandomEngineAndDistribution const *)
DetId getClosestCell(const XYZPoint &point, bool ecal, bool central) const
void updateHCAL(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:146
double getHCALEnergyResponse(double e, int hit, RandomEngineAndDistribution const *)
int onHcal() const
Definition: FSimTrack.h:116
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:22
const CaloSubdetectorGeometry * getHcalGeometry() const
Definition: Calorimeter.h:56
float charge() const
charge
Definition: FSimTrack.h:56
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
Log< level::Info, false > LogInfo
Definition: DetId.h:17
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
double e() const
energy of the momentum
Definition: RawParticle.h:305
int id() const
the index in FBaseSimEvent and other vectors
Definition: FSimTrack.h:96
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:320

◆ reconstructTrack()

void CalorimetryManager::reconstructTrack ( FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)

Definition at line 187 of file CalorimetryManager.cc.

References funct::abs(), FSimTrack::charge(), HCALResponse::correctHF(), debug_, RawParticle::e(), EMShowerSimulation(), dqmMemoryStats::float, FastHFShowerLibrary::getHitsMap(), FSimTrack::hcalEntrance(), HDShowerSimulation(), FSimTrack::id(), MuonMipSimulation(), myHDResponse_, FSimTrack::noEndVertex(), FSimTrack::onEcal(), FSimTrack::onHcal(), FSimTrack::onVFcal(), optionHDSim_, FastHFShowerLibrary::recoHFShowerLibrary(), reconstructHCAL(), theHFShowerLibrary, CoreSimTrack::type(), updateHCAL(), and useShowerLibrary.

Referenced by reconstruct().

187  {
188  int pid = abs(myTrack.type());
189 
190  if (debug_) {
191  LogInfo("FastCalorimetry") << " ===> pid = " << pid << std::endl;
192  }
193 
194  // Check that the particle hasn't decayed
195  if (myTrack.noEndVertex()) {
196  // Simulate energy smearing for photon and electrons
197  float charge_ = (float)(myTrack.charge());
198  if (pid == 11 || pid == 22) {
199  if (myTrack.onEcal())
200  EMShowerSimulation(myTrack, random);
201  else if (myTrack.onVFcal()) {
202  if (useShowerLibrary) {
204  myHDResponse_->correctHF(myTrack.hcalEntrance().e(), abs(myTrack.type()));
206  } else
207  reconstructHCAL(myTrack, random);
208  }
209  } // electron or photon
210  else if (pid == 13 || pid == 1000024 || (pid > 1000100 && pid < 1999999 && fabs(charge_) > 0.001)) {
211  MuonMipSimulation(myTrack, random);
212  }
213  // Simulate energy smearing for hadrons (i.e., everything
214  // but muons... and SUSY particles that deserve a special
215  // treatment.
216  else if (pid < 1000000) {
217  if (myTrack.onHcal() || myTrack.onVFcal()) {
218  if (optionHDSim_ == 0)
219  reconstructHCAL(myTrack, random);
220  else
221  HDShowerSimulation(myTrack, random);
222  }
223  } // pid < 1000000
224  } // myTrack.noEndVertex()
225 }
void reconstructHCAL(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
void updateHCAL(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:146
void recoHFShowerLibrary(const FSimTrack &myTrack)
void correctHF(double e, int type)
int onHcal() const
Definition: FSimTrack.h:116
void MuonMipSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
bool noEndVertex() const
no end vertex
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:22
void HDShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
Hadronic Shower Simulation.
float charge() const
charge
Definition: FSimTrack.h:56
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const std::map< CaloHitID, float > & getHitsMap()
int onVFcal() const
Definition: FSimTrack.h:121
int onEcal() const
Definition: FSimTrack.h:111
HCALResponse * myHDResponse_
Log< level::Info, false > LogInfo
FastHFShowerLibrary * theHFShowerLibrary
double e() const
energy of the momentum
Definition: RawParticle.h:305
int id() const
the index in FBaseSimEvent and other vectors
Definition: FSimTrack.h:96
void EMShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)

◆ respCorr()

void CalorimetryManager::respCorr ( double  p)
private

Definition at line 1030 of file CalorimetryManager.cc.

References debug_, ecorr, hcorr, mps_fire::i, k_e, k_h, AlCaHLTBitMon_ParallelJobs::p, p_knots, testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, testProducerWithPsetDescEmpty_cfi::y1, and testProducerWithPsetDescEmpty_cfi::y2.

Referenced by HDShowerSimulation().

1030  {
1031  int sizeP = p_knots.size();
1032 
1033  if (sizeP <= 1) {
1034  ecorr = 1.;
1035  hcorr = 1.;
1036  } else {
1037  int ip = -1;
1038  for (int i = 0; i < sizeP; i++) {
1039  if (p < p_knots[i]) {
1040  ip = i;
1041  break;
1042  }
1043  }
1044  if (ip == 0) {
1045  ecorr = k_e[0];
1046  hcorr = k_h[0];
1047  } else {
1048  if (ip == -1) {
1049  ecorr = k_e[sizeP - 1];
1050  hcorr = k_h[sizeP - 1];
1051  } else {
1052  double x1 = p_knots[ip - 1];
1053  double x2 = p_knots[ip];
1054  double y1 = k_e[ip - 1];
1055  double y2 = k_e[ip];
1056 
1057  ecorr = (y1 + (y2 - y1) * (p - x1) / (x2 - x1));
1058 
1059  y1 = k_h[ip - 1];
1060  y2 = k_h[ip];
1061  hcorr = (y1 + (y2 - y1) * (p - x1) / (x2 - x1));
1062  }
1063  }
1064  }
1065 
1066  if (debug_)
1067  LogInfo("FastCalorimetry") << " p, ecorr, hcorr = " << p << " " << ecorr << " " << hcorr << std::endl;
1068 }
std::vector< double > k_h
std::vector< double > p_knots
Log< level::Info, false > LogInfo
std::vector< double > k_e

◆ updateECAL()

void CalorimetryManager::updateECAL ( const std::map< CaloHitID, float > &  hitMap,
int  onEcal,
int  trackID = 0,
float  corr = 1.0 
)
private

Definition at line 1070 of file CalorimetryManager.cc.

References alignCSCRings::corr, EBMapping_, EEMapping_, and HCALHighEnergyHPDFilter_cfi::energy.

Referenced by EMShowerSimulation(), HDShowerSimulation(), and MuonMipSimulation().

1070  {
1071  std::map<CaloHitID, float>::const_iterator mapitr;
1072  std::map<CaloHitID, float>::const_iterator endmapitr = hitMap.end();
1073  if (onEcal == 1) {
1074  EBMapping_.reserve(EBMapping_.size() + hitMap.size());
1075  endmapitr = hitMap.end();
1076  for (mapitr = hitMap.begin(); mapitr != endmapitr; ++mapitr) {
1077  //correct energy
1078  float energy = mapitr->second;
1079  energy *= corr;
1080 
1081  //make finalized CaloHitID
1082  CaloHitID current_id(mapitr->first.unitID(), mapitr->first.timeSlice(), trackID);
1083 
1084  EBMapping_.push_back(std::pair<CaloHitID, float>(current_id, energy));
1085  }
1086  } else if (onEcal == 2) {
1087  EEMapping_.reserve(EEMapping_.size() + hitMap.size());
1088  endmapitr = hitMap.end();
1089  for (mapitr = hitMap.begin(); mapitr != endmapitr; ++mapitr) {
1090  //correct energy
1091  float energy = mapitr->second;
1092  energy *= corr;
1093 
1094  //make finalized CaloHitID
1095  CaloHitID current_id(mapitr->first.unitID(), mapitr->first.timeSlice(), trackID);
1096 
1097  EEMapping_.push_back(std::pair<CaloHitID, float>(current_id, energy));
1098  }
1099  }
1100 }
dictionary corr
std::vector< std::pair< CaloHitID, float > > EEMapping_
std::vector< std::pair< CaloHitID, float > > EBMapping_

◆ updateHCAL()

void CalorimetryManager::updateHCAL ( const std::map< CaloHitID, float > &  hitMap,
int  trackID = 0,
float  corr = 1.0 
)
private

Definition at line 1102 of file CalorimetryManager.cc.

References alignCSCRings::corr, HcalDetId::depth(), HCALHighEnergyHPDFilter_cfi::energy, HCALResponse::getCorrHFem(), HCALResponse::getCorrHFhad(), HcalBarrel, HcalDigitizer_, HcalEndcap, HcalForward, HcalOuter, HMapping_, HcalDetId::ietaAbs(), ietaShiftHB_, ietaShiftHE_, ietaShiftHF_, ietaShiftHO_, myHDResponse_, or, samplingHBHE_, samplingHF_, samplingHO_, DetId::subdetId(), protons_cff::time, timeShiftHB_, timeShiftHE_, timeShiftHF_, timeShiftHO_, useCorrectionSL, and useShowerLibrary.

Referenced by EMShowerSimulation(), HDShowerSimulation(), MuonMipSimulation(), reconstructHCAL(), and reconstructTrack().

1102  {
1103  std::vector<double> hfcorrEm = myHDResponse_->getCorrHFem();
1104  std::vector<double> hfcorrHad = myHDResponse_->getCorrHFhad();
1105  std::map<CaloHitID, float>::const_iterator mapitr;
1106  std::map<CaloHitID, float>::const_iterator endmapitr = hitMap.end();
1107  HMapping_.reserve(HMapping_.size() + hitMap.size());
1108  for (mapitr = hitMap.begin(); mapitr != endmapitr; ++mapitr) {
1109  //correct energy
1110  float energy = mapitr->second;
1111  energy *= corr;
1112 
1113  float time = mapitr->first.timeSlice();
1114  //put energy into uncalibrated state for digitizer && correct timing
1115  if (HcalDigitizer_) {
1116  HcalDetId hdetid = HcalDetId(mapitr->first.unitID());
1117  if (hdetid.subdetId() == HcalBarrel) {
1118  energy /= samplingHBHE_[hdetid.ietaAbs() - 1]; //re-convert to GeV
1119  time = timeShiftHB_[hdetid.ietaAbs() - ietaShiftHB_];
1120  } else if (hdetid.subdetId() == HcalEndcap) {
1121  energy /= samplingHBHE_[hdetid.ietaAbs() - 1]; //re-convert to GeV
1122  time = timeShiftHE_[hdetid.ietaAbs() - ietaShiftHE_];
1123  } else if (hdetid.subdetId() == HcalForward) {
1124  if (useShowerLibrary) {
1125  if (useCorrectionSL) {
1126  if (hdetid.depth() == 1 or hdetid.depth() == 3)
1127  energy *= hfcorrEm[hdetid.ietaAbs() - ietaShiftHF_];
1128  if (hdetid.depth() == 2 or hdetid.depth() == 4)
1129  energy *= hfcorrHad[hdetid.ietaAbs() - ietaShiftHF_];
1130  }
1131  } else {
1132  if (hdetid.depth() == 1 or hdetid.depth() == 3)
1133  energy *= samplingHF_[0];
1134  if (hdetid.depth() == 2 or hdetid.depth() == 4)
1135  energy *= samplingHF_[1];
1136  time = timeShiftHF_[hdetid.ietaAbs() - ietaShiftHF_];
1137  }
1138  } else if (hdetid.subdetId() == HcalOuter) {
1139  energy /= samplingHO_[hdetid.ietaAbs() - 1];
1140  time = timeShiftHO_[hdetid.ietaAbs() - ietaShiftHO_];
1141  }
1142  }
1143 
1144  //make finalized CaloHitID
1145  CaloHitID current_id(mapitr->first.unitID(), time, trackID);
1146  HMapping_.push_back(std::pair<CaloHitID, float>(current_id, energy));
1147  }
1148 }
std::vector< double > timeShiftHO_
constexpr int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:148
std::vector< double > timeShiftHF_
std::vector< double > samplingHF_
dictionary corr
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
vec1 & getCorrHFhad()
Definition: HCALResponse.h:48
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
std::vector< double > samplingHBHE_
HCALResponse * myHDResponse_
vec1 & getCorrHFem()
Definition: HCALResponse.h:47
std::vector< double > timeShiftHB_
std::vector< std::pair< CaloHitID, float > > HMapping_
std::vector< double > samplingHO_
std::vector< double > timeShiftHE_
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164

◆ updatePreshower()

void CalorimetryManager::updatePreshower ( const std::map< CaloHitID, float > &  hitMap,
int  trackID = 0,
float  corr = 1.0 
)
private

Definition at line 1150 of file CalorimetryManager.cc.

References alignCSCRings::corr, HCALHighEnergyHPDFilter_cfi::energy, and ESMapping_.

Referenced by EMShowerSimulation().

1150  {
1151  std::map<CaloHitID, float>::const_iterator mapitr;
1152  std::map<CaloHitID, float>::const_iterator endmapitr = hitMap.end();
1153  ESMapping_.reserve(ESMapping_.size() + hitMap.size());
1154  for (mapitr = hitMap.begin(); mapitr != endmapitr; ++mapitr) {
1155  //correct energy
1156  float energy = mapitr->second;
1157  energy *= corr;
1158 
1159  //make finalized CaloHitID
1160  CaloHitID current_id(mapitr->first.unitID(), mapitr->first.timeSlice(), trackID);
1161 
1162  ESMapping_.push_back(std::pair<CaloHitID, float>(current_id, energy));
1163  }
1164 }
dictionary corr
std::vector< std::pair< CaloHitID, float > > ESMapping_

Member Data Documentation

◆ aGammaGenerator

GammaFunctionGenerator* CalorimetryManager::aGammaGenerator
private

Definition at line 153 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and EMShowerSimulation().

◆ aLandauGenerator

const LandauFluctuationGenerator* CalorimetryManager::aLandauGenerator
private

Definition at line 152 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and EMShowerSimulation().

◆ aTerm

double CalorimetryManager::aTerm
private

Definition at line 142 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ bFixedLength_

bool CalorimetryManager::bFixedLength_
private

Definition at line 178 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ bTerm

double CalorimetryManager::bTerm
private

Definition at line 142 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ crackPadSurvivalProbability_

double CalorimetryManager::crackPadSurvivalProbability_
private

Definition at line 137 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ debug_

bool CalorimetryManager::debug_
private

◆ EBMapping_

std::vector<std::pair<CaloHitID, float> > CalorimetryManager::EBMapping_
private

Definition at line 108 of file CalorimetryManager.h.

Referenced by clean(), loadFromEcalBarrel(), and updateECAL().

◆ ecalCorrection

std::unique_ptr<KKCorrectionFactors> CalorimetryManager::ecalCorrection
private

Definition at line 191 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and EMShowerSimulation().

◆ EcalDigitizer_

bool CalorimetryManager::EcalDigitizer_
private

Definition at line 119 of file CalorimetryManager.h.

Referenced by readParameters().

◆ ecorr

double CalorimetryManager::ecorr
private

Definition at line 163 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), and respCorr().

◆ EEMapping_

std::vector<std::pair<CaloHitID, float> > CalorimetryManager::EEMapping_
private

Definition at line 109 of file CalorimetryManager.h.

Referenced by clean(), loadFromEcalEndcap(), and updateECAL().

◆ ESMapping_

std::vector<std::pair<CaloHitID, float> > CalorimetryManager::ESMapping_
private

Definition at line 111 of file CalorimetryManager.h.

Referenced by clean(), loadFromPreshower(), and updatePreshower().

◆ evtsToDebug_

std::vector<unsigned int> CalorimetryManager::evtsToDebug_
private

Definition at line 114 of file CalorimetryManager.h.

Referenced by readParameters(), and reconstruct().

◆ gridSize_

int CalorimetryManager::gridSize_
private

Definition at line 144 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ HcalDigitizer_

bool CalorimetryManager::HcalDigitizer_
private

Definition at line 120 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ hcorr

double CalorimetryManager::hcorr
private

Definition at line 164 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), and respCorr().

◆ hdGridSize_

int CalorimetryManager::hdGridSize_
private

Definition at line 148 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), MuonMipSimulation(), and readParameters().

◆ hdSimMethod_

int CalorimetryManager::hdSimMethod_
private

Definition at line 148 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), and readParameters().

◆ HMapping_

std::vector<std::pair<CaloHitID, float> > CalorimetryManager::HMapping_
private

Definition at line 110 of file CalorimetryManager.h.

Referenced by clean(), loadFromHcal(), and updateHCAL().

◆ ietaShiftHB_

int CalorimetryManager::ietaShiftHB_
private

Definition at line 124 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ ietaShiftHE_

int CalorimetryManager::ietaShiftHE_
private

Definition at line 124 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ ietaShiftHF_

int CalorimetryManager::ietaShiftHF_
private

Definition at line 124 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ ietaShiftHO_

int CalorimetryManager::ietaShiftHO_
private

Definition at line 124 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ initialized_

bool CalorimetryManager::initialized_
private

Definition at line 167 of file CalorimetryManager.h.

Referenced by initialize().

◆ k_e

std::vector<double> CalorimetryManager::k_e
private

Definition at line 161 of file CalorimetryManager.h.

Referenced by readParameters(), and respCorr().

◆ k_h

std::vector<double> CalorimetryManager::k_h
private

Definition at line 162 of file CalorimetryManager.h.

Referenced by readParameters(), and respCorr().

◆ mipValues_

std::vector<double> CalorimetryManager::mipValues_
private

Definition at line 143 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ muonSimTracks

std::vector<FSimTrack> CalorimetryManager::muonSimTracks
private

◆ myCalorimeter_

CaloGeometryHelper* CalorimetryManager::myCalorimeter_
private

◆ myElec

RawParticle CalorimetryManager::myElec
private

A few pointers to save time.

Definition at line 131 of file CalorimetryManager.h.

Referenced by EMShowerSimulation().

◆ myHDResponse_

HCALResponse* CalorimetryManager::myHDResponse_
private

◆ myHistos

Histos* CalorimetryManager::myHistos
private

Definition at line 103 of file CalorimetryManager.h.

◆ myHSParameters_

HSParameters* CalorimetryManager::myHSParameters_
private

Definition at line 106 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

◆ myPart

RawParticle CalorimetryManager::myPart
private

Definition at line 133 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), HDShowerSimulation(), and MuonMipSimulation().

◆ myPosi

RawParticle CalorimetryManager::myPosi
private

Definition at line 132 of file CalorimetryManager.h.

Referenced by EMShowerSimulation().

◆ mySimEvent

FSimEvent* CalorimetryManager::mySimEvent
private

Definition at line 100 of file CalorimetryManager.h.

Referenced by MuonMipSimulation(), and reconstruct().

◆ myZero_

std::vector< std::pair< int, float > > CalorimetryManager::myZero_
staticprivate
Initial value:
=
std::vector<std::pair<int, float> >(1, std::pair<int, float>(0, 0.))

Definition at line 155 of file CalorimetryManager.h.

◆ optionHDSim_

int CalorimetryManager::optionHDSim_
private

Definition at line 148 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), readParameters(), and reconstructTrack().

◆ p_knots

std::vector<double> CalorimetryManager::p_knots
private

Definition at line 160 of file CalorimetryManager.h.

Referenced by readParameters(), and respCorr().

◆ pulledPadSurvivalProbability_

double CalorimetryManager::pulledPadSurvivalProbability_
private

Definition at line 136 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ radiusFactorEB_

double CalorimetryManager::radiusFactorEB_
private

Definition at line 140 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ radiusFactorEE_

double CalorimetryManager::radiusFactorEE_
private

Definition at line 140 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ radiusPreshowerCorrections_

std::vector<double> CalorimetryManager::radiusPreshowerCorrections_
private

Definition at line 141 of file CalorimetryManager.h.

Referenced by readParameters().

◆ RCFactor_

double CalorimetryManager::RCFactor_
private

Definition at line 146 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ rsp

std::vector<double> CalorimetryManager::rsp
private

Definition at line 159 of file CalorimetryManager.h.

Referenced by readParameters().

◆ RTFactor_

double CalorimetryManager::RTFactor_
private

Definition at line 146 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ samplingHBHE_

std::vector<double> CalorimetryManager::samplingHBHE_
private

Definition at line 121 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ samplingHF_

std::vector<double> CalorimetryManager::samplingHF_
private

Definition at line 122 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ samplingHO_

std::vector<double> CalorimetryManager::samplingHO_
private

Definition at line 123 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ savedMuonSimTracks

std::vector<FSimTrack> CalorimetryManager::savedMuonSimTracks
private

Definition at line 170 of file CalorimetryManager.h.

Referenced by clean(), harvestMuonSimTracks(), and MuonMipSimulation().

◆ simulatePreshower_

bool CalorimetryManager::simulatePreshower_
private

Definition at line 149 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), initialize(), and readParameters().

◆ spotFraction_

double CalorimetryManager::spotFraction_
private

Definition at line 138 of file CalorimetryManager.h.

Referenced by readParameters().

◆ theAntiProtonProfile

GflashAntiProtonShowerProfile* CalorimetryManager::theAntiProtonProfile
private

Definition at line 184 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

◆ theCoreIntervals_

std::vector<double> CalorimetryManager::theCoreIntervals_
private

Definition at line 145 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ theHFShowerLibrary

FastHFShowerLibrary* CalorimetryManager::theHFShowerLibrary
private

◆ theMuonEcalEffects

MaterialEffects* CalorimetryManager::theMuonEcalEffects
private

◆ theMuonHcalEffects

MaterialEffects* CalorimetryManager::theMuonHcalEffects
private

◆ thePiKProfile

GflashPiKShowerProfile* CalorimetryManager::thePiKProfile
private

Definition at line 182 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

◆ theProfile

GflashHadronShowerProfile* CalorimetryManager::theProfile
private

◆ theProtonProfile

GflashProtonShowerProfile* CalorimetryManager::theProtonProfile
private

Definition at line 183 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

◆ theTailIntervals_

std::vector<double> CalorimetryManager::theTailIntervals_
private

Definition at line 145 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

◆ timeShiftHB_

std::vector<double> CalorimetryManager::timeShiftHB_
private

Definition at line 125 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ timeShiftHE_

std::vector<double> CalorimetryManager::timeShiftHE_
private

Definition at line 126 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ timeShiftHF_

std::vector<double> CalorimetryManager::timeShiftHF_
private

Definition at line 127 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ timeShiftHO_

std::vector<double> CalorimetryManager::timeShiftHO_
private

Definition at line 128 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ unfoldedMode_

bool CalorimetryManager::unfoldedMode_
private

Definition at line 116 of file CalorimetryManager.h.

◆ useCorrectionSL

bool CalorimetryManager::useCorrectionSL
private

Definition at line 188 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

◆ useShowerLibrary

bool CalorimetryManager::useShowerLibrary
private