Belle II Software development
AnalizerTCInfo Class Reference

simple class storing infos relevant for a TC for analyzing it. More...

#include <AnalizerTCInfo.h>

Public Member Functions

 AnalizerTCInfo ()
 constructor, makes sure that pointers are on nullptr until set
 
void discardTC ()
 function for discarding the old TC.
 
void assignTCs (AnalizerTCInfo *otherTC)
 function for assigning TCs to each other
 
void pairUp (AnalizerTCInfo *otherTC)
 links otherTC to this one
 
TCType::Type getType () const
 a type-identifier function
 

Static Public Member Functions

static AnalizerTCInfo createTC (bool isReference, const MCVXDPurityInfo &iD, SpacePointTrackCand &aTC)
 static function for correctly creating TrackCandidates
 
static void markUnused (std::vector< AnalizerTCInfo > &tcs, TCType::Type newType)
 find unpaired tcs and mark them with given type
 
static TCType::Type classifyTC (AnalizerTCInfo &referenceTC, AnalizerTCInfo &testTC, double purityThreshold, unsigned int ndfThreshold)
 for given pair of TCs their compatibility will be checked and the testTC classified, the given threshold will be used to draw the line between Contaminated and Ghost
 

Public Attributes

ROOT::Math::XYZVector m_posSeed
 carries the global coordinates of the position of the seed hit (typically the innermost hit)
 
ROOT::Math::XYZVector m_momSeed
 carries the momentum vector at the position of the seed hit (typically the innermost hit)
 
const SpacePointTrackCandm_tC = nullptr
 a link to the TC itself
 
AnalizerTCInfom_assignedTC = nullptr
 for reference TC: best test TC found, for test TC, compatible reference TC found
 
MCVXDPurityInfo m_assignedID
 stores the iD of the particle and knows the purity for it
 
TCType::Type m_tcType
 classifies attached TC
 

Detailed Description

simple class storing infos relevant for a TC for analyzing it.

Definition at line 28 of file AnalizerTCInfo.h.

Constructor & Destructor Documentation

◆ AnalizerTCInfo()

AnalizerTCInfo ( )
inline

constructor, makes sure that pointers are on nullptr until set

Definition at line 52 of file AnalizerTCInfo.h.

52: m_tcType(TCType::Unclassified) {}
TCType::Type m_tcType
classifies attached TC

Member Function Documentation

◆ assignTCs()

void assignTCs ( AnalizerTCInfo otherTC)
inline

function for assigning TCs to each other

Definition at line 113 of file AnalizerTCInfo.h.

114 {
115 m_assignedTC = otherTC;
116 otherTC->m_assignedTC = this;
117 }
AnalizerTCInfo * m_assignedTC
for reference TC: best test TC found, for test TC, compatible reference TC found

◆ classifyTC()

static TCType::Type classifyTC ( AnalizerTCInfo referenceTC,
AnalizerTCInfo testTC,
double  purityThreshold,
unsigned int  ndfThreshold 
)
inlinestatic

for given pair of TCs their compatibility will be checked and the testTC classified, the given threshold will be used to draw the line between Contaminated and Ghost

Definition at line 81 of file AnalizerTCInfo.h.

83 {
84 std::pair<int, float> testPurity = testTC.m_assignedID.getPurity();
85 std::pair<int, float> refPurity = referenceTC.m_assignedID.getPurity();
86 // catch ill case
87 if (testPurity.first != refPurity.first) { return TCType::Unclassified; }
88
89 if (testPurity.second < purityThreshold) { return TCType::Ghost; }
90
91 if (testTC.m_assignedID.getNDFTotal() < ndfThreshold) { return TCType::SmallStump; }
92
93 if (testPurity.second < 1.f) { return TCType::Contaminated; }
94
95 if (testTC.m_assignedID.getNClustersTotal() < referenceTC.m_assignedID.getNClustersTotal()) { return TCType::Clean; }
96
97 return TCType::Perfect;
98 }

◆ createTC()

static AnalizerTCInfo createTC ( bool  isReference,
const MCVXDPurityInfo iD,
SpacePointTrackCand aTC 
)
inlinestatic

static function for correctly creating TrackCandidates

Definition at line 56 of file AnalizerTCInfo.h.

57 {
58 AnalizerTCInfo newTC;
59
60 newTC.m_posSeed = aTC.getPosSeed();
61 newTC.m_momSeed = aTC.getMomSeed();
62 newTC.m_tC = &aTC;
63 newTC.m_assignedID = iD;
64 newTC.m_tcType = isReference ? TCType::Reference : TCType::Unclassified;
65 return newTC;
66 }
AnalizerTCInfo()
constructor, makes sure that pointers are on nullptr until set

◆ discardTC()

void discardTC ( )
inline

function for discarding the old TC.

the old TC attached to this will be marked as Clone and discarded

Definition at line 105 of file AnalizerTCInfo.h.

106 {
107 m_assignedTC->m_tcType = TCType::Clone;
108 m_assignedTC = nullptr;
109 }

◆ getType()

TCType::Type getType ( ) const
inline

a type-identifier function

Definition at line 143 of file AnalizerTCInfo.h.

143{ return m_tcType; }

◆ markUnused()

static void markUnused ( std::vector< AnalizerTCInfo > &  tcs,
TCType::Type  newType 
)
inlinestatic

find unpaired tcs and mark them with given type

Definition at line 70 of file AnalizerTCInfo.h.

71 {
72 for (AnalizerTCInfo& aTC : tcs) {
73 if (aTC.m_assignedTC == nullptr) {
74 aTC.m_tcType = newType;
75 }
76 }
77 }

◆ pairUp()

void pairUp ( AnalizerTCInfo otherTC)
inline

links otherTC to this one

Definition at line 121 of file AnalizerTCInfo.h.

122 {
123 // case: this TC was not assigned before
124 if (m_assignedTC == nullptr) {
125 assignTCs(otherTC);
126 return;
127 }
128
129 // case: was already assigned, but old one was not as good as the new one
130 if (m_assignedTC->m_tcType < otherTC->m_tcType) {
131 discardTC();
132 assignTCs(otherTC);
133 return;
134 }
135
136 // case: was already assigned, but old one was better.
137 otherTC->m_assignedTC = this;
138 otherTC->m_tcType = TCType::Clone;
139 }
void assignTCs(AnalizerTCInfo *otherTC)
function for assigning TCs to each other
void discardTC()
function for discarding the old TC.

Member Data Documentation

◆ m_assignedID

MCVXDPurityInfo m_assignedID

stores the iD of the particle and knows the purity for it

Definition at line 45 of file AnalizerTCInfo.h.

◆ m_assignedTC

AnalizerTCInfo* m_assignedTC = nullptr

for reference TC: best test TC found, for test TC, compatible reference TC found

Definition at line 42 of file AnalizerTCInfo.h.

◆ m_momSeed

ROOT::Math::XYZVector m_momSeed

carries the momentum vector at the position of the seed hit (typically the innermost hit)

Definition at line 36 of file AnalizerTCInfo.h.

◆ m_posSeed

ROOT::Math::XYZVector m_posSeed

carries the global coordinates of the position of the seed hit (typically the innermost hit)

Definition at line 33 of file AnalizerTCInfo.h.

◆ m_tC

const SpacePointTrackCand* m_tC = nullptr

a link to the TC itself

Definition at line 39 of file AnalizerTCInfo.h.

◆ m_tcType

TCType::Type m_tcType

classifies attached TC

Definition at line 48 of file AnalizerTCInfo.h.


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