ATLAS Offline Software
|
#include <TrigInDetTrackTruth.h>
Public Member Functions | |
TrigInDetTrackTruth () | |
Constructors: POOL needs default constructor. More... | |
TrigInDetTrackTruth (const HepMcParticleLink &p_tru_part, TrigIDHitStats hits) | |
initialized constructor: easier way to construct an instance if there is just one true particle associated with a track More... | |
virtual | ~TrigInDetTrackTruth () |
int | addMatch (HepMcParticleLink p_tru_part, TrigIDHitStats hits) |
accessor to fill object: returns index of new entry in vectors More... | |
int | index (HepMcParticleLink &) const |
method to find if a given HepMcParticleLink already exists in "map" and, if so, what is its index; if not found returns -1; relies on HepMcParticleLink overloaded == method (i.e. More... | |
const HepMcParticleLink * | bestMatch () const |
returns best match according to the number of hits More... | |
const HepMcParticleLink * | bestSiMatch () const |
returns best match according to the number of hits More... | |
const HepMcParticleLink * | bestTRTMatch () const |
returns best match according to the number of hits More... | |
const HepMcParticleLink * | truthMatch (unsigned int i) const |
returns matching true particle number i More... | |
unsigned int | nrMatches () const |
returns number of matching particles More... | |
unsigned int | nrCommonHits (unsigned int i) const |
returns number of common hits from true particle i and TrigInDetTrack More... | |
unsigned int | nrCommonSiHits (unsigned int i) const |
returns number of common hits from true particle i and TrigInDetTrack More... | |
unsigned int | nrCommonTRTHits (unsigned int i) const |
returns number of common hits from true particle i and TrigInDetTrack More... | |
unsigned int | nrCommonHitsBestSi () const |
returns total number of common hits from best match true particle and TrigInDetTrack More... | |
unsigned int | nrCommonHitsBestTRT () const |
returns total number of common hits from best match true particle and TrigInDetTrack More... | |
int | updateFamilyTree () |
accessor to fill family tree: for each HepMcParticleLink in the internal vector of HepMC::GenParticles, this method searches for its mother in the same vector. More... | |
const std::vector< std::pair< unsigned int, unsigned int > > & | getFamilyTree () const |
returns copy of family tree "map" More... | |
bool | motherInChain (unsigned int) const |
given index of a GenParticle which matches the track returns true if its mother also matches the track and false if not More... | |
int | motherIndexInChain (unsigned int) const |
given index of a GenParticle which matches the track returns index of its mother, if it also matches the track, or -1 if not More... | |
bool | daughtersInChain (unsigned int) const |
given index of a GenParticle which matches the track returns true if it has stable a daughter which also matches the track and false if not More... | |
std::vector< unsigned int > | daughterIndicesInChain (unsigned int) const |
given index of a GenParticle which matches the track returns vector with indices of its daughters, if they also matches the track, or an empty vector if not More... | |
Private Attributes | |
int | m_best_match_hits |
int | m_best_Si_match_hits |
int | m_best_TRT_match_hits |
std::vector< HepMcParticleLink > | m_true_part_vec |
std::vector< TrigIDHitStats > | m_nr_common_hits |
std::vector< std::pair< unsigned int, unsigned int > > | m_family_tree |
Friends | |
class | TrigInDetTrackTruthCnv_p1 |
class | TrigInDetTrackTruthCnv_p1_test |
Definition at line 36 of file TrigInDetTrackTruth.h.
|
inline |
Constructors: POOL needs default constructor.
Definition at line 56 of file TrigInDetTrackTruth.h.
|
inline |
initialized constructor: easier way to construct an instance if there is just one true particle associated with a track
Definition at line 62 of file TrigInDetTrackTruth.h.
|
inlinevirtual |
Definition at line 77 of file TrigInDetTrackTruth.h.
int TrigInDetTrackTruth::addMatch | ( | HepMcParticleLink | p_tru_part, |
TrigIDHitStats | hits | ||
) |
accessor to fill object: returns index of new entry in vectors
Definition at line 34 of file TrigInDetTrackTruth.cxx.
const HepMcParticleLink * TrigInDetTrackTruth::bestMatch | ( | ) | const |
returns best match according to the number of hits
Definition at line 184 of file TrigInDetTrackTruth.cxx.
const HepMcParticleLink * TrigInDetTrackTruth::bestSiMatch | ( | ) | const |
returns best match according to the number of hits
Definition at line 190 of file TrigInDetTrackTruth.cxx.
const HepMcParticleLink * TrigInDetTrackTruth::bestTRTMatch | ( | ) | const |
returns best match according to the number of hits
Definition at line 196 of file TrigInDetTrackTruth.cxx.
std::vector< unsigned int > TrigInDetTrackTruth::daughterIndicesInChain | ( | unsigned int | mother | ) | const |
given index of a GenParticle which matches the track returns vector with indices of its daughters, if they also matches the track, or an empty vector if not
Definition at line 277 of file TrigInDetTrackTruth.cxx.
bool TrigInDetTrackTruth::daughtersInChain | ( | unsigned int | mother | ) | const |
given index of a GenParticle which matches the track returns true if it has stable a daughter which also matches the track and false if not
Definition at line 296 of file TrigInDetTrackTruth.cxx.
const std::vector< std::pair< unsigned int, unsigned int > > & TrigInDetTrackTruth::getFamilyTree | ( | ) | const |
returns copy of family tree "map"
Definition at line 250 of file TrigInDetTrackTruth.cxx.
int TrigInDetTrackTruth::index | ( | HepMcParticleLink & | hep_link | ) | const |
method to find if a given HepMcParticleLink already exists in "map" and, if so, what is its index; if not found returns -1; relies on HepMcParticleLink overloaded == method (i.e.
compares only barcode)
Definition at line 74 of file TrigInDetTrackTruth.cxx.
bool TrigInDetTrackTruth::motherInChain | ( | unsigned int | daughter | ) | const |
given index of a GenParticle which matches the track returns true if its mother also matches the track and false if not
Definition at line 271 of file TrigInDetTrackTruth.cxx.
int TrigInDetTrackTruth::motherIndexInChain | ( | unsigned int | daughter | ) | const |
given index of a GenParticle which matches the track returns index of
its mother, if it also matches the track, or -1 if not
Definition at line 257 of file TrigInDetTrackTruth.cxx.
unsigned int TrigInDetTrackTruth::nrCommonHits | ( | unsigned int | i | ) | const |
returns number of common hits from true particle i and TrigInDetTrack
Definition at line 210 of file TrigInDetTrackTruth.cxx.
unsigned int TrigInDetTrackTruth::nrCommonHitsBestSi | ( | ) | const |
returns total number of common hits from best match true particle and TrigInDetTrack
Definition at line 231 of file TrigInDetTrackTruth.cxx.
unsigned int TrigInDetTrackTruth::nrCommonHitsBestTRT | ( | ) | const |
returns total number of common hits from best match true particle and TrigInDetTrack
Definition at line 237 of file TrigInDetTrackTruth.cxx.
unsigned int TrigInDetTrackTruth::nrCommonSiHits | ( | unsigned int | i | ) | const |
returns number of common hits from true particle i and TrigInDetTrack
Definition at line 217 of file TrigInDetTrackTruth.cxx.
unsigned int TrigInDetTrackTruth::nrCommonTRTHits | ( | unsigned int | i | ) | const |
returns number of common hits from true particle i and TrigInDetTrack
Definition at line 224 of file TrigInDetTrackTruth.cxx.
unsigned int TrigInDetTrackTruth::nrMatches | ( | ) | const |
returns number of matching particles
Definition at line 244 of file TrigInDetTrackTruth.cxx.
const HepMcParticleLink * TrigInDetTrackTruth::truthMatch | ( | unsigned int | i | ) | const |
returns matching true particle number i
Definition at line 202 of file TrigInDetTrackTruth.cxx.
int TrigInDetTrackTruth::updateFamilyTree | ( | ) |
accessor to fill family tree: for each HepMcParticleLink in the internal vector of HepMC::GenParticles, this method searches for its mother in the same vector.
If the mother is in the vector, the method adds the relation as a a mother-daughter pair to the family tree vector note: this method can be used as many times as necessary as long as the association object is not constant
Definition at line 95 of file TrigInDetTrackTruth.cxx.
|
friend |
Definition at line 105 of file TrigInDetTrackTruth.h.
|
friend |
Definition at line 106 of file TrigInDetTrackTruth.h.
|
private |
Definition at line 109 of file TrigInDetTrackTruth.h.
|
private |
Definition at line 110 of file TrigInDetTrackTruth.h.
|
private |
Definition at line 111 of file TrigInDetTrackTruth.h.
|
private |
Definition at line 118 of file TrigInDetTrackTruth.h.
|
private |
Definition at line 115 of file TrigInDetTrackTruth.h.
|
private |
Definition at line 114 of file TrigInDetTrackTruth.h.