Belle II Software  light-2403-persian
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 <mdst/dbobjects/CollisionAxisCMS.h>
14 #include <framework/database/DBObjPtr.h>
15 #include <framework/geometry/B2Vector3.h>
16 #include <framework/utilities/LabToCms.h>
17 
18 #include <Math/LorentzRotation.h>
19 #include <Math/Vector4D.h>
20 
21 namespace Belle2 {
31 
32  public:
33 
38 
43  {
44  return m_boostVectorDB->getBoost();
45  }
46 
50  double getCMSEnergy() const
51  {
52  return m_invariantMassDB->getMass();
53  }
54 
58  ROOT::Math::PxPyPzEVector getBeamFourMomentum() const
59  {
60  return rotateCmsToLab() * ROOT::Math::PxPyPzEVector(0, 0, 0, getCMSEnergy());
61  }
62 
67  const ROOT::Math::LorentzRotation rotateLabToCms() const
68  {
69  return LabToCms::rotateLabToCms(getBoostVector(), m_axisCmsDB->getAngleXZ(), m_axisCmsDB->getAngleYZ());
70  }
71 
76  const ROOT::Math::LorentzRotation rotateCmsToLab() const
77  {
78  return rotateLabToCms().Inverse();
79  }
80 
86  static ROOT::Math::PxPyPzMVector labToCms(const ROOT::Math::PxPyPzMVector& vec);
87 
93  static ROOT::Math::PxPyPzMVector cmsToLab(const ROOT::Math::PxPyPzMVector& vec);
94 
100  static ROOT::Math::PxPyPzEVector labToCms(const ROOT::Math::PxPyPzEVector& vec);
101 
107  static ROOT::Math::PxPyPzEVector cmsToLab(const ROOT::Math::PxPyPzEVector& vec);
108 
109  private:
113  };
114 
116 } // Belle2 namespace
117 
118 
119 
120 
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
static ROOT::Math::LorentzRotation rotateLabToCms(const ROOT::Math::XYZVector &boostVector, double cmsAngleXZ, double cmsAngleYZ)
Function takes 3D boostVector and angles of the HER momentum in the CM system obtained by pure boost.
Definition: LabToCms.h:43
Class to hold Lorentz transformations from/to CMS and boost vector.
ROOT::Math::PxPyPzEVector getBeamFourMomentum() const
Returns LAB four-momentum of e+e-, i.e.
double getCMSEnergy() const
Returns CMS energy of e+e- (aka.
static ROOT::Math::PxPyPzMVector labToCms(const ROOT::Math::PxPyPzMVector &vec)
Transforms Lorentz vector into CM System.
const ROOT::Math::LorentzRotation rotateLabToCms() const
Returns Lorentz transformation from Lab to CMS.
PCmsLabTransform()
Constructor.
static ROOT::Math::PxPyPzMVector cmsToLab(const ROOT::Math::PxPyPzMVector &vec)
Transforms Lorentz vector into Laboratory System.
const DBObjPtr< CollisionBoostVector > m_boostVectorDB
db object for boost vector.
const ROOT::Math::LorentzRotation rotateCmsToLab() const
Returns Lorentz transformation from CMS to Lab.
const DBObjPtr< CollisionInvariantMass > m_invariantMassDB
db object for invariant mass.
B2Vector3D getBoostVector() const
Returns boost vector (beta=p/E)
const DBObjPtr< CollisionAxisCMS > m_axisCmsDB
db object for collision axis in CM system from boost.
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24