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 64 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 76 of file TOPReconstructorModule.h.

77 {
78 topTrack = &trk;
79 for (const auto& chargedStable : Const::chargedStableSet) {
80 auto* pdf = new TOP::PDFConstructor(trk, chargedStable);
81 if (not pdf->isValid()) {
82 delete pdf;
83 for (auto PDF : PDFs) delete PDF;
84 PDFs.clear();
85 return;
86 }
87 pdf->switchDeltaRayPDF(deltaRayModeling);
88 PDFs.push_back(pdf);
89 }
90 isValid = true;
91 }
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 123 of file TOPReconstructorModule.h.

124 {
125 if (not isValid) return;
126 for (const auto pdf : PDFs) pdf->appendPDFOther(pdfOther);
127 }

◆ clearPDFOther()

void clearPDFOther ( )
inline

Clear the containers of PDF's of other tracks.

Definition at line 132 of file TOPReconstructorModule.h.

133 {
134 if (not isValid) return;
135 for (const auto pdf : PDFs) pdf->clearPDFOther();
136 }

◆ deletePDFs()

void deletePDFs ( )
inline

Release memory allocated in the constructor.

Definition at line 96 of file TOPReconstructorModule.h.

97 {
98 for (auto pdf : PDFs) delete pdf;
99 PDFs.clear();
100 isValid = false;
101 }

◆ setMostProbable()

void setMostProbable ( )
inline

Sets most probable hypothesis.

Definition at line 106 of file TOPReconstructorModule.h.

107 {
108 if (not isValid) return;
109 double maxLogL = -std::numeric_limits<double>::infinity();
110 for (const auto pdf : PDFs) {
111 double logL = pdf->getLogL().logL;
112 if (logL > maxLogL) {
113 mostProbable = pdf;
114 maxLogL = logL;
115 }
116 }
117 }

Member Data Documentation

◆ isValid

bool isValid = false

true if all PDF's are provided

Definition at line 69 of file TOPReconstructorModule.h.

◆ mostProbable

const TOP::PDFConstructor* mostProbable = 0

PDF of most probable particle hypothesis.

Definition at line 68 of file TOPReconstructorModule.h.

◆ PDFs

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

PDF's of charged stable particles.

Definition at line 67 of file TOPReconstructorModule.h.

◆ topTrack

const TOP::TOPTrack* topTrack = 0

track

Definition at line 66 of file TOPReconstructorModule.h.


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