Belle II Software  release-05-02-19
PCmsLabTransform.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2019 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric, Francesco Tenchini *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <mdst/dbobjects/CollisionBoostVector.h>
14 #include <mdst/dbobjects/CollisionInvariantMass.h>
15 #include <framework/database/DBObjPtr.h>
16 
17 #include <TLorentzRotation.h>
18 #include <TLorentzVector.h>
19 
20 namespace Belle2 {
29  class PCmsLabTransform {
30 
31  public:
32 
37 
41  TVector3 getBoostVector() const
42  {
43  return m_boostVectorDB->getBoost();
44  }
45 
49  double getCMSEnergy() const
50  {
51  return m_invariantMassDB->getMass();
52  }
53 
57  TLorentzVector getBeamFourMomentum() const
58  {
59  return rotateCmsToLab() * TLorentzVector(0, 0, 0, getCMSEnergy());
60  }
61 
66  const TLorentzRotation rotateLabToCms() const
67  {
68  TLorentzRotation rotation(-1.*getBoostVector());
69  return rotation;
70  }
71 
76  const TLorentzRotation rotateCmsToLab() const
77  {
78  return rotateLabToCms().Inverse();
79  }
80 
86  static TLorentzVector labToCms(const TLorentzVector& vec);
87 
93  static TLorentzVector cmsToLab(const TLorentzVector& vec);
94 
95  private:
96  const DBObjPtr<CollisionInvariantMass> m_invariantMassDB;
97  const DBObjPtr<CollisionBoostVector> m_boostVectorDB;
98  };
99 
101 } // Belle2 namespace
102 
103 
104 
105 
Belle2::PCmsLabTransform::m_invariantMassDB
const DBObjPtr< CollisionInvariantMass > m_invariantMassDB
db object for invariant mass.
Definition: PCmsLabTransform.h:104
Belle2::PCmsLabTransform::labToCms
static TLorentzVector labToCms(const TLorentzVector &vec)
Transforms Lorentz vector into CM System.
Definition: PCmsLabTransform.cc:15
Belle2::PCmsLabTransform::getCMSEnergy
double getCMSEnergy() const
Returns CMS energy of e+e- (aka.
Definition: PCmsLabTransform.h:57
Belle2::PCmsLabTransform::m_boostVectorDB
const DBObjPtr< CollisionBoostVector > m_boostVectorDB
db object for boost vector.
Definition: PCmsLabTransform.h:105
Belle2::PCmsLabTransform::rotateCmsToLab
const TLorentzRotation rotateCmsToLab() const
Returns Lorentz transformation from CMS to Lab.
Definition: PCmsLabTransform.h:84
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PCmsLabTransform::getBeamFourMomentum
TLorentzVector getBeamFourMomentum() const
Returns LAB four-momentum of e+e-.
Definition: PCmsLabTransform.h:65
Belle2::PCmsLabTransform::getBoostVector
TVector3 getBoostVector() const
Returns boost vector (beta=p/E)
Definition: PCmsLabTransform.h:49
Belle2::PCmsLabTransform::PCmsLabTransform
PCmsLabTransform()
Constructor.
Belle2::PCmsLabTransform::rotateLabToCms
const TLorentzRotation rotateLabToCms() const
Returns Lorentz transformation from Lab to CMS.
Definition: PCmsLabTransform.h:74
Belle2::PCmsLabTransform::cmsToLab
static TLorentzVector cmsToLab(const TLorentzVector &vec)
Transforms Lorentz vector into Laboratory System.
Definition: PCmsLabTransform.cc:21