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)
 
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 46 of file CalorimetryManager.h.

Constructor & Destructor Documentation

CalorimetryManager::CalorimetryManager ( )

Definition at line 71 of file CalorimetryManager.cc.

71  :
72  myCalorimeter_(nullptr),
73  initialized_(false)
74 {;}
CaloGeometryHelper * myCalorimeter_
CalorimetryManager::CalorimetryManager ( FSimEvent aSimEvent,
const edm::ParameterSet fastCalo,
const edm::ParameterSet MuonECALPars,
const edm::ParameterSet MuonHCALPars,
const edm::ParameterSet fastGflash 
)

Definition at line 76 of file CalorimetryManager.cc.

References aGammaGenerator, aLandauGenerator, ecalCorrection, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), TrajectoryFactories_cff::MaterialEffects, myCalorimeter_, myHDResponse_, myHSParameters_, readParameters(), theAntiProtonProfile, theHFShowerLibrary, theMuonEcalEffects, theMuonHcalEffects, thePiKProfile, theProfile, and theProtonProfile.

81  :
82  mySimEvent(aSimEvent),
83  initialized_(false),
84  theMuonEcalEffects(nullptr), theMuonHcalEffects(nullptr), bFixedLength_(false)
85 {
86 
89 
90  //Gflash
91  theProfile = new GflashHadronShowerProfile(parGflash);
92  thePiKProfile = new GflashPiKShowerProfile(parGflash);
95 
96  // FastHFShowerLibrary
98 
99  readParameters(fastCalo);
100 
101  myCalorimeter_ =
102  new CaloGeometryHelper(fastCalo);
103  myHDResponse_ =
104  new HCALResponse(fastCalo.getParameter<edm::ParameterSet>("HCALResponse"));
105  myHSParameters_ =
106  new HSParameters(fastCalo.getParameter<edm::ParameterSet>("HSParameters"));
107 
108  // Material Effects for Muons in ECAL (only EnergyLoss implemented so far)
109  if ( fastMuECAL.getParameter<bool>("PairProduction") ||
110  fastMuECAL.getParameter<bool>("Bremsstrahlung") ||
111  fastMuECAL.getParameter<bool>("MuonBremsstrahlung") ||
112  fastMuECAL.getParameter<bool>("EnergyLoss") ||
113  fastMuECAL.getParameter<bool>("MultipleScattering") )
114  theMuonEcalEffects = new MaterialEffects(fastMuECAL);
115 
116  // Material Effects for Muons in HCAL (only EnergyLoss implemented so far)
117  if ( fastMuHCAL.getParameter<bool>("PairProduction") ||
118  fastMuHCAL.getParameter<bool>("Bremsstrahlung") ||
119  fastMuHCAL.getParameter<bool>("MuonBremsstrahlung") ||
120  fastMuHCAL.getParameter<bool>("EnergyLoss") ||
121  fastMuHCAL.getParameter<bool>("MultipleScattering") )
122  theMuonHcalEffects = new MaterialEffects(fastMuHCAL);
123 
124  if( fastCalo.exists("ECALResponseScaling") ) {
125  ecalCorrection = std::unique_ptr<KKCorrectionFactors>( new KKCorrectionFactors( fastCalo.getParameter<edm::ParameterSet>("ECALResponseScaling") ) );
126  }
127 
128 }
T getParameter(std::string const &) const
GflashPiKShowerProfile * thePiKProfile
MaterialEffects * theMuonEcalEffects
MaterialEffects * theMuonHcalEffects
GflashHadronShowerProfile * theProfile
bool exists(std::string const &parameterName) const
checks if a parameter exists
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_
CalorimetryManager::~CalorimetryManager ( )

Definition at line 140 of file CalorimetryManager.cc.

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

141 {
142  if(myCalorimeter_) delete myCalorimeter_;
143  if(myHDResponse_) delete myHDResponse_;
144 
147 
148  if ( theProfile ) delete theProfile;
149 
151 }
MaterialEffects * theMuonEcalEffects
MaterialEffects * theMuonHcalEffects
GflashHadronShowerProfile * theProfile
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
FastHFShowerLibrary * theHFShowerLibrary

Member Function Documentation

void CalorimetryManager::clean ( )
private

Definition at line 130 of file CalorimetryManager.cc.

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

Referenced by initialize().

131 {
132  EBMapping_.clear();
133  EEMapping_.clear();
134  HMapping_.clear();
135  ESMapping_.clear();
136  muonSimTracks.clear();
137  savedMuonSimTracks.clear();
138 }
std::vector< std::pair< CaloHitID, float > > ESMapping_
std::vector< std::pair< CaloHitID, float > > EBMapping_
std::vector< FSimTrack > muonSimTracks
std::vector< FSimTrack > savedMuonSimTracks
std::vector< std::pair< CaloHitID, float > > EEMapping_
std::vector< std::pair< CaloHitID, float > > HMapping_
void CalorimetryManager::EMShowerSimulation ( const FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)
private

Definition at line 236 of file CalorimetryManager.cc.

References funct::abs(), aGammaGenerator, aLandauGenerator, aTerm, bFixedLength_, bTerm, EMShower::compute(), crackPadSurvivalProbability_, debug_, particleFlowClusterECALTimeSelected_cfi::depth, GetRecoTauVFromDQM_MC_cff::dir2, MillePedeFileConverter_cfg::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(), cmsBatch::log, particleFlowClusterECALTimeSelected_cfi::maxEnergy, mipValues_, myCalorimeter_, myElec, myPart, myPosi, FSimTrack::onEcal(), FSimTrack::onHcal(), FSimTrack::onLayer1(), FSimTrack::onLayer2(), pulledPadSurvivalProbability_, radiusFactorEB_, radiusFactorEE_, ECALProperties::radLenIncm(), RCFactor_, RTFactor_, Scenarios_cff::scale, EcalHitMaker::setCrackPadSurvivalProbability(), EMShower::setGrid(), EMShower::setHcal(), EMShower::setPreshower(), EcalHitMaker::setPreshowerPresent(), EcalHitMaker::setPulledPadSurvivalProbability(), EcalHitMaker::setRadiusFactor(), EcalHitMaker::setTrackParameters(), RawParticle::setVertex(), simulatePreshower_, findQualityFiles::size, theCoreIntervals_, theTailIntervals_, CoreSimTrack::type(), updateECAL(), updateHCAL(), updatePreshower(), and RawParticle::vertex().

Referenced by reconstructTrack().

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

Definition at line 63 of file CalorimetryManager.h.

Referenced by FamosManager::setupGeometryAndField().

63 {return myCalorimeter_;}
CaloGeometryHelper * myCalorimeter_
FastHFShowerLibrary* CalorimetryManager::getHFShowerLibrary ( ) const
inline

Definition at line 66 of file CalorimetryManager.h.

References EnergyCorrector::c, clean, corr, and funct::m.

Referenced by FamosManager::setupGeometryAndField().

66 {return theHFShowerLibrary;}
FastHFShowerLibrary * theHFShowerLibrary
void CalorimetryManager::harvestMuonSimTracks ( edm::SimTrackContainer m) const

Definition at line 1336 of file CalorimetryManager.cc.

References muonSimTracks, savedMuonSimTracks, and HiIsolationCommonParameters_cff::track.

1337 {
1338  c.reserve(int(0.2*muonSimTracks.size()+0.2*savedMuonSimTracks.size()+0.5));
1339  for(const auto & track : muonSimTracks){
1340  if(track.momentum().perp2() > 1.0 && fabs(track.momentum().eta()) < 3.0 && track.isGlobal()) c.push_back(track);
1341  }
1342  for(const auto & track : savedMuonSimTracks){
1343  if(track.momentum().perp2() > 1.0 && fabs(track.momentum().eta()) < 3.0 && track.isGlobal()) c.push_back(track);
1344  }
1345  c.shrink_to_fit();
1346 }
std::vector< FSimTrack > muonSimTracks
std::vector< FSimTrack > savedMuonSimTracks
void CalorimetryManager::HDShowerSimulation ( const FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)
private

Hadronic Shower Simulation.

Definition at line 512 of file CalorimetryManager.cc.

References funct::abs(), HcalHitMaker::addHit(), ALCARECOTkAlJpsiMuMu_cff::charge, FSimTrack::charge(), HFShower::compute(), HDShower::compute(), HDRShower::computeShower(), HCALResponse::correctHF(), debug_, FSimTrack::ecalEntrance(), Calorimeter::ecalProperties(), ecorr, objects.autophobj::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(), GeV, 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_, objects.autophobj::particleType, random, 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::vertex(), and FSimTrack::vfcalEntrance().

Referenced by reconstructTrack().

512  {//,
513  // const edm::ParameterSet& fastCalo){
514 
516 
517  // TimeMe t(" FASTEnergyReconstructor::HDShower");
518  const XYZTLorentzVector& moment = myTrack.momentum();
519 
520  if(debug_)
521  LogInfo("FastCalorimetry")
522  << "CalorimetryManager::HDShowerSimulation - track param."
523  << std::endl
524  << " eta = " << moment.eta() << std::endl
525  << " phi = " << moment.phi() << std::endl
526  << " et = " << moment.Et() << std::endl
527  << " e = " << myTrack.hcalEntrance().e() << std::endl;
528 
529  if (debug_) {
530  LogInfo("FastCalorimetry") << " HDShowerSimulation " << myTrack << std::endl;
531  }
532 
533 
534  int hit;
535 
536  XYZTLorentzVector trackPosition;
537  if ( myTrack.onEcal() ) {
538  trackPosition=myTrack.ecalEntrance().vertex();
539  hit = myTrack.onEcal()-1; //
540  myPart = myTrack.ecalEntrance();
541  } else if ( myTrack.onVFcal()) {
542  trackPosition=myTrack.vfcalEntrance().vertex();
543  hit = 2;
544  myPart = myTrack.vfcalEntrance();
545  }
546  else
547  {
548  LogInfo("FastCalorimetry") << " The particle is not in the acceptance " << std::endl;
549  return;
550  }
551 
552  // int onHCAL = hit + 1; - specially for myCalorimeter->hcalProperties(onHCAL)
553  // (below) to get VFcal properties ...
554  int onHCAL = hit + 1;
555  int onECAL = myTrack.onEcal();
556 
557  double pathEta = trackPosition.eta();
558  double pathPhi = trackPosition.phi();
559 
560  double eint = moment.e();
561  double eGen = myTrack.hcalEntrance().e();
562 
563  double emeas = 0.;
564  double pmip= myHDResponse_->getMIPfraction(eGen, pathEta);
565 
566 
567  //===========================================================================
568  if(eGen > 0.) {
569 
570  // ECAL and HCAL properties to get
572  theHDShowerparam(myCalorimeter_->ecalProperties(onECAL),
575 
576  //Making ECAL Grid (and segments calculation)
577  XYZPoint caloentrance;
578  XYZVector direction;
579  if(myTrack.onEcal())
580  {
581  caloentrance = myTrack.ecalEntrance().vertex().Vect();
582  direction = myTrack.ecalEntrance().Vect().Unit();
583  }
584  else if(myTrack.onHcal())
585  {
586  caloentrance = myTrack.hcalEntrance().vertex().Vect();
587  direction = myTrack.hcalEntrance().Vect().Unit();
588  }
589  else
590  {
591  caloentrance = myTrack.vfcalEntrance().vertex().Vect();
592  direction = myTrack.vfcalEntrance().Vect().Unit();
593  }
594 
595  if(debug_)
596  LogInfo("FastCalorimetry")
597  << "CalorimetryManager::HDShowerSimulation - on-calo 1 "
598  << std::endl
599  << " onEcal = " << myTrack.onEcal() << std::endl
600  << " onHcal = " << myTrack.onHcal() << std::endl
601  << " onVFcal = " << myTrack.onVFcal() << std::endl
602  << " position = " << caloentrance << std::endl;
603 
604 
605  DetId pivot;
606  if(myTrack.onEcal())
607  {
608  pivot=myCalorimeter_->getClosestCell(caloentrance,
609  true, myTrack.onEcal()==1);
610  }
611  else if(myTrack.onHcal())
612  {
613  pivot=myCalorimeter_->getClosestCell(caloentrance,
614  false, false);
615  }
616 
617  EcalHitMaker myGrid(myCalorimeter_,caloentrance,pivot,
618  pivot.null()? 0 : myTrack.onEcal(),hdGridSize_,1,
619  random);
620  // 1=HAD shower
621 
622  myGrid.setTrackParameters(direction,0,myTrack);
623  // Build the FAMOS HCAL
624  HcalHitMaker myHcalHitMaker(myGrid,(unsigned)1);
625 
626  // Shower simulation
627  bool status = false;
628  int mip = 2;
629  // Use HFShower for HF
630  if ( !myTrack.onEcal() && !myTrack.onHcal() ) {
631  // Warning : We give here the particle energy with the response
632  // but without the resolution/gaussian smearing
633  // For HF, the resolution is due to the PE statistic
634 
635  if(useShowerLibrary) {
637  status = true;
638  } else {
639  HFShower theShower(random,
640  &theHDShowerparam,
641  &myGrid,
642  &myHcalHitMaker,
643  onECAL,
644  eGen);
645  // eGen);
646  // e); // PV Warning : temporarly set the energy to the generated E
647 
648  status = theShower.compute();
649  }
650  } else {
651  if(hdSimMethod_ == 0) {
652  HDShower theShower(random,
653  &theHDShowerparam,
654  &myGrid,
655  &myHcalHitMaker,
656  onECAL,
657  eGen,
658  pmip);
659  status = theShower.compute();
660  mip = theShower.getmip();
661  }
662  else if (hdSimMethod_ == 1) {
663  HDRShower theShower(random,
664  &theHDShowerparam,
665  &myGrid,
666  &myHcalHitMaker,
667  onECAL,
668  eGen);
669  status = theShower.computeShower();
670  mip = 2;
671  }
672  else if (hdSimMethod_ == 2 ) {
673  //dynamically loading a corresponding profile by the particle type
674  int particleType = myTrack.type();
676  if(particleType == -2212) theProfile = theAntiProtonProfile;
677  else if(particleType == 2212) theProfile = theProtonProfile;
678 
679  //input variables for GflashHadronShowerProfile
680  int showerType = 99 + myTrack.onEcal();
681  double globalTime = 150.0; // a temporary reference hit time in nanosecond
682  float charge = (float)(myTrack.charge());
683  Gflash3Vector gfpos(trackPosition.X(),trackPosition.Y(),trackPosition.Z());
684  Gflash3Vector gfmom(moment.X(),moment.Y(),moment.Z());
685 
686  theProfile->initialize(showerType,eGen,globalTime,charge,gfpos,gfmom);
689 
690  //make hits
691  std::vector<GflashHit>& gflashHitList = theProfile->getGflashHitList();
692  std::vector<GflashHit>::const_iterator spotIter = gflashHitList.begin();
693  std::vector<GflashHit>::const_iterator spotIterEnd = gflashHitList.end();
694 
696 
697  for( ; spotIter != spotIterEnd; spotIter++){
698 
699  double pathLength = theProfile->getGflashShowino()->getPathLengthAtShower()
700  + (30*100/eGen)*(spotIter->getTime() - globalTime);
701 
702  double currentDepth = std::max(0.0,pathLength - theProfile->getGflashShowino()->getPathLengthOnEcal());
703 
704  //find the the showino position at the currentDepth
705  GflashTrajectoryPoint trajectoryPoint;
706  theProfile->getGflashShowino()->getHelix()->getGflashTrajectoryPoint(trajectoryPoint,pathLength);
707  Gflash3Vector positionAtCurrentDepth = trajectoryPoint.getPosition();
708  //find radial distrance
709  Gflash3Vector lateralDisplacement = positionAtCurrentDepth - spotIter->getPosition()/CLHEP::cm;
710  double rShower = lateralDisplacement.r();
711  double azimuthalAngle = lateralDisplacement.phi();
712 
713  whichCalor = Gflash::getCalorimeterNumber(positionAtCurrentDepth);
714 
715  if(whichCalor==Gflash::kESPM || whichCalor==Gflash::kENCA) {
716  bool statusPad = myGrid.getPads(currentDepth,true);
717  if(!statusPad) continue;
718  myGrid.setSpotEnergy(1.2*spotIter->getEnergy()/CLHEP::GeV);
719  myGrid.addHit(rShower/Gflash::intLength[Gflash::kESPM],azimuthalAngle,0);
720  }
721  else if(whichCalor==Gflash::kHB || whichCalor==Gflash::kHE) {
722  bool setHDdepth = myHcalHitMaker.setDepth(currentDepth,true);
723  if(!setHDdepth) continue;
724  myHcalHitMaker.setSpotEnergy(1.4*spotIter->getEnergy()/CLHEP::GeV);
725  myHcalHitMaker.addHit(rShower/Gflash::intLength[Gflash::kHB],azimuthalAngle,0);
726  }
727  }
728  status = true;
729  }
730  else {
731  edm::LogInfo("FastSimulationCalorimetry") << " SimMethod " << hdSimMethod_ <<" is NOT available ";
732  }
733  }
734 
735 
736  if(status) {
737 
738  // Here to switch between simple formulae and parameterized response
739  if(optionHDSim_ == 1) {
740  emeas = myHDResponse_->getHCALEnergyResponse(eGen, hit, random);
741  }
742  else { // optionHDsim == 2
743  emeas = myHDResponse_->responseHCAL(mip, eGen, pathEta, 1, random); // 1=hadron
744  }
745 
746  double correction = emeas / eGen;
747 
748  // RespCorrP factors (ECAL and HCAL separately) calculation
749  respCorr(eint);
750 
751  if(debug_)
752  LogInfo("FastCalorimetry")
753  << "CalorimetryManager::HDShowerSimulation - on-calo 2" << std::endl
754  << " eta = " << pathEta << std::endl
755  << " phi = " << pathPhi << std::endl
756  << " Egen = " << eGen << std::endl
757  << " Emeas = " << emeas << std::endl
758  << " corr = " << correction << std::endl
759  << " mip = " << mip << std::endl;
760 
761  if(myTrack.onEcal() > 0) {
762  // Save ECAL hits
763  updateECAL(myGrid.getHits(),onECAL,myTrack.id(),correction*ecorr);
764  }
765 
766  // Save HCAL hits
767  if(myTrack.onVFcal() && useShowerLibrary) {
768  myHDResponse_->correctHF(eGen,abs(myTrack.type()));
770  }
771  else
772  updateHCAL(myHcalHitMaker.getHits(),myTrack.id(),correction*hcorr);
773 
774  }
775  else { // shower simulation failed
776  if(myTrack.onHcal() || myTrack.onVFcal())
777  {
778  DetId cell = myCalorimeter_->getClosestCell(trackPosition.Vect(),false,false);
779  double tof = (((HcalGeometry*)(myCalorimeter_->getHcalGeometry()))->getPosition(cell).mag())/29.98;//speed of light
780  CaloHitID current_id(cell.rawId(),tof,myTrack.id());
781  std::map<CaloHitID,float> hitMap;
782  hitMap[current_id] = emeas;
783  updateHCAL(hitMap,myTrack.id());
784  if(debug_)
785  LogInfo("FastCalorimetry") << " HCAL simple cell "
786  << cell.rawId() << " added E = "
787  << emeas << std::endl;
788  }
789  }
790 
791  } // e > 0. ...
792 
793  if(debug_)
794  LogInfo("FastCalorimetry") << std::endl << " FASTEnergyReconstructor::HDShowerSimulation finished "
795  << std::endl;
796 }
float charge() const
charge
Definition: FSimTrack.h:51
const double GeV
Definition: MathUtil.h:16
const ECALProperties * ecalProperties(int onEcal) const
ECAL properties.
Definition: Calorimeter.cc:76
double responseHCAL(int _mip, double energy, double eta, int partype, RandomEngineAndDistribution const *)
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
Definition: FSimTrack.h:144
void updateHCAL(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
GflashPiKShowerProfile * thePiKProfile
GflashTrajectory * getHelix()
Definition: GflashShowino.h:30
void recoHFShowerLibrary(const FSimTrack &myTrack)
const XYZTLorentzVector & momentum() const
Temporary (until move of SimTrack to Mathcore) - No! Actually very useful.
Definition: FSimTrack.h:204
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)
const CaloSubdetectorGeometry * getHcalGeometry() const
Definition: Calorimeter.h:57
TRandom random
Definition: MVATrainer.cc:138
int onEcal() const
Definition: FSimTrack.h:106
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
CalorimeterNumber getCalorimeterNumber(const Gflash3Vector &position)
GflashAntiProtonShowerProfile * theAntiProtonProfile
math::XYZVector XYZVector
GflashProtonShowerProfile * theProtonProfile
double getPathLengthAtShower()
Definition: GflashShowino.h:26
void setTrackParameters(const XYZNormal &normal, double X0depthoffset, const FSimTrack &theTrack)
const HCALProperties * hcalProperties(int onHcal) const
HCAL properties.
Definition: Calorimeter.cc:87
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double getMIPfraction(double energy, double eta)
const RawParticle & ecalEntrance() const
The particle at ECAL entrance.
Definition: FSimTrack.h:138
int onVFcal() const
Definition: FSimTrack.h:116
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
const double intLength[kNumberCalorimeter]
void getGflashTrajectoryPoint(GflashTrajectoryPoint &point, double s) const
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:285
Definition: DetId.h:18
CLHEP::Hep3Vector Gflash3Vector
Definition: Gflash3Vector.h:6
bool null() const
is this a null id ?
Definition: DetId.h:45
double getPathLengthOnEcal()
Definition: GflashShowino.h:25
void SetRandom(const RandomEngineAndDistribution *)
math::XYZVector XYZPoint
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:25
int id() const
the index in FBaseSimEvent and other vectors
Definition: FSimTrack.h:91
const std::map< CaloHitID, float > & getHitsMap()
std::vector< GflashHit > & getGflashHitList()
int onHcal() const
Definition: FSimTrack.h:111
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:141
FastHFShowerLibrary * theHFShowerLibrary
DetId getClosestCell(const XYZPoint &point, bool ecal, bool central) const
HSParameters * myHSParameters_
void initialize(int showerType, double energy, double globalTime, double charge, Gflash3Vector &position, Gflash3Vector &momentum)
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
void CalorimetryManager::initialize ( RandomEngineAndDistribution const *  random)

Definition at line 175 of file CalorimetryManager.cc.

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

Referenced by reconstruct().

175  {
176 
177  // Clear the content of the calorimeters
178  if(!initialized_)
179  {
181 
182  // Check if the preshower is really available
184  {
185  edm::LogWarning("CalorimetryManager") << " WARNING: The preshower simulation has been turned on; but no preshower geometry is available " << std::endl;
186  edm::LogWarning("CalorimetryManager") << " Disabling the preshower simulation " << std::endl;
187  simulatePreshower_ = false;
188  }
189 
190  initialized_=true;
191  }
192  clean();
193 }
TRandom random
Definition: MVATrainer.cc:138
CaloGeometryHelper * myCalorimeter_
void SetRandom(const RandomEngineAndDistribution *)
bool preshowerPresent() const
FastHFShowerLibrary * theHFShowerLibrary
void CalorimetryManager::loadFromEcalBarrel ( edm::PCaloHitContainer c) const

Definition at line 1279 of file CalorimetryManager.cc.

References EBMapping_, plotBeamSpotDB::first, mps_fire::i, edm::second(), and EBDetId::unhashIndex().

Referenced by FamosProducer::produce().

1280 {
1281  c.reserve(c.size()+EBMapping_.size());
1282  for(unsigned i=0; i<EBMapping_.size(); i++) {
1283  c.push_back(PCaloHit(EBDetId::unhashIndex(EBMapping_[i].first.unitID()),EBMapping_[i].second,EBMapping_[i].first.timeSlice(),EBMapping_[i].first.trackID()));
1284  }
1285 }
std::vector< std::pair< CaloHitID, float > > EBMapping_
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:114
void CalorimetryManager::loadFromEcalEndcap ( edm::PCaloHitContainer c) const

Definition at line 1287 of file CalorimetryManager.cc.

References EEMapping_, plotBeamSpotDB::first, mps_fire::i, edm::second(), and EEDetId::unhashIndex().

Referenced by FamosProducer::produce().

1288 {
1289  c.reserve(c.size()+EEMapping_.size());
1290  for(unsigned i=0; i<EEMapping_.size(); i++) {
1291  c.push_back(PCaloHit(EEDetId::unhashIndex(EEMapping_[i].first.unitID()),EEMapping_[i].second,EEMapping_[i].first.timeSlice(),EEMapping_[i].first.trackID()));
1292  }
1293 }
static EEDetId unhashIndex(int hi)
Definition: EEDetId.cc:99
U second(std::pair< T, U > const &p)
std::vector< std::pair< CaloHitID, float > > EEMapping_
void CalorimetryManager::loadFromHcal ( edm::PCaloHitContainer c) const

Definition at line 1295 of file CalorimetryManager.cc.

References plotBeamSpotDB::first, HMapping_, mps_fire::i, and edm::second().

Referenced by FamosProducer::produce().

1296 {
1297  c.reserve(c.size()+HMapping_.size());
1298  for(unsigned i=0; i<HMapping_.size(); i++) {
1299  c.push_back(PCaloHit(DetId(HMapping_[i].first.unitID()),HMapping_[i].second,HMapping_[i].first.timeSlice(),HMapping_[i].first.trackID()));
1300  }
1301 }
U second(std::pair< T, U > const &p)
Definition: DetId.h:18
std::vector< std::pair< CaloHitID, float > > HMapping_
void CalorimetryManager::loadFromPreshower ( edm::PCaloHitContainer c) const

Definition at line 1304 of file CalorimetryManager.cc.

References ESMapping_, plotBeamSpotDB::first, and mps_fire::i.

Referenced by FamosProducer::produce().

1305 {
1306  c.reserve(c.size()+ESMapping_.size());
1307  for(unsigned i=0; i<ESMapping_.size(); i++) {
1308  c.push_back(PCaloHit(ESMapping_[i].first.unitID(),ESMapping_[i].second,ESMapping_[i].first.timeSlice(),ESMapping_[i].first.trackID()));
1309  }
1310 }
std::vector< std::pair< CaloHitID, float > > ESMapping_
void CalorimetryManager::loadMuonSimTracks ( edm::SimTrackContainer m) const

Definition at line 1314 of file CalorimetryManager.cc.

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

Referenced by FamosProducer::produce().

1315 {
1316  unsigned size=muons.size();
1317  for(unsigned i=0; i<size;++i)
1318  {
1319  int id = muons[i].trackId();
1320  if (!(abs(muons[i].type()) == 13 || abs(muons[i].type()) == 1000024 ||
1321  (abs(muons[i].type()) > 1000100 && abs(muons[i].type()) < 1999999)))
1322  continue;
1323  // identify the corresponding muon in the local collection
1324 
1325  std::vector<FSimTrack>::const_iterator itcheck=find_if(muonSimTracks.begin(),muonSimTracks.end(),FSimTrackEqual(id));
1326  if(itcheck!=muonSimTracks.end())
1327  {
1328  muons[i].setTkPosition(itcheck->trackerSurfacePosition());
1329  muons[i].setTkMomentum(itcheck->trackerSurfaceMomentum());
1330  }
1331  }
1332 
1333 }
size
Write out results.
type
Definition: HCALResponse.h:21
std::vector< FSimTrack > muonSimTracks
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void CalorimetryManager::MuonMipSimulation ( const FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)
private

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

Definition at line 799 of file CalorimetryManager.cc.

References HcalHitMaker::addHit(), ALCARECOTkAlJpsiMuMu_cff::charge, FSimTrack::charge(), debug_, EnergyLossSimulator::deltaMom(), FSimTrack::ecalEntrance(), MaterialEffects::energyLossSimulator(), objects.autophobj::float, CaloGeometryHelper::getClosestCell(), HcalHitMaker::getHits(), CaloSegment::HCAL, FSimTrack::hcalEntrance(), hdGridSize_, FSimTrack::id(), FSimTrack::momentum(), muonSimTracks, myCalorimeter_, myPart, DetId::null(), FSimTrack::onEcal(), FSimTrack::onHcal(), FSimTrack::onVFcal(), CaloSegment::PbWO4, random, reconstructHCAL(), savedMuonSimTracks, RawParticle::setID(), HcalHitMaker::setSpotEnergy(), SimTrack::setTkMomentum(), SimTrack::setTkPosition(), EcalHitMaker::setTrackParameters(), theMuonEcalEffects, theMuonHcalEffects, updateECAL(), updateHCAL(), MaterialEffectsSimulator::updateState(), RawParticle::vertex(), and FSimTrack::vfcalEntrance().

Referenced by reconstructTrack().

800 {
801  // TimeMe t(" FASTEnergyReconstructor::HDShower");
802  XYZTLorentzVector moment = myTrack.momentum();
803 
804  // Backward compatibility behaviour
805  if(!theMuonHcalEffects)
806  {
807  savedMuonSimTracks.push_back(myTrack);
808 
809  if(myTrack.onHcal() || myTrack.onVFcal() )
810  reconstructHCAL(myTrack, random);
811 
812  return;
813  }
814 
815 
816  if(debug_)
817  LogInfo("FastCalorimetry") << "CalorimetryManager::MuonMipSimulation - track param."
818  << std::endl
819  << " eta = " << moment.eta() << std::endl
820  << " phi = " << moment.phi() << std::endl
821  << " et = " << moment.Et() << std::endl;
822 
823  XYZTLorentzVector trackPosition;
824  if ( myTrack.onEcal() ) {
825  trackPosition=myTrack.ecalEntrance().vertex();
826  myPart = myTrack.ecalEntrance();
827  } else if ( myTrack.onVFcal()) {
828  trackPosition=myTrack.vfcalEntrance().vertex();
829  myPart = myTrack.vfcalEntrance();
830  }
831  else
832  {
833  LogInfo("FastCalorimetry") << " The particle is not in the acceptance " << std::endl;
834  return;
835  }
836 
837  // int onHCAL = hit + 1; - specially for myCalorimeter->hcalProperties(onHCAL)
838  // (below) to get VFcal properties ...
839  // not needed ?
840  // int onHCAL = hit + 1;
841  int onECAL = myTrack.onEcal();
842 
843  //===========================================================================
844 
845  // ECAL and HCAL properties to get
846 
847  //Making ECAL Grid (and segments calculation)
848  XYZPoint caloentrance;
849  XYZVector direction;
850  if(myTrack.onEcal())
851  {
852  caloentrance = myTrack.ecalEntrance().vertex().Vect();
853  direction = myTrack.ecalEntrance().Vect().Unit();
854  }
855  else if(myTrack.onHcal())
856  {
857  caloentrance = myTrack.hcalEntrance().vertex().Vect();
858  direction = myTrack.hcalEntrance().Vect().Unit();
859  }
860  else
861  {
862  caloentrance = myTrack.vfcalEntrance().vertex().Vect();
863  direction = myTrack.vfcalEntrance().Vect().Unit();
864  }
865 
866  DetId pivot;
867  if(myTrack.onEcal())
868  {
869  pivot=myCalorimeter_->getClosestCell(caloentrance,
870  true, myTrack.onEcal()==1);
871  }
872  else if(myTrack.onHcal())
873  {
874  pivot=myCalorimeter_->getClosestCell(caloentrance,
875  false, false);
876  }
877 
878  EcalHitMaker myGrid(myCalorimeter_,caloentrance,pivot,
879  pivot.null()? 0 : myTrack.onEcal(),hdGridSize_,0,
880  random);
881  // 0 =EM shower -> Unit = X0
882 
883  myGrid.setTrackParameters(direction,0,myTrack);
884 
885  // Now get the path in the Preshower, ECAL and HCAL along a straight line extrapolation
886  // but only those in the ECAL are used
887 
888  const std::vector<CaloSegment>& segments=myGrid.getSegments();
889  unsigned nsegments=segments.size();
890 
891  int ifirstHcal=-1;
892  int ilastEcal=-1;
893 
894  EnergyLossSimulator* energyLossECAL = (theMuonEcalEffects) ?
896  // // Muon brem in ECAL
897  // MuonBremsstrahlungSimulator* muonBremECAL = 0;
898  // if (theMuonEcalEffects) muonBremECAL = theMuonEcalEffects->muonBremsstrahlungSimulator();
899 
900  for(unsigned iseg=0;iseg<nsegments&&ifirstHcal<0;++iseg)
901  {
902 
903  // in the ECAL, there are two types of segments: PbWO4 and GAP
904  float segmentSizeinX0=segments[iseg].X0length();
905 
906  // Martijn - insert your computations here
907  float energy=0.0;
908  if (segmentSizeinX0>0.001 && segments[iseg].material()==CaloSegment::PbWO4 ) {
909  // The energy loss simulator
910  float charge = (float)(myTrack.charge());
911  ParticlePropagator theMuon(moment,trackPosition,charge,nullptr);
912  theMuon.setID(-(int)charge*13);
913  if ( energyLossECAL ) {
914  energyLossECAL->updateState(theMuon, segmentSizeinX0, random);
915  energy = energyLossECAL->deltaMom().E();
916  moment -= energyLossECAL->deltaMom();
917  }
918  }
919  // that's all for ECAL, Florian
920  // Save the hit only if it is a crystal
921  if(segments[iseg].material()==CaloSegment::PbWO4)
922  {
923  myGrid.getPads(segments[iseg].sX0Entrance()+segmentSizeinX0*0.5);
924  myGrid.setSpotEnergy(energy);
925  myGrid.addHit(0.,0.);
926  ilastEcal=iseg;
927  }
928  // Check for end of loop:
929  if(segments[iseg].material()==CaloSegment::HCAL)
930  {
931  ifirstHcal=iseg;
932  }
933  }
934 
935 
936  // Build the FAMOS HCAL
937  HcalHitMaker myHcalHitMaker(myGrid,(unsigned)2);
938  // float mipenergy=0.1;
939  // Create the helix with the stepping helix propagator
940  // to add a hit, just do
941  // myHcalHitMaker.setSpotEnergy(mipenergy);
942  // math::XYZVector hcalEntrance;
943  // if(ifirstHcal>=0) hcalEntrance=segments[ifirstHcal].entrance();
944  // myHcalHitMaker.addHit(hcalEntrance);
948  int ilastHcal=-1;
949  float mipenergy=0.0;
950 
951  EnergyLossSimulator* energyLossHCAL = (theMuonHcalEffects) ?
953  // // Muon Brem effect
954  // MuonBremsstrahlungSimulator* muonBremHCAL = 0;
955  // if (theMuonHcalEffects) muonBremHCAL = theMuonHcalEffects->muonBremsstrahlungSimulator();
956 
957  if(ifirstHcal>0 && energyLossHCAL){
958  for(unsigned iseg=ifirstHcal;iseg<nsegments;++iseg)
959  {
960  float segmentSizeinX0=segments[iseg].X0length();
961  if(segments[iseg].material()==CaloSegment::HCAL) {
962  ilastHcal=iseg;
963  if (segmentSizeinX0>0.001) {
964  // The energy loss simulator
965  float charge = (float)(myTrack.charge());
966  ParticlePropagator theMuon(moment,trackPosition,charge,nullptr);
967  theMuon.setID(-(int)charge*13);
968  energyLossHCAL->updateState(theMuon, segmentSizeinX0, random);
969  mipenergy = energyLossHCAL->deltaMom().E();
970  moment -= energyLossHCAL->deltaMom();
971  myHcalHitMaker.setSpotEnergy(mipenergy);
972  myHcalHitMaker.addHit(segments[iseg].entrance());
973  }
974  }
975  }
976  }
977 
978  // Copy the muon SimTrack (Only for Energy loss)
979  FSimTrack muonTrack(myTrack);
980  if(energyLossHCAL && ilastHcal>=0) {
981  math::XYZVector hcalExit=segments[ilastHcal].exit();
982  muonTrack.setTkPosition(hcalExit);
983  muonTrack.setTkMomentum(moment);
984  } else if(energyLossECAL && ilastEcal>=0) {
985  math::XYZVector ecalExit=segments[ilastEcal].exit();
986  muonTrack.setTkPosition(ecalExit);
987  muonTrack.setTkMomentum(moment);
988  } // else just leave tracker surface position and momentum...
989 
990  muonSimTracks.push_back(muonTrack);
991 
992  // no need to change below this line
993  std::map<CaloHitID,float>::const_iterator mapitr;
994  std::map<CaloHitID,float>::const_iterator endmapitr;
995  if(myTrack.onEcal() > 0) {
996  // Save ECAL hits
997  updateECAL(myGrid.getHits(),onECAL,myTrack.id());
998  }
999 
1000  // Save HCAL hits
1001  updateHCAL(myHcalHitMaker.getHits(),myTrack.id());
1002 
1003  if(debug_)
1004  LogInfo("FastCalorimetry") << std::endl << " FASTEnergyReconstructor::MipShowerSimulation finished "
1005  << std::endl;
1006 }
float charge() const
charge
Definition: FSimTrack.h:51
void reconstructHCAL(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
Definition: FSimTrack.h:144
void updateHCAL(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
MaterialEffects * theMuonEcalEffects
MaterialEffects * theMuonHcalEffects
const XYZTLorentzVector & momentum() const
Temporary (until move of SimTrack to Mathcore) - No! Actually very useful.
Definition: FSimTrack.h:204
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)
TRandom random
Definition: MVATrainer.cc:138
int onEcal() const
Definition: FSimTrack.h:106
std::vector< FSimTrack > muonSimTracks
math::XYZVector XYZVector
void setTrackParameters(const XYZNormal &normal, double X0depthoffset, const FSimTrack &theTrack)
const XYZTLorentzVector & deltaMom() const
Returns the actual energy lost.
const RawParticle & ecalEntrance() const
The particle at ECAL entrance.
Definition: FSimTrack.h:138
int onVFcal() const
Definition: FSimTrack.h:116
CaloGeometryHelper * myCalorimeter_
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:285
Definition: DetId.h:18
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
std::vector< FSimTrack > savedMuonSimTracks
bool null() const
is this a null id ?
Definition: DetId.h:45
math::XYZVector XYZPoint
int id() const
the index in FBaseSimEvent and other vectors
Definition: FSimTrack.h:91
int onHcal() const
Definition: FSimTrack.h:111
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:141
DetId getClosestCell(const XYZPoint &point, bool ecal, bool central) const
EnergyLossSimulator * energyLossSimulator() const
Return the Energy Loss engine.
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
void CalorimetryManager::readParameters ( const edm::ParameterSet fastCalo)
private

Definition at line 1009 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().

1009  {
1010 
1011  edm::ParameterSet ECALparameters = fastCalo.getParameter<edm::ParameterSet>("ECAL");
1012 
1013  evtsToDebug_ = fastCalo.getUntrackedParameter<std::vector<unsigned int> >("EvtsToDebug",std::vector<unsigned>());
1014  debug_ = fastCalo.getUntrackedParameter<bool>("Debug");
1015 
1016  bFixedLength_ = ECALparameters.getParameter<bool>("bFixedLength");
1017 
1018  gridSize_ = ECALparameters.getParameter<int>("GridSize");
1019  spotFraction_ = ECALparameters.getParameter<double>("SpotFraction");
1020  pulledPadSurvivalProbability_ = ECALparameters.getParameter<double>("FrontLeakageProbability");
1021  crackPadSurvivalProbability_ = ECALparameters.getParameter<double>("GapLossProbability");
1022  theCoreIntervals_ = ECALparameters.getParameter<std::vector<double> >("CoreIntervals");
1023  theTailIntervals_ = ECALparameters.getParameter<std::vector<double> >("TailIntervals");
1024 
1025  RCFactor_ = ECALparameters.getParameter<double>("RCFactor");
1026  RTFactor_ = ECALparameters.getParameter<double>("RTFactor");
1027  //changed after tuning - Feb-July - Shilpi Jain
1028  // radiusFactor_ = ECALparameters.getParameter<double>("RadiusFactor");
1029  radiusFactorEE_ = ECALparameters.getParameter<double>("RadiusFactorEE");
1030  radiusFactorEB_ = ECALparameters.getParameter<double>("RadiusFactorEB");
1031  //(end of) changed after tuning - Feb-July - Shilpi Jain
1032  radiusPreshowerCorrections_ = ECALparameters.getParameter<std::vector<double> >("RadiusPreshowerCorrections");
1035  mipValues_ = ECALparameters.getParameter<std::vector<double> >("MipsinGeV");
1036  simulatePreshower_ = ECALparameters.getParameter<bool>("SimulatePreshower");
1037 
1038  if(gridSize_ <1) gridSize_= 7;
1039  if(pulledPadSurvivalProbability_ <0. || pulledPadSurvivalProbability_>1 ) pulledPadSurvivalProbability_= 1.;
1040  if(crackPadSurvivalProbability_ <0. || crackPadSurvivalProbability_>1 ) crackPadSurvivalProbability_= 0.9;
1041 
1042  LogInfo("FastCalorimetry") << " Fast ECAL simulation parameters " << std::endl;
1043  LogInfo("FastCalorimetry") << " =============================== " << std::endl;
1044  if(simulatePreshower_)
1045  LogInfo("FastCalorimetry") << " The preshower is present " << std::endl;
1046  else
1047  LogInfo("FastCalorimetry") << " The preshower is NOT present " << std::endl;
1048  LogInfo("FastCalorimetry") << " Grid Size : " << gridSize_ << std::endl;
1049  if(spotFraction_>0.)
1050  LogInfo("FastCalorimetry") << " Spot Fraction : " << spotFraction_ << std::endl;
1051  else
1052  {
1053  LogInfo("FastCalorimetry") << " Core of the shower " << std::endl;
1054  for(unsigned ir=0; ir < theCoreIntervals_.size()/2;++ir)
1055  {
1056  LogInfo("FastCalorimetry") << " r < " << theCoreIntervals_[ir*2] << " R_M : " << theCoreIntervals_[ir*2+1] << " ";
1057  }
1058  LogInfo("FastCalorimetry") << std::endl;
1059 
1060  LogInfo("FastCalorimetry") << " Tail of the shower " << std::endl;
1061  for(unsigned ir=0; ir < theTailIntervals_.size()/2;++ir)
1062  {
1063  LogInfo("FastCalorimetry") << " r < " << theTailIntervals_[ir*2] << " R_M : " << theTailIntervals_[ir*2+1] << " ";
1064  }
1065  //changed after tuning - Feb-July - Shilpi Jain
1066  LogInfo("FastCalorimetry") << "Radius correction factors: EB & EE " << radiusFactorEB_ << " : "<< radiusFactorEE_ << std::endl;
1067  //(end of) changed after tuning - Feb-July - Shilpi Jain
1068  LogInfo("FastCalorimetry") << std::endl;
1069  if(mipValues_.size()>2) {
1070  LogInfo("FastCalorimetry") << "Improper number of parameters for the preshower ; using 95keV" << std::endl;
1071  mipValues_.clear();
1072  mipValues_.resize(2,0.000095);
1073  }
1074  }
1075 
1076  LogInfo("FastCalorimetry") << " FrontLeakageProbability : " << pulledPadSurvivalProbability_ << std::endl;
1077  LogInfo("FastCalorimetry") << " GapLossProbability : " << crackPadSurvivalProbability_ << std::endl;
1078 
1079 
1080  // RespCorrP: p (momentum), ECAL and HCAL corrections = f(p)
1081  edm::ParameterSet CalorimeterParam = fastCalo.getParameter<edm::ParameterSet>("CalorimeterProperties");
1082 
1083  rsp = CalorimeterParam.getParameter<std::vector<double> >("RespCorrP");
1084  LogInfo("FastCalorimetry") << " RespCorrP (rsp) size " << rsp.size() << std::endl;
1085 
1086  if( rsp.size()%3 !=0 ) {
1087  LogInfo("FastCalorimetry")
1088  << " RespCorrP size is wrong -> no corrections applied !!!"
1089  << std::endl;
1090 
1091  p_knots.push_back(14000.);
1092  k_e.push_back (1.);
1093  k_h.push_back (1.);
1094  }
1095  else {
1096  for(unsigned i = 0; i < rsp.size(); i += 3) {
1097  LogInfo("FastCalorimetry") << "i = " << i/3 << " p = " << rsp [i]
1098  << " k_e(p) = " << rsp[i+1]
1099  << " k_e(p) = " << rsp[i+2] << std::endl;
1100 
1101  p_knots.push_back(rsp[i]);
1102  k_e.push_back (rsp[i+1]);
1103  k_h.push_back (rsp[i+2]);
1104  }
1105  }
1106 
1107 
1108  //FR
1109  edm::ParameterSet HCALparameters = fastCalo.getParameter<edm::ParameterSet>("HCAL");
1110  optionHDSim_ = HCALparameters.getParameter<int>("SimOption");
1111  hdGridSize_ = HCALparameters.getParameter<int>("GridSize");
1112  hdSimMethod_ = HCALparameters.getParameter<int>("SimMethod");
1113  //RF
1114 
1115  EcalDigitizer_ = ECALparameters.getUntrackedParameter<bool>("Digitizer",false);
1116  HcalDigitizer_ = HCALparameters.getUntrackedParameter<bool>("Digitizer",false);
1117  samplingHBHE_ = HCALparameters.getParameter< std::vector<double> >("samplingHBHE");
1118  samplingHF_ = HCALparameters.getParameter< std::vector<double> >("samplingHF");
1119  samplingHO_ = HCALparameters.getParameter< std::vector<double> >("samplingHO");
1120  ietaShiftHB_ = HCALparameters.getParameter< int >("ietaShiftHB");
1121  ietaShiftHE_ = HCALparameters.getParameter< int >("ietaShiftHE");
1122  ietaShiftHF_ = HCALparameters.getParameter< int >("ietaShiftHF");
1123  ietaShiftHO_ = HCALparameters.getParameter< int >("ietaShiftHO");
1124  timeShiftHB_ = HCALparameters.getParameter< std::vector<double> >("timeShiftHB");
1125  timeShiftHE_ = HCALparameters.getParameter< std::vector<double> >("timeShiftHE");
1126  timeShiftHF_ = HCALparameters.getParameter< std::vector<double> >("timeShiftHF");
1127  timeShiftHO_ = HCALparameters.getParameter< std::vector<double> >("timeShiftHO");
1128 
1129  // FastHFShowerLibrary
1130  edm::ParameterSet m_HS = fastCalo.getParameter<edm::ParameterSet>("HFShowerLibrary");
1131  useShowerLibrary = m_HS.getUntrackedParameter<bool>("useShowerLibrary",false);
1132  useCorrectionSL = m_HS.getUntrackedParameter<bool>("useCorrectionSL",false);
1133 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< double > rsp
std::vector< double > k_h
std::vector< double > timeShiftHO_
std::vector< double > timeShiftHF_
std::vector< double > p_knots
std::vector< double > samplingHF_
std::vector< double > radiusPreshowerCorrections_
std::vector< double > theTailIntervals_
std::vector< double > samplingHBHE_
std::vector< double > timeShiftHB_
std::vector< double > theCoreIntervals_
std::vector< double > mipValues_
std::vector< unsigned int > evtsToDebug_
std::vector< double > k_e
std::vector< double > samplingHO_
std::vector< double > timeShiftHE_
void CalorimetryManager::reconstruct ( RandomEngineAndDistribution const *  random)

Definition at line 153 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().

Referenced by FamosManager::reconstruct().

154 {
155  if(!evtsToDebug_.empty())
156  {
157  std::vector<unsigned int>::const_iterator itcheck=find(evtsToDebug_.begin(),evtsToDebug_.end(),mySimEvent->id().event());
158  debug_=(itcheck!=evtsToDebug_.end());
159  if(debug_)
160  mySimEvent->print();
161  }
162 
164 
165  LogInfo("FastCalorimetry") << "Reconstructing " << (int) mySimEvent->nTracks() << " tracks." << std::endl;
166  for( int fsimi=0; fsimi < (int) mySimEvent->nTracks() ; ++fsimi) {
167 
168  FSimTrack& myTrack = mySimEvent->track(fsimi);
169 
170  reconstructTrack(myTrack, random);
171  } // particle loop
172 
173 } // reconstruct
EventNumber_t event() const
Definition: EventID.h:41
void reconstructTrack(FSimTrack &myTrack, RandomEngineAndDistribution const *)
TRandom random
Definition: MVATrainer.cc:138
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
unsigned int nTracks() const
Number of tracks.
Definition: FSimEvent.cc:36
void initialize(RandomEngineAndDistribution const *random)
edm::EventID id() const
Method to return the EventId.
Definition: FSimEvent.cc:27
std::vector< unsigned int > evtsToDebug_
void print() const
print the FBaseSimEvent in an intelligible way
FSimTrack & track(int id) const
Return track with given Id.
void CalorimetryManager::reconstructHCAL ( const FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)
private

Definition at line 456 of file CalorimetryManager.cc.

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

Referenced by MuonMipSimulation(), and reconstructTrack().

458 {
459  int hit;
460  int pid = abs(myTrack.type());
461  if (debug_) {
462  LogInfo("FastCalorimetry") << " reconstructHCAL " << myTrack << std::endl;
463  }
464 
465  XYZTLorentzVector trackPosition;
466  if (myTrack.onHcal()) {
467  trackPosition=myTrack.hcalEntrance().vertex();
468  hit = myTrack.onHcal()-1;
469  } else {
470  trackPosition=myTrack.vfcalEntrance().vertex();
471  hit = 2;
472  }
473 
474  double pathEta = trackPosition.eta();
475  double pathPhi = trackPosition.phi();
476 
477  double EGen = myTrack.hcalEntrance().e();
478  double emeas = 0.;
479 
480  float charge_ = (float)myTrack.charge();
481  if (pid == 13 || pid == 1000024 || (pid > 1000100 && pid < 1999999 && fabs(charge_) > 0.001)) {
482  emeas = myHDResponse_->responseHCAL(0, EGen, pathEta, 2, random); // 2=muon
483  if(debug_)
484  LogInfo("FastCalorimetry") << "CalorimetryManager::reconstructHCAL - MUON !!!" << std::endl;
485  }
486  else if( pid == 22 || pid == 11) {
487  emeas = myHDResponse_->responseHCAL(0, EGen, pathEta, 0, random); // last par. = 0 = e/gamma
488  if(debug_)
489  LogInfo("FastCalorimetry") << "CalorimetryManager::reconstructHCAL - e/gamma !!!" << std::endl;
490  }
491  else {
492  emeas = myHDResponse_->getHCALEnergyResponse(EGen, hit, random);
493  }
494 
495  if(debug_)
496  LogInfo("FastCalorimetry") << "CalorimetryManager::reconstructHCAL - on-calo "
497  << " eta = " << pathEta
498  << " phi = " << pathPhi
499  << " Egen = " << EGen
500  << " Emeas = " << emeas << std::endl;
501 
502  if(emeas > 0.) {
503  DetId cell = myCalorimeter_->getClosestCell(trackPosition.Vect(),false,false);
504  double tof = (((HcalGeometry*)(myCalorimeter_->getHcalGeometry()))->getPosition(cell).mag())/29.98;//speed of light
505  CaloHitID current_id(cell.rawId(),tof,myTrack.id());
506  std::map<CaloHitID,float> hitMap;
507  hitMap[current_id] = emeas;
508  updateHCAL(hitMap,myTrack.id());
509  }
510 }
float charge() const
charge
Definition: FSimTrack.h:51
double responseHCAL(int _mip, double energy, double eta, int partype, RandomEngineAndDistribution const *)
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
Definition: FSimTrack.h:144
void updateHCAL(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
double getHCALEnergyResponse(double e, int hit, RandomEngineAndDistribution const *)
const CaloSubdetectorGeometry * getHcalGeometry() const
Definition: Calorimeter.h:57
TRandom random
Definition: MVATrainer.cc:138
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:285
Definition: DetId.h:18
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:25
int id() const
the index in FBaseSimEvent and other vectors
Definition: FSimTrack.h:91
int onHcal() const
Definition: FSimTrack.h:111
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:141
DetId getClosestCell(const XYZPoint &point, bool ecal, bool central) const
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
void CalorimetryManager::reconstructTrack ( FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)

Definition at line 195 of file CalorimetryManager.cc.

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

Referenced by reconstruct().

195  {
196  int pid = abs(myTrack.type());
197 
198  if (debug_) {
199  LogInfo("FastCalorimetry") << " ===> pid = " << pid << std::endl;
200  }
201 
202  // Check that the particle hasn't decayed
203  if(myTrack.noEndVertex()) {
204  // Simulate energy smearing for photon and electrons
205  float charge_ = (float)(myTrack.charge());
206  if ( pid == 11 || pid == 22 ) {
207 
208  if ( myTrack.onEcal() )
209  EMShowerSimulation(myTrack, random);
210  else if ( myTrack.onVFcal() ) {
211  if(useShowerLibrary) {
213  myHDResponse_->correctHF(myTrack.hcalEntrance().e(),abs(myTrack.type()));
215  }
216  else reconstructHCAL(myTrack, random);
217  }
218  } // electron or photon
219  else if (pid == 13 || pid == 1000024 || (pid > 1000100 && pid < 1999999 && fabs(charge_) > 0.001))
220  {
221  MuonMipSimulation(myTrack, random);
222  }
223  // Simulate energy smearing for hadrons (i.e., everything
224  // but muons... and SUSY particles that deserve a special
225  // treatment.
226  else if ( pid < 1000000 ) {
227  if ( myTrack.onHcal() || myTrack.onVFcal() ) {
228  if(optionHDSim_ == 0 ) reconstructHCAL(myTrack, random);
229  else HDShowerSimulation(myTrack, random);
230  }
231  } // pid < 1000000
232  } // myTrack.noEndVertex()
233 }
bool noEndVertex() const
no end vertex
float charge() const
charge
Definition: FSimTrack.h:51
void reconstructHCAL(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
void updateHCAL(const std::map< CaloHitID, float > &hitMap, int trackID=0, float corr=1.0)
void recoHFShowerLibrary(const FSimTrack &myTrack)
void correctHF(double e, int type)
void MuonMipSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
TRandom random
Definition: MVATrainer.cc:138
int onEcal() const
Definition: FSimTrack.h:106
void HDShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
Hadronic Shower Simulation.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int onVFcal() const
Definition: FSimTrack.h:116
HCALResponse * myHDResponse_
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:25
int id() const
the index in FBaseSimEvent and other vectors
Definition: FSimTrack.h:91
const std::map< CaloHitID, float > & getHitsMap()
int onHcal() const
Definition: FSimTrack.h:111
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:141
FastHFShowerLibrary * theHFShowerLibrary
void EMShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
void CalorimetryManager::respCorr ( double  p)
private

Definition at line 1135 of file CalorimetryManager.cc.

References debug_, ecorr, hcorr, mps_fire::i, k_e, k_h, p_knots, globals_cff::x1, and globals_cff::x2.

Referenced by HDShowerSimulation().

1135  {
1136 
1137  int sizeP = p_knots.size();
1138 
1139  if(sizeP <= 1) {
1140  ecorr = 1.;
1141  hcorr = 1.;
1142  }
1143  else {
1144  int ip = -1;
1145  for (int i = 0; i < sizeP; i++) {
1146  if (p < p_knots[i]) { ip = i; break;}
1147  }
1148  if (ip == 0) {
1149  ecorr = k_e[0];
1150  hcorr = k_h[0];
1151  }
1152  else {
1153  if(ip == -1) {
1154  ecorr = k_e[sizeP-1];
1155  hcorr = k_h[sizeP-1];
1156  }
1157  else {
1158  double x1 = p_knots[ip-1];
1159  double x2 = p_knots[ip];
1160  double y1 = k_e[ip-1];
1161  double y2 = k_e[ip];
1162 
1163  ecorr = (y1 + (y2 - y1) * (p - x1)/(x2 - x1));
1164 
1165  y1 = k_h[ip-1];
1166  y2 = k_h[ip];
1167  hcorr = (y1 + (y2 - y1) * (p - x1)/(x2 - x1));
1168 
1169  }
1170  }
1171  }
1172 
1173  if(debug_)
1174  LogInfo("FastCalorimetry") << " p, ecorr, hcorr = " << p << " "
1175  << ecorr << " " << hcorr << std::endl;
1176 
1177 }
std::vector< double > k_h
std::vector< double > p_knots
std::vector< double > k_e
void CalorimetryManager::updateECAL ( const std::map< CaloHitID, float > &  hitMap,
int  onEcal,
int  trackID = 0,
float  corr = 1.0 
)
private

Definition at line 1179 of file CalorimetryManager.cc.

References corr, EBMapping_, and EEMapping_.

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

1180 {
1181  std::map<CaloHitID,float>::const_iterator mapitr;
1182  std::map<CaloHitID,float>::const_iterator endmapitr=hitMap.end();
1183  if(onEcal==1) {
1184  EBMapping_.reserve(EBMapping_.size()+hitMap.size());
1185  endmapitr=hitMap.end();
1186  for(mapitr=hitMap.begin();mapitr!=endmapitr;++mapitr) {
1187  //correct energy
1188  float energy = mapitr->second;
1189  energy *= corr;
1190 
1191  //make finalized CaloHitID
1192  CaloHitID current_id(mapitr->first.unitID(),mapitr->first.timeSlice(),trackID);
1193 
1194  EBMapping_.push_back(std::pair<CaloHitID,float>(current_id,energy));
1195  }
1196  }
1197  else if(onEcal==2) {
1198  EEMapping_.reserve(EEMapping_.size()+hitMap.size());
1199  endmapitr=hitMap.end();
1200  for(mapitr=hitMap.begin();mapitr!=endmapitr;++mapitr) {
1201  //correct energy
1202  float energy = mapitr->second;
1203  energy *= corr;
1204 
1205  //make finalized CaloHitID
1206  CaloHitID current_id(mapitr->first.unitID(),mapitr->first.timeSlice(),trackID);
1207 
1208  EEMapping_.push_back(std::pair<CaloHitID,float>(current_id,energy));
1209  }
1210  }
1211 
1212 }
std::vector< std::pair< CaloHitID, float > > EBMapping_
JetCorrectorParameters corr
Definition: classes.h:5
std::vector< std::pair< CaloHitID, float > > EEMapping_
void CalorimetryManager::updateHCAL ( const std::map< CaloHitID, float > &  hitMap,
int  trackID = 0,
float  corr = 1.0 
)
private

Definition at line 1214 of file CalorimetryManager.cc.

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

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

1215 {
1216  std::vector<double> hfcorrEm = myHDResponse_->getCorrHFem();
1217  std::vector<double> hfcorrHad = myHDResponse_->getCorrHFhad();
1218  std::map<CaloHitID,float>::const_iterator mapitr;
1219  std::map<CaloHitID,float>::const_iterator endmapitr=hitMap.end();
1220  HMapping_.reserve(HMapping_.size()+hitMap.size());
1221  for(mapitr=hitMap.begin(); mapitr!=endmapitr; ++mapitr) {
1222  //correct energy
1223  float energy = mapitr->second;
1224  energy *= corr;
1225 
1226  float time = mapitr->first.timeSlice();
1227  //put energy into uncalibrated state for digitizer && correct timing
1228  if(HcalDigitizer_){
1229  HcalDetId hdetid = HcalDetId(mapitr->first.unitID());
1230  if (hdetid.subdetId()== HcalBarrel){
1231  energy /= samplingHBHE_[hdetid.ietaAbs()-1]; //re-convert to GeV
1232  time = timeShiftHB_[hdetid.ietaAbs()-ietaShiftHB_];
1233  }
1234  else if (hdetid.subdetId()== HcalEndcap){
1235  energy /= samplingHBHE_[hdetid.ietaAbs()-1]; //re-convert to GeV
1236  time = timeShiftHE_[hdetid.ietaAbs()-ietaShiftHE_];
1237  }
1238  else if (hdetid.subdetId()== HcalForward){
1239  if(useShowerLibrary) {
1240  if(useCorrectionSL) {
1241  if(hdetid.depth()== 1 or hdetid.depth()==3) energy *= hfcorrEm[hdetid.ietaAbs()-ietaShiftHF_];
1242  if(hdetid.depth()== 2 or hdetid.depth()==4) energy *= hfcorrHad[hdetid.ietaAbs()-ietaShiftHF_];
1243  }
1244  } else {
1245  if(hdetid.depth()== 1 or hdetid.depth()==3) energy *= samplingHF_[0];
1246  if(hdetid.depth()== 2 or hdetid.depth()==4) energy *= samplingHF_[1];
1247  time = timeShiftHF_[hdetid.ietaAbs()-ietaShiftHF_];
1248  }
1249  }
1250  else if (hdetid.subdetId()== HcalOuter){
1251  energy /= samplingHO_[hdetid.ietaAbs()-1];
1252  time = timeShiftHO_[hdetid.ietaAbs()-ietaShiftHO_];
1253  }
1254  }
1255 
1256  //make finalized CaloHitID
1257  CaloHitID current_id(mapitr->first.unitID(),time,trackID);
1258  HMapping_.push_back(std::pair<CaloHitID,float>(current_id,energy));
1259  }
1260 }
std::vector< double > timeShiftHO_
std::vector< double > timeShiftHF_
std::vector< double > samplingHF_
int depth() const
get the tower depth
Definition: HcalDetId.cc:129
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:49
std::vector< double > samplingHBHE_
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
JetCorrectorParameters corr
Definition: classes.h:5
HCALResponse * myHDResponse_
vec1 & getCorrHFem()
Definition: HCALResponse.h:48
std::vector< double > timeShiftHB_
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.cc:119
std::vector< std::pair< CaloHitID, float > > HMapping_
std::vector< double > samplingHO_
std::vector< double > timeShiftHE_
void CalorimetryManager::updatePreshower ( const std::map< CaloHitID, float > &  hitMap,
int  trackID = 0,
float  corr = 1.0 
)
private

Definition at line 1262 of file CalorimetryManager.cc.

References corr, and ESMapping_.

Referenced by EMShowerSimulation().

1263 {
1264  std::map<CaloHitID,float>::const_iterator mapitr;
1265  std::map<CaloHitID,float>::const_iterator endmapitr=hitMap.end();
1266  ESMapping_.reserve(ESMapping_.size()+hitMap.size());
1267  for(mapitr=hitMap.begin();mapitr!=endmapitr;++mapitr) {
1268  //correct energy
1269  float energy = mapitr->second;
1270  energy *= corr;
1271 
1272  //make finalized CaloHitID
1273  CaloHitID current_id(mapitr->first.unitID(),mapitr->first.timeSlice(),trackID);
1274 
1275  ESMapping_.push_back(std::pair<CaloHitID,float>(current_id,energy));
1276  }
1277 }
std::vector< std::pair< CaloHitID, float > > ESMapping_
JetCorrectorParameters corr
Definition: classes.h:5

Member Data Documentation

GammaFunctionGenerator* CalorimetryManager::aGammaGenerator
private

Definition at line 158 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and EMShowerSimulation().

const LandauFluctuationGenerator* CalorimetryManager::aLandauGenerator
private

Definition at line 157 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and EMShowerSimulation().

double CalorimetryManager::aTerm
private

Definition at line 147 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

bool CalorimetryManager::bFixedLength_
private

Definition at line 184 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

double CalorimetryManager::bTerm
private

Definition at line 147 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

double CalorimetryManager::crackPadSurvivalProbability_
private

Definition at line 142 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 113 of file CalorimetryManager.h.

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

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

Definition at line 197 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and EMShowerSimulation().

bool CalorimetryManager::EcalDigitizer_
private

Definition at line 124 of file CalorimetryManager.h.

Referenced by readParameters().

double CalorimetryManager::ecorr
private

Definition at line 168 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), and respCorr().

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

Definition at line 114 of file CalorimetryManager.h.

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

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

Definition at line 116 of file CalorimetryManager.h.

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

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

Definition at line 119 of file CalorimetryManager.h.

Referenced by readParameters(), and reconstruct().

int CalorimetryManager::gridSize_
private

Definition at line 149 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

bool CalorimetryManager::HcalDigitizer_
private

Definition at line 125 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

double CalorimetryManager::hcorr
private

Definition at line 169 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), and respCorr().

int CalorimetryManager::hdGridSize_
private

Definition at line 153 of file CalorimetryManager.h.

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

int CalorimetryManager::hdSimMethod_
private

Definition at line 153 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), and readParameters().

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

Definition at line 115 of file CalorimetryManager.h.

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

int CalorimetryManager::ietaShiftHB_
private

Definition at line 129 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

int CalorimetryManager::ietaShiftHE_
private

Definition at line 129 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

int CalorimetryManager::ietaShiftHF_
private

Definition at line 129 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

int CalorimetryManager::ietaShiftHO_
private

Definition at line 129 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

bool CalorimetryManager::initialized_
private

Definition at line 172 of file CalorimetryManager.h.

Referenced by initialize().

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

Definition at line 166 of file CalorimetryManager.h.

Referenced by readParameters(), and respCorr().

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

Definition at line 167 of file CalorimetryManager.h.

Referenced by readParameters(), and respCorr().

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

Definition at line 148 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

std::vector<FSimTrack> CalorimetryManager::muonSimTracks
private
CaloGeometryHelper* CalorimetryManager::myCalorimeter_
private
RawParticle CalorimetryManager::myElec
private

A few pointers to save time.

Definition at line 136 of file CalorimetryManager.h.

Referenced by EMShowerSimulation().

HCALResponse* CalorimetryManager::myHDResponse_
private
Histos* CalorimetryManager::myHistos
private

Definition at line 108 of file CalorimetryManager.h.

HSParameters* CalorimetryManager::myHSParameters_
private

Definition at line 111 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

RawParticle CalorimetryManager::myPart
private

Definition at line 138 of file CalorimetryManager.h.

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

RawParticle CalorimetryManager::myPosi
private

Definition at line 137 of file CalorimetryManager.h.

Referenced by EMShowerSimulation().

FSimEvent* CalorimetryManager::mySimEvent
private

Definition at line 105 of file CalorimetryManager.h.

Referenced by reconstruct().

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 160 of file CalorimetryManager.h.

int CalorimetryManager::optionHDSim_
private

Definition at line 153 of file CalorimetryManager.h.

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

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

Definition at line 165 of file CalorimetryManager.h.

Referenced by readParameters(), and respCorr().

double CalorimetryManager::pulledPadSurvivalProbability_
private

Definition at line 141 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

double CalorimetryManager::radiusFactorEB_
private

Definition at line 145 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

double CalorimetryManager::radiusFactorEE_
private

Definition at line 145 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 146 of file CalorimetryManager.h.

Referenced by readParameters().

double CalorimetryManager::RCFactor_
private

Definition at line 151 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 164 of file CalorimetryManager.h.

Referenced by readParameters().

double CalorimetryManager::RTFactor_
private

Definition at line 151 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 126 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 127 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 128 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 175 of file CalorimetryManager.h.

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

bool CalorimetryManager::simulatePreshower_
private

Definition at line 154 of file CalorimetryManager.h.

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

double CalorimetryManager::spotFraction_
private

Definition at line 143 of file CalorimetryManager.h.

Referenced by readParameters().

GflashAntiProtonShowerProfile* CalorimetryManager::theAntiProtonProfile
private

Definition at line 190 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

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

Definition at line 150 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

FastHFShowerLibrary* CalorimetryManager::theHFShowerLibrary
private
MaterialEffects* CalorimetryManager::theMuonEcalEffects
private
MaterialEffects* CalorimetryManager::theMuonHcalEffects
private
GflashPiKShowerProfile* CalorimetryManager::thePiKProfile
private

Definition at line 188 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

GflashHadronShowerProfile* CalorimetryManager::theProfile
private
GflashProtonShowerProfile* CalorimetryManager::theProtonProfile
private

Definition at line 189 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

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

Definition at line 150 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 130 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 131 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 132 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 133 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

bool CalorimetryManager::unfoldedMode_
private

Definition at line 121 of file CalorimetryManager.h.

bool CalorimetryManager::useCorrectionSL
private

Definition at line 194 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

bool CalorimetryManager::useShowerLibrary
private