#include <CellSmearer.h>
Inheritance diagram for Atlfast::CellSmearer:
Public Member Functions | |
CellSmearer (const int aseed, const double barrelForwardEta) | |
virtual | ~CellSmearer () |
virtual HepLorentzVector | smear (const HepMC::GenParticle &) |
virtual HepLorentzVector | smear (const HepLorentzVector &avec) |
virtual int | setSmearParameters (const std::vector< double > &smearValues) |
virtual int | setSmearParamSchema (const int smearSchema) |
Private Member Functions | |
RandGauss * | randGauss () |
RandFlat * | randFlat () |
Private Attributes | |
double | m_BarrelForwardEta |
Definition at line 40 of file CellSmearer.h.
Atlfast::CellSmearer::CellSmearer | ( | const int | aseed, | |
const double | barrelForwardEta | |||
) | [inline] |
Constructor as in DefaultSmearer
Definition at line 48 of file CellSmearer.h.
00049 : 00050 ISmearer(), 00051 DefaultSmearer(aseed), 00052 m_BarrelForwardEta(barrelForwardEta) 00053 { }
virtual Atlfast::CellSmearer::~CellSmearer | ( | ) | [inline, virtual] |
HepLorentzVector Atlfast::CellSmearer::smear | ( | const HepMC::GenParticle & | ) | [virtual] |
Smear method for HepMC::GenParticle
Reimplemented from Atlfast::DefaultSmearer.
Definition at line 23 of file CellSmearer.cxx.
00023 { 00024 return smear(particle.momentum()); 00025 }
HepLorentzVector Atlfast::CellSmearer::smear | ( | const HepLorentzVector & | avec | ) | [virtual] |
Smear method for HepLorentzVector
Reimplemented from Atlfast::DefaultSmearer.
Definition at line 27 of file CellSmearer.cxx.
00027 { 00028 //........................................................ 00029 //.....smear Cells energy 00030 //........................................................ 00031 // parametrizes smearing for hadronic energy deposition 00032 // parametrization from L. Poggioli 00033 // no pileup added 00034 00035 float sigma=0.; 00036 HepLorentzVector smearedVec(vec); 00037 float aa, bb; 00038 float sqrtene = sqrt(vec.e()/GeV); 00039 float abseta = fabs(vec.pseudoRapidity()); 00040 while(1) { 00041 aa=randGauss()->fire(); 00042 bb=randGauss()->fire(); 00043 if(abseta < m_BarrelForwardEta) sigma = aa*0.5/sqrtene + bb*0.03; 00044 else sigma = aa*1.0/sqrtene + bb*0.07; 00045 if(1.+sigma > .0) break; 00046 } 00047 smearedVec.setPx(vec.px()*(1.0+sigma)); 00048 smearedVec.setPy(vec.py()*(1.0+sigma)); 00049 smearedVec.setPz(vec.pz()*(1.0+sigma)); 00050 smearedVec.setE(vec.e()*(1.0+sigma)); 00051 return smearedVec; 00052 00053 }
int Atlfast::CellSmearer::setSmearParameters | ( | const std::vector< double > & | smearValues | ) | [virtual] |
Sets the smearing parameters
Reimplemented from Atlfast::DefaultSmearer.
Definition at line 56 of file CellSmearer.cxx.
int Atlfast::CellSmearer::setSmearParamSchema | ( | const int | smearSchema | ) | [virtual] |
Sets the smearing schema
Reimplemented from Atlfast::DefaultSmearer.
Definition at line 60 of file CellSmearer.cxx.
RandGauss* Atlfast::DefaultSmearer::randGauss | ( | ) | [inline, inherited] |
Hook for subclasses etc. to get their hands on a randGauss object
Definition at line 65 of file DefaultSmearer.h.
00065 { return m_randGauss;}
RandFlat* Atlfast::DefaultSmearer::randFlat | ( | ) | [inline, inherited] |
Hook for subclasses etc. to get their hands on a randFlat object
Definition at line 71 of file DefaultSmearer.h.
00071 { return m_randFlat;}
double Atlfast::CellSmearer::m_BarrelForwardEta [private] |
Transition between Barrel and forward Calo
Definition at line 69 of file CellSmearer.h.