CMS 3D CMS Logo

PPSUtilities.h
Go to the documentation of this file.
1 #ifndef PPSTOOLS_UTILITIES
2 #define PPSTOOLS_UTILITIES
3 #include <cmath>
4 #include <string>
5 #include <CLHEP/Units/PhysicalConstants.h>
6 #include <CLHEP/Units/GlobalSystemOfUnits.h>
7 #include "TLorentzVector.h"
8 
9 class H_BeamParticle;
10 
11 namespace HepMC {
12  class GenParticle;
13 }
14 
15 namespace PPSTools {
16 
17  struct FullBeamInfo {
20  double fBeamMomentum;
21  double fBeamEnergy;
22  };
23 
24  struct LimitedBeamInfo {
25  double fBeamMomentum;
26  double fBeamEnergy;
27  };
28 
29  const double urad = 1. / 1000000.;
30  const double ProtonMass = CLHEP::proton_mass_c2 / GeV;
31  const double ProtonMassSQ = pow(ProtonMass, 2);
32 
33  TLorentzVector HectorParticle2LorentzVector(H_BeamParticle hp, int);
34 
35  H_BeamParticle LorentzVector2HectorParticle(TLorentzVector p);
36 
37  void LorentzBoost(H_BeamParticle& h_p, int dir, const std::string& frame, FullBeamInfo const& bi);
38 
39  void LorentzBoost(TLorentzVector& p_out, const std::string& frame, FullBeamInfo const& bi);
40 
41  void LorentzBoost(HepMC::GenParticle& p_out, const std::string& frame, FullBeamInfo const& bi);
42 
43  void Get_t_and_xi(const TLorentzVector* proton, double& t, double& xi, LimitedBeamInfo const& bi);
44 
45 }; // namespace PPSTools
46 #endif
void LorentzBoost(H_BeamParticle &h_p, int dir, const std::string &frame, FullBeamInfo const &bi)
TLorentzVector HectorParticle2LorentzVector(H_BeamParticle hp, int)
Definition: PPSUtilities.cc:6
H_BeamParticle LorentzVector2HectorParticle(TLorentzVector p)
Definition: PPSUtilities.cc:16
const double urad
Definition: PPSUtilities.h:29
const double ProtonMassSQ
Definition: PPSUtilities.h:31
const double ProtonMass
Definition: PPSUtilities.h:30
void Get_t_and_xi(const TLorentzVector *proton, double &t, double &xi, LimitedBeamInfo const &bi)
Definition: PPSUtilities.cc:72
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29