ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KFParticle_eventReconstruction Class Reference

#include <coresoftware/blob/master/offline/packages/KFParticle_sPHENIX/KFParticle_eventReconstruction.h>

+ Inheritance diagram for KFParticle_eventReconstruction:
+ Collaboration diagram for KFParticle_eventReconstruction:

Public Member Functions

 KFParticle_eventReconstruction ()
 KFParticle constructor.
 
virtual ~KFParticle_eventReconstruction ()
 
void createDecay (PHCompositeNode *topNode, std::vector< KFParticle > &selectedMother, std::vector< KFParticle > &selectedVertex, std::vector< std::vector< KFParticle >> &selectedDaughters, std::vector< std::vector< KFParticle >> &selectedIntermediates, int &nPVs, int &multiplicity)
 
void buildBasicChain (std::vector< KFParticle > &selectedMotherBasic, std::vector< KFParticle > &selectedVertexBasic, std::vector< std::vector< KFParticle >> &selectedDaughtersBasic, const std::vector< KFParticle > &daughterParticlesBasic, const std::vector< int > &goodTrackIndexBasic, const std::vector< KFParticle > &primaryVerticesBasic)
 Used to reconstruct simple decays with no intermediate states.
 
void buildChain (std::vector< KFParticle > &selectedMotherAdv, std::vector< KFParticle > &selectedVertexAdv, std::vector< std::vector< KFParticle >> &selectedDaughtersAdv, std::vector< std::vector< KFParticle >> &selectedIntermediatesAdv, const std::vector< KFParticle > &daughterParticlesAdv, const std::vector< int > &goodTrackIndexAdv, const std::vector< KFParticle > &primaryVerticesAdv)
 Used to reconstruct more complicated decays with up to four intermediate states.
 
void getCandidateDecay (std::vector< KFParticle > &selectedMotherCand, std::vector< KFParticle > &selectedVertexCand, std::vector< std::vector< KFParticle >> &selectedDaughtersCand, std::vector< KFParticle > daughterParticlesCand, std::vector< std::vector< int >> goodTracksThatMeetCand, std::vector< KFParticle > primaryVerticesCand, int n_track_start, int n_track_stop, bool isIntermediate, int intermediateNumber, bool constrainMass)
 Basic building block for event reconstruction and selection.
 
int selectBestCombination (bool PVconstraint, bool isAnInterMother, std::vector< KFParticle > possibleCandidates, std::vector< KFParticle > possibleVertex)
 Method to chose best candidate from a selection of common SV's.
 
KFParticle createFakePV ()
 
- Public Member Functions inherited from KFParticle_Tools
 KFParticle_Tools ()
 KFParticle constructor.
 
virtual ~KFParticle_Tools ()
 
KFParticle makeVertex (PHCompositeNode *topNode)
 
std::vector< KFParticle > makeAllPrimaryVertices (PHCompositeNode *topNode, std::string vertexMapName)
 
KFParticle makeParticle (PHCompositeNode *topNode)
 Return a KFPTrack from track vector and covariance matrix. No mass or vertex constraints.
 
std::vector< KFParticle > makeAllDaughterParticles (PHCompositeNode *topNode)
 
int getTracksFromVertex (PHCompositeNode *topNode, KFParticle vertex, std::string vertexMapName)
 
bool isGoodTrack (KFParticle particle, const std::vector< KFParticle > primaryVertices)
 
int calcMinIP (KFParticle track, std::vector< KFParticle > PVs, float &minimumIP, float &minimumIPchi2)
 
std::vector< intfindAllGoodTracks (std::vector< KFParticle > daughterParticles, std::vector< KFParticle > primaryVertices)
 
std::vector< std::vector< int > > findTwoProngs (std::vector< KFParticle > daughterParticles, std::vector< int > goodTrackIndex, int nTracks)
 
std::vector< std::vector< int > > findNProngs (std::vector< KFParticle > daughterParticles, std::vector< int > goodTrackIndex, std::vector< std::vector< int >> goodTracksThatMeet, int nRequiredTracks, unsigned int nProngs)
 
std::vector< std::vector< int > > appendTracksToIntermediates (KFParticle intermediateResonances[], std::vector< KFParticle > daughterParticles, std::vector< int > goodTrackIndex, int num_remaining_tracks)
 
float eventDIRA (KFParticle particle, KFParticle vertex)
 Calculates the cosine of the angle betweent the flight direction and momentum.
 
float flightDistanceChi2 (KFParticle particle, KFParticle vertex)
 
std::tuple< KFParticle, bool > buildMother (KFParticle vDaughters[], std::string daughterOrder[], bool isIntermediate, int intermediateNumber, int nTracks, bool constrainMass, float required_vertexID)
 
void constrainToVertex (KFParticle &particle, bool &goodCandidate, KFParticle &vertex)
 
std::tuple< KFParticle, bool > getCombination (KFParticle vDaughters[], std::string daughterOrder[], KFParticle vertex, bool constrain_to_vertex, bool isIntermediate, int intermediateNumber, int nTracks, bool constrainMass, float required_vertexID)
 
std::vector< std::vector
< std::string > > 
findUniqueDaughterCombinations (int start, int end)
 
double calculateEllipsoidRadius (int posOrNeg, double sigma_ii, double sigma_jj, double sigma_ij)
 
float calculateEllipsoidVolume (KFParticle particle)
 
float calculateJT (KFParticle mother, KFParticle daughter)
 
bool isInRange (float min, float value, float max)
 
void identify (KFParticle particle)
 
- Public Member Functions inherited from KFParticle_particleList
 KFParticle_particleList ()
 
virtual ~KFParticle_particleList ()
 
std::map< std::string,
particle_pair
getParticleList ()
 
float returnPDGMass (const int pdgIndex)
 Return mother masses from KFParticleDatabase ( pdg.lbl.gov/2019/reviews/rpp2019-rev-monte-carlo-numbering.pdf )
 

Protected Attributes

bool m_constrain_to_vertex
 
bool m_constrain_int_mass
 
bool m_use_fake_pv
 
- Protected Attributes inherited from KFParticle_Tools
std::string m_mother_name_Tools
 
int m_num_intermediate_states = -1
 
std::vector< intm_num_tracks_from_intermediate
 
std::vector< std::string > m_daughter_name
 
std::vector< intm_daughter_charge
 
int m_num_tracks = -1
 
bool m_has_intermediates
 
std::vector< std::string > m_intermediate_name
 
std::vector< intm_intermediate_charge
 
std::vector< std::pair< float,
float > > 
m_intermediate_mass_range
 
std::vector< float > m_intermediate_min_pt
 
std::vector< float > m_intermediate_min_dira
 
std::vector< float > m_intermediate_min_fdchi2
 
std::vector< float > m_intermediate_min_ip
 
std::vector< float > m_intermediate_max_ip
 
std::vector< float > m_intermediate_min_ipchi2
 
std::vector< float > m_intermediate_max_ipchi2
 
float m_min_mass = -1
 
float m_max_mass = -1
 
float m_min_decayTime = -1
 
float m_max_decayTime = FLT_MAX
 
float m_min_decayLength = -1
 
float m_max_decayLength = FLT_MAX
 
float m_track_pt = -1
 
float m_track_ptchi2 = FLT_MAX
 
float m_track_ip = -1
 
float m_track_ipchi2 = -1
 
float m_track_chi2ndof = FLT_MAX
 
float m_comb_DCA = FLT_MAX
 
float m_vertex_chi2ndof = FLT_MAX
 
float m_fdchi2 = -1
 
float m_dira_min = -1
 
float m_dira_max = 1
 
float m_mother_pt = -1
 
float m_mother_ipchi2 = FLT_MAX
 
float m_mva_cut_value = -1
 
bool m_get_charge_conjugate = true
 
bool m_allowZeroMassTracks = false
 
std::string m_vtx_map_node_name
 
std::string m_trk_map_node_name
 
SvtxVertexMapm_dst_vertexmap = nullptr
 
SvtxTrackMapm_dst_trackmap = nullptr
 
SvtxVertexm_dst_vertex = nullptr
 
SvtxTrackm_dst_track = nullptr
 

Additional Inherited Members

- Protected Member Functions inherited from KFParticle_MVA
 KFParticle_MVA ()
 
virtual ~KFParticle_MVA ()
 
std::tuple< TMVA::Reader
*, std::vector< Float_t > > 
initMVA ()
 
Float_t evaluateMVA (TMVA::Reader *reader, std::vector< Float_t > reader_floats, KFParticle particle, KFPVertex vertex)
 

Detailed Description

Definition at line 33 of file KFParticle_eventReconstruction.h.

View newest version in sPHENIX GitHub at line 33 of file KFParticle_eventReconstruction.h

Constructor & Destructor Documentation

KFParticle_eventReconstruction::KFParticle_eventReconstruction ( )

KFParticle constructor.

Definition at line 48 of file KFParticle_eventReconstruction.cc.

View newest version in sPHENIX GitHub at line 48 of file KFParticle_eventReconstruction.cc

virtual KFParticle_eventReconstruction::~KFParticle_eventReconstruction ( )
inlinevirtual

Definition at line 38 of file KFParticle_eventReconstruction.h.

View newest version in sPHENIX GitHub at line 38 of file KFParticle_eventReconstruction.h

Member Function Documentation

void KFParticle_eventReconstruction::buildBasicChain ( std::vector< KFParticle > &  selectedMotherBasic,
std::vector< KFParticle > &  selectedVertexBasic,
std::vector< std::vector< KFParticle >> &  selectedDaughtersBasic,
const std::vector< KFParticle > &  daughterParticlesBasic,
const std::vector< int > &  goodTrackIndexBasic,
const std::vector< KFParticle > &  primaryVerticesBasic 
)

Used to reconstruct simple decays with no intermediate states.

Definition at line 83 of file KFParticle_eventReconstruction.cc.

View newest version in sPHENIX GitHub at line 83 of file KFParticle_eventReconstruction.cc

References KFParticle_Tools::findNProngs(), KFParticle_Tools::findTwoProngs(), getCandidateDecay(), and KFParticle_Tools::m_num_tracks.

Referenced by createDecay().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KFParticle_eventReconstruction::buildChain ( std::vector< KFParticle > &  selectedMotherAdv,
std::vector< KFParticle > &  selectedVertexAdv,
std::vector< std::vector< KFParticle >> &  selectedDaughtersAdv,
std::vector< std::vector< KFParticle >> &  selectedIntermediatesAdv,
const std::vector< KFParticle > &  daughterParticlesAdv,
const std::vector< int > &  goodTrackIndexAdv,
const std::vector< KFParticle > &  primaryVerticesAdv 
)

Used to reconstruct more complicated decays with up to four intermediate states.

Definition at line 100 of file KFParticle_eventReconstruction.cc.

View newest version in sPHENIX GitHub at line 100 of file KFParticle_eventReconstruction.cc

References a, KFParticle_Tools::appendTracksToIntermediates(), b, c, clear(), d, KFParticle_Tools::findNProngs(), KFParticle_Tools::findTwoProngs(), KFParticle_Tools::findUniqueDaughterCombinations(), getCandidateDecay(), KFParticle_Tools::getCombination(), if(), it, k, m, m_constrain_int_mass, m_constrain_to_vertex, KFParticle_Tools::m_daughter_charge, KFParticle_Tools::m_daughter_name, KFParticle_Tools::m_intermediate_charge, KFParticle_Tools::m_intermediate_name, KFParticle_Tools::m_num_intermediate_states, KFParticle_Tools::m_num_tracks, KFParticle_Tools::m_num_tracks_from_intermediate, n, second, and selectBestCombination().

Referenced by createDecay().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void KFParticle_eventReconstruction::createDecay ( PHCompositeNode topNode,
std::vector< KFParticle > &  selectedMother,
std::vector< KFParticle > &  selectedVertex,
std::vector< std::vector< KFParticle >> &  selectedDaughters,
std::vector< std::vector< KFParticle >> &  selectedIntermediates,
int nPVs,
int multiplicity 
)

Starts the reconstruction chain

Parameters
selectedMotherInput a vector and it will be filled with any mother candidates
selectedVertexInput a vector and it will be filled with the production vertex associated to your mother
selectedDaughtersInput a vector and it will be filled with any tracks associated to your mother
selectedIntermediatesInput a vector and it will be filled with any intermediate states associated to your mother

Definition at line 55 of file KFParticle_eventReconstruction.cc.

View newest version in sPHENIX GitHub at line 55 of file KFParticle_eventReconstruction.cc

References buildBasicChain(), buildChain(), createFakePV(), KFParticle_Tools::findAllGoodTracks(), KFParticle_Tools::m_has_intermediates, m_use_fake_pv, KFParticle_Tools::m_vtx_map_node_name, KFParticle_Tools::makeAllDaughterParticles(), and KFParticle_Tools::makeAllPrimaryVertices().

Referenced by KFParticle_sPHENIX::process_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

KFParticle KFParticle_eventReconstruction::createFakePV ( )

Definition at line 395 of file KFParticle_eventReconstruction.cc.

View newest version in sPHENIX GitHub at line 395 of file KFParticle_eventReconstruction.cc

Referenced by createDecay().

+ Here is the caller graph for this function:

void KFParticle_eventReconstruction::getCandidateDecay ( std::vector< KFParticle > &  selectedMotherCand,
std::vector< KFParticle > &  selectedVertexCand,
std::vector< std::vector< KFParticle >> &  selectedDaughtersCand,
std::vector< KFParticle >  daughterParticlesCand,
std::vector< std::vector< int >>  goodTracksThatMeetCand,
std::vector< KFParticle >  primaryVerticesCand,
int  n_track_start,
int  n_track_stop,
bool  isIntermediate,
int  intermediateNumber,
bool  constrainMass 
)

Basic building block for event reconstruction and selection.

Definition at line 281 of file KFParticle_eventReconstruction.cc.

View newest version in sPHENIX GitHub at line 281 of file KFParticle_eventReconstruction.cc

References KFParticle_Tools::calcMinIP(), clear(), KFParticle_Tools::findUniqueDaughterCombinations(), for(), KFParticle_Tools::getCombination(), KFParticle_Tools::isInRange(), m_constrain_to_vertex, KFParticle_Tools::m_daughter_charge, KFParticle_Tools::m_daughter_name, KFParticle_Tools::m_intermediate_max_ip, KFParticle_Tools::m_intermediate_max_ipchi2, KFParticle_Tools::m_intermediate_min_ip, KFParticle_Tools::m_intermediate_min_ipchi2, second, and selectBestCombination().

Referenced by buildBasicChain(), and buildChain().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int KFParticle_eventReconstruction::selectBestCombination ( bool  PVconstraint,
bool  isAnInterMother,
std::vector< KFParticle >  possibleCandidates,
std::vector< KFParticle >  possibleVertex 
)

Method to chose best candidate from a selection of common SV's.

Definition at line 365 of file KFParticle_eventReconstruction.cc.

View newest version in sPHENIX GitHub at line 365 of file KFParticle_eventReconstruction.cc

Referenced by buildChain(), and getCandidateDecay().

+ Here is the caller graph for this function:

Member Data Documentation

bool KFParticle_eventReconstruction::m_constrain_int_mass
protected

Definition at line 89 of file KFParticle_eventReconstruction.h.

View newest version in sPHENIX GitHub at line 89 of file KFParticle_eventReconstruction.h

Referenced by buildChain(), and KFParticle_sPHENIX::constrainIntermediateMasses().

bool KFParticle_eventReconstruction::m_constrain_to_vertex
protected

Definition at line 88 of file KFParticle_eventReconstruction.h.

View newest version in sPHENIX GitHub at line 88 of file KFParticle_eventReconstruction.h

Referenced by buildChain(), KFParticle_sPHENIX::constrainToPrimaryVertex(), and getCandidateDecay().

bool KFParticle_eventReconstruction::m_use_fake_pv
protected

Definition at line 90 of file KFParticle_eventReconstruction.h.

View newest version in sPHENIX GitHub at line 90 of file KFParticle_eventReconstruction.h

Referenced by createDecay(), KFParticle_sPHENIX::process_event(), and KFParticle_sPHENIX::useFakePrimaryVertex().


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