CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions | Variables
PPSTools Namespace Reference

Classes

struct  FullBeamInfo
 
struct  LimitedBeamInfo
 

Functions

void Get_t_and_xi (const TLorentzVector *proton, double &t, double &xi, LimitedBeamInfo const &bi)
 
TLorentzVector HectorParticle2LorentzVector (H_BeamParticle hp, int)
 
void LorentzBoost (H_BeamParticle &h_p, int dir, const std::string &frame, FullBeamInfo const &bi)
 
void LorentzBoost (TLorentzVector &p_out, const std::string &frame, FullBeamInfo const &bi)
 
void LorentzBoost (HepMC::GenParticle &p_out, const std::string &frame, FullBeamInfo const &bi)
 
H_BeamParticle LorentzVector2HectorParticle (TLorentzVector p)
 

Variables

const double ProtonMass = CLHEP::proton_mass_c2 / GeV
 
const double ProtonMassSQ = pow(ProtonMass, 2)
 
const double urad = 1. / 1000000.
 

Function Documentation

void PPSTools::Get_t_and_xi ( const TLorentzVector *  proton,
double &  t,
double &  xi,
LimitedBeamInfo const &  bi 
)

Definition at line 72 of file PPSUtilities.cc.

References funct::cos(), relval_parameters_module::energy, PPSTools::LimitedBeamInfo::fBeamEnergy, PPSTools::LimitedBeamInfo::fBeamMomentum, Pi, ProtonMassSQ, mathSSE::sqrt(), and theta().

Referenced by CTPPSFastTrackingProducer::FastReco().

72  {
73  t = 0.;
74  xi = -1.;
75  if (!proton)
76  return;
77  double mom =
78  sqrt((proton->Px()) * (proton->Px()) + (proton->Py()) * (proton->Py()) + (proton->Pz()) * (proton->Pz()));
79  if (mom > bi.fBeamMomentum)
80  mom = bi.fBeamMomentum;
81  double energy = proton->E();
82  double theta = (proton->Pz() > 0) ? proton->Theta() : TMath::Pi() - proton->Theta();
83  t = -2. * (ProtonMassSQ - bi.fBeamEnergy * energy + bi.fBeamMomentum * mom * cos(theta));
84  xi = (1.0 - energy / bi.fBeamEnergy);
85 }
const double Pi
Geom::Theta< T > theta() const
T sqrt(T t)
Definition: SSEVec.h:19
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
static const double ProtonMassSQ
TLorentzVector PPSTools::HectorParticle2LorentzVector ( H_BeamParticle  hp,
int  direction 
)

Definition at line 6 of file PPSUtilities.cc.

References funct::cos(), funct::pow(), ProtonMassSQ, mathSSE::sqrt(), funct::tan(), theta(), and urad.

6  {
7  double partP = sqrt(pow(hp.getE(), 2) - ProtonMassSQ);
8  double theta = sqrt(pow(hp.getTX(), 2) + pow(hp.getTY(), 2)) * urad;
9  double pz = partP * cos(theta);
10  double px = tan((double)hp.getTX() * urad) * pz; //it is equivalente to PartP*sin(theta)*cos(phi);
11  double py = tan((double)hp.getTY() * urad) * pz; //it is equivalente to partP*sin(theta)*sin(phi);
12  pz *= direction;
13  return TLorentzVector(px, py, pz, hp.getE());
14 }
Geom::Theta< T > theta() const
static const double urad
T sqrt(T t)
Definition: SSEVec.h:19
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
static const double ProtonMassSQ
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
void PPSTools::LorentzBoost ( H_BeamParticle &  h_p,
int  dir,
const std::string &  frame,
FullBeamInfo const &  bi 
)
void PPSTools::LorentzBoost ( TLorentzVector &  p_out,
const std::string &  frame,
FullBeamInfo const &  bi 
)
void PPSTools::LorentzBoost ( HepMC::GenParticle &  p_out,
const std::string &  frame,
FullBeamInfo const &  bi 
)
H_BeamParticle PPSTools::LorentzVector2HectorParticle ( TLorentzVector  p)

Definition at line 16 of file PPSUtilities.cc.

References funct::abs().

16  {
17  H_BeamParticle h_p;
18  h_p.set4Momentum(p.Px(), p.Py(), abs(p.Pz()), p.E());
19  return h_p;
20 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Variable Documentation

const double PPSTools::ProtonMass = CLHEP::proton_mass_c2 / GeV

Definition at line 30 of file PPSUtilities.h.

const double PPSTools::ProtonMassSQ = pow(ProtonMass, 2)
const double PPSTools::urad = 1. / 1000000.

Definition at line 29 of file PPSUtilities.h.