2 #include "HepMC/GenParticle.h" 3 #include "H_BeamParticle.h" 4 #include "TLorentzVector.h" 10 double pz = partP*
cos(theta);
11 double px =
tan((
double)hp.getTX()*
urad)*pz;
12 double py =
tan((
double)hp.getTY()*
urad)*pz;
14 return TLorentzVector(px,py,pz,hp.getE());
20 h_p.set4Momentum(p.Px(),p.Py(),
abs(p.Pz()),p.E());
26 p_out.SetPx(
p.momentum().px());
27 p_out.SetPy(
p.momentum().py());
28 p_out.SetPz(
p.momentum().pz());
30 p.set_momentum(HepMC::FourVector(p_out.Px(),p_out.Py(),p_out.Pz(),p_out.E()));
40 const long double microrad = 1.e-6;
42 double px_P, py_P,pz_P;
43 double px_N, py_N,pz_N;
44 double fBoostAngle1=0.;
45 double fBoostAngle2=0.;
55 TLorentzVector BeamP, BeamN, projVect;
56 BeamP.SetPx(px_P);BeamP.SetPy(py_P);BeamP.SetPz(pz_P);BeamP.SetE(bi.
fBeamEnergy);
57 BeamN.SetPx(px_N);BeamN.SetPy(py_N);BeamN.SetPz(-pz_N);BeamN.SetE(bi.
fBeamEnergy);
58 projVect = BeamP + BeamN;
60 TLorentzVector boosted = p_out;
61 beta = projVect.BoostVector();
69 double mom =
sqrt((proton->Px())*(proton->Px())+(proton->Py())*(proton->Py())+(proton->Pz())*(proton->Pz()));
71 double energy = proton->E();
72 double theta = (proton->Pz()>0)?proton->Theta():
TMath::Pi()-proton->Theta();
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
static const double ProtonMassSQ
Power< A, B >::type pow(const A &a, const B &b)