CMS 3D CMS Logo

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 65 of file PPSUtilities.cc.

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

Referenced by CTPPSFastTrackingProducer::FastReco().

65  {
66  t = 0.;
67  xi = -1.;
68  if (!proton) return;
69  double mom = sqrt((proton->Px())*(proton->Px())+(proton->Py())*(proton->Py())+(proton->Pz())*(proton->Pz()));
70  if (mom>bi.fBeamMomentum) mom=bi.fBeamMomentum;
71  double energy = proton->E();
72  double theta = (proton->Pz()>0)?proton->Theta():TMath::Pi()-proton->Theta();
73  t = -2.*(ProtonMassSQ-bi.fBeamEnergy*energy+bi.fBeamMomentum*mom*cos(theta));
74  xi = (1.0-energy/bi.fBeamEnergy);
75 }
const double Pi
Geom::Theta< T > theta() const
T sqrt(T t)
Definition: SSEVec.h:18
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.

Referenced by LorentzVector2HectorParticle(), and HectorTransport::transportProton().

7 {
8  double partP = sqrt(pow(hp.getE(),2)-ProtonMassSQ);
9  double theta = sqrt(pow(hp.getTX(),2)+pow(hp.getTY(),2))*urad;
10  double pz = partP*cos(theta);
11  double px = tan((double)hp.getTX()*urad)*pz;//it is equivalente to PartP*sin(theta)*cos(phi);
12  double py = tan((double)hp.getTY()*urad)*pz;//it is equivalente to partP*sin(theta)*sin(phi);
13  pz*=direction;
14  return TLorentzVector(px,py,pz,hp.getE());
15 }
Geom::Theta< T > theta() const
static const double urad
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
T sqrt(T t)
Definition: SSEVec.h:18
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:40
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)

Variable Documentation

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

Definition at line 32 of file PPSUtilities.h.

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

Definition at line 31 of file PPSUtilities.h.