Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KFMCParticle Class Reference

A class to store relations between mother and daughter Monte Carlo simulated particles. More...

#include <KFParticle/blob/master/KFParticlePerformance/KFMCParticle.h>

+ Inheritance diagram for KFMCParticle:
+ Collaboration diagram for KFMCParticle:

Public Member Functions

 KFMCParticle ()
 
 ~KFMCParticle ()
 
void AddDaughter (int i)
 Adds an Id of the new particle to the list with Ids of daughter particles.
 
int NDaughters () const
 Returns number of daughter particles.
 
const std::vector< int > & GetDaughterIds () const
 Returns a reference to the vector with Id of daughter particle KFMCParticle::fDaughterIds.
 
void CleanDaughters ()
 Remove Ids of all daughter particles from the current object.
 
void SetPDG (int pdg)
 Set the PDG code of the current particle KFMCParticle::fPDG.
 
void SetMCTrackID (int id)
 Sets the Id of the corresponding Monte Carlo track KFMCParticle::fMCTrackID.
 
void SetMotherId (int id)
 Sets the Id of the mother particle or primary vertex KFMCParticle::fMotherId.
 
int GetMCTrackID () const
 Returns Id of the corresponding MC track KFMCParticle::fMCTrackID.
 
int GetMotherId () const
 Returns Id of the mother particle or primary vertex KFMCParticle::fMotherId.
 
int GetPDG () const
 Returns PDG code of the current particle KFMCParticle::fPDG.
 
bool IsReconstructable (int i) const
 Returns a flag showing if particle can be reconstructed with KFMCParticle::fIsReconstructable index "i".
 
void SetAsReconstructable (int i)
 Defines the particle as those which should be reconstructed for the efficiency set "i".
 
bool IsReconstructableV0 (int i) const
 Returns a flag showing if particle is a reconstructable V0.
 
void SetAsReconstructableV0 (int i)
 Defines the particle as V0 which should be reconstructed for the efficiency set "i".
 
void SetInitialParticleId (int i)
 Sets Id of the Monte Carlo particle, from which the current particle was copied.
 
int InitialParticleId () const
 Returns the Id of the Monte Carlo particle, from which the current particle was copied.
 

Private Attributes

std::vector< int > fDaughterIds
 A vector with Ids of the daughter Monte Carlo particles.
 
int fMCTrackID
 A unique Id of the corresponding Monte Carlo track.
 
int fMotherId
 A unique Id of the mother particle. If the current particle is primary the Id of the primary vertex with a negative sigh is stored.
 
int fPDG
 A PDG code of the current particle.
 
bool fIsReconstructable [5]
 
bool fIsV0 [3]
 
int fInitialParticleId
 

Detailed Description

A class to store relations between mother and daughter Monte Carlo simulated particles.

Author
M.Zyzak, I.Kisel
Date
05.02.2019
Version
1.0

The class is used to calculate reconstruction efficiency of all Monte Carlo particles. It is simplifies the procedure for short-lived particles. Contains a vector with unique Ids of all MC daughters, a unique Id of the corresponding MC track, a unique Id of the MC mother particle, the PDG code of the MC particle, flags showing if particle can be reconstructed according to several different definitions, flags showing if particle creates a secondary vertex with two or more daughters, an index of the initial particle Id in case of the K->mu+nu and pi-> mu+nu decays, since GEANT engines do not store neutrinos.

Definition at line 48 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 48 of file KFMCParticle.h

Constructor & Destructor Documentation

KFMCParticle::KFMCParticle ( )
KFMCParticle::~KFMCParticle ( )

Definition at line 39 of file KFMCParticle.cxx.

View newest version in sPHENIX GitHub at line 39 of file KFMCParticle.cxx

Member Function Documentation

void KFMCParticle::AddDaughter ( int  i)

Adds an Id of the new particle to the list with Ids of daughter particles.

Definition at line 43 of file KFMCParticle.cxx.

View newest version in sPHENIX GitHub at line 43 of file KFMCParticle.cxx

References fDaughterIds.

void KFMCParticle::CleanDaughters ( )
inline

Remove Ids of all daughter particles from the current object.

Definition at line 57 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 57 of file KFMCParticle.h

References fDaughterIds.

const std::vector<int>& KFMCParticle::GetDaughterIds ( ) const
inline

Returns a reference to the vector with Id of daughter particle KFMCParticle::fDaughterIds.

Definition at line 56 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 56 of file KFMCParticle.h

References fDaughterIds.

int KFMCParticle::GetMCTrackID ( ) const
inline

Returns Id of the corresponding MC track KFMCParticle::fMCTrackID.

Definition at line 63 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 63 of file KFMCParticle.h

References fMCTrackID.

int KFMCParticle::GetMotherId ( ) const
inline

Returns Id of the mother particle or primary vertex KFMCParticle::fMotherId.

Definition at line 64 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 64 of file KFMCParticle.h

References fMotherId.

int KFMCParticle::GetPDG ( ) const
inline

Returns PDG code of the current particle KFMCParticle::fPDG.

Definition at line 65 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 65 of file KFMCParticle.h

References fPDG.

int KFMCParticle::InitialParticleId ( ) const
inline

Returns the Id of the Monte Carlo particle, from which the current particle was copied.

Definition at line 74 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 74 of file KFMCParticle.h

References fInitialParticleId.

bool KFMCParticle::IsReconstructable ( int  i) const
inline

Returns a flag showing if particle can be reconstructed with KFMCParticle::fIsReconstructable index "i".

Definition at line 67 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 67 of file KFMCParticle.h

References fIsReconstructable, and i.

bool KFMCParticle::IsReconstructableV0 ( int  i) const
inline

Returns a flag showing if particle is a reconstructable V0.

Definition at line 70 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 70 of file KFMCParticle.h

References fIsV0, and i.

int KFMCParticle::NDaughters ( ) const
inline

Returns number of daughter particles.

Definition at line 55 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 55 of file KFMCParticle.h

References fDaughterIds.

void KFMCParticle::SetAsReconstructable ( int  i)
inline

Defines the particle as those which should be reconstructed for the efficiency set "i".

Definition at line 68 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 68 of file KFMCParticle.h

References fIsReconstructable, and i.

void KFMCParticle::SetAsReconstructableV0 ( int  i)
inline

Defines the particle as V0 which should be reconstructed for the efficiency set "i".

Definition at line 71 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 71 of file KFMCParticle.h

References fIsV0, and i.

void KFMCParticle::SetInitialParticleId ( int  i)
inline

Sets Id of the Monte Carlo particle, from which the current particle was copied.

Definition at line 73 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 73 of file KFMCParticle.h

References fInitialParticleId, and i.

void KFMCParticle::SetMCTrackID ( int  id)
inline

Sets the Id of the corresponding Monte Carlo track KFMCParticle::fMCTrackID.

Definition at line 60 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 60 of file KFMCParticle.h

References fMCTrackID, and train_ambiguity_solver::id.

void KFMCParticle::SetMotherId ( int  id)
inline

Sets the Id of the mother particle or primary vertex KFMCParticle::fMotherId.

Definition at line 61 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 61 of file KFMCParticle.h

References fMotherId, and train_ambiguity_solver::id.

void KFMCParticle::SetPDG ( int  pdg)
inline

Set the PDG code of the current particle KFMCParticle::fPDG.

Definition at line 59 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 59 of file KFMCParticle.h

References fPDG, and pdg.

Member Data Documentation

std::vector<int> KFMCParticle::fDaughterIds
private

A vector with Ids of the daughter Monte Carlo particles.

Definition at line 76 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 76 of file KFMCParticle.h

Referenced by AddDaughter(), CleanDaughters(), GetDaughterIds(), and NDaughters().

int KFMCParticle::fInitialParticleId
private

For calculation of missing mass method efficiency a copy of the mother particle is created. fInitialParticleId is an Id of the initial mother particle.

Definition at line 105 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 105 of file KFMCParticle.h

Referenced by InitialParticleId(), and SetInitialParticleId().

bool KFMCParticle::fIsReconstructable[5]
private

Flags for calculation of the efficiency, define the denominator in each set of efficiency. Flags 0-2 are used for particles reconstructed by the conventional method, 3 and 4 are used for particles found by the missing mass method:
[0] - true for all particles, is used for calculation of the efficiency in 4pi;
[1] - true if the particle is long-lived and can be reconstructed in the detector or if the particle is short-lived and all its daughter particles can be reconstructed; detector-dependent;
[2] - true if the particle is long-lived and is reconstructed in the detector or if the particle is short-lived and all its daughter particles are reconstructed, is used in calculation of efficiency of the KF Particle Finder method;
[3] - true if the particle is long-lived and is reconstructed in the detector or if the particle is short-lived, can be reconstructed by the missing mass method and all its daughter particles are reconstructed;
[4] - true for all particles, which can be found by the missing mass method, is used for calculation of the efficiency in 4pi.

Definition at line 96 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 96 of file KFMCParticle.h

Referenced by IsReconstructable(), and SetAsReconstructable().

bool KFMCParticle::fIsV0[3]
private

Flags to calculate efficiency of short-lived particles producing a secondary vertex with two or more daughters; similar to KFMCParticle::fIsReconstructable[0-2].

Definition at line 100 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 100 of file KFMCParticle.h

Referenced by IsReconstructableV0(), and SetAsReconstructableV0().

int KFMCParticle::fMCTrackID
private

A unique Id of the corresponding Monte Carlo track.

Definition at line 77 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 77 of file KFMCParticle.h

Referenced by GetMCTrackID(), and SetMCTrackID().

int KFMCParticle::fMotherId
private

A unique Id of the mother particle. If the current particle is primary the Id of the primary vertex with a negative sigh is stored.

Definition at line 78 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 78 of file KFMCParticle.h

Referenced by GetMotherId(), and SetMotherId().

int KFMCParticle::fPDG
private

A PDG code of the current particle.

Definition at line 79 of file KFMCParticle.h.

View newest version in sPHENIX GitHub at line 79 of file KFMCParticle.h

Referenced by GetPDG(), and SetPDG().


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