LorentzVector.hh
Go to the documentation of this file.
1 #pragma once
2 
5 
7 
8 class TLorentzVector;
9 
10 namespace boca
11 {
12 
17 template<typename Value_>
18 class LorentzVector : public LorentzVectorBase<Value_>
19 {
21 };
22 
27 template<>
28 class LorentzVector<Momentum> : public LorentzVectorBase<Momentum>
29 {
30 
31 public:
32 
39 
43  LorentzVector();
44 
45 // LorentzVector(LorentzVectorBase<Momentum> const& lorentz_vector);
46 
50  LorentzVector(TLorentzVector const &lorentzvector);
51 
56 
61 
66 
70  LorentzVector(exroot::Jet const &jet);
71 
75  LorentzVector(exroot::LHEFParticle const &particle);
76 
81 
86 
91 
93 
103  void SetVectE(Vector3<Momentum> const& vector, const boca::Energy &energy);
104 
108  void SetVectM(Vector3<Momentum> const &spatial, boca::Mass const& mass);
109 
113  void SetPtEtaPhiM(Momentum const &pt, boca::Angle const &eta, boca::Angle const &phi, boca::Mass const &mass);
114 
118  void SetPtEtaPhiE(Momentum const &pt, boca::Angle const &eta, boca::Angle const &phi, boca::Energy const &energy);
119 
123  template<typename Particle>
124  void LorentzVectorByEnergy(const Particle &particle)
125  {
126  SetPtEtaPhiE(particle.PT * GeV, particle.Eta * rad, particle.Phi * rad, particle.E * GeV);
127  }
128 
132  template<typename Particle>
133  void LorentzVectorByMass(const Particle &particle, boca::Mass const &mass)
134  {
135  SetPtEtaPhiM(particle.PT * GeV, particle.Eta * rad, particle.Phi * rad, mass);
136  }
137 
141  template<typename Particle>
142  void LorentzVectorByMass(const Particle &particle)
143  {
144  LorentzVectorByMass(particle, particle.Mass * GeV);
145  }
146 
150  template<typename Particle>
151  void LorentzVectorByM(const Particle &particle)
152  {
153  LorentzVectorByMass(particle, particle.M * GeV);
154  }
155 
157 
166  Momentum Px() const;
167 
171  Momentum Py() const;
172 
176  Momentum Pz() const;
177 
181  boca::Energy E() const;
182 
186  boca::Energy Energy() const;
187 
191  Momentum &Px() ;
192 
196  Momentum &Py() ;
197 
201  Momentum &Pz() ;
202 
206  boca::Energy &E() ;
207 
211  boca::Energy &Energy() ;
212 
214 
223  Momentum P() const;
224 
228  EnergySquare Et2() const;
229 
233  boca::Energy Et() const;
234 
238  template<typename Value, typename = OnlyIfNotQuantity<Value>>
239  EnergySquare Et2(Vector3<Value> const &vector) const
240  {
241  return ScalarT2(vector);
242  }
243 
247  template<typename Value, typename = OnlyIfNotQuantity<Value>>
248  boca::Energy Et(Vector3<Value> const &vector) const
249  {
250  return ScalarT(vector);
251  }
252 
256  MassSquare M2() const;
257 
261  boca::Mass M() const;
262 
266  boca::Mass Mass() const;
267 
271  MassSquare Mt2() const;
272 
276  boca::Mass Mt() const;
277 
281  Momentum Pt() const;
282 
286  template<typename Value, typename = OnlyIfNotQuantity<Value>>
287  Momentum Pt(Vector3<Value> const &vector) const
288  {
289  return Perp(vector);
290  }
291 
293 };
294 
299 template<>
300 class LorentzVector<Length> : public LorentzVectorBase<Length>
301 {
302 public:
303 
310 
314  LorentzVector();
315 
320 
325 
327 
331  void Smearing(const boca::Length &amount);
332 
333 };
334 
335 }
336 
constexpr Value_ Perp() const
The transverse component .
Definition: Vector3.hh:409
typename boost::units::multiply_typeof_helper< Mass, Mass >::type MassSquare
Definition: ElectronVolt.hh:75
void LorentzVectorByMass(const Particle &particle, boca::Mass const &mass)
Setter for a exroot Particle and a mass.
Definition: LorentzVector.hh:133
Lorentz vector.
Definition: PseudoJet.hh:17
Definition: ExRootClasses.h:309
void LorentzVectorByM(const Particle &particle)
Setter for a exroot Particle.
Definition: LorentzVector.hh:151
Definition: ExRootClasses.h:84
Definition: ExRootClasses.h:216
boost::units::quantity< boost::units::si::plane_angle > Angle
Angle measured in radian.
Definition: Si.hh:35
void LorentzVectorByEnergy(const Particle &particle)
Setter for a exroot Particle.
Definition: LorentzVector.hh:124
Definition: Particle.hh:12
constexpr Value_ ScalarT() const
transvere scalar square
Definition: LorentzVectorBase.hh:376
boost::units::quantity< boost::units::si::length > Length
Length measured in meter.
Definition: Si.hh:24
typename boost::units::multiply_typeof_helper< Energy, Energy >::type EnergySquare
Definition: ElectronVolt.hh:74
void LorentzVectorByMass(const Particle &particle)
Setter for a exroot Particle.
Definition: LorentzVector.hh:142
constexpr LorentzVectorBase()
Default constructor.
Definition: LorentzVectorBase.hh:66
boca::Energy E() const
Energy.
Definition: PseudoJet.cpp:108
constexpr ValueSquare ScalarT2() const
transvere scalar square
Definition: LorentzVectorBase.hh:368
Definition: ExRootClasses.h:258
::GenParticle GenParticle
Definition: TypeDef.hh:17
boca::Energy Et(Vector3< Value > const &vector) const
Transverse energy w.r.t. given axis.
Definition: LorentzVector.hh:248
Definition: ExRootClasses.h:286
Definition: ExRootClasses.h:134
boca::Mass Mass() const
Mass.
Definition: PseudoJet.cpp:98
Angle Phi() const
Azimuth constrained to .
Definition: PseudoJet.cpp:153
Boosted Collider Analysis.
Definition: Analysis.hh:15
::Track Track
Definition: TypeDef.hh:27
boost::units::quantity< electronvolt::Energy > Energy
Energy measured in electronvolt.
Definition: ElectronVolt.hh:56
Definition: ExRootClasses.h:235
EnergySquare Et2(Vector3< Value > const &vector) const
Transverse energy w.r.t. given axis squared.
Definition: LorentzVector.hh:239
Lorentz Vector.
Definition: LorentzVectorBase.hh:32
boost::units::unit< EnergyDimension, System > Energy
Definition: ElectronVolt.hh:46
Energy Momentum
Momentum measured in electronvolt.
Definition: ElectronVolt.hh:68
Definition: ExRootClasses.h:168
Momentum Pt(Vector3< Value > const &vector) const
Transverse component of the spatial vector w.r.t. given axis.
Definition: LorentzVector.hh:287
Energy Mass
Mass measured in electronvolt.
Definition: ElectronVolt.hh:62