13 #define PI 3.141592653589793238462643383279502884197169399375105820974945
29 double zvert = p.
vertex().Z();
30 return EcalEta(p.
eta(), zvert, rhovert);
39 if(EtaParticle != 0.) {
41 double ZEcal = (kER_ECAL-plane_Radius)*sinh(EtaParticle)+Zvertex;
43 if(ZEcal != 0.0) Theta = atan(kER_ECAL/ZEcal);
44 if(Theta<0.0) Theta = Theta+
PI ;
48 if( fabs(ETA) > kEEtaBarrelEndcap )
50 double Zend = kEZ_Endcap ;
51 if(EtaParticle<0.0 ) Zend = -Zend ;
52 double Zlen = Zend - Zvertex ;
53 double RR = Zlen/sinh(EtaParticle);
54 Theta = atan((RR+plane_Radius)/Zend);
55 if(Theta<0.0) Theta = Theta+
PI ;
56 ETA = -
log(
tan(0.5*Theta));
81 double PhiParticle,
int ChargeParticle,
double Rstart)
85 double Rbend = kERBARM-(Rstart/100.);
86 double Bend = 0.3 * 4. * Rbend/ 2.0 ;
90 if( fabs(EtaParticle) <= kEEtaBarrelEndcap) {
91 if (fabs(Bend/PtParticle)<=1.) {
92 PHI = PhiParticle - asin(Bend/PtParticle)*ChargeParticle;
93 if(PHI >
PI) {PHI = PHI - 2*
PI;}
94 if(PHI < -
PI) {PHI = PHI + 2*
PI;}
99 Rhit = kEZENDM / sinh(fabs(EtaParticle));
100 if (fabs(((Rhit-(Rstart/100.))/Rbend)*Bend/PtParticle)<=1.) {
101 PHI = PhiParticle - asin(((Rhit-(Rstart/100.))/Rbend)*Bend/PtParticle)*ChargeParticle;
102 if(PHI >
PI) {PHI = PHI - 2*
PI;}
103 if(PHI < -
PI) {PHI = PHI + 2*
PI;}
static std::vector< std::string > checklist log
static const double kER_ECAL
static double EcalEta(const reco::Candidate &p)
virtual float eta() const =0
momentum pseudorapidity
virtual float phi() const =0
momentum azimuthal angle
virtual float pt() const =0
transverse momentum
Tan< T >::type tan(const T &t)
virtual const Point & vertex() const =0
vertex position
virtual int charge() const =0
electric charge
static double EcalPhi(const reco::Candidate &p)
static const double kEEtaBarrelEndcap
static const double kERBARM
static const double kEZ_Endcap
static const double kEZENDM