Belle II Software prerelease-10-00-00a
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/utilities/LabToCms.h>
16
17#include <Math/LorentzRotation.h>
18#include <Math/Vector4D.h>
19
20namespace Belle2 {
25
30
31 public:
32
37
41 ROOT::Math::XYZVector getBoostVector() const
42 {
43 return ROOT::Math::XYZVector(m_boostVectorDB->getBoost());
44 }
45
49 double getCMSEnergy() const
50 {
51 return m_invariantMassDB->getMass();
52 }
53
57 ROOT::Math::PxPyPzEVector getBeamFourMomentum() const
58 {
59 return rotateCmsToLab() * ROOT::Math::PxPyPzEVector(0, 0, 0, getCMSEnergy());
60 }
61
66 const ROOT::Math::LorentzRotation rotateLabToCms() const
67 {
68 return LabToCms::rotateLabToCms(getBoostVector(), m_axisCmsDB->getAngleXZ(), m_axisCmsDB->getAngleYZ());
69 }
70
75 const ROOT::Math::LorentzRotation rotateCmsToLab() const
76 {
77 return rotateLabToCms().Inverse();
78 }
79
85 static ROOT::Math::PxPyPzMVector labToCms(const ROOT::Math::PxPyPzMVector& vec);
86
92 static ROOT::Math::PxPyPzMVector cmsToLab(const ROOT::Math::PxPyPzMVector& vec);
93
99 static ROOT::Math::PxPyPzEVector labToCms(const ROOT::Math::PxPyPzEVector& vec);
100
106 static ROOT::Math::PxPyPzEVector cmsToLab(const ROOT::Math::PxPyPzEVector& vec);
107
108 private:
112 };
113
115} // Belle2 namespace
116
117
118
119
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
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.
const DBObjPtr< CollisionAxisCMS > m_axisCmsDB
db object for collision axis in CM system from boost.
ROOT::Math::XYZVector getBoostVector() const
Returns boost vector (beta=p/E)
Abstract base class for different kinds of events.