Analysis Software
Documentation for sPHENIX simulation 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.
 
 ~KFParticle_eventReconstruction () override=default
 
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.
 
 ~KFParticle_Tools () override=default
 
KFParticle makeVertex (PHCompositeNode *topNode)
 
std::vector< KFParticlemakeAllPrimaryVertices (PHCompositeNode *topNode, const std::string &vertexMapName)
 
KFParticle makeParticle (PHCompositeNode *topNode)
 Return a KFPTrack from track vector and covariance matrix. No mass or vertex constraints.
 
std::vector< KFParticlemakeAllDaughterParticles (PHCompositeNode *topNode)
 
int getTracksFromVertex (PHCompositeNode *topNode, const KFParticle &vertex, const std::string &vertexMapName)
 
bool isGoodTrack (const KFParticle &particle, const std::vector< KFParticle > &primaryVertices)
 
int calcMinIP (const KFParticle &track, const std::vector< KFParticle > &PVs, float &minimumIP, float &minimumIPchi2)
 
std::vector< int > findAllGoodTracks (std::vector< KFParticle > daughterParticles, const 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, const 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, const std::vector< int > &goodTrackIndex, int num_remaining_tracks)
 
float eventDIRA (const KFParticle &particle, const KFParticle &vertex)
 Calculates the cosine of the angle betweent the flight direction and momentum.
 
float flightDistanceChi2 (const KFParticle &particle, const 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 (const KFParticle &particle)
 
float calculateJT (const KFParticle &mother, const KFParticle &daughter)
 
bool isInRange (float min, float value, float max)
 
bool findParticle (const std::string &particle)
 
int getParticleID (const std::string &particle)
 
float getParticleMass (const std::string &particle)
 
float getParticleMass (const int PDGID)
 
void identify (const KFParticle &particle)
 

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< int > m_num_tracks_from_intermediate
 
std::vector< std::string > m_daughter_name
 
std::vector< int > m_daughter_charge
 
int m_num_tracks = -1
 
bool m_has_intermediates
 
std::vector< std::string > m_intermediate_name
 
std::vector< int > m_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
 
std::vector< float > m_intermediate_vertex_volume
 
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
 
int m_nMVTXHits = 3
 
int m_nTPCHits = 20
 
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_mother_vertex_volume = FLT_MAX
 
float m_mva_cut_value = -1
 
bool m_get_charge_conjugate = true
 
bool m_extrapolateTracksToSV = 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 ()=default
 
virtual ~KFParticle_MVA ()=default
 
std::tuple< TMVA::Reader
*, std::vector< Float_t > > 
initMVA ()
 
Float_t evaluateMVA (TMVA::Reader *reader, std::vector< Float_t > reader_floats, const KFParticle &particle, const 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 47 of file KFParticle_eventReconstruction.cc.

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

KFParticle_eventReconstruction::~KFParticle_eventReconstruction ( )
overridedefault

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 89 of file KFParticle_eventReconstruction.cc.

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

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

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 109 of file KFParticle_eventReconstruction.cc.

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

References KFPMath::a, KFParticle_Tools::appendTracksToIntermediates(), assert, KFPMath::b, parse_cmake_options::begin, Acts::PhysicalConstants::c, KFParticle::Chi2(), KFParticle::Create(), distance(), end, KFParticle_Tools::findNProngs(), KFParticle_Tools::findTwoProngs(), KFParticle_Tools::findUniqueDaughterCombinations(), getCandidateDecay(), KFParticle::GetChi2(), KFParticle_Tools::getCombination(), KFParticle::GetNDF(), KFParticle_Tools::getParticleID(), KFParticle_Tools::getParticleMass(), GetQ(), i, Id(), it, j, k, Acts::UnitConstants::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, KFParticle::NDF(), merge_hashes::p, particles, selectBestCombination(), KFParticleBase::SetId(), KFParticleBase::SetPDG(), and ActsExamples::HepMC3Event::vertices().

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 54 of file KFParticle_eventReconstruction.cc.

View newest version in sPHENIX GitHub at line 54 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 455 of file KFParticle_eventReconstruction.cc.

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

References KFParticle::Chi2(), KFParticle::Create(), KFParticle::NDF(), and KFParticleBase::SetId().

Referenced by createDecay().

+ Here is the call graph for this function:

+ 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 
)
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 425 of file KFParticle_eventReconstruction.cc.

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

References KFParticleBase::GetDeviationFromVertex(), GetDeviationFromVertex(), KFParticle::GetErrMass(), and i.

Referenced by buildChain(), and getCandidateDecay().

+ Here is the call graph for this function:

+ 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: