21 float ptParticle = momentum.Rho();
22 float etaParticle = momentum.eta();
23 float phiParticle = momentum.phi();
24 float vRho = vertex.Rho();
28 const float RBARM = 1.357 ;
29 const float ZENDM = 3.186 ;
31 float rbend = RBARM-(vRho/100.0);
37 if (fabs(bend/ptParticle) <= 1.)
39 phi = phiParticle - asin(bend/ptParticle)*
charge;
43 edm::LogWarning(
"") <<
"[EcalPositionFromTrack::phiTransformation] Warning: " 44 <<
"Too low Pt, giving up";
53 rHit = ZENDM / sinh(fabs(etaParticle));
54 if (fabs(((rHit-(vRho/100.0))/rbend)*bend/ptParticle) <= 1.0)
56 phi = phiParticle - asin(((rHit-(vRho/100.0)) / rbend)*bend/ptParticle)*
charge;
60 edm::LogWarning(
"") <<
"[EcalPositionFromTrack::phiTransformation] Warning: " 61 <<
"Too low Pt, giving up";
76 float etaParticle = momentum.eta();
77 float vZ = vertex.z();
78 float vRho = vertex.Rho();
80 if (etaParticle != 0.0)
83 float zEcal = (
R_ECAL-vRho)*sinh(etaParticle)+vZ;
85 if(zEcal != 0.0) theta = atan(
R_ECAL/zEcal);
86 if(theta < 0.0) theta = theta +
Geom::pi() ;
93 if(etaParticle < 0.0 ) Zend = - Zend;
94 float Zlen = Zend - vZ ;
95 float RR = Zlen/sinh(etaParticle);
96 theta = atan((RR+vRho)/Zend);
97 if(theta < 0.0) theta = theta+
Geom::pi();
98 ETA = -
log(
tan(0.5*theta));
103 edm::LogWarning(
"") <<
"[EcalPositionFromTrack::etaTransformation] Warning: " 104 <<
"Eta equals to zero, not correcting";
Global3DPoint GlobalPoint
Geom::Theta< T > theta() const
Tan< T >::type tan(const T &t)
static float etaBarrelEndcap
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation