21 throw cms::Exception(
"UnimplementedFeature") <<
"Type " << type <<
" not supported in MEzCalculator.\n";
24 double M_mu = 0.10566;
25 double M_e = 0.511e-3;
26 double M_lepton = M_mu;
39 double a = M_W*M_W - M_lepton*M_lepton + 2.0*(pxmu*pxnu + pymu*pynu);
40 double A = 4.0*(emu*emu - pzmu*pzmu);
41 double B = -4.0*a*pzmu;
42 double C = 4.0*emu*emu*(pxnu*pxnu + pynu*pynu) - a*a;
44 double tmproot = B*B - 4.0*A*
C;
52 double tmpsol1 = (-B + TMath::Sqrt(tmproot))/(2.0*A);
53 double tmpsol2 = (-B - TMath::Sqrt(tmproot))/(2.0*A);
57 if (TMath::Abs(tmpsol2-pzmu) < TMath::Abs(tmpsol1-pzmu)) { pznu = tmpsol2;}
61 if (TMath::Abs(tmpsol1)<TMath::Abs(tmpsol2) ) pznu = tmpsol1;
67 if (TMath::Abs(tmpsol2-pzmu) < TMath::Abs(tmpsol1-pzmu)) { pznu = tmpsol2;}
72 if (TMath::Abs(tmpsol1)<TMath::Abs(tmpsol2) ) pznu = tmpsol1;
78 p3w.SetXYZ(pxmu+pxnu, pymu+pynu, pzmu+ tmpsol1);
79 p3mu.SetXYZ(pxmu, pymu, pzmu );
81 double sinthcm1 = 2.*(p3mu.Perp(p3w))/M_W;
82 p3w.SetXYZ(pxmu+pxnu, pymu+pynu, pzmu+ tmpsol2);
83 double sinthcm2 = 2.*(p3mu.Perp(p3w))/M_W;
85 double costhcm1 = TMath::Sqrt(1. - sinthcm1*sinthcm1);
86 double costhcm2 = TMath::Sqrt(1. - sinthcm2*sinthcm2);
88 if ( costhcm1 > costhcm2 ) pznu = tmpsol1;
~MEzCalculator()
destructor
virtual double energy() const
energy
double Calculate(int type=1)
member functions
MEzCalculator()
constructor
virtual double px() const
x coordinate of momentum vector
virtual double pz() const
z coordinate of momentum vector
virtual double py() const
y coordinate of momentum vector