CMS 3D CMS Logo

HectorTransport.h
Go to the documentation of this file.
1 #ifndef HECTOR_TRANSPORT
2 #define HECTOR_TRANSPORT
4 
7 
12 
14 
15 #include <cmath>
16 #include <iomanip>
17 #include <cstdlib>
18 
19 // HepMC headers
20 #include "HepMC/GenEvent.h"
21 #include "HepMC/GenVertex.h"
22 #include "HepMC/GenParticle.h"
23 #include "HepMC/SimpleVector.h"
24 
25 // user include files
26 #include <string>
27 
28 namespace CLHEP {
29  class HepRandomEngine;
30 }
31 
32 class H_BeamParticle;
33 class H_BeamLine;
34 
36 public:
39  ~HectorTransport() override;
40  void process(const HepMC::GenEvent *, const edm::EventSetup &, CLHEP::HepRandomEngine *) override;
41 
42 private:
44  bool transportProton(const HepMC::GenParticle *);
47  void genProtonsLoop(const HepMC::GenEvent *, const edm::EventSetup &);
49 
50  // New function to calculate the LorentzBoost
51  void setBeamEnergy(double e) {
52  fBeamEnergy = e;
53  fBeamMomentum = sqrt(fBeamEnergy * fBeamEnergy - ProtonMassSQ);
54  }
55 
56  double getBeamEnergy() { return fBeamEnergy; }
57 
58  double getBeamMomentum() { return fBeamMomentum; }
59 
60  bool setBeamLine();
61  /*
62  *
63  * ATTENTION: DATA MEMBERS AND FUNCTIONS COMMON TO BOTH METHODS SHOULD BE MOVED TO THE BASE CLASS
64  *
65  */
66  // Defaults
68 
69  double m_fEtacut;
71 
72  double m_lengthctpps;
73  double m_f_ctpps_f;
74  double m_b_ctpps_b;
75 
76  // PPSHector
77  std::unique_ptr<H_BeamLine> m_beamline45;
78  std::unique_ptr<H_BeamLine> m_beamline56;
79 
82 };
83 #endif
std::string m_beam2filename
double getBeamEnergy()
T sqrt(T t)
Definition: SSEVec.h:19
edm::ESHandle< ParticleDataTable > m_pdt
void setBeamEnergy(double e)
std::string m_beam1filename
std::unique_ptr< H_BeamLine > m_beamline56
std::unique_ptr< H_BeamLine > m_beamline45
double getBeamMomentum()
static const double ProtonMassSQ