Belle II Software development
SVDdEdxPDFs Class Reference

Specialized class for holding the SVD dE/dx PDFs. More...

#include <SVDdEdxPDFs.h>

Inheritance diagram for SVDdEdxPDFs:
dEdxPDFs

Public Member Functions

 SVDdEdxPDFs ()=default
 Default constructor.
 
const TH2F * getSVDPDF (const unsigned int hypothesis, const bool truncated) const
 Return the SVD dE/dx PDF for the given particle hypothesis.
 
const TH2F * getPDF (const Const::ChargedStable &chargedStable, bool truncated) const
 Return the dE/dx PDF for the given particle hypothesis.
 
const TH2F * getPDF (const unsigned int hypothesis, const bool truncated) const
 Return the dE/dx PDF for the given particle hypothesis.
 
const std::vector< const TH2F * > & getPDFs (bool truncated) const
 Return all PDF's as a vector of histogram pointers.
 
void setPDF (const TH2F &pdf, const Const::ChargedStable &chargedStable, bool truncated)
 Set the dE/dx PDF for the given particle hypothesis.
 
void setPDF (const TH2F &pdf, const unsigned int hypothesis, const bool truncated)
 Set the dE/dx PDF for the given particle hypothesis.
 
bool checkPDFs (bool truncated) const
 Check PDF histograms if they are defined in the same range and with the same binning.
 

Private Member Functions

 ClassDef (SVDdEdxPDFs, 1)
 Class version for the ROOT streamer.
 

Private Attributes

std::array< TH2F, Const::ChargedStable::c_SetSizem_dEdxPDFs
 Array of dE/dx PDFs for each particle hypothesis.
 
std::array< TH2F, Const::ChargedStable::c_SetSizem_dEdxPDFsTruncated
 Array of truncated dE/dx PDFs for each particle hypothesis.
 
std::vector< const TH2F * > m_cachePDFs
 cache for a vector of pointers to PDFs
 
std::vector< const TH2F * > m_cachePDFsTruncated
 do not write out
 

Detailed Description

Specialized class for holding the SVD dE/dx PDFs.

Definition at line 26 of file SVDdEdxPDFs.h.

Member Function Documentation

◆ getPDF() [1/2]

const TH2F * getPDF ( const Const::ChargedStable chargedStable,
bool  truncated 
) const
inlineinherited

Return the dE/dx PDF for the given particle hypothesis.

Parameters
chargedStableParticle hypothesis
truncatedIf true, return the truncated dE/dx PDF

Definition at line 46 of file dEdxPDFs.h.

47 {
48 return getPDF(chargedStable.getIndex(), truncated);
49 }
const TH2F * getPDF(const Const::ChargedStable &chargedStable, bool truncated) const
Return the dE/dx PDF for the given particle hypothesis.
Definition: dEdxPDFs.h:46

◆ getPDF() [2/2]

const TH2F * getPDF ( const unsigned int  hypothesis,
const bool  truncated 
) const
inlineinherited

Return the dE/dx PDF for the given particle hypothesis.

Parameters
hypothesisParticle hypothesis (as in Const::ChargedStable::c_SetSize)
truncatedIf true, return the truncated dE/dx PDF

Definition at line 56 of file dEdxPDFs.h.

57 {
58 return truncated ? &(m_dEdxPDFsTruncated.at(hypothesis)) : &(m_dEdxPDFs.at(hypothesis));
59 }
std::array< TH2F, Const::ChargedStable::c_SetSize > m_dEdxPDFs
Array of dE/dx PDFs for each particle hypothesis.
Definition: dEdxPDFs.h:103
std::array< TH2F, Const::ChargedStable::c_SetSize > m_dEdxPDFsTruncated
Array of truncated dE/dx PDFs for each particle hypothesis.
Definition: dEdxPDFs.h:106

◆ getSVDPDF()

const TH2F * getSVDPDF ( const unsigned int  hypothesis,
const bool  truncated 
) const
inline

Return the SVD dE/dx PDF for the given particle hypothesis.

Parameters
hypothesisParticle hypothesis (as in Const::ChargedStable::c_SetSize)
truncatedIf true, return the truncated dE/dx PDF

Definition at line 40 of file SVDdEdxPDFs.h.

41 {
42 return getPDF(hypothesis, truncated);
43 }

◆ setPDF() [1/2]

void setPDF ( const TH2F &  pdf,
const Const::ChargedStable chargedStable,
bool  truncated 
)
inlineinherited

Set the dE/dx PDF for the given particle hypothesis.

Parameters
pdfdE/dx PDF as a 2D histogram (TH2F)
chargedStableParticle hypothesis
truncatedIf true, set the truncated dE/dx PDF

Definition at line 74 of file dEdxPDFs.h.

75 {
76 setPDF(pdf, chargedStable.getIndex(), truncated);
77 }
void setPDF(const TH2F &pdf, const Const::ChargedStable &chargedStable, bool truncated)
Set the dE/dx PDF for the given particle hypothesis.
Definition: dEdxPDFs.h:74

◆ setPDF() [2/2]

void setPDF ( const TH2F &  pdf,
const unsigned int  hypothesis,
const bool  truncated 
)
inlineinherited

Set the dE/dx PDF for the given particle hypothesis.

Parameters
pdfdE/dx PDF as a 2D histogram (TH2F)
hypothesisParticle hypothesis (as in Const::ChargedStable::c_SetSize)
truncatedIf true, set the truncated dE/dx PDF

Definition at line 85 of file dEdxPDFs.h.

86 {
87 if (truncated)
88 m_dEdxPDFsTruncated.at(hypothesis) = pdf;
89 else
90 m_dEdxPDFs.at(hypothesis) = pdf;
91 }

Member Data Documentation

◆ m_cachePDFs

std::vector<const TH2F*> m_cachePDFs
mutableprivateinherited

cache for a vector of pointers to PDFs

Definition at line 109 of file dEdxPDFs.h.

◆ m_cachePDFsTruncated

std::vector<const TH2F*> m_cachePDFsTruncated
mutableprivateinherited

do not write out

cache for a vector of pointers to truncated PDFs

Definition at line 112 of file dEdxPDFs.h.

◆ m_dEdxPDFs

std::array<TH2F, Const::ChargedStable::c_SetSize> m_dEdxPDFs
privateinherited

Array of dE/dx PDFs for each particle hypothesis.

Definition at line 103 of file dEdxPDFs.h.

◆ m_dEdxPDFsTruncated

std::array<TH2F, Const::ChargedStable::c_SetSize> m_dEdxPDFsTruncated
privateinherited

Array of truncated dE/dx PDFs for each particle hypothesis.

Definition at line 106 of file dEdxPDFs.h.


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