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 69 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 81 of file TOPReconstructorModule.h.

82 {
83 topTrack = &trk;
84 for (const auto& chargedStable : Const::chargedStableSet) {
85 auto* pdf = new TOP::PDFConstructor(trk, chargedStable);
86 if (not pdf->isValid()) {
87 delete pdf;
88 for (auto PDF : PDFs) delete PDF;
89 PDFs.clear();
90 return;
91 }
92 pdf->switchDeltaRayPDF(deltaRayModeling);
93 PDFs.push_back(pdf);
94 }
95 isValid = true;
96 }
static const ParticleSet chargedStableSet
set of charged stable particles
Definition: Const.h:618
bool isValid
true if all PDF's are provided
std::vector< TOP::PDFConstructor * > PDFs
PDF's of charged stable particles.

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

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

◆ clearPDFOther()

void clearPDFOther ( )
inline

Clear the containers of PDF's of other tracks.

Definition at line 137 of file TOPReconstructorModule.h.

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

◆ deletePDFs()

void deletePDFs ( )
inline

Release memory allocated in the constructor.

Definition at line 101 of file TOPReconstructorModule.h.

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

◆ setMostProbable()

void setMostProbable ( )
inline

Sets most probable hypothesis.

Definition at line 111 of file TOPReconstructorModule.h.

112 {
113 if (not isValid) return;
114 double maxLogL = -std::numeric_limits<double>::infinity();
115 for (const auto pdf : PDFs) {
116 double logL = pdf->getLogL().logL;
117 if (logL > maxLogL) {
118 mostProbable = pdf;
119 maxLogL = logL;
120 }
121 }
122 }
const TOP::PDFConstructor * mostProbable
PDF of most probable particle hypothesis.

Member Data Documentation

◆ isValid

bool isValid = false

true if all PDF's are provided

Definition at line 74 of file TOPReconstructorModule.h.

◆ mostProbable

const TOP::PDFConstructor* mostProbable = 0

PDF of most probable particle hypothesis.

Definition at line 73 of file TOPReconstructorModule.h.

◆ PDFs

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

PDF's of charged stable particles.

Definition at line 72 of file TOPReconstructorModule.h.

◆ topTrack

const TOP::TOPTrack* topTrack = 0

track

Definition at line 71 of file TOPReconstructorModule.h.


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