Belle II Software development
TOPReconstructorModule::PDFCollection Struct Reference

A collection of PDF's of charged stable particles for a given track. More...

Public Member Functions

 PDFCollection (const TOP::TOPTrack &trk, bool deltaRayModeling)
 Constructor.
 
void deletePDFs ()
 Release memory allocated in the constructor.
 
void setMostProbable ()
 Sets most probable hypothesis.
 
void appendPDFOther (const TOP::PDFConstructor *pdfOther)
 Append most probable PDF of other track in the same module.
 
void clearPDFOther ()
 Clear the containers of PDF's of other tracks.
 

Public Attributes

const TOP::TOPTracktopTrack = 0
 track
 
std::vector< TOP::PDFConstructor * > PDFs
 PDF's of charged stable particles.
 
const TOP::PDFConstructormostProbable = 0
 PDF of most probable particle hypothesis.
 
bool isValid = false
 true if all PDF's are provided
 

Detailed Description

A collection of PDF's of charged stable particles for a given track.

Definition at line 70 of file TOPReconstructorModule.h.

Constructor & Destructor Documentation

◆ PDFCollection()

PDFCollection ( const TOP::TOPTrack & trk,
bool deltaRayModeling )
inline

Constructor.

Parameters
trkgiven track
deltaRayModelinginclude or exclude delta-ray modeling in log likelihood calculation

Definition at line 82 of file TOPReconstructorModule.h.

83 {
84 topTrack = &trk;
85 for (const auto& chargedStable : Const::chargedStableSet) {
86 auto* pdf = new TOP::PDFConstructor(trk, chargedStable);
87 if (not pdf->isValid()) {
88 delete pdf;
89 for (auto PDF : PDFs) delete PDF;
90 PDFs.clear();
91 return;
92 }
93 pdf->switchDeltaRayPDF(deltaRayModeling);
94 PDFs.push_back(pdf);
95 }
96 isValid = true;
97 }
bool isValid(EForwardBackward eForwardBackward)
Check whether the given enum instance is one of the valid values.

Member Function Documentation

◆ appendPDFOther()

void appendPDFOther ( const TOP::PDFConstructor * pdfOther)
inline

Append most probable PDF of other track in the same module.

Parameters
pdfOtherPDF of other track

Definition at line 129 of file TOPReconstructorModule.h.

130 {
131 if (not isValid) return;
132 for (const auto pdf : PDFs) pdf->appendPDFOther(pdfOther);
133 }

◆ clearPDFOther()

void clearPDFOther ( )
inline

Clear the containers of PDF's of other tracks.

Definition at line 138 of file TOPReconstructorModule.h.

139 {
140 if (not isValid) return;
141 for (const auto pdf : PDFs) pdf->clearPDFOther();
142 }

◆ deletePDFs()

void deletePDFs ( )
inline

Release memory allocated in the constructor.

Definition at line 102 of file TOPReconstructorModule.h.

103 {
104 for (auto pdf : PDFs) delete pdf;
105 PDFs.clear();
106 isValid = false;
107 }

◆ setMostProbable()

void setMostProbable ( )
inline

Sets most probable hypothesis.

Definition at line 112 of file TOPReconstructorModule.h.

113 {
114 if (not isValid) return;
115 double maxLogL = -std::numeric_limits<double>::infinity();
116 for (const auto pdf : PDFs) {
117 double logL = pdf->getLogL().logL;
118 if (logL > maxLogL) {
119 mostProbable = pdf;
120 maxLogL = logL;
121 }
122 }
123 }

Member Data Documentation

◆ isValid

bool isValid = false

true if all PDF's are provided

Definition at line 75 of file TOPReconstructorModule.h.

◆ mostProbable

const TOP::PDFConstructor* mostProbable = 0

PDF of most probable particle hypothesis.

Definition at line 74 of file TOPReconstructorModule.h.

◆ PDFs

std::vector<TOP::PDFConstructor*> PDFs

PDF's of charged stable particles.

Definition at line 73 of file TOPReconstructorModule.h.

◆ topTrack

const TOP::TOPTrack* topTrack = 0

track

Definition at line 72 of file TOPReconstructorModule.h.


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