Belle II Software development
AnalizerTCInfo Class Reference

simple class storing infos relevant for a TC for analizing 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 posSeed
 carries the global coordinates of the position of the seed hit (typically the innermost hit)
 
ROOT::Math::XYZVector momSeed
 carries the momentum vector at the position of the seed hit (typically the innermost hit)
 
const SpacePointTrackCandtC
 a link to the TC itself
 
AnalizerTCInfoassignedTC
 for reference TC: best test TC found, for test TC, compatible reference TC found
 
MCVXDPurityInfo assignedID
 stores the iD of the particle and knows the purity for it
 
TCType::Type tcType
 classifies attached TC
 

Detailed Description

simple class storing infos relevant for a TC for analizing 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: tC(nullptr), assignedTC(nullptr), tcType(TCType::Unclassified) {}
AnalizerTCInfo * assignedTC
for reference TC: best test TC found, for test TC, compatible reference TC found
const SpacePointTrackCand * tC
a link to the TC itself
TCType::Type 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 assignedTC = otherTC;
116 otherTC->assignedTC = this;
117 }

◆ 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.assignedID.getPurity();
85 std::pair<int, float> refPurity = referenceTC.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.assignedID.getNDFTotal() < ndfThreshold) { return TCType::SmallStump; }
92
93 if (testPurity.second < 1.f) { return TCType::Contaminated; }
94
95 if (testTC.assignedID.getNClustersTotal() < referenceTC.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.posSeed = aTC.getPosSeed();
61 newTC.momSeed = aTC.getMomSeed();
62 newTC.tC = &aTC;
63 newTC.assignedID = iD;
64 newTC.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 assignedTC->tcType = TCType::Clone;
108 assignedTC = nullptr;
109 }

◆ getType()

TCType::Type getType ( ) const
inline

a type-identifier function

Definition at line 143 of file AnalizerTCInfo.h.

143{ return 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.assignedTC == nullptr) {
74 aTC.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 (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 (assignedTC->tcType < otherTC->tcType) {
131 discardTC();
132 assignTCs(otherTC);
133 return;
134 }
135
136 // case: was already assigned, but old one was better.
137 otherTC->assignedTC = this;
138 otherTC->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

◆ assignedID

MCVXDPurityInfo assignedID

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

Definition at line 45 of file AnalizerTCInfo.h.

◆ assignedTC

AnalizerTCInfo* assignedTC

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

Definition at line 42 of file AnalizerTCInfo.h.

◆ momSeed

ROOT::Math::XYZVector momSeed

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

Definition at line 36 of file AnalizerTCInfo.h.

◆ posSeed

ROOT::Math::XYZVector posSeed

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

Definition at line 33 of file AnalizerTCInfo.h.

◆ tC

a link to the TC itself

Definition at line 39 of file AnalizerTCInfo.h.

◆ tcType

TCType::Type tcType

classifies attached TC

Definition at line 48 of file AnalizerTCInfo.h.


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