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 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 *)
 
 ~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_
 
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  // myHistos(0),
74  initialized_(false)
75 {;}
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 77 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.

82  :
83  mySimEvent(aSimEvent),
84  initialized_(false),
85  theMuonEcalEffects(nullptr), theMuonHcalEffects(nullptr), bFixedLength_(false)
86 {
87 
90 
91  //Gflash
92  theProfile = new GflashHadronShowerProfile(parGflash);
93  thePiKProfile = new GflashPiKShowerProfile(parGflash);
96 
97  // FastHFShowerLibrary
99 
100  readParameters(fastCalo);
101 
102  // myHistos = 0;
103 
104  // myHistos = Histos::instance();
105  // myHistos->book("h10",140,-3.5,3.5,100,-0.5,99.5);
106  // myHistos->book("h20",150,0,150.,100,-0.5,99.5);
107  // myHistos->book("h100",140,-3.5,3.5,100,0,0.1);
108  // myHistos->book("h110",140,-3.5,3.5,100,0,10.);
109  // myHistos->book("h120",200,-5.,5.,100,0,0.5);
110 
111  // myHistos->book("h200",300,0,3.,100,0.,35.);
112  // myHistos->book("h210",720,-M_PI,M_PI,100,0,35.);
113  // myHistos->book("h212",720,-M_PI,M_PI,100,0,35.);
114 
115  // myHistos->bookByNumber("h30",0,7,300,-3.,3.,100,0.,35.);
116  // myHistos->book("h310",75,-3.,3.,"");
117  // myHistos->book("h400",100,-10.,10.,100,0.,35.);
118  // myHistos->book("h410",720,-M_PI,M_PI);
119 
120  myCalorimeter_ =
121  new CaloGeometryHelper(fastCalo);
122  myHDResponse_ =
123  new HCALResponse(fastCalo.getParameter<edm::ParameterSet>("HCALResponse"));
124  myHSParameters_ =
125  new HSParameters(fastCalo.getParameter<edm::ParameterSet>("HSParameters"));
126 
127  // Material Effects for Muons in ECAL (only EnergyLoss implemented so far)
128 
129  if ( fastMuECAL.getParameter<bool>("PairProduction") ||
130  fastMuECAL.getParameter<bool>("Bremsstrahlung") ||
131  fastMuECAL.getParameter<bool>("MuonBremsstrahlung") ||
132  fastMuECAL.getParameter<bool>("EnergyLoss") ||
133  fastMuECAL.getParameter<bool>("MultipleScattering") )
134  theMuonEcalEffects = new MaterialEffects(fastMuECAL);
135 
136  // Material Effects for Muons in HCAL (only EnergyLoss implemented so far)
137 
138  if ( fastMuHCAL.getParameter<bool>("PairProduction") ||
139  fastMuHCAL.getParameter<bool>("Bremsstrahlung") ||
140  fastMuHCAL.getParameter<bool>("MuonBremsstrahlung") ||
141  fastMuHCAL.getParameter<bool>("EnergyLoss") ||
142  fastMuHCAL.getParameter<bool>("MultipleScattering") )
143  theMuonHcalEffects = new MaterialEffects(fastMuHCAL);
144 
145  if( fastCalo.exists("ECALResponseScaling") ) {
146  ecalCorrection = std::unique_ptr<KKCorrectionFactors>( new KKCorrectionFactors( fastCalo.getParameter<edm::ParameterSet>("ECALResponseScaling") ) );
147  }
148 
149 }
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 160 of file CalorimetryManager.cc.

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

161 {
162  if(myCalorimeter_) delete myCalorimeter_;
163  if(myHDResponse_) delete myHDResponse_;
164 
167 
168  if ( theProfile ) delete theProfile;
169 
171 }
MaterialEffects * theMuonEcalEffects
MaterialEffects * theMuonHcalEffects
GflashHadronShowerProfile * theProfile
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
FastHFShowerLibrary * theHFShowerLibrary

Member Function Documentation

void CalorimetryManager::clean ( )
private

Definition at line 151 of file CalorimetryManager.cc.

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

Referenced by reconstruct().

152 {
153  EBMapping_.clear();
154  EEMapping_.clear();
155  HMapping_.clear();
156  ESMapping_.clear();
157  muonSimTracks.clear();
158 }
std::vector< std::pair< CaloHitID, float > > ESMapping_
std::vector< std::pair< CaloHitID, float > > EBMapping_
std::vector< FSimTrack > muonSimTracks
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 252 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(), 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 reconstruct().

253  {
254  std::vector<const RawParticle*> thePart;
255  double X0depth;
256 
257  if (debug_) {
258  LogInfo("FastCalorimetry") << " EMShowerSimulation " <<myTrack << std::endl;
259  }
260 
261  // std::cout << " Simulating " << myTrack << std::endl;
262 
263  // The Particle at ECAL entrance
264  // std::cout << " Before ecalEntrance " << std::endl;
265  myPart = myTrack.ecalEntrance();
266 
267  // protection against infinite loop.
268  if ( myTrack.type() == 22 && myPart.e()<0.055) return;
269 
270 
271  // Barrel or Endcap ?
272  int onEcal = myTrack.onEcal();
273  int onHcal = myTrack.onHcal();
274  int onLayer1 = myTrack.onLayer1();
275  int onLayer2 = myTrack.onLayer2();
276 
277  // The entrance in ECAL
278  XYZPoint ecalentrance = myPart.vertex().Vect();
279 
280  // std::cout << " Ecal entrance " << ecalentrance << std::endl;
281 
282  // The preshower
283  PreshowerHitMaker * myPreshower = nullptr;
284  if(simulatePreshower_ && (onLayer1 || onLayer2))
285  {
286  XYZPoint layer1entrance,layer2entrance;
287  XYZVector dir1,dir2;
288  if(onLayer1)
289  {
290  layer1entrance = XYZPoint(myTrack.layer1Entrance().vertex().Vect());
291  dir1 = XYZVector(myTrack.layer1Entrance().Vect().Unit());
292  }
293  if(onLayer2)
294  {
295  layer2entrance = XYZPoint(myTrack.layer2Entrance().vertex().Vect());
296  dir2 = XYZVector(myTrack.layer2Entrance().Vect().Unit());
297  }
298  // std::cout << " Layer1entrance " << layer1entrance << std::endl;
299  // std::cout << " Layer2entrance " << layer2entrance << std::endl;
300  myPreshower = new PreshowerHitMaker(myCalorimeter_,
301  layer1entrance,
302  dir1,
303  layer2entrance,
304  dir2,
306  random);
307  myPreshower->setMipEnergy(mipValues_[0],mipValues_[1]);
308  }
309 
310  // The ECAL Properties
312  showerparam(myCalorimeter_->ecalProperties(onEcal),
313  myCalorimeter_->hcalProperties(onHcal),
314  myCalorimeter_->layer1Properties(onLayer1),
315  myCalorimeter_->layer2Properties(onLayer2),
318  RCFactor_,
319  RTFactor_);
320 
321  // Photons : create an e+e- pair
322  if ( myTrack.type() == 22 ) {
323 
324  // Depth for the first e+e- pair creation (in X0)
325  X0depth = -log(random->flatShoot()) * (9./7.);
326 
327  // Initialization
328  double eMass = 0.000510998902;
329  double xe=0;
330  double xm=eMass/myPart.e();
331  double weight = 0.;
332 
333  // Generate electron energy between emass and eGamma-emass
334  do {
335  xe = random->flatShoot()*(1.-2.*xm) + xm;
336  weight = 1. - 4./3.*xe*(1.-xe);
337  } while ( weight < random->flatShoot() );
338 
339  // Protection agains infinite loop in Famos Shower
340  if ( myPart.e()*xe < 0.055 || myPart.e()*(1.-xe) < 0.055 ) {
341 
342  if ( myPart.e() > 0.055 ) thePart.push_back(&myPart);
343 
344  } else {
345 
346  myElec = (myPart) * xe;
347  myPosi = (myPart) * (1.-xe);
350  thePart.push_back(&myElec);
351  thePart.push_back(&myPosi);
352  }
353  // Electrons
354  } else {
355 
356  X0depth = 0.;
357  if ( myPart.e() > 0.055 ) thePart.push_back(&myPart);
358 
359  }
360 
361  // After the different protections, this shouldn't happen.
362  if(thePart.empty())
363  {
364  if(myPreshower==nullptr) return;
365  delete myPreshower;
366  return;
367  }
368 
369  // find the most energetic particle
370  double maxEnergy=-1.;
371  for(unsigned ip=0;ip < thePart.size();++ip)
372  if(thePart[ip]->e() > maxEnergy) maxEnergy = thePart[ip]->e();
373 
374  // Initialize the Grid in ECAL
375  int size = gridSize_;
376  if(maxEnergy>100) size=11;
377  // if ( maxEnergy < threshold5x5 ) size = 5;
378  // if ( maxEnergy < threshold3x3 ) size = 3;
379 
380 
381  EMShower theShower(random,aGammaGenerator,&showerparam,&thePart,nullptr,nullptr,bFixedLength_);
382 
383 
384  double maxShower = theShower.getMaximumOfShower();
385  if (maxShower > 20.) maxShower = 2.; // simple pivot-searching protection
386 
387  double depth((X0depth + maxShower) *
389  XYZPoint meanShower = ecalentrance + myPart.Vect().Unit()*depth;
390 
391  // if(onEcal!=1) return ;
392 
393  // The closest crystal
394  DetId pivot(myCalorimeter_->getClosestCell(meanShower, true, onEcal==1));
395 
396  if(pivot.subdetId() == 0) { // further protection against avbsence of pivot
397  edm::LogWarning("CalorimetryManager") << "Pivot for egamma e = " << myTrack.hcalEntrance().e() << " is not found at depth " << depth << " and meanShower coordinates = " << meanShower << std::endl;
398  if(myPreshower) delete myPreshower;
399  return;
400  }
401 
402  EcalHitMaker myGrid(myCalorimeter_,ecalentrance,pivot,onEcal,size,0,random);
403  // ^^^^
404  // for EM showers
405  myGrid.setPulledPadSurvivalProbability(pulledPadSurvivalProbability_);
406  myGrid.setCrackPadSurvivalProbability(crackPadSurvivalProbability_);
407 
408  //maximumdepth dependence of the radiusfactorbehindpreshower
409  //First tuning: Shilpi Jain (Mar-Apr 2010); changed after tuning - Feb-July - Shilpi Jain
410  /* **************
411  myGrid.setRadiusFactor(radiusFactor_);
412  if(onLayer1 || onLayer2)
413  {
414  float b = radiusPreshowerCorrections_[0];
415  float a = radiusFactor_*( 1.+radiusPreshowerCorrections_[1]*radiusPreshowerCorrections_[0] );
416  float maxdepth = X0depth+theShower.getMaximumOfShower();
417  float newRadiusFactor = radiusFactor_;
418  if(myPart.e()<=250.)
419  {
420  newRadiusFactor = a/(1.+b*maxdepth);
421  }
422  myGrid.setRadiusFactor(newRadiusFactor);
423  }
424  else // otherwise use the normal radius factor
425  {
426  myGrid.setRadiusFactor(radiusFactor_);
427  }
428  ************** */
429  if(myTrack.onEcal() == 2) // if on EE
430  {
431  if( (onLayer1 || onLayer2) && myPart.e()<=250.)
432  {
433  double maxdepth = X0depth+theShower.getMaximumOfShower();
434  double newRadiusFactor = radiusFactorEE_ * aTerm/(1.+bTerm*maxdepth);
435  myGrid.setRadiusFactor(newRadiusFactor);
436  }
437  else // otherwise use the normal radius factor
438  {
439  myGrid.setRadiusFactor(radiusFactorEE_);
440  }
441  }//if(myTrack.onEcal() == 2)
442  else // else if on EB
443  {
444  myGrid.setRadiusFactor(radiusFactorEB_);
445  }
446  //(end of) changed after tuning - Feb-July - Shilpi Jain
447 
448  myGrid.setPreshowerPresent(simulatePreshower_);
449 
450  // The shower simulation
451  myGrid.setTrackParameters(myPart.Vect().Unit(),X0depth,myTrack);
452 
453  // std::cout << " PS ECAL GAP HCAL X0 " << myGrid.ps1TotalX0()+myGrid.ps2TotalX0() << " " << myGrid.ecalTotalX0();
454  // std::cout << " " << myGrid.ecalHcalGapTotalX0() << " " << myGrid.hcalTotalX0() << std::endl;
455  // std::cout << " PS ECAL GAP HCAL L0 " << myGrid.ps1TotalL0()+myGrid.ps2TotalL0() << " " << myGrid.ecalTotalL0();
456  // std::cout << " " << myGrid.ecalHcalGapTotalL0() << " " << myGrid.hcalTotalL0() << std::endl;
457  // std::cout << "ECAL-HCAL " << myTrack.momentum().eta() << " " << myGrid.ecalHcalGapTotalL0() << std::endl;
458  //
459  // std::cout << " Grid created " << std::endl;
460  if(myPreshower) theShower.setPreshower(myPreshower);
461 
462  HcalHitMaker myHcalHitMaker(myGrid,(unsigned)0);
463 
464  theShower.setGrid(&myGrid);
465  theShower.setHcal(&myHcalHitMaker);
466  theShower.compute();
467  //myHistos->fill("h502", myPart->eta(),myGrid.totalX0());
468 
469  // calculate the total simulated energy for this particle
470  float simE = 0;
471  for( const auto& mapIterator : myGrid.getHits() ) {
472  simE += mapIterator.second;
473  }
474 
475  auto scale = ecalCorrection ? ecalCorrection->getScale( myTrack.ecalEntrance().e(),
476  std::abs( myTrack.ecalEntrance().eta() ), simE ) : 1.;
477 
478  // Save the hits !
479  updateECAL( myGrid.getHits(), onEcal,myTrack.id(), scale );
480 
481  // Now fill the HCAL hits
482  updateHCAL(myHcalHitMaker.getHits(),myTrack.id());
483 
484  // delete the preshower
485  if(myPreshower!=nullptr) {
486  updatePreshower(myPreshower->getHits(),myTrack.id());
487  delete myPreshower;
488  // std::cout << " Deleting myPreshower " << std::endl;
489  }
490 
491 }
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:96
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:127
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
int onEcal() const
Definition: FSimTrack.h:101
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:133
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:86
const RawParticle & layer2Entrance() const
The particle at Preshower Layer 2.
Definition: FSimTrack.h:130
int onLayer1() const
Definition: FSimTrack.h:91
int onHcal() const
Definition: FSimTrack.h:106
double eta() const
Definition: RawParticle.h:267
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:136
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 61 of file CalorimetryManager.h.

Referenced by FamosManager::setupGeometryAndField().

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

Definition at line 64 of file CalorimetryManager.h.

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

Referenced by FamosManager::setupGeometryAndField().

64 {return theHFShowerLibrary;}
FastHFShowerLibrary * theHFShowerLibrary
void CalorimetryManager::HDShowerSimulation ( const FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)
private

Hadronic Shower Simulation.

Definition at line 557 of file CalorimetryManager.cc.

References funct::abs(), HcalHitMaker::addHit(), FSimTrack::charge(), ALCARECOTkAlJpsiMuMu_cff::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 reconstruct().

557  {//,
558  // const edm::ParameterSet& fastCalo){
559 
561 
562  // TimeMe t(" FASTEnergyReconstructor::HDShower");
563  const XYZTLorentzVector& moment = myTrack.momentum();
564 
565  if(debug_)
566  LogInfo("FastCalorimetry")
567  << "CalorimetryManager::HDShowerSimulation - track param."
568  << std::endl
569  << " eta = " << moment.eta() << std::endl
570  << " phi = " << moment.phi() << std::endl
571  << " et = " << moment.Et() << std::endl
572  << " e = " << myTrack.hcalEntrance().e() << std::endl;
573 
574  if (debug_) {
575  LogInfo("FastCalorimetry") << " HDShowerSimulation " << myTrack << std::endl;
576  }
577 
578 
579  int hit;
580  // int pid = abs(myTrack.type());
581 
582  XYZTLorentzVector trackPosition;
583  if ( myTrack.onEcal() ) {
584  trackPosition=myTrack.ecalEntrance().vertex();
585  hit = myTrack.onEcal()-1; //
586  myPart = myTrack.ecalEntrance();
587  } else if ( myTrack.onVFcal()) {
588  trackPosition=myTrack.vfcalEntrance().vertex();
589  hit = 2;
590  myPart = myTrack.vfcalEntrance();
591  }
592  else
593  {
594  LogInfo("FastCalorimetry") << " The particle is not in the acceptance " << std::endl;
595  return;
596  }
597 
598  // int onHCAL = hit + 1; - specially for myCalorimeter->hcalProperties(onHCAL)
599  // (below) to get VFcal properties ...
600  int onHCAL = hit + 1;
601  int onECAL = myTrack.onEcal();
602 
603  double pathEta = trackPosition.eta();
604  double pathPhi = trackPosition.phi();
605  // double pathTheta = trackPosition.theta();
606 
607  double eint = moment.e();
608  double eGen = myTrack.hcalEntrance().e();
609 
610  double emeas = 0.;
611  double pmip= myHDResponse_->getMIPfraction(eGen, pathEta);
612  // std::cout << " CalorimetryManager onHcal " << pmip << std::endl;
613 
614 
615  //double emeas = -0.000001;
616 
617  //===========================================================================
618  if(eGen > 0.) {
619 
620  // ECAL and HCAL properties to get
622  theHDShowerparam(myCalorimeter_->ecalProperties(onECAL),
625 
626  //Making ECAL Grid (and segments calculation)
627  XYZPoint caloentrance;
628  XYZVector direction;
629  if(myTrack.onEcal())
630  {
631  caloentrance = myTrack.ecalEntrance().vertex().Vect();
632  direction = myTrack.ecalEntrance().Vect().Unit();
633  }
634  else if(myTrack.onHcal())
635  {
636  caloentrance = myTrack.hcalEntrance().vertex().Vect();
637  direction = myTrack.hcalEntrance().Vect().Unit();
638  }
639  else
640  {
641  caloentrance = myTrack.vfcalEntrance().vertex().Vect();
642  direction = myTrack.vfcalEntrance().Vect().Unit();
643  }
644 
645  if(debug_)
646  LogInfo("FastCalorimetry")
647  << "CalorimetryManager::HDShowerSimulation - on-calo 1 "
648  << std::endl
649  << " onEcal = " << myTrack.onEcal() << std::endl
650  << " onHcal = " << myTrack.onHcal() << std::endl
651  << " onVFcal = " << myTrack.onVFcal() << std::endl
652  << " position = " << caloentrance << std::endl;
653 
654 
655  DetId pivot;
656  if(myTrack.onEcal())
657  {
658  pivot=myCalorimeter_->getClosestCell(caloentrance,
659  true, myTrack.onEcal()==1);
660  }
661  else if(myTrack.onHcal())
662  {
663  // std::cout << " CalorimetryManager onHcal " << myTrack.onHcal() << " caloentrance" << caloentrance << std::endl;
664  pivot=myCalorimeter_->getClosestCell(caloentrance,
665  false, false);
666  }
667 
668  EcalHitMaker myGrid(myCalorimeter_,caloentrance,pivot,
669  pivot.null()? 0 : myTrack.onEcal(),hdGridSize_,1,
670  random);
671  // 1=HAD shower
672 
673  myGrid.setTrackParameters(direction,0,myTrack);
674  // Build the FAMOS HCAL
675  HcalHitMaker myHcalHitMaker(myGrid,(unsigned)1);
676 
677  // Shower simulation
678  bool status = false;
679  int mip = 2;
680  // Use HFShower for HF
681  if ( !myTrack.onEcal() && !myTrack.onHcal() ) {
682  // std::cout << "CalorimetryManager::HDShowerSimulation(): track entrance = "
683  // << myTrack.vfcalEntrance().vertex().X() << " "
684  // << myTrack.vfcalEntrance().vertex().Y() << " "
685  // << myTrack.vfcalEntrance().vertex().Z() << " "
686  // << " , Energy (Gen/Scale) = " << eGen << " " << e << std::endl;
687 
688  // Warning : We give here the particle energy with the response
689  // but without the resolution/gaussian smearing
690  // For HF, the resolution is due to the PE statistic
691 
692  if(useShowerLibrary) {
694  status = true;
695  } else {
696  HFShower theShower(random,
697  &theHDShowerparam,
698  &myGrid,
699  &myHcalHitMaker,
700  onECAL,
701  eGen);
702  // eGen);
703  // e); // PV Warning : temporarly set the energy to the generated E
704 
705  status = theShower.compute();
706  }
707  } else {
708  if(hdSimMethod_ == 0) {
709  HDShower theShower(random,
710  &theHDShowerparam,
711  &myGrid,
712  &myHcalHitMaker,
713  onECAL,
714  eGen,
715  pmip);
716  status = theShower.compute();
717  mip = theShower.getmip();
718  }
719  else if (hdSimMethod_ == 1) {
720  HDRShower theShower(random,
721  &theHDShowerparam,
722  &myGrid,
723  &myHcalHitMaker,
724  onECAL,
725  eGen);
726  status = theShower.computeShower();
727  mip = 2;
728  }
729  else if (hdSimMethod_ == 2 ) {
730  // std::cout << "Using GflashHadronShowerProfile hdSimMethod_ == 2" << std::endl;
731 
732  //dynamically loading a corresponding profile by the particle type
733  int particleType = myTrack.type();
735  if(particleType == -2212) theProfile = theAntiProtonProfile;
736  else if(particleType == 2212) theProfile = theProtonProfile;
737 
738  //input variables for GflashHadronShowerProfile
739  int showerType = 99 + myTrack.onEcal();
740  double globalTime = 150.0; // a temporary reference hit time in nanosecond
741  float charge = (float)(myTrack.charge());
742  Gflash3Vector gfpos(trackPosition.X(),trackPosition.Y(),trackPosition.Z());
743  Gflash3Vector gfmom(moment.X(),moment.Y(),moment.Z());
744 
745  theProfile->initialize(showerType,eGen,globalTime,charge,gfpos,gfmom);
748 
749  //make hits
750  std::vector<GflashHit>& gflashHitList = theProfile->getGflashHitList();
751  std::vector<GflashHit>::const_iterator spotIter = gflashHitList.begin();
752  std::vector<GflashHit>::const_iterator spotIterEnd = gflashHitList.end();
753 
755 
756  for( ; spotIter != spotIterEnd; spotIter++){
757 
758  double pathLength = theProfile->getGflashShowino()->getPathLengthAtShower()
759  + (30*100/eGen)*(spotIter->getTime() - globalTime);
760 
761  double currentDepth = std::max(0.0,pathLength - theProfile->getGflashShowino()->getPathLengthOnEcal());
762 
763  //find the the showino position at the currentDepth
764  GflashTrajectoryPoint trajectoryPoint;
765  theProfile->getGflashShowino()->getHelix()->getGflashTrajectoryPoint(trajectoryPoint,pathLength);
766  Gflash3Vector positionAtCurrentDepth = trajectoryPoint.getPosition();
767  //find radial distrance
768  Gflash3Vector lateralDisplacement = positionAtCurrentDepth - spotIter->getPosition()/CLHEP::cm;
769  double rShower = lateralDisplacement.r();
770  double azimuthalAngle = lateralDisplacement.phi();
771 
772  whichCalor = Gflash::getCalorimeterNumber(positionAtCurrentDepth);
773 
774  if(whichCalor==Gflash::kESPM || whichCalor==Gflash::kENCA) {
775  bool statusPad = myGrid.getPads(currentDepth,true);
776  if(!statusPad) continue;
777  myGrid.setSpotEnergy(1.2*spotIter->getEnergy()/CLHEP::GeV);
778  myGrid.addHit(rShower/Gflash::intLength[Gflash::kESPM],azimuthalAngle,0);
779  }
780  else if(whichCalor==Gflash::kHB || whichCalor==Gflash::kHE) {
781  bool setHDdepth = myHcalHitMaker.setDepth(currentDepth,true);
782  if(!setHDdepth) continue;
783  myHcalHitMaker.setSpotEnergy(1.4*spotIter->getEnergy()/CLHEP::GeV);
784  myHcalHitMaker.addHit(rShower/Gflash::intLength[Gflash::kHB],azimuthalAngle,0);
785  }
786  }
787  status = true;
788  }
789  else {
790  edm::LogInfo("FastSimulationCalorimetry") << " SimMethod " << hdSimMethod_ <<" is NOT available ";
791  }
792  }
793 
794 
795  if(status) {
796 
797  // Here to switch between simple formulae and parameterized response
798  if(optionHDSim_ == 1) {
799  emeas = myHDResponse_->getHCALEnergyResponse(eGen, hit, random);
800  }
801  else { // optionHDsim == 2
802  emeas = myHDResponse_->responseHCAL(mip, eGen, pathEta, 1, random); // 1=hadron
803  }
804 
805  double correction = emeas / eGen;
806 
807  // RespCorrP factors (ECAL and HCAL separately) calculation
808  respCorr(eint);
809 
810  if(debug_)
811  LogInfo("FastCalorimetry")
812  << "CalorimetryManager::HDShowerSimulation - on-calo 2" << std::endl
813  << " eta = " << pathEta << std::endl
814  << " phi = " << pathPhi << std::endl
815  << " Egen = " << eGen << std::endl
816  << " Emeas = " << emeas << std::endl
817  << " corr = " << correction << std::endl
818  << " mip = " << mip << std::endl;
819 
820  if(myTrack.onEcal() > 0) {
821  // Save ECAL hits
822  updateECAL(myGrid.getHits(),onECAL,myTrack.id(),correction*ecorr);
823  }
824 
825  // Save HCAL hits
826  if(myTrack.onVFcal() && useShowerLibrary) {
827  myHDResponse_->correctHF(eGen,abs(myTrack.type()));
829  }
830  else
831  updateHCAL(myHcalHitMaker.getHits(),myTrack.id(),correction*hcorr);
832 
833  }
834  else { // shower simulation failed
835  // std::cout << " Shower simulation failed " << trackPosition.Vect() << std::endl;
836  // std::cout << " The FSimTrack " << myTrack << std::endl;
837  // std::cout << " HF entrance on VFcal" << myTrack.onVFcal() << std::endl;
838  // std::cout << " trackPosition.eta() " << trackPosition.eta() << std::endl;
839  if(myTrack.onHcal() || myTrack.onVFcal())
840  {
841  DetId cell = myCalorimeter_->getClosestCell(trackPosition.Vect(),false,false);
842  double tof = (((HcalGeometry*)(myCalorimeter_->getHcalGeometry()))->getPosition(cell).mag())/29.98;//speed of light
843  CaloHitID current_id(cell.rawId(),tof,myTrack.id());
844  std::map<CaloHitID,float> hitMap;
845  hitMap[current_id] = emeas;
846  updateHCAL(hitMap,myTrack.id());
847  if(debug_)
848  LogInfo("FastCalorimetry") << " HCAL simple cell "
849  << cell.rawId() << " added E = "
850  << emeas << std::endl;
851  }
852  }
853 
854  } // e > 0. ...
855 
856  if(debug_)
857  LogInfo("FastCalorimetry") << std::endl << " FASTEnergyReconstructor::HDShowerSimulation finished "
858  << std::endl;
859 }
float charge() const
charge
Definition: FSimTrack.h:47
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:139
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:190
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:101
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:133
int onVFcal() const
Definition: FSimTrack.h:111
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:86
const std::map< CaloHitID, float > & getHitsMap()
std::vector< GflashHit > & getGflashHitList()
int onHcal() const
Definition: FSimTrack.h:106
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:136
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::loadFromEcalBarrel ( edm::PCaloHitContainer c) const

Definition at line 1364 of file CalorimetryManager.cc.

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

Referenced by FamosProducer::produce().

1365 {
1366  c.reserve(c.size()+EBMapping_.size());
1367  for(unsigned i=0; i<EBMapping_.size(); i++) {
1368  c.push_back(PCaloHit(EBDetId::unhashIndex(EBMapping_[i].first.unitID()),EBMapping_[i].second,EBMapping_[i].first.timeSlice(),EBMapping_[i].first.trackID()));
1369  }
1370 }
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 1372 of file CalorimetryManager.cc.

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

Referenced by FamosProducer::produce().

1373 {
1374  c.reserve(c.size()+EEMapping_.size());
1375  for(unsigned i=0; i<EEMapping_.size(); i++) {
1376  c.push_back(PCaloHit(EEDetId::unhashIndex(EEMapping_[i].first.unitID()),EEMapping_[i].second,EEMapping_[i].first.timeSlice(),EEMapping_[i].first.trackID()));
1377  }
1378 }
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 1380 of file CalorimetryManager.cc.

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

Referenced by FamosProducer::produce().

1381 {
1382  c.reserve(c.size()+HMapping_.size());
1383  for(unsigned i=0; i<HMapping_.size(); i++) {
1384  c.push_back(PCaloHit(DetId(HMapping_[i].first.unitID()),HMapping_[i].second,HMapping_[i].first.timeSlice(),HMapping_[i].first.trackID()));
1385  }
1386 }
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 1389 of file CalorimetryManager.cc.

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

Referenced by FamosProducer::produce().

1390 {
1391  c.reserve(c.size()+ESMapping_.size());
1392  for(unsigned i=0; i<ESMapping_.size(); i++) {
1393  c.push_back(PCaloHit(ESMapping_[i].first.unitID(),ESMapping_[i].second,ESMapping_[i].first.timeSlice(),ESMapping_[i].first.trackID()));
1394  }
1395 }
std::vector< std::pair< CaloHitID, float > > ESMapping_
void CalorimetryManager::loadMuonSimTracks ( edm::SimTrackContainer m) const

Definition at line 1399 of file CalorimetryManager.cc.

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

Referenced by FamosProducer::produce().

1400 {
1401  unsigned size=muons.size();
1402  for(unsigned i=0; i<size;++i)
1403  {
1404  int id=muons[i].trackId();
1405  if(abs(muons[i].type())!=13) continue;
1406  // identify the corresponding muon in the local collection
1407 
1408  std::vector<FSimTrack>::const_iterator itcheck=find_if(muonSimTracks.begin(),muonSimTracks.end(),FSimTrackEqual(id));
1409  if(itcheck!=muonSimTracks.end())
1410  {
1411  muons[i].setTkPosition(itcheck->trackerSurfacePosition());
1412  muons[i].setTkMomentum(itcheck->trackerSurfaceMomentum());
1413  // std::cout << " Found the SimTrack " << std::endl;
1414  // std::cout << *itcheck << std::endl;
1415  // std::cout << "SimTrack Id "<< id << " " << muons[i] << " " << std::endl;
1416  }
1417  // else
1418  // {
1419  // std::cout << " Calorimetery Manager : this should really not happen " << std::endl;
1420  // std::cout << " Was looking for " << id << " " << muons[i] << std::endl;
1421  // for(unsigned i=0;i<muonSimTracks.size();++i)
1422  // std::cout << muonSimTracks[i] << std::endl;
1423  // }
1424  }
1425 
1426 }
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 862 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(), RawParticle::setID(), HcalHitMaker::setSpotEnergy(), SimTrack::setTkMomentum(), SimTrack::setTkPosition(), EcalHitMaker::setTrackParameters(), theMuonEcalEffects, theMuonHcalEffects, updateECAL(), updateHCAL(), MaterialEffectsSimulator::updateState(), RawParticle::vertex(), and FSimTrack::vfcalEntrance().

Referenced by reconstruct().

863 {
864  // TimeMe t(" FASTEnergyReconstructor::HDShower");
865  XYZTLorentzVector moment = myTrack.momentum();
866 
867  // Backward compatibility behaviour
868  if(!theMuonHcalEffects)
869  {
870  if(myTrack.onHcal() || myTrack.onVFcal() )
871  reconstructHCAL(myTrack, random);
872 
873  return;
874  }
875 
876  if(debug_)
877  LogInfo("FastCalorimetry") << "CalorimetryManager::MuonMipSimulation - track param."
878  << std::endl
879  << " eta = " << moment.eta() << std::endl
880  << " phi = " << moment.phi() << std::endl
881  << " et = " << moment.Et() << std::endl;
882 
883  // int hit;
884  // int pid = abs(myTrack.type());
885 
886  XYZTLorentzVector trackPosition;
887  if ( myTrack.onEcal() ) {
888  trackPosition=myTrack.ecalEntrance().vertex();
889  // hit = myTrack.onEcal()-1; //
890  myPart = myTrack.ecalEntrance();
891  } else if ( myTrack.onVFcal()) {
892  trackPosition=myTrack.vfcalEntrance().vertex();
893  // hit = 2;
894  myPart = myTrack.vfcalEntrance();
895  }
896  else
897  {
898  LogInfo("FastCalorimetry") << " The particle is not in the acceptance " << std::endl;
899  return;
900  }
901 
902  // int onHCAL = hit + 1; - specially for myCalorimeter->hcalProperties(onHCAL)
903  // (below) to get VFcal properties ...
904  // not needed ?
905  // int onHCAL = hit + 1;
906  int onECAL = myTrack.onEcal();
907 
908  // double pathEta = trackPosition.eta();
909  // double pathPhi = trackPosition.phi();
910  // double pathTheta = trackPosition.theta();
911 
912  //===========================================================================
913 
914  // ECAL and HCAL properties to get
915 
916  //Making ECAL Grid (and segments calculation)
917  XYZPoint caloentrance;
918  XYZVector direction;
919  if(myTrack.onEcal())
920  {
921  caloentrance = myTrack.ecalEntrance().vertex().Vect();
922  direction = myTrack.ecalEntrance().Vect().Unit();
923  }
924  else if(myTrack.onHcal())
925  {
926  caloentrance = myTrack.hcalEntrance().vertex().Vect();
927  direction = myTrack.hcalEntrance().Vect().Unit();
928  }
929  else
930  {
931  caloentrance = myTrack.vfcalEntrance().vertex().Vect();
932  direction = myTrack.vfcalEntrance().Vect().Unit();
933  }
934 
935  DetId pivot;
936  if(myTrack.onEcal())
937  {
938  pivot=myCalorimeter_->getClosestCell(caloentrance,
939  true, myTrack.onEcal()==1);
940  }
941  else if(myTrack.onHcal())
942  {
943  // std::cout << " CalorimetryManager onHcal " << myTrack.onHcal() << " caloentrance" << caloentrance << std::endl;
944  pivot=myCalorimeter_->getClosestCell(caloentrance,
945  false, false);
946  }
947 
948  EcalHitMaker myGrid(myCalorimeter_,caloentrance,pivot,
949  pivot.null()? 0 : myTrack.onEcal(),hdGridSize_,0,
950  random);
951  // 0 =EM shower -> Unit = X0
952 
953  myGrid.setTrackParameters(direction,0,myTrack);
954 
955  // Now get the path in the Preshower, ECAL and HCAL along a straight line extrapolation
956  // but only those in the ECAL are used
957 
958  const std::vector<CaloSegment>& segments=myGrid.getSegments();
959  unsigned nsegments=segments.size();
960 
961  int ifirstHcal=-1;
962  int ilastEcal=-1;
963 
964  EnergyLossSimulator* energyLossECAL = (theMuonEcalEffects) ?
966  // // Muon brem in ECAL
967  // MuonBremsstrahlungSimulator* muonBremECAL = 0;
968  // if (theMuonEcalEffects) muonBremECAL = theMuonEcalEffects->muonBremsstrahlungSimulator();
969 
970  for(unsigned iseg=0;iseg<nsegments&&ifirstHcal<0;++iseg)
971  {
972 
973  // in the ECAL, there are two types of segments: PbWO4 and GAP
974  float segmentSizeinX0=segments[iseg].X0length();
975 
976  // Martijn - insert your computations here
977  float energy=0.0;
978  if (segmentSizeinX0>0.001 && segments[iseg].material()==CaloSegment::PbWO4 ) {
979  // The energy loss simulator
980  float charge = (float)(myTrack.charge());
981  ParticlePropagator theMuon(moment,trackPosition,charge,nullptr);
982  theMuon.setID(-(int)charge*13);
983  if ( energyLossECAL ) {
984  energyLossECAL->updateState(theMuon, segmentSizeinX0, random);
985  energy = energyLossECAL->deltaMom().E();
986  moment -= energyLossECAL->deltaMom();
987  }
988  }
989  // that's all for ECAL, Florian
990  // Save the hit only if it is a crystal
991  if(segments[iseg].material()==CaloSegment::PbWO4)
992  {
993  myGrid.getPads(segments[iseg].sX0Entrance()+segmentSizeinX0*0.5);
994  myGrid.setSpotEnergy(energy);
995  myGrid.addHit(0.,0.);
996  ilastEcal=iseg;
997  }
998  // Check for end of loop:
999  if(segments[iseg].material()==CaloSegment::HCAL)
1000  {
1001  ifirstHcal=iseg;
1002  }
1003  }
1004 
1005 
1006  // Build the FAMOS HCAL
1007  HcalHitMaker myHcalHitMaker(myGrid,(unsigned)2);
1008  // float mipenergy=0.1;
1009  // Create the helix with the stepping helix propagator
1010  // to add a hit, just do
1011  // myHcalHitMaker.setSpotEnergy(mipenergy);
1012  // math::XYZVector hcalEntrance;
1013  // if(ifirstHcal>=0) hcalEntrance=segments[ifirstHcal].entrance();
1014  // myHcalHitMaker.addHit(hcalEntrance);
1018  int ilastHcal=-1;
1019  float mipenergy=0.0;
1020 
1021  EnergyLossSimulator* energyLossHCAL = (theMuonHcalEffects) ?
1023  // // Muon Brem effect
1024  // MuonBremsstrahlungSimulator* muonBremHCAL = 0;
1025  // if (theMuonHcalEffects) muonBremHCAL = theMuonHcalEffects->muonBremsstrahlungSimulator();
1026 
1027  if(ifirstHcal>0 && energyLossHCAL){
1028  for(unsigned iseg=ifirstHcal;iseg<nsegments;++iseg)
1029  {
1030  float segmentSizeinX0=segments[iseg].X0length();
1031  if(segments[iseg].material()==CaloSegment::HCAL) {
1032  ilastHcal=iseg;
1033  if (segmentSizeinX0>0.001) {
1034  // The energy loss simulator
1035  float charge = (float)(myTrack.charge());
1036  ParticlePropagator theMuon(moment,trackPosition,charge,nullptr);
1037  theMuon.setID(-(int)charge*13);
1038  energyLossHCAL->updateState(theMuon, segmentSizeinX0, random);
1039  mipenergy = energyLossHCAL->deltaMom().E();
1040  moment -= energyLossHCAL->deltaMom();
1041  myHcalHitMaker.setSpotEnergy(mipenergy);
1042  myHcalHitMaker.addHit(segments[iseg].entrance());
1043  }
1044  }
1045  }
1046  }
1047 
1052  //
1053 
1054 
1055 
1056  // Copy the muon SimTrack (Only for Energy loss)
1057  FSimTrack muonTrack(myTrack);
1058  if(energyLossHCAL && ilastHcal>=0) {
1059  math::XYZVector hcalExit=segments[ilastHcal].exit();
1060  muonTrack.setTkPosition(hcalExit);
1061  muonTrack.setTkMomentum(moment);
1062  } else if(energyLossECAL && ilastEcal>=0) {
1063  math::XYZVector ecalExit=segments[ilastEcal].exit();
1064  muonTrack.setTkPosition(ecalExit);
1065  muonTrack.setTkMomentum(moment);
1066  } // else just leave tracker surface position and momentum...
1067 
1068  muonSimTracks.push_back(muonTrack);
1069 
1070 
1071  // no need to change below this line
1072  std::map<CaloHitID,float>::const_iterator mapitr;
1073  std::map<CaloHitID,float>::const_iterator endmapitr;
1074  if(myTrack.onEcal() > 0) {
1075  // Save ECAL hits
1076  updateECAL(myGrid.getHits(),onECAL,myTrack.id());
1077  }
1078 
1079  // Save HCAL hits
1080  updateHCAL(myHcalHitMaker.getHits(),myTrack.id());
1081 
1082  if(debug_)
1083  LogInfo("FastCalorimetry") << std::endl << " FASTEnergyReconstructor::MipShowerSimulation finished "
1084  << std::endl;
1085 }
float charge() const
charge
Definition: FSimTrack.h:47
void reconstructHCAL(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
Definition: FSimTrack.h:139
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:190
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:101
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:133
int onVFcal() const
Definition: FSimTrack.h:111
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
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:86
int onHcal() const
Definition: FSimTrack.h:106
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:136
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 1088 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().

1088  {
1089 
1090  edm::ParameterSet ECALparameters = fastCalo.getParameter<edm::ParameterSet>("ECAL");
1091 
1092  evtsToDebug_ = fastCalo.getUntrackedParameter<std::vector<unsigned int> >("EvtsToDebug",std::vector<unsigned>());
1093  debug_ = fastCalo.getUntrackedParameter<bool>("Debug");
1094 
1095  bFixedLength_ = ECALparameters.getParameter<bool>("bFixedLength");
1096  // std::cout << "bFixedLength_ = " << bFixedLength_ << std::endl;
1097 
1098  gridSize_ = ECALparameters.getParameter<int>("GridSize");
1099  spotFraction_ = ECALparameters.getParameter<double>("SpotFraction");
1100  pulledPadSurvivalProbability_ = ECALparameters.getParameter<double>("FrontLeakageProbability");
1101  crackPadSurvivalProbability_ = ECALparameters.getParameter<double>("GapLossProbability");
1102  theCoreIntervals_ = ECALparameters.getParameter<std::vector<double> >("CoreIntervals");
1103  theTailIntervals_ = ECALparameters.getParameter<std::vector<double> >("TailIntervals");
1104 
1105  RCFactor_ = ECALparameters.getParameter<double>("RCFactor");
1106  RTFactor_ = ECALparameters.getParameter<double>("RTFactor");
1107  //changed after tuning - Feb-July - Shilpi Jain
1108  // radiusFactor_ = ECALparameters.getParameter<double>("RadiusFactor");
1109  radiusFactorEE_ = ECALparameters.getParameter<double>("RadiusFactorEE");
1110  radiusFactorEB_ = ECALparameters.getParameter<double>("RadiusFactorEB");
1111  //(end of) changed after tuning - Feb-July - Shilpi Jain
1112  radiusPreshowerCorrections_ = ECALparameters.getParameter<std::vector<double> >("RadiusPreshowerCorrections");
1115  mipValues_ = ECALparameters.getParameter<std::vector<double> >("MipsinGeV");
1116  simulatePreshower_ = ECALparameters.getParameter<bool>("SimulatePreshower");
1117 
1118  if(gridSize_ <1) gridSize_= 7;
1119  if(pulledPadSurvivalProbability_ <0. || pulledPadSurvivalProbability_>1 ) pulledPadSurvivalProbability_= 1.;
1120  if(crackPadSurvivalProbability_ <0. || crackPadSurvivalProbability_>1 ) crackPadSurvivalProbability_= 0.9;
1121 
1122  LogInfo("FastCalorimetry") << " Fast ECAL simulation parameters " << std::endl;
1123  LogInfo("FastCalorimetry") << " =============================== " << std::endl;
1124  if(simulatePreshower_)
1125  LogInfo("FastCalorimetry") << " The preshower is present " << std::endl;
1126  else
1127  LogInfo("FastCalorimetry") << " The preshower is NOT present " << std::endl;
1128  LogInfo("FastCalorimetry") << " Grid Size : " << gridSize_ << std::endl;
1129  if(spotFraction_>0.)
1130  LogInfo("FastCalorimetry") << " Spot Fraction : " << spotFraction_ << std::endl;
1131  else
1132  {
1133  LogInfo("FastCalorimetry") << " Core of the shower " << std::endl;
1134  for(unsigned ir=0; ir < theCoreIntervals_.size()/2;++ir)
1135  {
1136  LogInfo("FastCalorimetry") << " r < " << theCoreIntervals_[ir*2] << " R_M : " << theCoreIntervals_[ir*2+1] << " ";
1137  }
1138  LogInfo("FastCalorimetry") << std::endl;
1139 
1140  LogInfo("FastCalorimetry") << " Tail of the shower " << std::endl;
1141  for(unsigned ir=0; ir < theTailIntervals_.size()/2;++ir)
1142  {
1143  LogInfo("FastCalorimetry") << " r < " << theTailIntervals_[ir*2] << " R_M : " << theTailIntervals_[ir*2+1] << " ";
1144  }
1145  //changed after tuning - Feb-July - Shilpi Jain
1146  // LogInfo("FastCalorimetry") << "Radius correction factor " << radiusFactor_ << std::endl;
1147  LogInfo("FastCalorimetry") << "Radius correction factors: EB & EE " << radiusFactorEB_ << " : "<< radiusFactorEE_ << std::endl;
1148  //(end of) changed after tuning - Feb-July - Shilpi Jain
1149  LogInfo("FastCalorimetry") << std::endl;
1150  if(mipValues_.size()>2) {
1151  LogInfo("FastCalorimetry") << "Improper number of parameters for the preshower ; using 95keV" << std::endl;
1152  mipValues_.clear();
1153  mipValues_.resize(2,0.000095);
1154  }
1155  }
1156 
1157  LogInfo("FastCalorimetry") << " FrontLeakageProbability : " << pulledPadSurvivalProbability_ << std::endl;
1158  LogInfo("FastCalorimetry") << " GapLossProbability : " << crackPadSurvivalProbability_ << std::endl;
1159 
1160 
1161  // RespCorrP: p (momentum), ECAL and HCAL corrections = f(p)
1162  edm::ParameterSet CalorimeterParam = fastCalo.getParameter<edm::ParameterSet>("CalorimeterProperties");
1163 
1164  rsp = CalorimeterParam.getParameter<std::vector<double> >("RespCorrP");
1165  LogInfo("FastCalorimetry") << " RespCorrP (rsp) size " << rsp.size() << std::endl;
1166 
1167  if( rsp.size()%3 !=0 ) {
1168  LogInfo("FastCalorimetry")
1169  << " RespCorrP size is wrong -> no corrections applied !!!"
1170  << std::endl;
1171 
1172  p_knots.push_back(14000.);
1173  k_e.push_back (1.);
1174  k_h.push_back (1.);
1175  }
1176  else {
1177  for(unsigned i = 0; i < rsp.size(); i += 3) {
1178  LogInfo("FastCalorimetry") << "i = " << i/3 << " p = " << rsp [i]
1179  << " k_e(p) = " << rsp[i+1]
1180  << " k_e(p) = " << rsp[i+2] << std::endl;
1181 
1182  p_knots.push_back(rsp[i]);
1183  k_e.push_back (rsp[i+1]);
1184  k_h.push_back (rsp[i+2]);
1185  }
1186  }
1187 
1188 
1189  //FR
1190  edm::ParameterSet HCALparameters = fastCalo.getParameter<edm::ParameterSet>("HCAL");
1191  optionHDSim_ = HCALparameters.getParameter<int>("SimOption");
1192  hdGridSize_ = HCALparameters.getParameter<int>("GridSize");
1193  hdSimMethod_ = HCALparameters.getParameter<int>("SimMethod");
1194  //RF
1195 
1196  EcalDigitizer_ = ECALparameters.getUntrackedParameter<bool>("Digitizer",false);
1197  HcalDigitizer_ = HCALparameters.getUntrackedParameter<bool>("Digitizer",false);
1198  samplingHBHE_ = HCALparameters.getParameter< std::vector<double> >("samplingHBHE");
1199  samplingHF_ = HCALparameters.getParameter< std::vector<double> >("samplingHF");
1200  samplingHO_ = HCALparameters.getParameter< std::vector<double> >("samplingHO");
1201  ietaShiftHB_ = HCALparameters.getParameter< int >("ietaShiftHB");
1202  ietaShiftHE_ = HCALparameters.getParameter< int >("ietaShiftHE");
1203  ietaShiftHF_ = HCALparameters.getParameter< int >("ietaShiftHF");
1204  ietaShiftHO_ = HCALparameters.getParameter< int >("ietaShiftHO");
1205  timeShiftHB_ = HCALparameters.getParameter< std::vector<double> >("timeShiftHB");
1206  timeShiftHE_ = HCALparameters.getParameter< std::vector<double> >("timeShiftHE");
1207  timeShiftHF_ = HCALparameters.getParameter< std::vector<double> >("timeShiftHF");
1208  timeShiftHO_ = HCALparameters.getParameter< std::vector<double> >("timeShiftHO");
1209 
1210  // FastHFShowerLibrary
1211  edm::ParameterSet m_HS = fastCalo.getParameter<edm::ParameterSet>("HFShowerLibrary");
1212  useShowerLibrary = m_HS.getUntrackedParameter<bool>("useShowerLibrary",false);
1213  useCorrectionSL = m_HS.getUntrackedParameter<bool>("useCorrectionSL",false);
1214 }
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 173 of file CalorimetryManager.cc.

References funct::abs(), clean(), HCALResponse::correctHF(), gather_cfg::cout, debug_, EMShowerSimulation(), edm::EventID::event(), evtsToDebug_, spr::find(), FastHFShowerLibrary::getHitsMap(), FSimTrack::hcalEntrance(), HDShowerSimulation(), FSimEvent::id(), FSimTrack::id(), initialized_, createfilelist::int, MuonMipSimulation(), myCalorimeter_, myHDResponse_, mySimEvent, FSimTrack::noEndVertex(), FSimEvent::nTracks(), FSimTrack::onEcal(), FSimTrack::onHcal(), FSimTrack::onVFcal(), optionHDSim_, sysUtil::pid, CaloGeometryHelper::preshowerPresent(), FBaseSimEvent::print(), FastHFShowerLibrary::recoHFShowerLibrary(), reconstructHCAL(), FastHFShowerLibrary::SetRandom(), simulatePreshower_, theHFShowerLibrary, FBaseSimEvent::track(), CoreSimTrack::type(), updateHCAL(), and useShowerLibrary.

Referenced by FamosManager::reconstruct().

174 {
176  if(!evtsToDebug_.empty())
177  {
178  std::vector<unsigned int>::const_iterator itcheck=find(evtsToDebug_.begin(),evtsToDebug_.end(),mySimEvent->id().event());
179  debug_=(itcheck!=evtsToDebug_.end());
180  if(debug_)
181  mySimEvent->print();
182  }
183  // Clear the content of the calorimeters
184  if(!initialized_)
185  {
186 
187  // Check if the preshower is really available
189  {
190  std::cout << " WARNING " << std::endl;
191  std::cout << " The preshower simulation has been turned on; but no preshower geometry is available " << std::endl;
192  std::cout << " Disabling the preshower simulation " << std::endl;
193  simulatePreshower_ = false;
194  }
195 
196  initialized_=true;
197  }
198  clean();
199 
200 
201 
202  LogInfo("FastCalorimetry") << "Reconstructing " << (int) mySimEvent->nTracks() << " tracks." << std::endl;
203  for( int fsimi=0; fsimi < (int) mySimEvent->nTracks() ; ++fsimi) {
204 
205  FSimTrack& myTrack = mySimEvent->track(fsimi);
206 
207  int pid = abs(myTrack.type());
208 
209  if (debug_) {
210  LogInfo("FastCalorimetry") << " ===> pid = " << pid << std::endl;
211  }
212 
213 
214  // Check that the particle hasn't decayed
215  if(myTrack.noEndVertex()) {
216  // Simulate energy smearing for photon and electrons
217  if ( pid == 11 || pid == 22 ) {
218 
219  if ( myTrack.onEcal() )
220  EMShowerSimulation(myTrack, random);
221  else if ( myTrack.onVFcal() ) {
222  if(useShowerLibrary) {
224  myHDResponse_->correctHF(myTrack.hcalEntrance().e(),abs(myTrack.type()));
226  }
227  else reconstructHCAL(myTrack, random);
228  }
229  } // electron or photon
230  else if (pid==13)
231  {
232  MuonMipSimulation(myTrack, random);
233  }
234  // Simulate energy smearing for hadrons (i.e., everything
235  // but muons... and SUSY particles that deserve a special
236  // treatment.
237  else if ( pid < 1000000 ) {
238  if ( myTrack.onHcal() || myTrack.onVFcal() ) {
239  if(optionHDSim_ == 0 ) reconstructHCAL(myTrack, random);
240  else HDShowerSimulation(myTrack, random);
241  }
242  } // pid < 1000000
243  } // myTrack.noEndVertex()
244  } // particle loop
245  // LogInfo("FastCalorimetry") << " Number of hits (barrel)" << EBMapping_.size() << std::endl;
246  // LogInfo("FastCalorimetry") << " Number of hits (Hcal)" << HMapping_.size() << std::endl;
247  // std::cout << " Nombre de hit (endcap)" << EEMapping_.size() << std::endl;
248 
249 } // reconstruct
EventNumber_t event() const
Definition: EventID.h:41
bool noEndVertex() const
no end vertex
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
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
int onEcal() const
Definition: FSimTrack.h:101
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:111
unsigned int nTracks() const
Number of tracks.
Definition: FSimEvent.cc:36
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
edm::EventID id() const
Method to return the EventId.
Definition: FSimEvent.cc:27
void SetRandom(const RandomEngineAndDistribution *)
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:25
std::vector< unsigned int > evtsToDebug_
int id() const
the index in FBaseSimEvent and other vectors
Definition: FSimTrack.h:86
bool preshowerPresent() const
const std::map< CaloHitID, float > & getHitsMap()
int onHcal() const
Definition: FSimTrack.h:106
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:136
FastHFShowerLibrary * theHFShowerLibrary
void print() const
print the FBaseSimEvent in an intelligible way
void EMShowerSimulation(const FSimTrack &myTrack, RandomEngineAndDistribution const *)
FSimTrack & track(int id) const
Return track with given Id.
void CalorimetryManager::reconstructHCAL ( const FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)
private

Definition at line 493 of file CalorimetryManager.cc.

References funct::abs(), debug_, 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 reconstruct().

495 {
496  int hit;
497  int pid = abs(myTrack.type());
498  if (debug_) {
499  LogInfo("FastCalorimetry") << " reconstructHCAL " << myTrack << std::endl;
500  }
501 
502  // FSimTrack myTrack = mySimEvent.track(fsimi);
503 
504  // int pid=abs(myTrack.type());
505  // std::cout << "reconstructHCAL " << std::endl;
506 
507  XYZTLorentzVector trackPosition;
508  if (myTrack.onHcal()) {
509  trackPosition=myTrack.hcalEntrance().vertex();
510  hit = myTrack.onHcal()-1;
511  } else {
512  trackPosition=myTrack.vfcalEntrance().vertex();
513  hit = 2;
514  }
515 
516  double pathEta = trackPosition.eta();
517  double pathPhi = trackPosition.phi();
518  // double pathTheta = trackPosition.theta();
519 
520  double EGen = myTrack.hcalEntrance().e();
521  double emeas = 0.;
522  //double emeas = -0.0001;
523 
524  if(pid == 13) {
525  // std::cout << " We should not be here " << std::endl;
526  emeas = myHDResponse_->responseHCAL(0, EGen, pathEta, 2, random); // 2=muon
527  if(debug_)
528  LogInfo("FastCalorimetry") << "CalorimetryManager::reconstructHCAL - MUON !!!" << std::endl;
529  }
530  else if( pid == 22 || pid == 11) {
531  emeas = myHDResponse_->responseHCAL(0, EGen, pathEta, 0, random); // last par. = 0 = e/gamma
532  // cout << "CalorimetryManager::reconstructHCAL - e/gamma !!!" << std::endl;
533  if(debug_)
534  LogInfo("FastCalorimetry") << "CalorimetryManager::reconstructHCAL - e/gamma !!!" << std::endl;
535  }
536  else {
537  emeas = myHDResponse_->getHCALEnergyResponse(EGen, hit, random);
538  }
539 
540  if(debug_)
541  LogInfo("FastCalorimetry") << "CalorimetryManager::reconstructHCAL - on-calo "
542  << " eta = " << pathEta
543  << " phi = " << pathPhi
544  << " Egen = " << EGen
545  << " Emeas = " << emeas << std::endl;
546 
547  if(emeas > 0.) {
548  DetId cell = myCalorimeter_->getClosestCell(trackPosition.Vect(),false,false);
549  double tof = (((HcalGeometry*)(myCalorimeter_->getHcalGeometry()))->getPosition(cell).mag())/29.98;//speed of light
550  CaloHitID current_id(cell.rawId(),tof,myTrack.id());
551  std::map<CaloHitID,float> hitMap;
552  hitMap[current_id] = emeas;
553  updateHCAL(hitMap,myTrack.id());
554  }
555 }
double responseHCAL(int _mip, double energy, double eta, int partype, RandomEngineAndDistribution const *)
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
Definition: FSimTrack.h:139
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:86
int onHcal() const
Definition: FSimTrack.h:106
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:136
DetId getClosestCell(const XYZPoint &point, bool ecal, bool central) const
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
void CalorimetryManager::respCorr ( double  p)
private

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

1216  {
1217 
1218  int sizeP = p_knots.size();
1219 
1220  if(sizeP <= 1) {
1221  ecorr = 1.;
1222  hcorr = 1.;
1223  }
1224  else {
1225  int ip = -1;
1226  for (int i = 0; i < sizeP; i++) {
1227  if (p < p_knots[i]) { ip = i; break;}
1228  }
1229  if (ip == 0) {
1230  ecorr = k_e[0];
1231  hcorr = k_h[0];
1232  }
1233  else {
1234  if(ip == -1) {
1235  ecorr = k_e[sizeP-1];
1236  hcorr = k_h[sizeP-1];
1237  }
1238  else {
1239  double x1 = p_knots[ip-1];
1240  double x2 = p_knots[ip];
1241  double y1 = k_e[ip-1];
1242  double y2 = k_e[ip];
1243 
1244  if(x1 == x2) {
1245  // std::cout << " equal p_knots values!!! " << std::endl;
1246  }
1247 
1248  ecorr = (y1 + (y2 - y1) * (p - x1)/(x2 - x1));
1249 
1250  y1 = k_h[ip-1];
1251  y2 = k_h[ip];
1252  hcorr = (y1 + (y2 - y1) * (p - x1)/(x2 - x1));
1253 
1254  }
1255  }
1256  }
1257 
1258  if(debug_)
1259  LogInfo("FastCalorimetry") << " p, ecorr, hcorr = " << p << " "
1260  << ecorr << " " << hcorr << std::endl;
1261 
1262 }
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 1264 of file CalorimetryManager.cc.

References corr, EBMapping_, and EEMapping_.

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

1265 {
1266  std::map<CaloHitID,float>::const_iterator mapitr;
1267  std::map<CaloHitID,float>::const_iterator endmapitr=hitMap.end();
1268  if(onEcal==1) {
1269  EBMapping_.reserve(EBMapping_.size()+hitMap.size());
1270  endmapitr=hitMap.end();
1271  for(mapitr=hitMap.begin();mapitr!=endmapitr;++mapitr) {
1272  //correct energy
1273  float energy = mapitr->second;
1274  energy *= corr;
1275 
1276  //make finalized CaloHitID
1277  CaloHitID current_id(mapitr->first.unitID(),mapitr->first.timeSlice(),trackID);
1278 
1279  EBMapping_.push_back(std::pair<CaloHitID,float>(current_id,energy));
1280  }
1281  }
1282  else if(onEcal==2) {
1283  EEMapping_.reserve(EEMapping_.size()+hitMap.size());
1284  endmapitr=hitMap.end();
1285  for(mapitr=hitMap.begin();mapitr!=endmapitr;++mapitr) {
1286  //correct energy
1287  float energy = mapitr->second;
1288  energy *= corr;
1289 
1290  //make finalized CaloHitID
1291  CaloHitID current_id(mapitr->first.unitID(),mapitr->first.timeSlice(),trackID);
1292 
1293  EEMapping_.push_back(std::pair<CaloHitID,float>(current_id,energy));
1294  }
1295  }
1296 
1297 }
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 1299 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_, samplingHBHE_, samplingHF_, samplingHO_, DetId::subdetId(), ntuplemaker::time, timeShiftHB_, timeShiftHE_, timeShiftHF_, timeShiftHO_, useCorrectionSL, and useShowerLibrary.

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

1300 {
1301  std::vector<double> hfcorrEm = myHDResponse_->getCorrHFem();
1302  std::vector<double> hfcorrHad = myHDResponse_->getCorrHFhad();
1303  std::map<CaloHitID,float>::const_iterator mapitr;
1304  std::map<CaloHitID,float>::const_iterator endmapitr=hitMap.end();
1305  HMapping_.reserve(HMapping_.size()+hitMap.size());
1306  for(mapitr=hitMap.begin(); mapitr!=endmapitr; ++mapitr) {
1307  //correct energy
1308  float energy = mapitr->second;
1309  energy *= corr;
1310 
1311  float time = mapitr->first.timeSlice();
1312  //put energy into uncalibrated state for digitizer && correct timing
1313  if(HcalDigitizer_){
1314  HcalDetId hdetid = HcalDetId(mapitr->first.unitID());
1315  if (hdetid.subdetId()== HcalBarrel){
1316  energy /= samplingHBHE_[hdetid.ietaAbs()-1]; //re-convert to GeV
1317  time = timeShiftHB_[hdetid.ietaAbs()-ietaShiftHB_];
1318  }
1319  else if (hdetid.subdetId()== HcalEndcap){
1320  energy /= samplingHBHE_[hdetid.ietaAbs()-1]; //re-convert to GeV
1321  time = timeShiftHE_[hdetid.ietaAbs()-ietaShiftHE_];
1322  }
1323  else if (hdetid.subdetId()== HcalForward){
1324  if(useShowerLibrary) {
1325  if(useCorrectionSL) {
1326  if(hdetid.depth()== 1) energy *= hfcorrEm[hdetid.ietaAbs()-ietaShiftHF_];
1327  if(hdetid.depth()== 2) energy *= hfcorrHad[hdetid.ietaAbs()-ietaShiftHF_];
1328  }
1329  } else {
1330  if(hdetid.depth()== 1) energy *= samplingHF_[0];
1331  if(hdetid.depth()== 2) energy *= samplingHF_[1];
1332  time = timeShiftHF_[hdetid.ietaAbs()-ietaShiftHF_];
1333  }
1334  }
1335  else if (hdetid.subdetId()== HcalOuter){
1336  energy /= samplingHO_[hdetid.ietaAbs()-1];
1337  time = timeShiftHO_[hdetid.ietaAbs()-ietaShiftHO_];
1338  }
1339  }
1340 
1341  //make finalized CaloHitID
1342  CaloHitID current_id(mapitr->first.unitID(),time,trackID);
1343  HMapping_.push_back(std::pair<CaloHitID,float>(current_id,energy));
1344  }
1345 }
std::vector< double > timeShiftHO_
std::vector< double > timeShiftHF_
std::vector< double > samplingHF_
int depth() const
get the tower depth
Definition: HcalDetId.cc:108
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:98
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 1347 of file CalorimetryManager.cc.

References corr, and ESMapping_.

Referenced by EMShowerSimulation().

1348 {
1349  std::map<CaloHitID,float>::const_iterator mapitr;
1350  std::map<CaloHitID,float>::const_iterator endmapitr=hitMap.end();
1351  ESMapping_.reserve(ESMapping_.size()+hitMap.size());
1352  for(mapitr=hitMap.begin();mapitr!=endmapitr;++mapitr) {
1353  //correct energy
1354  float energy = mapitr->second;
1355  energy *= corr;
1356 
1357  //make finalized CaloHitID
1358  CaloHitID current_id(mapitr->first.unitID(),mapitr->first.timeSlice(),trackID);
1359 
1360  ESMapping_.push_back(std::pair<CaloHitID,float>(current_id,energy));
1361  }
1362 }
std::vector< std::pair< CaloHitID, float > > ESMapping_
JetCorrectorParameters corr
Definition: classes.h:5

Member Data Documentation

GammaFunctionGenerator* CalorimetryManager::aGammaGenerator
private

Definition at line 154 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and EMShowerSimulation().

const LandauFluctuationGenerator* CalorimetryManager::aLandauGenerator
private

Definition at line 153 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and EMShowerSimulation().

double CalorimetryManager::aTerm
private

Definition at line 143 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

bool CalorimetryManager::bFixedLength_
private

Definition at line 179 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

double CalorimetryManager::bTerm
private

Definition at line 143 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

double CalorimetryManager::crackPadSurvivalProbability_
private

Definition at line 138 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 109 of file CalorimetryManager.h.

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

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

Definition at line 192 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and EMShowerSimulation().

bool CalorimetryManager::EcalDigitizer_
private

Definition at line 120 of file CalorimetryManager.h.

Referenced by readParameters().

double CalorimetryManager::ecorr
private

Definition at line 164 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), and respCorr().

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

Definition at line 110 of file CalorimetryManager.h.

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

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

Definition at line 112 of file CalorimetryManager.h.

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

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

Definition at line 115 of file CalorimetryManager.h.

Referenced by readParameters(), and reconstruct().

int CalorimetryManager::gridSize_
private

Definition at line 145 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

bool CalorimetryManager::HcalDigitizer_
private

Definition at line 121 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

double CalorimetryManager::hcorr
private

Definition at line 165 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), and respCorr().

int CalorimetryManager::hdGridSize_
private

Definition at line 149 of file CalorimetryManager.h.

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

int CalorimetryManager::hdSimMethod_
private

Definition at line 149 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), and readParameters().

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

Definition at line 111 of file CalorimetryManager.h.

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

int CalorimetryManager::ietaShiftHB_
private

Definition at line 125 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

int CalorimetryManager::ietaShiftHE_
private

Definition at line 125 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

int CalorimetryManager::ietaShiftHF_
private

Definition at line 125 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

int CalorimetryManager::ietaShiftHO_
private

Definition at line 125 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

bool CalorimetryManager::initialized_
private

Definition at line 168 of file CalorimetryManager.h.

Referenced by reconstruct().

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

Definition at line 162 of file CalorimetryManager.h.

Referenced by readParameters(), and respCorr().

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

Definition at line 163 of file CalorimetryManager.h.

Referenced by readParameters(), and respCorr().

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

Definition at line 144 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 170 of file CalorimetryManager.h.

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

CaloGeometryHelper* CalorimetryManager::myCalorimeter_
private
RawParticle CalorimetryManager::myElec
private

A few pointers to save time.

Definition at line 132 of file CalorimetryManager.h.

Referenced by EMShowerSimulation().

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

Definition at line 104 of file CalorimetryManager.h.

HSParameters* CalorimetryManager::myHSParameters_
private

Definition at line 107 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

RawParticle CalorimetryManager::myPart
private

Definition at line 134 of file CalorimetryManager.h.

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

RawParticle CalorimetryManager::myPosi
private

Definition at line 133 of file CalorimetryManager.h.

Referenced by EMShowerSimulation().

FSimEvent* CalorimetryManager::mySimEvent
private

Definition at line 101 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 156 of file CalorimetryManager.h.

int CalorimetryManager::optionHDSim_
private

Definition at line 149 of file CalorimetryManager.h.

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

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

Definition at line 161 of file CalorimetryManager.h.

Referenced by readParameters(), and respCorr().

double CalorimetryManager::pulledPadSurvivalProbability_
private

Definition at line 137 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

double CalorimetryManager::radiusFactorEB_
private

Definition at line 141 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

double CalorimetryManager::radiusFactorEE_
private

Definition at line 141 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 142 of file CalorimetryManager.h.

Referenced by readParameters().

double CalorimetryManager::RCFactor_
private

Definition at line 147 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 160 of file CalorimetryManager.h.

Referenced by readParameters().

double CalorimetryManager::RTFactor_
private

Definition at line 147 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 122 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 123 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 124 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

bool CalorimetryManager::simulatePreshower_
private

Definition at line 150 of file CalorimetryManager.h.

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

double CalorimetryManager::spotFraction_
private

Definition at line 139 of file CalorimetryManager.h.

Referenced by readParameters().

GflashAntiProtonShowerProfile* CalorimetryManager::theAntiProtonProfile
private

Definition at line 185 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

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

Definition at line 146 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 183 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

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

Definition at line 184 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

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

Definition at line 146 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 126 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 127 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 128 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 129 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

bool CalorimetryManager::unfoldedMode_
private

Definition at line 117 of file CalorimetryManager.h.

bool CalorimetryManager::useCorrectionSL
private

Definition at line 189 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

bool CalorimetryManager::useShowerLibrary
private

Definition at line 188 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), readParameters(), reconstruct(), and updateHCAL().