CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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_
 
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 44 of file CalorimetryManager.h.

Constructor & Destructor Documentation

CalorimetryManager::CalorimetryManager ( )

Definition at line 69 of file CalorimetryManager.cc.

69  :
70  myCalorimeter_(0),
71  // myHistos(0),
72  initialized_(false)
73 {;}
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 75 of file CalorimetryManager.cc.

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

80  :
81  mySimEvent(aSimEvent),
82  initialized_(false),
84 {
85 
88 
89  //Gflash
90  theProfile = new GflashHadronShowerProfile(parGflash);
91  thePiKProfile = new GflashPiKShowerProfile(parGflash);
94 
95  // FastHFShowerLibrary
97 
98  readParameters(fastCalo);
99 
100  // myHistos = 0;
101 
102  // myHistos = Histos::instance();
103  // myHistos->book("h10",140,-3.5,3.5,100,-0.5,99.5);
104  // myHistos->book("h20",150,0,150.,100,-0.5,99.5);
105  // myHistos->book("h100",140,-3.5,3.5,100,0,0.1);
106  // myHistos->book("h110",140,-3.5,3.5,100,0,10.);
107  // myHistos->book("h120",200,-5.,5.,100,0,0.5);
108 
109  // myHistos->book("h200",300,0,3.,100,0.,35.);
110  // myHistos->book("h210",720,-M_PI,M_PI,100,0,35.);
111  // myHistos->book("h212",720,-M_PI,M_PI,100,0,35.);
112 
113  // myHistos->bookByNumber("h30",0,7,300,-3.,3.,100,0.,35.);
114  // myHistos->book("h310",75,-3.,3.,"");
115  // myHistos->book("h400",100,-10.,10.,100,0.,35.);
116  // myHistos->book("h410",720,-M_PI,M_PI);
117 
118  myCalorimeter_ =
119  new CaloGeometryHelper(fastCalo);
120  myHDResponse_ =
121  new HCALResponse(fastCalo.getParameter<edm::ParameterSet>("HCALResponse"));
122  myHSParameters_ =
123  new HSParameters(fastCalo.getParameter<edm::ParameterSet>("HSParameters"));
124 
125  // Material Effects for Muons in ECAL (only EnergyLoss implemented so far)
126 
127  if ( fastMuECAL.getParameter<bool>("PairProduction") ||
128  fastMuECAL.getParameter<bool>("Bremsstrahlung") ||
129  fastMuECAL.getParameter<bool>("MuonBremsstrahlung") ||
130  fastMuECAL.getParameter<bool>("EnergyLoss") ||
131  fastMuECAL.getParameter<bool>("MultipleScattering") )
132  theMuonEcalEffects = new MaterialEffects(fastMuECAL);
133 
134  // Material Effects for Muons in HCAL (only EnergyLoss implemented so far)
135 
136  if ( fastMuHCAL.getParameter<bool>("PairProduction") ||
137  fastMuHCAL.getParameter<bool>("Bremsstrahlung") ||
138  fastMuHCAL.getParameter<bool>("MuonBremsstrahlung") ||
139  fastMuHCAL.getParameter<bool>("EnergyLoss") ||
140  fastMuHCAL.getParameter<bool>("MultipleScattering") )
141  theMuonHcalEffects = new MaterialEffects(fastMuHCAL);
142 
143 
144 }
T getParameter(std::string const &) const
GflashPiKShowerProfile * thePiKProfile
MaterialEffects * theMuonEcalEffects
MaterialEffects * theMuonHcalEffects
GflashHadronShowerProfile * theProfile
void readParameters(const edm::ParameterSet &fastCalo)
const LandauFluctuationGenerator * aLandauGenerator
GflashAntiProtonShowerProfile * theAntiProtonProfile
GflashProtonShowerProfile * theProtonProfile
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
GammaFunctionGenerator * aGammaGenerator
FastHFShowerLibrary * theHFShowerLibrary
HSParameters * myHSParameters_
CalorimetryManager::~CalorimetryManager ( )

Definition at line 155 of file CalorimetryManager.cc.

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

156 {
157  if(myCalorimeter_) delete myCalorimeter_;
158  if(myHDResponse_) delete myHDResponse_;
159 
162 
163  if ( theProfile ) delete theProfile;
164 
166 }
MaterialEffects * theMuonEcalEffects
MaterialEffects * theMuonHcalEffects
GflashHadronShowerProfile * theProfile
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
FastHFShowerLibrary * theHFShowerLibrary

Member Function Documentation

void CalorimetryManager::clean ( )
private

Definition at line 146 of file CalorimetryManager.cc.

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

Referenced by reconstruct().

147 {
148  EBMapping_.clear();
149  EEMapping_.clear();
150  HMapping_.clear();
151  ESMapping_.clear();
152  muonSimTracks.clear();
153 }
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 245 of file CalorimetryManager.cc.

References aGammaGenerator, aLandauGenerator, aTerm, bFixedLength_, bTerm, EMShower::compute(), crackPadSurvivalProbability_, debug_, HLT_25ns14e33_v1_cff::depth, GetRecoTauVFromDQM_MC_cff::dir2, alignCSCRings::e, FSimTrack::ecalEntrance(), Calorimeter::ecalProperties(), 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, mipValues_, myCalorimeter_, myElec, myPart, myPosi, NULL, FSimTrack::onEcal(), FSimTrack::onHcal(), FSimTrack::onLayer1(), FSimTrack::onLayer2(), pulledPadSurvivalProbability_, radiusFactorEB_, radiusFactorEE_, ECALProperties::radLenIncm(), RCFactor_, RTFactor_, EcalHitMaker::setCrackPadSurvivalProbability(), EMShower::setGrid(), EMShower::setHcal(), PreshowerHitMaker::setMipEnergy(), EMShower::setPreshower(), EcalHitMaker::setPreshowerPresent(), EcalHitMaker::setPulledPadSurvivalProbability(), EcalHitMaker::setRadiusFactor(), EcalHitMaker::setTrackParameters(), RawParticle::setVertex(), simulatePreshower_, findQualityFiles::size, theCoreIntervals_, theTailIntervals_, CoreSimTrack::type(), updateECAL(), updateHCAL(), updatePreshower(), RawParticle::vertex(), and histoStyle::weight.

Referenced by reconstruct().

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

Definition at line 59 of file CalorimetryManager.h.

References myCalorimeter_.

Referenced by FamosManager::setupGeometryAndField().

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

Definition at line 62 of file CalorimetryManager.h.

References theHFShowerLibrary.

Referenced by FamosManager::setupGeometryAndField().

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

Hadronic Shower Simulation.

Definition at line 543 of file CalorimetryManager.cc.

References funct::abs(), HcalHitMaker::addHit(), FSimTrack::charge(), HFShower::compute(), HDShower::compute(), HDRShower::computeShower(), HCALResponse::correctHF(), debug_, FSimTrack::ecalEntrance(), Calorimeter::ecalProperties(), ecorr, Gflash::getCalorimeterNumber(), CaloGeometryHelper::getClosestCell(), CaloSubdetectorGeometry::getGeometry(), GflashHadronShowerProfile::getGflashHitList(), GflashHadronShowerProfile::getGflashShowino(), GflashTrajectory::getGflashTrajectoryPoint(), HCALResponse::getHCALEnergyResponse(), Calorimeter::getHcalGeometry(), GflashShowino::getHelix(), HcalHitMaker::getHits(), FastHFShowerLibrary::getHitsMap(), HDShower::getmip(), HCALResponse::getMIPfraction(), GflashShowino::getPathLengthAtShower(), GflashShowino::getPathLengthOnEcal(), CaloCellGeometry::getPosition(), 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(), PV3DBase< T, PVType, FrameType >::mag(), bookConverter::max, FSimTrack::momentum(), myCalorimeter_, myHDResponse_, myHSParameters_, myPart, DetId::null(), FSimTrack::onEcal(), FSimTrack::onHcal(), FSimTrack::onVFcal(), optionHDSim_, HLT_25ns14e33_v1_cff::particleType, random, DetId::rawId(), FastHFShowerLibrary::recoHFShowerLibrary(), respCorr(), HCALResponse::responseHCAL(), HcalHitMaker::setDepth(), HcalHitMaker::setSpotEnergy(), EcalHitMaker::setTrackParameters(), ntuplemaker::status, theAntiProtonProfile, theHFShowerLibrary, thePiKProfile, theProfile, theProtonProfile, CoreSimTrack::type(), updateECAL(), updateHCAL(), useShowerLibrary, RawParticle::vertex(), and FSimTrack::vfcalEntrance().

Referenced by reconstruct().

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

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

1345 {
1346  c.reserve(c.size()+EBMapping_.size());
1347  for(unsigned i=0; i<EBMapping_.size(); i++) {
1348  c.push_back(PCaloHit(EBDetId::unhashIndex(EBMapping_[i].first.unitID()),EBMapping_[i].second,EBMapping_[i].first.timeSlice(),EBMapping_[i].first.trackID()));
1349  }
1350 }
int i
Definition: DBlmapReader.cc:9
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 1352 of file CalorimetryManager.cc.

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

1353 {
1354  c.reserve(c.size()+EEMapping_.size());
1355  for(unsigned i=0; i<EEMapping_.size(); i++) {
1356  c.push_back(PCaloHit(EEDetId::unhashIndex(EEMapping_[i].first.unitID()),EEMapping_[i].second,EEMapping_[i].first.timeSlice(),EEMapping_[i].first.trackID()));
1357  }
1358 }
int i
Definition: DBlmapReader.cc:9
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 1360 of file CalorimetryManager.cc.

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

1361 {
1362  c.reserve(c.size()+HMapping_.size());
1363  for(unsigned i=0; i<HMapping_.size(); i++) {
1364  c.push_back(PCaloHit(DetId(HMapping_[i].first.unitID()),HMapping_[i].second,HMapping_[i].first.timeSlice(),HMapping_[i].first.trackID()));
1365  }
1366 }
int i
Definition: DBlmapReader.cc:9
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 1369 of file CalorimetryManager.cc.

References ESMapping_, plotBeamSpotDB::first, and i.

1370 {
1371  c.reserve(c.size()+ESMapping_.size());
1372  for(unsigned i=0; i<ESMapping_.size(); i++) {
1373  c.push_back(PCaloHit(ESMapping_[i].first.unitID(),ESMapping_[i].second,ESMapping_[i].first.timeSlice(),ESMapping_[i].first.trackID()));
1374  }
1375 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::pair< CaloHitID, float > > ESMapping_
void CalorimetryManager::loadMuonSimTracks ( edm::SimTrackContainer m) const

Definition at line 1379 of file CalorimetryManager.cc.

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

1380 {
1381  unsigned size=muons.size();
1382  for(unsigned i=0; i<size;++i)
1383  {
1384  int id=muons[i].trackId();
1385  if(abs(muons[i].type())!=13) continue;
1386  // identify the corresponding muon in the local collection
1387 
1388  std::vector<FSimTrack>::const_iterator itcheck=find_if(muonSimTracks.begin(),muonSimTracks.end(),FSimTrackEqual(id));
1389  if(itcheck!=muonSimTracks.end())
1390  {
1391  muons[i].setTkPosition(itcheck->trackerSurfacePosition());
1392  muons[i].setTkMomentum(itcheck->trackerSurfaceMomentum());
1393 // std::cout << " Found the SimTrack " << std::endl;
1394 // std::cout << *itcheck << std::endl;
1395 // std::cout << "SimTrack Id "<< id << " " << muons[i] << " " << std::endl;
1396  }
1397 // else
1398 // {
1399 // std::cout << " Calorimetery Manager : this should really not happen " << std::endl;
1400 // std::cout << " Was looking for " << id << " " << muons[i] << std::endl;
1401 // for(unsigned i=0;i<muonSimTracks.size();++i)
1402 // std::cout << muonSimTracks[i] << std::endl;
1403 // }
1404  }
1405 
1406 }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
std::vector< FSimTrack > muonSimTracks
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
tuple muons
Definition: patZpeak.py:38
tuple size
Write out results.
void CalorimetryManager::MuonMipSimulation ( const FSimTrack myTrack,
RandomEngineAndDistribution const *  random 
)
private

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

Definition at line 846 of file CalorimetryManager.cc.

References HcalHitMaker::addHit(), FSimTrack::charge(), debug_, EnergyLossSimulator::deltaMom(), FSimTrack::ecalEntrance(), relval_parameters_module::energy, MaterialEffects::energyLossSimulator(), 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().

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

References aTerm, bFixedLength_, bTerm, crackPadSurvivalProbability_, debug_, EcalDigitizer_, evtsToDebug_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), gridSize_, HcalDigitizer_, hdGridSize_, hdSimMethod_, 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().

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

Referenced by FamosManager::reconstruct().

169 {
170 
171  if(evtsToDebug_.size())
172  {
173  std::vector<unsigned int>::const_iterator itcheck=find(evtsToDebug_.begin(),evtsToDebug_.end(),mySimEvent->id().event());
174  debug_=(itcheck!=evtsToDebug_.end());
175  if(debug_)
176  mySimEvent->print();
177  }
178  // Clear the content of the calorimeters
179  if(!initialized_)
180  {
181 
182  // Check if the preshower is really available
184  {
185  std::cout << " WARNING " << std::endl;
186  std::cout << " The preshower simulation has been turned on; but no preshower geometry is available " << std::endl;
187  std::cout << " Disabling the preshower simulation " << std::endl;
188  simulatePreshower_ = false;
189  }
190 
191  initialized_=true;
192  }
193  clean();
194 
195  LogInfo("FastCalorimetry") << "Reconstructing " << (int) mySimEvent->nTracks() << " tracks." << std::endl;
196  for( int fsimi=0; fsimi < (int) mySimEvent->nTracks() ; ++fsimi) {
197 
198  FSimTrack& myTrack = mySimEvent->track(fsimi);
199 
200  int pid = abs(myTrack.type());
201 
202  if (debug_) {
203  LogInfo("FastCalorimetry") << " ===> pid = " << pid << std::endl;
204  }
205 
206 
207  // Check that the particle hasn't decayed
208  if(myTrack.noEndVertex()) {
209  // Simulate energy smearing for photon and electrons
210  if ( pid == 11 || pid == 22 ) {
211 
212  if ( myTrack.onEcal() )
213  EMShowerSimulation(myTrack, random);
214  else if ( myTrack.onVFcal() ) {
215  if(useShowerLibrary) {
217  myHDResponse_->correctHF(myTrack.hcalEntrance().e(),abs(myTrack.type()));
219  }
220  else reconstructHCAL(myTrack, random);
221  }
222  } // electron or photon
223  else if (pid==13)
224  {
225  MuonMipSimulation(myTrack, random);
226  }
227  // Simulate energy smearing for hadrons (i.e., everything
228  // but muons... and SUSY particles that deserve a special
229  // treatment.
230  else if ( pid < 1000000 ) {
231  if ( myTrack.onHcal() || myTrack.onVFcal() ) {
232  if(optionHDSim_ == 0 ) reconstructHCAL(myTrack, random);
233  else HDShowerSimulation(myTrack, random);
234  }
235  } // pid < 1000000
236  } // myTrack.noEndVertex()
237  } // particle loop
238  // LogInfo("FastCalorimetry") << " Number of hits (barrel)" << EBMapping_.size() << std::endl;
239  // LogInfo("FastCalorimetry") << " Number of hits (Hcal)" << HMapping_.size() << std::endl;
240  // std::cout << " Nombre de hit (endcap)" << EEMapping_.size() << std::endl;
241 
242 } // 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:7
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:42
HCALResponse * myHDResponse_
CaloGeometryHelper * myCalorimeter_
edm::EventID id() const
Method to return the EventId.
Definition: FSimEvent.cc:33
tuple pid
Definition: sysUtil.py:22
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
tuple cout
Definition: gather_cfg.py:121
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 479 of file CalorimetryManager.cc.

References funct::abs(), debug_, CaloGeometryHelper::getClosestCell(), CaloSubdetectorGeometry::getGeometry(), HCALResponse::getHCALEnergyResponse(), Calorimeter::getHcalGeometry(), CaloCellGeometry::getPosition(), FSimTrack::hcalEntrance(), FSimTrack::id(), PV3DBase< T, PVType, FrameType >::mag(), myCalorimeter_, myHDResponse_, FSimTrack::onHcal(), sysUtil::pid, DetId::rawId(), HCALResponse::responseHCAL(), CoreSimTrack::type(), updateHCAL(), RawParticle::vertex(), and FSimTrack::vfcalEntrance().

Referenced by MuonMipSimulation(), and reconstruct().

481 {
482  int hit;
483  int pid = abs(myTrack.type());
484  if (debug_) {
485  LogInfo("FastCalorimetry") << " reconstructHCAL " << myTrack << std::endl;
486  }
487 
488  // FSimTrack myTrack = mySimEvent.track(fsimi);
489 
490  // int pid=abs(myTrack.type());
491  // std::cout << "reconstructHCAL " << std::endl;
492 
493  XYZTLorentzVector trackPosition;
494  if (myTrack.onHcal()) {
495  trackPosition=myTrack.hcalEntrance().vertex();
496  hit = myTrack.onHcal()-1;
497  } else {
498  trackPosition=myTrack.vfcalEntrance().vertex();
499  hit = 2;
500  }
501 
502  double pathEta = trackPosition.eta();
503  double pathPhi = trackPosition.phi();
504  // double pathTheta = trackPosition.theta();
505 
506  double EGen = myTrack.hcalEntrance().e();
507  double emeas = 0.;
508  //double emeas = -0.0001;
509 
510  if(pid == 13) {
511  // std::cout << " We should not be here " << std::endl;
512  emeas = myHDResponse_->responseHCAL(0, EGen, pathEta, 2, random); // 2=muon
513  if(debug_)
514  LogInfo("FastCalorimetry") << "CalorimetryManager::reconstructHCAL - MUON !!!" << std::endl;
515  }
516  else if( pid == 22 || pid == 11) {
517  emeas = myHDResponse_->responseHCAL(0, EGen, pathEta, 0, random); // last par. = 0 = e/gamma
518  // cout << "CalorimetryManager::reconstructHCAL - e/gamma !!!" << std::endl;
519  if(debug_)
520  LogInfo("FastCalorimetry") << "CalorimetryManager::reconstructHCAL - e/gamma !!!" << std::endl;
521  }
522  else {
523  emeas = myHDResponse_->getHCALEnergyResponse(EGen, hit, random);
524  }
525 
526  if(debug_)
527  LogInfo("FastCalorimetry") << "CalorimetryManager::reconstructHCAL - on-calo "
528  << " eta = " << pathEta
529  << " phi = " << pathPhi
530  << " Egen = " << EGen
531  << " Emeas = " << emeas << std::endl;
532 
533  if(emeas > 0.) {
534  DetId cell = myCalorimeter_->getClosestCell(trackPosition.Vect(),false,false);
535  double tof = (myCalorimeter_->getHcalGeometry()->getGeometry(cell)->getPosition().mag())/29.98;//speed of light
536  CaloHitID current_id(cell.rawId(),tof,myTrack.id());
537  std::map<CaloHitID,float> hitMap;
538  hitMap[current_id] = emeas;
539  updateHCAL(hitMap,myTrack.id());
540  }
541 }
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
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
T mag() const
Definition: PV3DBase.h:67
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
tuple pid
Definition: sysUtil.py:22
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
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:15
void CalorimetryManager::respCorr ( double  p)
private

Definition at line 1200 of file CalorimetryManager.cc.

References debug_, ecorr, hcorr, i, k_e, k_h, and p_knots.

Referenced by HDShowerSimulation().

1200  {
1201 
1202  int sizeP = p_knots.size();
1203 
1204  if(sizeP <= 1) {
1205  ecorr = 1.;
1206  hcorr = 1.;
1207  }
1208  else {
1209  int ip = -1;
1210  for (int i = 0; i < sizeP; i++) {
1211  if (p < p_knots[i]) { ip = i; break;}
1212  }
1213  if (ip == 0) {
1214  ecorr = k_e[0];
1215  hcorr = k_h[0];
1216  }
1217  else {
1218  if(ip == -1) {
1219  ecorr = k_e[sizeP-1];
1220  hcorr = k_h[sizeP-1];
1221  }
1222  else {
1223  double x1 = p_knots[ip-1];
1224  double x2 = p_knots[ip];
1225  double y1 = k_e[ip-1];
1226  double y2 = k_e[ip];
1227 
1228  if(x1 == x2) {
1229  // std::cout << " equal p_knots values!!! " << std::endl;
1230  }
1231 
1232  ecorr = (y1 + (y2 - y1) * (p - x1)/(x2 - x1));
1233 
1234  y1 = k_h[ip-1];
1235  y2 = k_h[ip];
1236  hcorr = (y1 + (y2 - y1) * (p - x1)/(x2 - x1));
1237 
1238  }
1239  }
1240  }
1241 
1242  if(debug_)
1243  LogInfo("FastCalorimetry") << " p, ecorr, hcorr = " << p << " "
1244  << ecorr << " " << hcorr << std::endl;
1245 
1246 }
int i
Definition: DBlmapReader.cc:9
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 1248 of file CalorimetryManager.cc.

References corr, EBMapping_, EEMapping_, and relval_parameters_module::energy.

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

1249 {
1250  std::map<CaloHitID,float>::const_iterator mapitr;
1251  std::map<CaloHitID,float>::const_iterator endmapitr=hitMap.end();
1252  if(onEcal==1) {
1253  EBMapping_.reserve(EBMapping_.size()+hitMap.size());
1254  endmapitr=hitMap.end();
1255  for(mapitr=hitMap.begin();mapitr!=endmapitr;++mapitr) {
1256  //correct energy
1257  float energy = mapitr->second;
1258  energy *= corr;
1259 
1260  //make finalized CaloHitID
1261  CaloHitID current_id(mapitr->first.unitID(),mapitr->first.timeSlice(),trackID);
1262 
1263  EBMapping_.push_back(std::pair<CaloHitID,float>(current_id,energy));
1264  }
1265  }
1266  else if(onEcal==2) {
1267  EEMapping_.reserve(EEMapping_.size()+hitMap.size());
1268  endmapitr=hitMap.end();
1269  for(mapitr=hitMap.begin();mapitr!=endmapitr;++mapitr) {
1270  //correct energy
1271  float energy = mapitr->second;
1272  energy *= corr;
1273 
1274  //make finalized CaloHitID
1275  CaloHitID current_id(mapitr->first.unitID(),mapitr->first.timeSlice(),trackID);
1276 
1277  EEMapping_.push_back(std::pair<CaloHitID,float>(current_id,energy));
1278  }
1279  }
1280 
1281 }
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 1283 of file CalorimetryManager.cc.

References corr, HcalDetId::depth(), relval_parameters_module::energy, HCALResponse::getCorrHF(), HcalBarrel, HcalDigitizer_, HcalEndcap, HcalForward, HcalOuter, HMapping_, HcalDetId::ietaAbs(), ietaShiftHB_, ietaShiftHE_, ietaShiftHF_, ietaShiftHO_, myHDResponse_, samplingHBHE_, samplingHF_, samplingHO_, DetId::subdetId(), cond::rpcobgas::time, timeShiftHB_, timeShiftHE_, timeShiftHF_, timeShiftHO_, useCorrectionSL, and useShowerLibrary.

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

1284 {
1285  std::vector<double> hfcorr = myHDResponse_->getCorrHF();
1286  std::map<CaloHitID,float>::const_iterator mapitr;
1287  std::map<CaloHitID,float>::const_iterator endmapitr=hitMap.end();
1288  HMapping_.reserve(HMapping_.size()+hitMap.size());
1289  for(mapitr=hitMap.begin(); mapitr!=endmapitr; ++mapitr) {
1290  //correct energy
1291  float energy = mapitr->second;
1292  energy *= corr;
1293 
1294  float time = mapitr->first.timeSlice();
1295  //put energy into uncalibrated state for digitizer && correct timing
1296  if(HcalDigitizer_){
1297  HcalDetId hdetid = HcalDetId(mapitr->first.unitID());
1298  if (hdetid.subdetId()== HcalBarrel){
1299  energy /= samplingHBHE_[hdetid.ietaAbs()-1]; //re-convert to GeV
1300  time = timeShiftHB_[hdetid.ietaAbs()-ietaShiftHB_];
1301  }
1302  else if (hdetid.subdetId()== HcalEndcap){
1303  energy /= samplingHBHE_[hdetid.ietaAbs()-1]; //re-convert to GeV
1304  time = timeShiftHE_[hdetid.ietaAbs()-ietaShiftHE_];
1305  }
1306  else if (hdetid.subdetId()== HcalForward){
1307  if(useShowerLibrary) {
1308  if(useCorrectionSL) energy *= hfcorr[hdetid.ietaAbs()-29];
1309  } else {
1310  if(hdetid.depth()== 1) energy *= samplingHF_[0];
1311  if(hdetid.depth()== 2) energy *= samplingHF_[1];
1312  }
1313  time = timeShiftHF_[hdetid.ietaAbs()-ietaShiftHF_];
1314  }
1315  else if (hdetid.subdetId()== HcalOuter){
1316  energy /= samplingHO_[hdetid.ietaAbs()-1];
1317  time = timeShiftHO_[hdetid.ietaAbs()-ietaShiftHO_];
1318  }
1319  }
1320 
1321  //make finalized CaloHitID
1322  CaloHitID current_id(mapitr->first.unitID(),time,trackID);
1323  HMapping_.push_back(std::pair<CaloHitID,float>(current_id,energy));
1324  }
1325 }
std::vector< double > timeShiftHO_
std::vector< double > timeShiftHF_
std::vector< double > samplingHF_
int depth() const
get the tower depth
Definition: HcalDetId.h:40
vec1 & getCorrHF()
Definition: HCALResponse.h:48
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_
std::vector< double > timeShiftHB_
int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:34
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 1327 of file CalorimetryManager.cc.

References corr, relval_parameters_module::energy, and ESMapping_.

Referenced by EMShowerSimulation().

1328 {
1329  std::map<CaloHitID,float>::const_iterator mapitr;
1330  std::map<CaloHitID,float>::const_iterator endmapitr=hitMap.end();
1331  ESMapping_.reserve(ESMapping_.size()+hitMap.size());
1332  for(mapitr=hitMap.begin();mapitr!=endmapitr;++mapitr) {
1333  //correct energy
1334  float energy = mapitr->second;
1335  energy *= corr;
1336 
1337  //make finalized CaloHitID
1338  CaloHitID current_id(mapitr->first.unitID(),mapitr->first.timeSlice(),trackID);
1339 
1340  ESMapping_.push_back(std::pair<CaloHitID,float>(current_id,energy));
1341  }
1342 }
std::vector< std::pair< CaloHitID, float > > ESMapping_
JetCorrectorParameters corr
Definition: classes.h:5

Member Data Documentation

GammaFunctionGenerator* CalorimetryManager::aGammaGenerator
private

Definition at line 152 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and EMShowerSimulation().

const LandauFluctuationGenerator* CalorimetryManager::aLandauGenerator
private

Definition at line 151 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and EMShowerSimulation().

double CalorimetryManager::aTerm
private

Definition at line 141 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

bool CalorimetryManager::bFixedLength_
private

Definition at line 177 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

double CalorimetryManager::bTerm
private

Definition at line 141 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

double CalorimetryManager::crackPadSurvivalProbability_
private

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

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

bool CalorimetryManager::EcalDigitizer_
private

Definition at line 118 of file CalorimetryManager.h.

Referenced by readParameters().

double CalorimetryManager::ecorr
private

Definition at line 162 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), and respCorr().

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

Definition at line 108 of file CalorimetryManager.h.

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

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

Definition at line 110 of file CalorimetryManager.h.

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

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

Definition at line 113 of file CalorimetryManager.h.

Referenced by readParameters(), and reconstruct().

int CalorimetryManager::gridSize_
private

Definition at line 143 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

bool CalorimetryManager::HcalDigitizer_
private

Definition at line 119 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

double CalorimetryManager::hcorr
private

Definition at line 163 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), and respCorr().

int CalorimetryManager::hdGridSize_
private

Definition at line 147 of file CalorimetryManager.h.

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

int CalorimetryManager::hdSimMethod_
private

Definition at line 147 of file CalorimetryManager.h.

Referenced by HDShowerSimulation(), and readParameters().

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

Definition at line 109 of file CalorimetryManager.h.

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

int CalorimetryManager::ietaShiftHB_
private

Definition at line 123 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

int CalorimetryManager::ietaShiftHE_
private

Definition at line 123 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

int CalorimetryManager::ietaShiftHF_
private

Definition at line 123 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

int CalorimetryManager::ietaShiftHO_
private

Definition at line 123 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

bool CalorimetryManager::initialized_
private

Definition at line 166 of file CalorimetryManager.h.

Referenced by reconstruct().

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

Definition at line 160 of file CalorimetryManager.h.

Referenced by readParameters(), and respCorr().

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

Definition at line 161 of file CalorimetryManager.h.

Referenced by readParameters(), and respCorr().

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

Definition at line 142 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

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

Referenced by EMShowerSimulation().

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

Definition at line 102 of file CalorimetryManager.h.

HSParameters* CalorimetryManager::myHSParameters_
private

Definition at line 105 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

RawParticle CalorimetryManager::myPart
private

Definition at line 132 of file CalorimetryManager.h.

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

RawParticle CalorimetryManager::myPosi
private

Definition at line 131 of file CalorimetryManager.h.

Referenced by EMShowerSimulation().

FSimEvent* CalorimetryManager::mySimEvent
private

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

int CalorimetryManager::optionHDSim_
private

Definition at line 147 of file CalorimetryManager.h.

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

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

Definition at line 159 of file CalorimetryManager.h.

Referenced by readParameters(), and respCorr().

double CalorimetryManager::pulledPadSurvivalProbability_
private

Definition at line 135 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

double CalorimetryManager::radiusFactorEB_
private

Definition at line 139 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

double CalorimetryManager::radiusFactorEE_
private

Definition at line 139 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 140 of file CalorimetryManager.h.

Referenced by readParameters().

double CalorimetryManager::RCFactor_
private

Definition at line 145 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 158 of file CalorimetryManager.h.

Referenced by readParameters().

double CalorimetryManager::RTFactor_
private

Definition at line 145 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 120 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 121 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 122 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

bool CalorimetryManager::simulatePreshower_
private

Definition at line 148 of file CalorimetryManager.h.

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

double CalorimetryManager::spotFraction_
private

Definition at line 137 of file CalorimetryManager.h.

Referenced by readParameters().

GflashAntiProtonShowerProfile* CalorimetryManager::theAntiProtonProfile
private

Definition at line 183 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

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

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

Referenced by CalorimetryManager(), and HDShowerSimulation().

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

Definition at line 182 of file CalorimetryManager.h.

Referenced by CalorimetryManager(), and HDShowerSimulation().

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

Definition at line 144 of file CalorimetryManager.h.

Referenced by EMShowerSimulation(), and readParameters().

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

Definition at line 124 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 125 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 126 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

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

Definition at line 127 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

bool CalorimetryManager::unfoldedMode_
private

Definition at line 115 of file CalorimetryManager.h.

bool CalorimetryManager::useCorrectionSL
private

Definition at line 187 of file CalorimetryManager.h.

Referenced by readParameters(), and updateHCAL().

bool CalorimetryManager::useShowerLibrary
private

Definition at line 186 of file CalorimetryManager.h.

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