Belle II Software  release-06-00-14
PCmsLabTransform.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 #include <mdst/dbobjects/CollisionBoostVector.h>
12 #include <mdst/dbobjects/CollisionInvariantMass.h>
13 #include <framework/database/DBObjPtr.h>
14 
15 #include <TLorentzRotation.h>
16 #include <TLorentzVector.h>
17 
18 namespace Belle2 {
28 
29  public:
30 
35 
39  TVector3 getBoostVector() const
40  {
41  return m_boostVectorDB->getBoost();
42  }
43 
47  double getCMSEnergy() const
48  {
49  return m_invariantMassDB->getMass();
50  }
51 
55  TLorentzVector getBeamFourMomentum() const
56  {
57  return rotateCmsToLab() * TLorentzVector(0, 0, 0, getCMSEnergy());
58  }
59 
64  const TLorentzRotation rotateLabToCms() const
65  {
66  TLorentzRotation rotation(-1.*getBoostVector());
67  return rotation;
68  }
69 
74  const TLorentzRotation rotateCmsToLab() const
75  {
76  return rotateLabToCms().Inverse();
77  }
78 
84  static TLorentzVector labToCms(const TLorentzVector& vec);
85 
91  static TLorentzVector cmsToLab(const TLorentzVector& vec);
92 
93  private:
96  };
97 
99 } // Belle2 namespace
100 
101 
102 
103 
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Class to hold Lorentz transformations from/to CMS and boost vector.
double getCMSEnergy() const
Returns CMS energy of e+e- (aka.
const TLorentzRotation rotateLabToCms() const
Returns Lorentz transformation from Lab to CMS.
PCmsLabTransform()
Constructor.
static TLorentzVector cmsToLab(const TLorentzVector &vec)
Transforms Lorentz vector into Laboratory System.
TVector3 getBoostVector() const
Returns boost vector (beta=p/E)
const DBObjPtr< CollisionBoostVector > m_boostVectorDB
db object for boost vector.
TLorentzVector getBeamFourMomentum() const
Returns LAB four-momentum of e+e-.
const TLorentzRotation rotateCmsToLab() const
Returns Lorentz transformation from CMS to Lab.
const DBObjPtr< CollisionInvariantMass > m_invariantMassDB
db object for invariant mass.
static TLorentzVector labToCms(const TLorentzVector &vec)
Transforms Lorentz vector into CM System.
Abstract base class for different kinds of events.