AnalysisTree
Loading...
Searching...
No Matches
AnalysisTree::Track Class Reference

A class for a generic track with determined momentum. More...

#include <Track.hpp>

Inheritance diagram for AnalysisTree::Track:
Inheritance graph
Collaboration diagram for AnalysisTree::Track:
Collaboration graph

Public Member Functions

 Track (size_t id) noexcept
 
 Track (const Container &cont)
 
 Track (size_t id, const BranchConfig &branch) noexcept
 
 Track (const Track &track)=default
 
 Track (Track &&track)=default
 
Trackoperator= (Track &&)=default
 
Trackoperator= (const Track &track)=default
 
void SetMomentum (Floating_t px, Floating_t py, Floating_t pz) noexcept
 
void SetMomentum3 (const TVector3 &momentum) noexcept
 
void SetCharge (Int_t charge) noexcept
 
ANALYSISTREE_ATTR_NODISCARD Floating_t GetPx () const noexcept
 
ANALYSISTREE_ATTR_NODISCARD Floating_t GetPy () const noexcept
 
ANALYSISTREE_ATTR_NODISCARD Floating_t GetPz () const noexcept
 
ANALYSISTREE_ATTR_NODISCARD Floating_t GetPt () const noexcept
 
ANALYSISTREE_ATTR_NODISCARD Floating_t GetPhi () const noexcept
 
ANALYSISTREE_ATTR_NODISCARD Floating_t GetEta () const noexcept
 
ANALYSISTREE_ATTR_NODISCARD Floating_t GetP () const noexcept
 
ANALYSISTREE_ATTR_NODISCARD Integer_t GetCharge () const noexcept
 
ANALYSISTREE_ATTR_NODISCARD TVector3 GetMomentum3 () const noexcept
 
ANALYSISTREE_ATTR_NODISCARD Floating_t GetRapidity (PdgCode_t pdg) const
 
ANALYSISTREE_ATTR_NODISCARD Floating_t GetRapidityByMass (float mass) const noexcept
 
template<typename T >
GetField (Integer_t id) const
 
template<typename T >
void SetField (T value, Int_t field_id)
 
void Print () const noexcept override
 
- Public Member Functions inherited from AnalysisTree::Container
 Container (size_t id)
 
 Container (size_t id, const BranchConfig &branch)
 
 Container (const Container &container)=default
 
 Container (Container &&container)=default
 
Containeroperator= (Container &&)=default
 
Containeroperator= (const Container &part)=default
 
template<class T >
std::vector< T > & Vector ()
 
template<class T >
const std::vector< T > & GetVector () const
 
template<typename T >
void SetField (T value, Integer_t field_id)
 
template<typename T >
ANALYSISTREE_ATTR_NODISCARD T GetField (Integer_t field_id) const
 
template<typename T >
ANALYSISTREE_ATTR_NODISCARD size_t GetSize () const
 
void Init (const BranchConfig &branch)
 
template<>
std::vector< int > & Vector ()
 
template<>
std::vector< float > & Vector ()
 
template<>
std::vector< bool > & Vector ()
 
template<>
const std::vector< int > & GetVector () const
 
template<>
const std::vector< float > & GetVector () const
 
template<>
const std::vector< bool > & GetVector () const
 
- Public Member Functions inherited from AnalysisTree::IndexedObject
 IndexedObject (size_t id)
 
 IndexedObject (const IndexedObject &indexedObject)=default
 
 IndexedObject (IndexedObject &&indexedObject)=default
 
IndexedObjectoperator= (IndexedObject &&)=default
 
IndexedObjectoperator= (const IndexedObject &indexedObject)=default
 
ANALYSISTREE_ATTR_NODISCARD size_t GetId () const
 

Protected Member Functions

 ClassDefOverride (Track, 2)
 
- Protected Member Functions inherited from AnalysisTree::Container
 ClassDefOverride (Container, 2)
 

Static Protected Member Functions

static float GetMassByPdgId (PdgCode_t pdg)
 
static int GetChargeByPdgId (PdgCode_t pdg)
 

Protected Attributes

Floating_t px_ {UndefValueFloat}
 x-component of track's momentum
 
Floating_t py_ {UndefValueFloat}
 y-component of track's momentum
 
Floating_t pz_ {UndefValueFloat}
 z-component of track's momentum
 
Integer_t charge_ {-1000}
 
- Protected Attributes inherited from AnalysisTree::Container
std::vector< float > floats_ {}
 
std::vector< int > ints_ {}
 
std::vector< bool > bools_ {}
 

Friends

bool operator== (const Track &that, const Track &other)
 

Detailed Description

A class for a generic track with determined momentum.

Detailed description starts here...

Member Function Documentation

◆ GetField()

template<typename T >
T AnalysisTree::Track::GetField ( Integer_t id) const
inline

Calculates field

Parameters
id- number of the field. In case of negative values corresponding pre-defined field will be calculated
Returns
field value. In case it is not found exeption is thrown

◆ GetMomentum3()

ANALYSISTREE_ATTR_NODISCARD TVector3 AnalysisTree::Track::GetMomentum3 ( ) const
inlinenoexcept
Returns
3d-momentum of a track

◆ GetRapidity()

ANALYSISTREE_ATTR_NODISCARD Floating_t AnalysisTree::Track::GetRapidity ( PdgCode_t pdg) const
inline

Calculates rapidity

Parameters
pdg- pdg code hypotesis
Returns
rapidity of the track. If pdg is not found - exeption should be thrown.

◆ GetRapidityByMass()

ANALYSISTREE_ATTR_NODISCARD Floating_t AnalysisTree::Track::GetRapidityByMass ( float mass) const
inlinenoexcept

Calculates rapidity

Parameters
mass- track mass hypotesis in GeV/c^2
Returns
rapidity of the track

◆ Print()

void AnalysisTree::Track::Print ( ) const
overridevirtualnoexcept

Prints the track content

Reimplemented from AnalysisTree::Container.

◆ SetMomentum()

void AnalysisTree::Track::SetMomentum ( Floating_t px,
Floating_t py,
Floating_t pz )
inlinenoexcept

Calculates 4-momentum

Parameters
mass- track mass hypotesis in GeV/c^2
Returns
4d-momentum of track Calculates 4-momentum
Parameters
pdg- pdg code hypotesis
Returns
4d-momentum of track. If pdg is not found - exeption should be thrown.

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const Track & that,
const Track & other )
friend

Compares 2 tracks

Parameters
that,other- tracks to compare

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