22 float ptParticle = momentum.Rho();
23 float etaParticle = momentum.eta();
24 float phiParticle = momentum.phi();
25 float vRho = vertex.Rho();
29 const float RBARM = 1.357;
30 const float ZENDM = 3.186;
32 float rbend = RBARM - (vRho / 100.0);
37 if (fabs(bend / ptParticle) <= 1.) {
38 phi = phiParticle - asin(bend / ptParticle) *
charge;
44 edm::LogWarning(
"") <<
"[EcalPositionFromTrack::phiTransformation] Warning: " 45 <<
"Too low Pt, giving up";
53 rHit = ZENDM / sinh(fabs(etaParticle));
54 if (fabs(((rHit - (vRho / 100.0)) / rbend) * bend / ptParticle) <= 1.0) {
55 phi = phiParticle - asin(((rHit - (vRho / 100.0)) / rbend) * bend / ptParticle) *
charge;
61 edm::LogWarning(
"") <<
"[EcalPositionFromTrack::phiTransformation] Warning: " 62 <<
"Too low Pt, giving up";
74 float etaParticle = momentum.eta();
75 float vZ = vertex.z();
76 float vRho = vertex.Rho();
78 if (etaParticle != 0.0) {
80 float zEcal = (
R_ECAL - vRho) * sinh(etaParticle) + vZ;
83 theta = atan(
R_ECAL / zEcal);
91 if (etaParticle < 0.0)
93 float Zlen = Zend - vZ;
94 float RR = Zlen / sinh(etaParticle);
95 theta = atan((RR + vRho) / Zend);
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