2 #include "HepMC/GenParticle.h" 3 #include "H_BeamParticle.h" 4 #include "TLorentzVector.h" 13 return TLorentzVector(
px,
py, pz,
hp.getE());
18 h_p.set4Momentum(
p.Px(),
p.Py(),
abs(
p.Pz()),
p.E());
23 p_out.SetPx(
p.momentum().px());
24 p_out.SetPy(
p.momentum().py());
25 p_out.SetPz(
p.momentum().pz());
27 p.set_momentum(HepMC::FourVector(p_out.Px(), p_out.Py(), p_out.Pz(), p_out.E()));
35 const long double microrad = 1.e-6;
37 double px_P, py_P, pz_P;
38 double px_N, py_N, pz_N;
39 double fBoostAngle1 = 0.;
40 double fBoostAngle2 = 0.;
42 fBoostAngle1 = bi.fCrossingAngleBeam1;
43 fBoostAngle2 = bi.fCrossingAngleBeam2;
46 fBoostAngle1 = -bi.fCrossingAngleBeam1;
47 fBoostAngle2 = -bi.fCrossingAngleBeam2;
49 px_P = bi.fBeamMomentum *
sin(fBoostAngle2 * microrad);
50 px_N = bi.fBeamMomentum *
sin(fBoostAngle1 * microrad);
51 pz_P = bi.fBeamMomentum *
cos(fBoostAngle2 * microrad);
52 pz_N = bi.fBeamMomentum *
cos(fBoostAngle1 * microrad);
56 TLorentzVector BeamP, BeamN, projVect;
60 BeamP.SetE(bi.fBeamEnergy);
64 BeamN.SetE(bi.fBeamEnergy);
65 projVect = BeamP + BeamN;
67 TLorentzVector boosted = p_out;
68 beta = projVect.BoostVector();
78 sqrt((proton->Px()) * (proton->Px()) + (proton->Py()) * (proton->Py()) + (proton->Pz()) * (proton->Pz()));
81 double energy = proton->E();
82 double theta = (proton->Pz() > 0) ? proton->Theta() :
TMath::Pi() - proton->Theta();
Sin< T >::type sin(const T &t)
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
Geom::Theta< T > theta() const