Project
Loading...
Searching...
No Matches
o2::MCTrackT< _T > Class Template Reference

#include <MCTrack.h>

Public Member Functions

 MCTrackT ()
 Default constructor.
 
 MCTrackT (Int_t pdgCode, Int_t motherID, Int_t secondMotherID, Int_t firstDaughterID, Int_t lastDaughterID, Double_t px, Double_t py, Double_t pz, Double_t x, Double_t y, Double_t z, Double_t t, Int_t nPoints)
 Standard constructor.
 
 MCTrackT (const MCTrackT &track)=default
 Copy constructor.
 
 MCTrackT (const TParticle &particle)
 Constructor from TParticle.
 
 ~MCTrackT ()=default
 Destructor.
 
void Print (Int_t iTrack=0) const
 Output to screen.
 
Int_t GetPdgCode () const
 Accessors.
 
Int_t getMotherTrackId () const
 
Int_t getSecondMotherTrackId () const
 
bool isPrimary () const
 
bool isSecondary () const
 
Int_t getFirstDaughterTrackId () const
 
Int_t getLastDaughterTrackId () const
 
Double_t GetStartVertexMomentumX () const
 
Double_t GetStartVertexMomentumY () const
 
Double_t GetStartVertexMomentumZ () const
 
Double_t GetStartVertexCoordinatesX () const
 
Double_t GetStartVertexCoordinatesY () const
 
Double_t GetStartVertexCoordinatesZ () const
 
Double_t GetStartVertexCoordinatesT () const
 
Double_t R2 () const
 production radius squared
 
Double_t R () const
 production radius
 
Double_t GetMass () const
 return mass from PDG Database if known (print message in case cannot look up)
 
_T getWeight () const
 return particle weight
 
Double_t GetEnergy () const
 
Double_t Px () const
 
Double_t Py () const
 
Double_t Pz () const
 
Double_t Vx () const
 
Double_t Vy () const
 
Double_t Vz () const
 
Double_t T () const
 
Double_t GetPt () const
 
Double_t GetP () const
 
Double_t GetPhi () const
 
Double_t GetEta () const
 
Double_t GetTgl () const
 
Double_t GetTheta () const
 
Double_t GetRapidity () const
 
void GetMomentum (TVector3 &momentum) const
 
void Get4Momentum (TLorentzVector &momentum) const
 
void GetStartVertex (TVector3 &vertex) const
 
Int_t getHitMask () const
 Accessors to the hit mask.
 
void setHitMask (Int_t m)
 
void SetMotherTrackId (Int_t id)
 Modifiers.
 
void SetSecondMotherTrackId (Int_t id)
 
void SetFirstDaughterTrackId (Int_t id)
 
void SetLastDaughterTrackId (Int_t id)
 
void setHit (Int_t iDetBit)
 
bool leftTraceGivenBitField (int bit) const
 
bool leftTrace (Int_t iDet, std::vector< int > const &detIDtoBit) const
 
int getNumDet () const
 
void setStore (bool f)
 
bool getStore () const
 
bool hasHits () const
 determine if this track has hits
 
void setProcess (int proc)
 set process property
 
int getProcess () const
 get the production process (id) of this track
 
o2::mcgenstatus::MCGenStatusEncoding getStatusCode () const
 get generator status code
 
void setToBeDone (bool f)
 
bool getToBeDone () const
 
void setInhibited (bool f)
 
bool getInhibited () const
 
bool isTransported () const
 
const chargetProdProcessAsString () const
 get the string representation of the production process
 

Static Public Attributes

static constexpr int NHITBITS = 22
 

Detailed Description

template<class _T>
class o2::MCTrackT< _T >

Data class for storing Monte Carlo tracks processed by the Stack. An MCTrack can be a primary track put into the simulation or a secondary one produced by the transport through decay or interaction. This is a light weight particle class that is saved to disk instead of saving the TParticle class. It is also used for filtering the stack

Definition at line 46 of file MCTrack.h.

Constructor & Destructor Documentation

◆ MCTrackT() [1/4]

template<typename T >
o2::MCTrackT< T >::MCTrackT ( )
inline

Default constructor.

Definition at line 332 of file MCTrack.h.

◆ MCTrackT() [2/4]

template<typename T >
o2::MCTrackT< T >::MCTrackT ( Int_t  pdgCode,
Int_t  motherID,
Int_t  secondMotherID,
Int_t  firstDaughterID,
Int_t  lastDaughterID,
Double_t  px,
Double_t  py,
Double_t  pz,
Double_t  x,
Double_t  y,
Double_t  z,
Double_t  t,
Int_t  nPoints 
)
inline

Standard constructor.

Definition at line 351 of file MCTrack.h.

◆ MCTrackT() [3/4]

template<class _T >
o2::MCTrackT< _T >::MCTrackT ( const MCTrackT< _T > &  track)
default

Copy constructor.

◆ MCTrackT() [4/4]

template<typename T >
o2::MCTrackT< T >::MCTrackT ( const TParticle &  particle)
inline

Constructor from TParticle.

Definition at line 372 of file MCTrack.h.

◆ ~MCTrackT()

template<class _T >
o2::MCTrackT< _T >::~MCTrackT ( )
default

Destructor.

Member Function Documentation

◆ Get4Momentum()

template<typename T >
void o2::MCTrackT< T >::Get4Momentum ( TLorentzVector &  momentum) const
inline

Definition at line 320 of file MCTrack.h.

◆ GetEnergy()

template<typename T >
Double_t o2::MCTrackT< T >::GetEnergy ( ) const
inline

Definition at line 304 of file MCTrack.h.

◆ GetEta()

template<class _T >
Double_t o2::MCTrackT< _T >::GetEta ( ) const
inline

Definition at line 131 of file MCTrack.h.

◆ getFirstDaughterTrackId()

template<class _T >
Int_t o2::MCTrackT< _T >::getFirstDaughterTrackId ( ) const
inline

Definition at line 77 of file MCTrack.h.

◆ getHitMask()

template<class _T >
Int_t o2::MCTrackT< _T >::getHitMask ( ) const
inline

Accessors to the hit mask.

Definition at line 163 of file MCTrack.h.

◆ getInhibited()

template<class _T >
bool o2::MCTrackT< _T >::getInhibited ( ) const
inline

Definition at line 249 of file MCTrack.h.

◆ getLastDaughterTrackId()

template<class _T >
Int_t o2::MCTrackT< _T >::getLastDaughterTrackId ( ) const
inline

Definition at line 78 of file MCTrack.h.

◆ GetMass()

template<typename T >
Double_t o2::MCTrackT< T >::GetMass ( ) const
inline

return mass from PDG Database if known (print message in case cannot look up)

Definition at line 413 of file MCTrack.h.

◆ GetMomentum()

template<typename T >
void o2::MCTrackT< T >::GetMomentum ( TVector3 &  momentum) const
inline

Definition at line 314 of file MCTrack.h.

◆ getMotherTrackId()

template<class _T >
Int_t o2::MCTrackT< _T >::getMotherTrackId ( ) const
inline

Definition at line 73 of file MCTrack.h.

◆ getNumDet()

template<class _T >
int o2::MCTrackT< _T >::getNumDet ( ) const
inline

Definition at line 199 of file MCTrack.h.

◆ GetP()

template<class _T >
Double_t o2::MCTrackT< _T >::GetP ( ) const
inline

Definition at line 116 of file MCTrack.h.

◆ GetPdgCode()

template<class _T >
Int_t o2::MCTrackT< _T >::GetPdgCode ( ) const
inline

Accessors.

Definition at line 72 of file MCTrack.h.

◆ GetPhi()

template<class _T >
Double_t o2::MCTrackT< _T >::GetPhi ( ) const
inline

Definition at line 124 of file MCTrack.h.

◆ getProcess()

template<class _T >
int o2::MCTrackT< _T >::getProcess ( ) const
inline

get the production process (id) of this track

Definition at line 230 of file MCTrack.h.

◆ getProdProcessAsString()

template<typename T >
const char * o2::MCTrackT< T >::getProdProcessAsString ( ) const
inline

get the string representation of the production process

Definition at line 434 of file MCTrack.h.

◆ GetPt()

template<class _T >
Double_t o2::MCTrackT< _T >::GetPt ( ) const
inline

Definition at line 109 of file MCTrack.h.

◆ GetRapidity()

template<typename T >
Double_t o2::MCTrackT< T >::GetRapidity ( ) const
inline

Definition at line 425 of file MCTrack.h.

◆ getSecondMotherTrackId()

template<class _T >
Int_t o2::MCTrackT< _T >::getSecondMotherTrackId ( ) const
inline

Definition at line 74 of file MCTrack.h.

◆ GetStartVertex()

template<typename T >
void o2::MCTrackT< T >::GetStartVertex ( TVector3 &  vertex) const
inline

Definition at line 326 of file MCTrack.h.

◆ GetStartVertexCoordinatesT()

template<class _T >
Double_t o2::MCTrackT< _T >::GetStartVertexCoordinatesT ( ) const
inline

Definition at line 85 of file MCTrack.h.

◆ GetStartVertexCoordinatesX()

template<class _T >
Double_t o2::MCTrackT< _T >::GetStartVertexCoordinatesX ( ) const
inline

Definition at line 82 of file MCTrack.h.

◆ GetStartVertexCoordinatesY()

template<class _T >
Double_t o2::MCTrackT< _T >::GetStartVertexCoordinatesY ( ) const
inline

Definition at line 83 of file MCTrack.h.

◆ GetStartVertexCoordinatesZ()

template<class _T >
Double_t o2::MCTrackT< _T >::GetStartVertexCoordinatesZ ( ) const
inline

Definition at line 84 of file MCTrack.h.

◆ GetStartVertexMomentumX()

template<class _T >
Double_t o2::MCTrackT< _T >::GetStartVertexMomentumX ( ) const
inline

Definition at line 79 of file MCTrack.h.

◆ GetStartVertexMomentumY()

template<class _T >
Double_t o2::MCTrackT< _T >::GetStartVertexMomentumY ( ) const
inline

Definition at line 80 of file MCTrack.h.

◆ GetStartVertexMomentumZ()

template<class _T >
Double_t o2::MCTrackT< _T >::GetStartVertexMomentumZ ( ) const
inline

Definition at line 81 of file MCTrack.h.

◆ getStatusCode()

template<class _T >
o2::mcgenstatus::MCGenStatusEncoding o2::MCTrackT< _T >::getStatusCode ( ) const
inline

get generator status code

Definition at line 233 of file MCTrack.h.

◆ getStore()

template<class _T >
bool o2::MCTrackT< _T >::getStore ( ) const
inline

Definition at line 218 of file MCTrack.h.

◆ GetTgl()

template<class _T >
Double_t o2::MCTrackT< _T >::GetTgl ( ) const
inline

Definition at line 142 of file MCTrack.h.

◆ GetTheta()

template<class _T >
Double_t o2::MCTrackT< _T >::GetTheta ( ) const
inline

Definition at line 148 of file MCTrack.h.

◆ getToBeDone()

template<class _T >
bool o2::MCTrackT< _T >::getToBeDone ( ) const
inline

Definition at line 241 of file MCTrack.h.

◆ getWeight()

template<class _T >
_T o2::MCTrackT< _T >::getWeight ( ) const
inline

return particle weight

Definition at line 96 of file MCTrack.h.

◆ hasHits()

template<class _T >
bool o2::MCTrackT< _T >::hasHits ( ) const
inline

determine if this track has hits

Definition at line 220 of file MCTrack.h.

◆ isPrimary()

template<class _T >
bool o2::MCTrackT< _T >::isPrimary ( ) const
inline

Definition at line 75 of file MCTrack.h.

◆ isSecondary()

template<class _T >
bool o2::MCTrackT< _T >::isSecondary ( ) const
inline

Definition at line 76 of file MCTrack.h.

◆ isTransported()

template<class _T >
bool o2::MCTrackT< _T >::isTransported ( ) const
inline

Definition at line 251 of file MCTrack.h.

◆ leftTrace()

template<class _T >
bool o2::MCTrackT< _T >::leftTrace ( Int_t  iDet,
std::vector< int > const &  detIDtoBit 
) const
inline

Returns of detector with DetID iDet has seen this track. Needs lookup table detIDToBit mapping detectorIDs to bitfields (which is persistified in MCEventHeaders).

Definition at line 189 of file MCTrack.h.

◆ leftTraceGivenBitField()

template<class _T >
bool o2::MCTrackT< _T >::leftTraceGivenBitField ( int  bit) const
inline

Definition at line 182 of file MCTrack.h.

◆ Print()

template<typename T >
void o2::MCTrackT< T >::Print ( Int_t  iTrack = 0) const
inline

Output to screen.

Definition at line 405 of file MCTrack.h.

◆ Px()

template<class _T >
Double_t o2::MCTrackT< _T >::Px ( ) const
inline

Definition at line 101 of file MCTrack.h.

◆ Py()

template<class _T >
Double_t o2::MCTrackT< _T >::Py ( ) const
inline

Definition at line 102 of file MCTrack.h.

◆ Pz()

template<class _T >
Double_t o2::MCTrackT< _T >::Pz ( ) const
inline

Definition at line 103 of file MCTrack.h.

◆ R()

template<class _T >
Double_t o2::MCTrackT< _T >::R ( ) const
inline

production radius

Definition at line 90 of file MCTrack.h.

◆ R2()

template<class _T >
Double_t o2::MCTrackT< _T >::R2 ( ) const
inline

production radius squared

Definition at line 88 of file MCTrack.h.

◆ SetFirstDaughterTrackId()

template<class _T >
void o2::MCTrackT< _T >::SetFirstDaughterTrackId ( Int_t  id)
inline

Definition at line 168 of file MCTrack.h.

◆ setHit()

template<class _T >
void o2::MCTrackT< _T >::setHit ( Int_t  iDetBit)
inline

Definition at line 174 of file MCTrack.h.

◆ setHitMask()

template<class _T >
void o2::MCTrackT< _T >::setHitMask ( Int_t  m)
inline

Definition at line 164 of file MCTrack.h.

◆ setInhibited()

template<class _T >
void o2::MCTrackT< _T >::setInhibited ( bool  f)
inline

Definition at line 243 of file MCTrack.h.

◆ SetLastDaughterTrackId()

template<class _T >
void o2::MCTrackT< _T >::SetLastDaughterTrackId ( Int_t  id)
inline

Definition at line 169 of file MCTrack.h.

◆ SetMotherTrackId()

template<class _T >
void o2::MCTrackT< _T >::SetMotherTrackId ( Int_t  id)
inline

Modifiers.

Definition at line 166 of file MCTrack.h.

◆ setProcess()

template<class _T >
void o2::MCTrackT< _T >::setProcess ( int  proc)
inline

set process property

Definition at line 222 of file MCTrack.h.

◆ SetSecondMotherTrackId()

template<class _T >
void o2::MCTrackT< _T >::SetSecondMotherTrackId ( Int_t  id)
inline

Definition at line 167 of file MCTrack.h.

◆ setStore()

template<class _T >
void o2::MCTrackT< _T >::setStore ( bool  f)
inline

Definition at line 212 of file MCTrack.h.

◆ setToBeDone()

template<class _T >
void o2::MCTrackT< _T >::setToBeDone ( bool  f)
inline

Definition at line 235 of file MCTrack.h.

◆ T()

template<class _T >
Double_t o2::MCTrackT< _T >::T ( ) const
inline

Definition at line 107 of file MCTrack.h.

◆ Vx()

template<class _T >
Double_t o2::MCTrackT< _T >::Vx ( ) const
inline

Definition at line 104 of file MCTrack.h.

◆ Vy()

template<class _T >
Double_t o2::MCTrackT< _T >::Vy ( ) const
inline

Definition at line 105 of file MCTrack.h.

◆ Vz()

template<class _T >
Double_t o2::MCTrackT< _T >::Vz ( ) const
inline

Definition at line 106 of file MCTrack.h.

Member Data Documentation

◆ NHITBITS

template<class _T >
constexpr int o2::MCTrackT< _T >::NHITBITS = 22
staticconstexpr

Definition at line 49 of file MCTrack.h.


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