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 (HepMC::GenParticle &p_out, const std::string &frame, FullBeamInfo const &bi)
 
void LorentzBoost (TLorentzVector &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

◆ Get_t_and_xi()

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

Definition at line 72 of file PPSUtilities.cc.

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 }

References funct::cos(), HCALHighEnergyHPDFilter_cfi::energy, PPSTools::LimitedBeamInfo::fBeamEnergy, PPSTools::LimitedBeamInfo::fBeamMomentum, Pi, ProtonMassSQ, mathSSE::sqrt(), submitPVValidationJobs::t, theta(), and protons_cff::xi.

Referenced by CTPPSFastTrackingProducer::FastReco().

◆ HectorParticle2LorentzVector()

TLorentzVector PPSTools::HectorParticle2LorentzVector ( H_BeamParticle  hp,
int  direction 
)

Definition at line 6 of file PPSUtilities.cc.

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 }

References funct::cos(), trackingPlots::hp, funct::pow(), ProtonMassSQ, multPhiCorr_741_25nsDY_cfi::px, multPhiCorr_741_25nsDY_cfi::py, mathSSE::sqrt(), funct::tan(), theta(), and urad.

◆ LorentzBoost() [1/3]

void PPSTools::LorentzBoost ( H_BeamParticle &  h_p,
int  dir,
const std::string &  frame,
FullBeamInfo const &  bi 
)

◆ LorentzBoost() [2/3]

void PPSTools::LorentzBoost ( HepMC::GenParticle &  p_out,
const std::string &  frame,
FullBeamInfo const &  bi 
)

◆ LorentzBoost() [3/3]

void PPSTools::LorentzBoost ( TLorentzVector &  p_out,
const std::string &  frame,
FullBeamInfo const &  bi 
)

◆ LorentzVector2HectorParticle()

H_BeamParticle PPSTools::LorentzVector2HectorParticle ( TLorentzVector  p)

Definition at line 16 of file PPSUtilities.cc.

16  {
17  H_BeamParticle h_p;
18  h_p.set4Momentum(p.Px(), p.Py(), abs(p.Pz()), p.E());
19  return h_p;
20 }

References funct::abs(), and AlCaHLTBitMon_ParallelJobs::p.

Variable Documentation

◆ ProtonMass

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

Definition at line 30 of file PPSUtilities.h.

◆ ProtonMassSQ

const double PPSTools::ProtonMassSQ = pow(ProtonMass, 2)

◆ urad

const double PPSTools::urad = 1. / 1000000.

Definition at line 29 of file PPSUtilities.h.

multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
trackingPlots.hp
hp
Definition: trackingPlots.py:1231
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
ProtonMassSQ
static const double ProtonMassSQ
Definition: PPSUnitConversion.h:6
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
urad
static const double urad
Definition: PPSUnitConversion.h:10
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
protons_cff.xi
xi
Definition: protons_cff.py:31
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644