Project
Loading...
Searching...
No Matches
o2::mcutils::MCTrackNavigator Class Reference

#include <MCUtils.h>

Public Member Functions

 ClassDefNV (MCTrackNavigator, 1)
 

Static Public Member Functions

static bool isPhysicalPrimary (o2::MCTrack const &p, std::vector< o2::MCTrack > const &pcontainer)
 
static bool isKeepPhysics (o2::MCTrack const &p, std::vector< o2::MCTrack > const &pcontainer)
 
static bool isFromPrimaryDecayChain (o2::MCTrack const &p, std::vector< o2::MCTrack > const &pcontainer)
 
static o2::MCTrack const & getFirstPrimary (o2::MCTrack const &p, std::vector< o2::MCTrack > const &pcontainer)
 
static o2::MCTrack const * getMother (o2::MCTrack const &p, std::vector< o2::MCTrack > const &pcontainer)
 Given an MCTrack p; Return it's direct mother or nullptr. (we follow only first mother)
 
static o2::MCTrack const * getDaughter (o2::MCTrack const &p, std::vector< o2::MCTrack > const &pcontainer)
 Given an MCTrack p; Return it's direct daughter or nullptr. (we follow only first daughter)
 
static o2::MCTrack const * getDaughter0 (o2::MCTrack const &p, std::vector< o2::MCTrack > const &pcontainer)
 Given an MCTrack p; Return it's first direct daughter or nullptr.
 
static o2::MCTrack const * getDaughter1 (o2::MCTrack const &p, std::vector< o2::MCTrack > const &pcontainer)
 Given an MCTrack p; Return it's second direct daughter or nullptr.
 

Detailed Description

A couple of functions to query on MC tracks ( that needs navigation within the global container of available tracks. It is a class so as to make it available for interactive ROOT more easily.

Definition at line 32 of file MCUtils.h.

Member Function Documentation

◆ ClassDefNV()

o2::mcutils::MCTrackNavigator::ClassDefNV ( MCTrackNavigator  ,
 
)

Given an MCTrack p; Fill the complete parent chain (ancestorchain) up to the most fundamental particle (follow only first mothers). query if a track is a direct or indirect daughter of a parentID if trackid is same as parentid it returns true bool isTrackDaughterOf(int /*trackid*‍/, int /*parentid*‍/) const; we can think about offering some visitor like patterns executing a user hook on nodes

◆ getDaughter()

o2::MCTrack const * o2::mcutils::MCTrackNavigator::getDaughter ( o2::MCTrack const &  p,
std::vector< o2::MCTrack > const &  pcontainer 
)
static

Given an MCTrack p; Return it's direct daughter or nullptr. (we follow only first daughter)

Definition at line 31 of file MCUtils.cxx.

◆ getDaughter0()

o2::MCTrack const * o2::mcutils::MCTrackNavigator::getDaughter0 ( o2::MCTrack const &  p,
std::vector< o2::MCTrack > const &  pcontainer 
)
static

Given an MCTrack p; Return it's first direct daughter or nullptr.

Definition at line 40 of file MCUtils.cxx.

◆ getDaughter1()

o2::MCTrack const * o2::mcutils::MCTrackNavigator::getDaughter1 ( o2::MCTrack const &  p,
std::vector< o2::MCTrack > const &  pcontainer 
)
static

Given an MCTrack p; Return it's second direct daughter or nullptr.

Definition at line 49 of file MCUtils.cxx.

◆ getFirstPrimary()

o2::MCTrack const & o2::mcutils::MCTrackNavigator::getFirstPrimary ( o2::MCTrack const &  p,
std::vector< o2::MCTrack > const &  pcontainer 
)
static

Given an MCTrack p; Return the first primary mother particle in the upward parent chain (follow only first mothers). The first primary mother may have further parent (put by the generator). Return p itself if p is a primary.

Definition at line 58 of file MCUtils.cxx.

◆ getMother()

o2::MCTrack const * o2::mcutils::MCTrackNavigator::getMother ( o2::MCTrack const &  p,
std::vector< o2::MCTrack > const &  pcontainer 
)
static

Given an MCTrack p; Return it's direct mother or nullptr. (we follow only first mother)

Definition at line 22 of file MCUtils.cxx.

◆ isFromPrimaryDecayChain()

bool o2::mcutils::MCTrackNavigator::isFromPrimaryDecayChain ( o2::MCTrack const &  p,
std::vector< o2::MCTrack > const &  pcontainer 
)
static

check if the particle is from the decay chain of a primary particle

check if from decay

check if mother is primary

else check if mother is from primary decay

Definition at line 171 of file MCUtils.cxx.

◆ isKeepPhysics()

bool o2::mcutils::MCTrackNavigator::isKeepPhysics ( o2::MCTrack const &  p,
std::vector< o2::MCTrack > const &  pcontainer 
)
static

return true of particle is to be kept for physics analysis in any case (follows logic used in particle stack class

check if the particle is from pair production from a particle belonging to the primary decay chain

check if from pair production

else check if mother is from primary decay

Definition at line 189 of file MCUtils.cxx.

◆ isPhysicalPrimary()

bool o2::mcutils::MCTrackNavigator::isPhysicalPrimary ( o2::MCTrack const &  p,
std::vector< o2::MCTrack > const &  pcontainer 
)
static

Function to determine if a MC track/particle p is a primary according to physics criteria. Needs the particle as input, as well as the whole navigable container of particles (of which p needs to be a part itself). The container can be fetched via MCKinematicsReader.

Definition at line 73 of file MCUtils.cxx.


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