#include <MuonSpectrometer.h>
Public Member Functions | |
EtaBin (double deltaponp, int bin) | |
void | setEtaStuff (double etaFirst, double deltaEta) |
void | combine (EtaBin &otherEtaBin, double thispt, double nextpt) |
double | calculateResolution (const HepLorentzVector &avec) |
void | dump (std::string indent) |
double | getEtaMin () |
double | getEtaMax () |
Private Attributes | |
int | m_etabin |
double | m_etamin |
double | m_etamax |
double | m_etavalue |
double | m_deltaponp |
double | m_constterm |
double | m_ptterm |
Definition at line 13 of file MuonSpectrometer.h.
Atlfast::EtaBin::EtaBin | ( | double | deltaponp, | |
int | bin | |||
) |
Definition at line 75 of file MuonSpectrometer.cxx.
00075 : 00076 m_etabin(etabin), m_etamin(0.), m_etamax(0.), m_deltaponp(0.01*deltaponp){}
void Atlfast::EtaBin::setEtaStuff | ( | double | etaFirst, | |
double | deltaEta | |||
) |
Definition at line 78 of file MuonSpectrometer.cxx.
00078 { 00079 00080 m_etavalue = deltaEta*double(m_etabin); 00081 m_etamin = m_etabin ? deltaEta*double(m_etabin-0.5) + etaFirst: etaFirst; 00082 m_etamax = deltaEta*double(m_etabin+0.5); 00083 00084 }
void Atlfast::EtaBin::combine | ( | EtaBin & | otherEtaBin, | |
double | thispt, | |||
double | nextpt | |||
) |
Definition at line 86 of file MuonSpectrometer.cxx.
00086 { 00087 00088 00089 m_constterm = 1.; 00090 m_ptterm = 0; 00091 00092 if (m_deltaponp < 1.){ 00093 00094 double resthis = m_deltaponp; 00095 double resnext = otherEtaBin.m_deltaponp; 00096 double delossthis = dEnergyLoss(m_etavalue,thispt); 00097 double delossnext = dEnergyLoss(m_etavalue,nextpt); 00098 00099 m_ptterm = ( resnext*resnext - resthis*resthis 00100 - (delossnext*delossnext - delossthis*delossthis ) ) / 00101 (nextpt*nextpt - thispt*thispt); 00102 00103 m_constterm = resthis*resthis - m_ptterm*thispt*thispt - delossthis*delossthis; 00104 00105 } 00106 }
double Atlfast::EtaBin::calculateResolution | ( | const HepLorentzVector & | avec | ) |
Definition at line 108 of file MuonSpectrometer.cxx.
00108 { 00109 00110 double resolution = 1.; 00111 if (m_constterm < 1.){ // Otherwise return resolution of 1.0 00112 double dEloss = dEnergyLoss(avec); 00113 double pT = avec.perp(); 00114 double resolution_squared = m_constterm + m_ptterm*pT*pT + dEloss*dEloss; 00115 if (resolution_squared > 0. && resolution_squared < 1.) 00116 resolution = sqrt(resolution_squared); 00117 } 00118 return resolution; 00119 }
void Atlfast::EtaBin::dump | ( | std::string | indent | ) |
Definition at line 121 of file MuonSpectrometer.cxx.
00121 { 00122 indent += " "; 00123 std::cout<<std::endl; 00124 std::cout<<indent<<"\nDump for EtaBin:\n"; 00125 std::cout<<indent<<"m_etabin "<<m_etabin<<std::endl; 00126 std::cout<<indent<<"m_etamin "<<m_etamin<<std::endl; 00127 std::cout<<indent<<"m_etamax "<<m_etamax<<std::endl; 00128 std::cout<<indent<<"m_deltaponp "<<m_deltaponp<<std::endl; 00129 std::cout<<indent<<"m_constterm "<<m_constterm<<std::endl; 00130 std::cout<<indent<<"m_ptterm "<<m_ptterm<<std::endl; 00131 }
double Atlfast::EtaBin::getEtaMin | ( | ) | [inline] |
double Atlfast::EtaBin::getEtaMax | ( | ) | [inline] |
int Atlfast::EtaBin::m_etabin [private] |
Definition at line 23 of file MuonSpectrometer.h.
double Atlfast::EtaBin::m_etamin [private] |
Definition at line 24 of file MuonSpectrometer.h.
double Atlfast::EtaBin::m_etamax [private] |
Definition at line 25 of file MuonSpectrometer.h.
double Atlfast::EtaBin::m_etavalue [private] |
Definition at line 26 of file MuonSpectrometer.h.
double Atlfast::EtaBin::m_deltaponp [private] |
Definition at line 27 of file MuonSpectrometer.h.
double Atlfast::EtaBin::m_constterm [private] |
Definition at line 28 of file MuonSpectrometer.h.
double Atlfast::EtaBin::m_ptterm [private] |
Definition at line 29 of file MuonSpectrometer.h.