#include <HICaloUtil.h>
Public Member Functions | |
HICaloUtil () | |
Static Public Member Functions | |
static double | EcalEta (const reco::Candidate &p) |
static double | EcalEta (double EtaParticle, double Zvertex, double plane_Radius) |
static double | EcalPhi (double PtParticle, double EtaParticle, double PhiParticle, int ChargeParticle, double Rstart) |
static double | EcalPhi (const reco::Candidate &p) |
Static Public Attributes | |
static const double | kEEtaBarrelEndcap = 1.479 |
static const double | kER_ECAL = 136.5 |
static const double | kERBARM = 1.357 |
static const double | kEZ_Endcap = 328.0 |
static const double | kEZENDM = 3.186 |
Definition at line 15 of file HICaloUtil.h.
HICaloUtil::HICaloUtil | ( | ) | [inline] |
Definition at line 17 of file HICaloUtil.h.
{}
double HICaloUtil::EcalEta | ( | const reco::Candidate & | p | ) | [static] |
Definition at line 24 of file HICaloUtil.cc.
References reco::Candidate::eta(), mathSSE::sqrt(), and reco::Candidate::vertex().
double HICaloUtil::EcalEta | ( | double | EtaParticle, |
double | Zvertex, | ||
double | plane_Radius | ||
) | [static] |
Definition at line 35 of file HICaloUtil.cc.
References ETA, create_public_lumi_plots::log, PI, and funct::tan().
{ // Calculate the eta of the particle wrt center of detector. if(EtaParticle != 0.) { double Theta = 0.0 ; double ZEcal = (kER_ECAL-plane_Radius)*sinh(EtaParticle)+Zvertex; if(ZEcal != 0.0) Theta = atan(kER_ECAL/ZEcal); if(Theta<0.0) Theta = Theta+PI ; double ETA = - log(tan(0.5*Theta)); if( fabs(ETA) > kEEtaBarrelEndcap ) { double Zend = kEZ_Endcap ; if(EtaParticle<0.0 ) Zend = -Zend ; double Zlen = Zend - Zvertex ; double RR = Zlen/sinh(EtaParticle); Theta = atan((RR+plane_Radius)/Zend); if(Theta<0.0) Theta = Theta+PI ; ETA = - log(tan(0.5*Theta)); } return ETA; } return EtaParticle; }
double HICaloUtil::EcalPhi | ( | double | PtParticle, |
double | EtaParticle, | ||
double | PhiParticle, | ||
int | ChargeParticle, | ||
double | Rstart | ||
) | [static] |
Definition at line 80 of file HICaloUtil.cc.
{ // Calculate the phi of the particle transported to the Ecal. double Rbend = kERBARM-(Rstart/100.); //assumed rstart in cm double Bend = 0.3 * 4. * Rbend/ 2.0 ; //PHI correction double PHI = 0.0 ; if( fabs(EtaParticle) <= kEEtaBarrelEndcap) { if (fabs(Bend/PtParticle)<=1.) { PHI = PhiParticle - asin(Bend/PtParticle)*ChargeParticle; if(PHI > PI) {PHI = PHI - 2*PI;} if(PHI < -PI) {PHI = PHI + 2*PI;} return PHI; } } else { double Rhit = 0.0 ; Rhit = kEZENDM / sinh(fabs(EtaParticle)); if (fabs(((Rhit-(Rstart/100.))/Rbend)*Bend/PtParticle)<=1.) { PHI = PhiParticle - asin(((Rhit-(Rstart/100.))/Rbend)*Bend/PtParticle)*ChargeParticle; if(PHI > PI) {PHI = PHI - 2*PI;} if(PHI < -PI) {PHI = PHI + 2*PI;} return PHI; } else { return PhiParticle; } } return PhiParticle; }
double HICaloUtil::EcalPhi | ( | const reco::Candidate & | p | ) | [static] |
Definition at line 67 of file HICaloUtil.cc.
References reco::Candidate::charge(), DeDxDiscriminatorTools::charge(), reco::Candidate::eta(), phi, reco::Candidate::phi(), reco::Candidate::pt(), mathSSE::sqrt(), and reco::Candidate::vertex().
const double HICaloUtil::kEEtaBarrelEndcap = 1.479 [static] |
Definition at line 25 of file HICaloUtil.h.
const double HICaloUtil::kER_ECAL = 136.5 [static] |
Definition at line 26 of file HICaloUtil.h.
const double HICaloUtil::kERBARM = 1.357 [static] |
Definition at line 28 of file HICaloUtil.h.
const double HICaloUtil::kEZ_Endcap = 328.0 [static] |
Definition at line 27 of file HICaloUtil.h.
const double HICaloUtil::kEZENDM = 3.186 [static] |
Definition at line 29 of file HICaloUtil.h.