Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-10 02:21:31

0001 #ifndef PPSTOOLS_UTILITIES
0002 #define PPSTOOLS_UTILITIES
0003 #include <cmath>
0004 #include <string>
0005 #include <CLHEP/Units/PhysicalConstants.h>
0006 #include <CLHEP/Units/SystemOfUnits.h>
0007 #include "TLorentzVector.h"
0008 
0009 class H_BeamParticle;
0010 
0011 namespace HepMC {
0012   class GenParticle;
0013 }
0014 
0015 namespace PPSTools {
0016 
0017   struct FullBeamInfo {
0018     double fCrossingAngleBeam1;
0019     double fCrossingAngleBeam2;
0020     double fBeamMomentum;
0021     double fBeamEnergy;
0022   };
0023 
0024   struct LimitedBeamInfo {
0025     double fBeamMomentum;
0026     double fBeamEnergy;
0027   };
0028 
0029   const double urad = 1. / 1000000.;
0030   const double ProtonMass = CLHEP::proton_mass_c2 / CLHEP::GeV;
0031   const double ProtonMassSQ = pow(ProtonMass, 2);
0032 
0033   TLorentzVector HectorParticle2LorentzVector(H_BeamParticle hp, int);
0034 
0035   H_BeamParticle LorentzVector2HectorParticle(TLorentzVector p);
0036 
0037   void LorentzBoost(H_BeamParticle& h_p, int dir, const std::string& frame, FullBeamInfo const& bi);
0038 
0039   void LorentzBoost(TLorentzVector& p_out, const std::string& frame, FullBeamInfo const& bi);
0040 
0041   void LorentzBoost(HepMC::GenParticle& p_out, const std::string& frame, FullBeamInfo const& bi);
0042 
0043   void Get_t_and_xi(const TLorentzVector* proton, double& t, double& xi, LimitedBeamInfo const& bi);
0044 
0045 };  // namespace PPSTools
0046 #endif