Belle II Software development
CMSRotationFrame Class Reference

Stack frame for cms and Rotation frame. More...

#include <ReferenceFrame.h>

Inheritance diagram for CMSRotationFrame:
ReferenceFrame

Public Member Functions

 CMSRotationFrame (const ROOT::Math::XYZVector &newX, const ROOT::Math::XYZVector &newY, const ROOT::Math::XYZVector &newZ)
 Create new rotation frame.
 
virtual ROOT::Math::XYZVector getVertex (const ROOT::Math::XYZVector &vector) const override
 Get vertex 3-vector in rotation frame.
 
virtual ROOT::Math::PxPyPzEVector getMomentum (const ROOT::Math::PxPyPzEVector &vector) const override
 Get Lorentz vector in rotation frame.
 
virtual TMatrixFSym getMomentumErrorMatrix (const TMatrixFSym &matrix) const override
 Get Momentum error matrix in rotation frame.
 
virtual TMatrixFSym getVertexErrorMatrix (const TMatrixFSym &matrix) const override
 Get Vertex error matrix in rotation frame.
 
virtual ROOT::Math::XYZVector getVertex (const Particle *particle) const
 Wrapper for particles.
 
virtual ROOT::Math::PxPyPzEVector getMomentum (const Particle *particle) const
 Wrapper for particles.
 
virtual TMatrixFSym getMomentumErrorMatrix (const Particle *particle) const
 Wrapper for particles.
 
virtual TMatrixFSym getVertexErrorMatrix (const Particle *particle) const
 Wrapper for particles.
 

Static Public Member Functions

static const ReferenceFrameGetCurrent ()
 Get current rest frame.
 

Static Private Member Functions

static void Push (const ReferenceFrame *frame)
 Push rest frame of given particle.
 
static void Pop ()
 Pop current rest frame.
 

Private Attributes

CMSFrame cmsframe
 CMSFrame.
 
RotationFrame rotationframe
 Rotationframe.
 

Static Private Attributes

static std::stack< const ReferenceFrame * > m_reference_frames
 Stack of current rest frames.
 

Detailed Description

Stack frame for cms and Rotation frame.

Definition at line 296 of file ReferenceFrame.h.

Constructor & Destructor Documentation

◆ CMSRotationFrame()

CMSRotationFrame ( const ROOT::Math::XYZVector & newX,
const ROOT::Math::XYZVector & newY,
const ROOT::Math::XYZVector & newZ )
explicit

Create new rotation frame.

Definition at line 200 of file ReferenceFrame.cc.

201 :
202 rotationframe(newX, newY, newZ)
203{
204
205}
RotationFrame rotationframe
Rotationframe.

Member Function Documentation

◆ GetCurrent()

const ReferenceFrame & GetCurrent ( )
staticinherited

Get current rest frame.

Returns
RestFrame

Definition at line 26 of file ReferenceFrame.cc.

27{
28 if (m_reference_frames.empty()) {
29 static LabFrame _default;
30 return _default;
31 } else {
32 return *m_reference_frames.top();
33 }
34}
static std::stack< const ReferenceFrame * > m_reference_frames
Stack of current rest frames.

◆ getMomentum() [1/2]

ROOT::Math::PxPyPzEVector getMomentum ( const ROOT::Math::PxPyPzEVector & vector) const
overridevirtual

Get Lorentz vector in rotation frame.

Parameters
vectorLorentz vector from particle
Returns
Lorentz vector in rotation frame

Implements ReferenceFrame.

Definition at line 212 of file ReferenceFrame.cc.

213{
214 return rotationframe.getMomentum(cmsframe.getMomentum(vector));
215}
CMSFrame cmsframe
CMSFrame.

◆ getMomentum() [2/2]

virtual ROOT::Math::PxPyPzEVector getMomentum ( const Particle * particle) const
inlinevirtualinherited

Wrapper for particles.

Parameters
particleparticle
Returns
momentum 4-vector in reference frame

Definition at line 60 of file ReferenceFrame.h.

61 {
62 return getMomentum(particle->get4Vector());
63 }

◆ getMomentumErrorMatrix() [1/2]

TMatrixFSym getMomentumErrorMatrix ( const TMatrixFSym & matrix) const
overridevirtual

Get Momentum error matrix in rotation frame.

Parameters
matrixCovariance matrix from particle
Returns
Covariance matrix in rotation frame

Implements ReferenceFrame.

Definition at line 217 of file ReferenceFrame.cc.

218{
219 return rotationframe.getMomentumErrorMatrix(cmsframe.getMomentumErrorMatrix(matrix));
220}

◆ getMomentumErrorMatrix() [2/2]

virtual TMatrixFSym getMomentumErrorMatrix ( const Particle * particle) const
inlinevirtualinherited

Wrapper for particles.

Parameters
particleparticle
Returns
Covariance matrix in reference frame

Definition at line 77 of file ReferenceFrame.h.

78 {
79 return getMomentumErrorMatrix(particle->getMomentumErrorMatrix());
80 }

◆ getVertex() [1/2]

ROOT::Math::XYZVector getVertex ( const ROOT::Math::XYZVector & vector) const
overridevirtual

Get vertex 3-vector in rotation frame.

Parameters
vector3-vector from particle
Returns
3-vector in rotation frame

Implements ReferenceFrame.

Definition at line 207 of file ReferenceFrame.cc.

208{
209 return rotationframe.getVertex(cmsframe.getVertex(vector));
210}

◆ getVertex() [2/2]

virtual ROOT::Math::XYZVector getVertex ( const Particle * particle) const
inlinevirtualinherited

Wrapper for particles.

Parameters
particle
Returns
3-vector in reference frame

Definition at line 43 of file ReferenceFrame.h.

44 {
45 return getVertex(particle->getVertex());
46 }

◆ getVertexErrorMatrix() [1/2]

TMatrixFSym getVertexErrorMatrix ( const TMatrixFSym & matrix) const
overridevirtual

Get Vertex error matrix in rotation frame.

Parameters
matrixCovariance matrix from particle
Returns
Covariance matrix in rotation frame

Implements ReferenceFrame.

Definition at line 222 of file ReferenceFrame.cc.

223{
224 return rotationframe.getVertexErrorMatrix(cmsframe.getVertexErrorMatrix(matrix));
225}

◆ getVertexErrorMatrix() [2/2]

virtual TMatrixFSym getVertexErrorMatrix ( const Particle * particle) const
inlinevirtualinherited

Wrapper for particles.

Parameters
particle
Returns
Covariance matrix in reference frame

Definition at line 94 of file ReferenceFrame.h.

95 {
96 return getVertexErrorMatrix(particle->getVertexErrorMatrix());
97 }

◆ Pop()

static void Pop ( )
inlinestaticprivateinherited

Pop current rest frame.

Definition at line 118 of file ReferenceFrame.h.

119 {
120 m_reference_frames.pop();
121 }

◆ Push()

static void Push ( const ReferenceFrame * frame)
inlinestaticprivateinherited

Push rest frame of given particle.

Parameters
frameUse this reference frame

Definition at line 110 of file ReferenceFrame.h.

111 {
112 m_reference_frames.push(frame);
113 }

Member Data Documentation

◆ cmsframe

CMSFrame cmsframe
private

CMSFrame.

Definition at line 333 of file ReferenceFrame.h.

◆ m_reference_frames

std::stack< const ReferenceFrame * > m_reference_frames
staticprivateinherited

Stack of current rest frames.

Definition at line 123 of file ReferenceFrame.h.

◆ rotationframe

RotationFrame rotationframe
private

Rotationframe.

Definition at line 334 of file ReferenceFrame.h.


The documentation for this class was generated from the following files: