Rivet  3.1.4
DISKinematics.hh
1 // -*- C++ -*-
2 #ifndef RIVET_DISKinematics_HH
3 #define RIVET_DISKinematics_HH
4 
5 #include "Rivet/Particle.hh"
6 #include "Rivet/Event.hh"
7 #include "Rivet/Projection.hh"
8 #include "Rivet/Projections/DISLepton.hh"
9 #include "Rivet/Projections/Beam.hh"
10 
11 namespace Rivet {
12 
13 
15  class DISKinematics : public Projection {
16  public:
17 
19  DISKinematics(const DISLepton & lepton = DISLepton(),
20  const std::map<std::string,std::string> & opts =
21  std::map<std::string,std::string>())
22  : _theQ2(-1.0), _theW2(-1.0), _theX(-1.0), _theY(-1.0), _theS(-1.0)
23  {
24  setName("DISKinematics");
25  //addPdgIdPair(ANY, hadid);
26  declare(Beam(), "Beam");
27  declare(lepton, "Lepton");
28  }
29 
32 
33 
34  protected:
35 
37  virtual void project(const Event& e);
38 
40  virtual CmpState compare(const Projection& p) const;
41 
42 
43  public:
44 
46  double Q2() const { return _theQ2; }
47 
49  double W2() const { return _theW2; }
50 
52  double x() const { return _theX; }
53 
55  double y() const { return _theY; }
56 
58  double s() const { return _theS; }
59 
60 
61 
63  const LorentzTransform& boostHCM() const {
64  return _hcm;
65  }
66 
68  const LorentzTransform& boostBreit() const {
69  return _breit;
70  }
71 
73  const Particle& beamHadron() const {
74  return _inHadron;
75  }
76 
78  const Particle& beamLepton() const {
79  return _inLepton;
80  }
81 
83  const Particle& scatteredLepton() const {
84  return _outLepton;
85  }
86 
90  const int orientation() const {
91  return sign(_inHadron.pz());
92  }
93 
94 
95  private:
96 
98  double _theQ2;
99 
101  double _theW2;
102 
104  double _theX;
105 
107  double _theY;
108 
110  double _theS;
111 
113  Particle _inHadron, _inLepton, _outLepton;
114 
116  LorentzTransform _hcm;
117 
119  LorentzTransform _breit;
120 
121  };
122 
123 
124 }
125 
126 #endif
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:142
Definition: MC_Cent_pPb.hh:10
double s() const
The centre of mass energy .
Definition: DISKinematics.hh:58
const LorentzTransform & boostHCM() const
The LorentzRotation needed to boost a particle to the hadronic CM frame.
Definition: DISKinematics.hh:63
double y() const
The inelasticity .
Definition: DISKinematics.hh:55
const int orientation() const
1/-1 multiplier indicating (respectively) whether the event has conventional orientation or not ...
Definition: DISKinematics.hh:90
Get the DIS kinematic variables and relevant boosts for an event.
Definition: DISKinematics.hh:15
DISKinematics(const DISLepton &lepton=DISLepton(), const std::map< std::string, std::string > &opts=std::map< std::string, std::string >())
The default constructor.
Definition: DISKinematics.hh:19
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition: Particle.hh:18
double Q2() const
The .
Definition: DISKinematics.hh:46
virtual CmpState compare(const Projection &p) const
Compare with other projections.
const Particle & scatteredLepton() const
The scattered DIS lepton.
Definition: DISKinematics.hh:83
double x() const
The Bjorken .
Definition: DISKinematics.hh:52
double W2() const
The .
Definition: DISKinematics.hh:49
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
Object implementing Lorentz transform calculations and boosts.
Definition: LorentzTrans.hh:21
const Particle & beamHadron() const
The incoming hadron beam particle.
Definition: DISKinematics.hh:73
DEFAULT_RIVET_PROJ_CLONE(DISKinematics)
Clone on the heap.
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:170
Project out the incoming beams.
Definition: Beam.hh:129
const LorentzTransform & boostBreit() const
The LorentzRotation needed to boost a particle to the hadronic Breit frame.
Definition: DISKinematics.hh:68
const Particle & beamLepton() const
The incoming lepton beam particle.
Definition: DISKinematics.hh:78
Get the incoming and outgoing leptons in a DIS event.
Definition: DISLepton.hh:17
virtual void project(const Event &e)
Perform the projection operation on the supplied event.
Base class for all Rivet projections.
Definition: Projection.hh:29
std::enable_if< std::is_arithmetic< NUM >::value, int >::type sign(NUM val)
Find the sign of a number.
Definition: MathUtils.hh:266