Belle II Software prerelease-11-00-00a
TOPReconstructorModule::PDFCollection Struct Reference

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

Collaboration diagram for TOPReconstructorModule::PDFCollection:

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 67 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 79 of file TOPReconstructorModule.h.

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

127 {
128 if (not isValid) return;
129 for (const auto pdf : PDFs) pdf->appendPDFOther(pdfOther);
130 }

◆ clearPDFOther()

void clearPDFOther ( )
inline

Clear the containers of PDF's of other tracks.

Definition at line 135 of file TOPReconstructorModule.h.

136 {
137 if (not isValid) return;
138 for (const auto pdf : PDFs) pdf->clearPDFOther();
139 }

◆ deletePDFs()

void deletePDFs ( )
inline

Release memory allocated in the constructor.

Definition at line 99 of file TOPReconstructorModule.h.

100 {
101 for (auto pdf : PDFs) delete pdf;
102 PDFs.clear();
103 isValid = false;
104 }

◆ setMostProbable()

void setMostProbable ( )
inline

Sets most probable hypothesis.

Definition at line 109 of file TOPReconstructorModule.h.

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

Member Data Documentation

◆ isValid

bool isValid = false

true if all PDF's are provided

Definition at line 72 of file TOPReconstructorModule.h.

◆ mostProbable

const TOP::PDFConstructor* mostProbable = 0

PDF of most probable particle hypothesis.

Definition at line 71 of file TOPReconstructorModule.h.

◆ PDFs

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

PDF's of charged stable particles.

Definition at line 70 of file TOPReconstructorModule.h.

◆ topTrack

const TOP::TOPTrack* topTrack = 0

track

Definition at line 69 of file TOPReconstructorModule.h.


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