Belle II Software  release-08-01-10
PDFConstructor Class Reference

PDF construction and log likelihood determination for a given track and particle hypothesis. More...

#include <PDFConstructor.h>

Collaboration diagram for PDFConstructor:

Classes

struct  InverseRaytracerDirect
 Structure that enables defining a template function: direct photons. More...
 
struct  InverseRaytracerReflected
 Structure that enables defining a template function: reflected photons. More...
 
struct  LogL
 Useful data type for returning the results of log likelihood calculation. More...
 
struct  PrismSolution
 Solution of inverse raytracing in prism. More...
 
struct  Pull
 Data type for storing photon pull w.r.t PDF peak. More...
 

Public Types

enum  EPDFOption {
  c_Rough = 0 ,
  c_Fine = 1 ,
  c_Optimal = 2
}
 Signal PDF construction options. More...
 
enum  EStoreOption {
  c_Reduced = 0 ,
  c_Full = 1
}
 Options for storing signal PDF parameters. More...
 

Public Member Functions

 PDFConstructor (const TOPTrack &track, const Const::ChargedStable &hypothesis, EPDFOption PDFOption=c_Optimal, EStoreOption storeOption=c_Reduced, double overrideMass=0)
 Class constructor. More...
 
bool isValid () const
 Checks the object status. More...
 
void switchOffDeltaRayPDF () const
 Exclude delta-ray PDF in log likelihood calculation.
 
void switchOnDeltaRayPDF () const
 Include delta-ray PDF in log likelihood calculation (this is default)
 
void switchDeltaRayPDF (bool deltaPDFOn) const
 Include or exclude delta-ray PDF in log likelihood calculation. More...
 
int getModuleID () const
 Returns slot ID. More...
 
const Const::ChargedStablegetHypothesis () const
 Returns particle hypothesis. More...
 
const std::vector< TOPTrack::SelectedHit > & getSelectedHits () const
 Returns selected photon hits belonging to this slot. More...
 
double getBkgRate () const
 Returns estimated background hit rate. More...
 
double getCosTotal () const
 Returns cosine of total reflection angle. More...
 
double getCosCerenkovAngle (double E) const
 Returns cosine of Cerenkov angle at given photon energy. More...
 
const std::vector< SignalPDF > & getSignalPDF () const
 Returns signal PDF. More...
 
const BackgroundPDFgetBackgroundPDF () const
 Returns background PDF. More...
 
const DeltaRayPDFgetDeltaRayPDF () const
 Returns delta-ray PDF. More...
 
double getExpectedSignalPhotons () const
 Returns the expected number of signal photons within the default time window. More...
 
double getExpectedDeltaPhotons () const
 Returns the expected number of delta-ray photons within the default time window. More...
 
double getExpectedBkgPhotons () const
 Returns the expected number of background photons within the default time window. More...
 
double getExpectedPhotons () const
 Returns the expected number of all photons within the default time window. More...
 
double getExpectedSignalPhotons (double minTime, double maxTime) const
 Returns the expected number of signal photons within a given time window. More...
 
double getExpectedDeltaPhotons (double minTime, double maxTime) const
 Returns the expected number of delta-ray photons within a given time window. More...
 
double getExpectedBkgPhotons (double minTime, double maxTime) const
 Returns the expected number of background photons within a given time window. More...
 
double getExpectedPhotons (double minTime, double maxTime) const
 Returns the expected number of all photons within a given time window. More...
 
double getPDFValue (int pixelID, double time, double timeErr, double sigt=0) const
 Returns PDF value. More...
 
LogL getLogL () const
 Returns extended log likelihood (using the default time window) More...
 
LogL getLogL (double t0, double sigt=0) const
 Returns extended log likelihood for PDF shifted in time. More...
 
LogL getLogL (double t0, double minTime, double maxTime, double sigt=0) const
 Returns extended log likelihood for PDF shifted in time and using different time window. More...
 
LogL getBackgroundLogL () const
 Returns extended log likelihood for background hypothesis using default time window. More...
 
LogL getBackgroundLogL (double minTime, double maxTime) const
 Returns extended log likelihood for background hypothesis. More...
 
const std::vector< LogL > & getPixelLogLs (double t0, double sigt=0) const
 Returns extended log likelihoods in pixels for PDF shifted in time. More...
 
const std::vector< LogL > & getPixelLogLs (double t0, double minTime, double maxTime, double sigt=0) const
 Returns extended log likelihoods in pixels for PDF shifted in time and using diferent time window. More...
 
const std::vector< Pull > & getPulls () const
 Returns photon pulls w.r.t PDF peaks. More...
 
int getNCalls_setPDF (SignalPDF::EPeakType type) const
 Returns number of calls of template function setSignalPDF<T> for a given peak type. More...
 
int getNCalls_expandPDF (SignalPDF::EPeakType type) const
 Returns number of calls of function expandSignalPDF for a given peak type. More...
 
const std::map< double, YScanner::Derivatives > & getDerivatives () const
 Returns a collection of derivatives for debugging purposes. More...
 
void appendPDFOther (const PDFConstructor *pdfOther)
 Append most probable PDF of other track in this module. More...
 
void clearPDFOther ()
 Clear the container of PDF's of other tracks.
 

Private Member Functions

template<class T >
void setSignalPDF (T &t, unsigned col, double xD, double zD, int Nxm=0, double xmMin=0, double xmMax=0)
 Template function: sets signal PDF in a pixel column and for specific reflection in x. More...
 
const InverseRaytracer::CerenkovAnglecerenkovAngle (double dE=0)
 Returns cosine and sine of cerenkov angle. More...
 
void setSignalPDF ()
 Sets signal PDF.
 
void setSignalPDF_direct ()
 Sets signal PDF for direct photons.
 
void setSignalPDF_reflected ()
 Sets signal PDF for reflected photons.
 
void setSignalPDF_prism ()
 Sets signal PDF for track crossing prism.
 
void setSignalPDF_reflected (int Nxm, double xmMin, double xmMax)
 Sets signal PDF for reflected photons at given reflection number. More...
 
bool detectionPositionX (double xM, int Nxm, std::vector< double > &xDs, double &minLen)
 Calculates unfolded detection position from known reflection position on the mirror and emission point. More...
 
bool doRaytracingCorrections (const InverseRaytracer::Solution &sol, double dFic_dx, double xD)
 Corrects the solution of inverse ray-tracing with fast ray-tracing. More...
 
double deltaXD (double dFic, const InverseRaytracer::Solution &sol, double xD)
 Returns the difference in xD between ray-traced solution rotated by dFic and input argument. More...
 
bool setDerivatives (YScanner::Derivatives &D, double dL, double de, double dFic)
 Sets the derivatives (numerically) using forward ray-tracing. More...
 
bool raytrace (const FastRaytracer &rayTracer, double dL=0, double de=0, double dFic=0)
 Forward ray-tracing (called by setDerivatives) More...
 
double propagationLosses (double E, double propLen, int nx, int ny, SignalPDF::EPeakType type) const
 Returns photon propagation losses (bulk absorption, surface reflectivity, mirror reflectivity) More...
 
void expandSignalPDF (unsigned col, const YScanner::Derivatives &D, SignalPDF::EPeakType type)
 Expands signal PDF in y (y-scan) More...
 
bool rangeOfX (double z, double &xmi, double &xma)
 Estimates range of unfolded x coordinate of the hits on given plane perpendicular to z-axis. More...
 
double findReflectionExtreme (double xE, double zE, double zD, int Nxm, double A, const RaytracerBase::Mirror &mirror) const
 Finds the position on the mirror of the extreme reflection. More...
 
double derivativeOfReflectedX (double x, double xe, double ze, double zd) const
 Returns the derivative of reflected position at given x. More...
 
bool prismRaytrace (const PrismSolution &sol, double dL=0, double dFic=0, double de=0)
 Do forward raytracing of inverse raytracing solution in prism. More...
 
PrismSolution prismSolution (const PixelPositions::PixelData &pixel, unsigned k, int nx)
 General solution of inverse raytracing in prism: iterative procedure calling basic solution. More...
 
PrismSolution prismSolution (const ROOT::Math::XYZPoint &rD, double L)
 Basic solution of inverse raytracing in prism: assuming straight line particle trajectory. More...
 
double pdfValueSignalDelta (int pixelID, double time, double timeErr, double sigt=0) const
 Returns the value of signal + deltaRay PDF normalized to the number of expected photons. More...
 
double pdfValue (int pixelID, double time, double timeErr, double sigt=0) const
 Returns the value of PDF normalized to the number of expected photons. More...
 
void initializePixelLogLs (double minTime, double maxTime) const
 Initializes pixel log likelihoods. More...
 
void appendPulls (const TOPTrack::SelectedHit &hit) const
 Appends pulls of a photon hit. More...
 

Private Attributes

int m_moduleID = 0
 slot ID
 
const TOPTrackm_track
 temporary reference to track at TOP
 
const Const::ChargedStable m_hypothesis
 particle hypothesis
 
const InverseRaytracerm_inverseRaytracer = 0
 inverse ray-tracer
 
const FastRaytracerm_fastRaytracer = 0
 fast ray-tracer
 
std::vector< FastRaytracerm_rayTracers
 copies of fast ray-tracer used to compute derivatives
 
const YScannerm_yScanner = 0
 PDF expander in y.
 
const BackgroundPDFm_backgroundPDF = 0
 background PDF
 
DeltaRayPDF m_deltaRayPDF
 delta-ray PDF
 
EPDFOption m_PDFOption = c_Optimal
 signal PDF construction option
 
EStoreOption m_storeOption = c_Reduced
 signal PDF storing option
 
bool m_valid = false
 cross-check flag, true if track is valid and all the pointers above are valid
 
double m_beta = 0
 particle hypothesis beta
 
double m_tof = 0
 time-of-flight from IP to average photon emission position
 
double m_groupIndex = 0
 group refractive index at mean photon energy
 
double m_groupIndexDerivative = 0
 derivative (dn_g/dE) of group refractive index at mean photon energy
 
double m_cosTotal = 0
 cosine of total reflection angle
 
double m_minTime = 0
 time window lower edge
 
double m_maxTime = 0
 time window upper edge
 
std::vector< TOPTrack::SelectedHitm_selectedHits
 selected photon hits
 
double m_bkgRate = 0
 estimated background hit rate
 
std::vector< SignalPDFm_signalPDFs
 parameterized signal PDF in pixels (index = pixelID - 1)
 
double m_signalPhotons = 0
 expected number of signal photons
 
double m_bkgPhotons = 0
 expected number of uniform background photons
 
double m_deltaPhotons = 0
 expected number of delta-ray photons
 
std::map< double, InverseRaytracer::CerenkovAnglem_cerenkovAngles
 sine and cosine of Cerenkov angles
 
double m_dFic = 0
 temporary storage for dFic used in last call to deltaXD
 
double m_Fic = 0
 temporary storage for Cerenkov azimuthal angle
 
std::map< SignalPDF::EPeakType, int > m_ncallsSetPDF
 number of calls to setSignalPDF<T>
 
std::map< SignalPDF::EPeakType, int > m_ncallsExpandPDF
 number of calls to expandSignalPDF
 
std::vector< LogLm_pixelLLs
 pixel log likelihoods (index = pixelID - 1)
 
std::vector< Pullm_pulls
 photon pulls w.r.t PDF peaks
 
bool m_deltaPDFOn = true
 include/exclude delta-ray PDF in likelihood calculation
 
std::map< double, YScanner::Derivativesm_derivatives
 a map of xD and derivatives
 
std::set< int > m_zeroPixels
 collection of pixelID's with zero pdfValue
 
std::vector< const PDFConstructor * > m_pdfOtherTracks
 most probable PDF's of other tracks in the module
 

Detailed Description

PDF construction and log likelihood determination for a given track and particle hypothesis.

Definition at line 34 of file PDFConstructor.h.

Member Enumeration Documentation

◆ EPDFOption

enum EPDFOption

Signal PDF construction options.

Enumerator
c_Rough 

no dependence on y

c_Fine 

y dependent everywhere

c_Optimal 

y dependent only where necessary

Definition at line 41 of file PDFConstructor.h.

41  {
42  c_Rough = 0,
43  c_Fine = 1,
44  c_Optimal = 2
45  };
@ c_Optimal
y dependent only where necessary
@ c_Fine
y dependent everywhere
@ c_Rough
no dependence on y

◆ EStoreOption

Options for storing signal PDF parameters.

Enumerator
c_Reduced 

only PDF peak data

c_Full 

also extra information and derivatives

Definition at line 50 of file PDFConstructor.h.

Constructor & Destructor Documentation

◆ PDFConstructor()

PDFConstructor ( const TOPTrack track,
const Const::ChargedStable hypothesis,
EPDFOption  PDFOption = c_Optimal,
EStoreOption  storeOption = c_Reduced,
double  overrideMass = 0 
)

Class constructor.

Parameters
tracktrack at TOP
hypothesisparticle hypothesis
PDFOptionsignal PDF construction option
storeOptionsignal PDF store option
overrideMassalternative mass value to be used intestead of the one from hypothesis. Ignored if <= 0.

Definition at line 27 of file PDFConstructor.cc.

28  :
29  m_moduleID(track.getModuleID()), m_track(track), m_hypothesis(hypothesis),
35  m_PDFOption(PDFOption), m_storeOption(storeOption)
36  {
37  if (not track.isValid()) {
38  B2ERROR("TOP::PDFConstructor: TOPTrack is not valid, cannot continue");
39  return;
40  }
41 
42  m_valid = m_inverseRaytracer != 0 and m_fastRaytracer != 0 and m_yScanner != 0 and m_backgroundPDF != 0;
43  if (not m_valid) {
44  B2ERROR("TOP::PDFConstructor: missing reconstruction objects, cannot continue");
45  return;
46  }
47 
48  m_beta = track.getBeta(hypothesis, overrideMass);
49  m_yScanner->prepare(track.getMomentumMag(), m_beta, track.getLengthInQuartz());
50  m_tof = track.getTOF(hypothesis, 0, overrideMass);
51 
57  m_selectedHits = track.getSelectedHits();
58  m_bkgRate = track.getBkgRate();
59 
60  // prepare the memory for storing signal PDF
61 
62  const auto& pixelPositions = m_yScanner->getPixelPositions();
63  int numPixels = pixelPositions.getNumPixels();
64  const auto* geo = TOPGeometryPar::Instance()->getGeometry();
65  for (int pixelID = 1; pixelID <= numPixels; pixelID++) {
66  auto pmtType = pixelPositions.get(pixelID).pmtType;
67  const auto& tts = geo->getTTS(pmtType);
68  m_signalPDFs.push_back(SignalPDF(pixelID, tts));
69  }
70 
71  // construct PDF
72 
74  setSignalPDF();
75  }
76 
77  m_deltaRayPDF.prepare(track, hypothesis);
79 
80  m_bkgPhotons = std::max(m_bkgRate * (m_maxTime - m_minTime), 0.1);
81 
82  // release the memory not needed anymore
83 
84  m_rayTracers.clear();
85  }
void prepare(const TOPTrack &track, const Const::ChargedStable &hypothesis)
Prepare the object.
Definition: DeltaRayPDF.cc:70
double getNumPhotons() const
Returns number of photons.
Definition: DeltaRayPDF.h:54
double m_cosTotal
cosine of total reflection angle
void setSignalPDF()
Sets signal PDF.
double m_bkgRate
estimated background hit rate
double m_beta
particle hypothesis beta
const YScanner * m_yScanner
PDF expander in y.
std::vector< SignalPDF > m_signalPDFs
parameterized signal PDF in pixels (index = pixelID - 1)
double m_maxTime
time window upper edge
const InverseRaytracer * m_inverseRaytracer
inverse ray-tracer
double m_minTime
time window lower edge
EStoreOption m_storeOption
signal PDF storing option
double m_groupIndex
group refractive index at mean photon energy
double m_bkgPhotons
expected number of uniform background photons
double m_deltaPhotons
expected number of delta-ray photons
bool m_valid
cross-check flag, true if track is valid and all the pointers above are valid
DeltaRayPDF m_deltaRayPDF
delta-ray PDF
const FastRaytracer * m_fastRaytracer
fast ray-tracer
const TOPTrack & m_track
temporary reference to track at TOP
EPDFOption m_PDFOption
signal PDF construction option
const BackgroundPDF * m_backgroundPDF
background PDF
std::vector< FastRaytracer > m_rayTracers
copies of fast ray-tracer used to compute derivatives
const Const::ChargedStable m_hypothesis
particle hypothesis
double m_groupIndexDerivative
derivative (dn_g/dE) of group refractive index at mean photon energy
std::vector< TOPTrack::SelectedHit > m_selectedHits
selected photon hits
double m_tof
time-of-flight from IP to average photon emission position
unsigned getNumPixels() const
Returns number of pixels.
const TOPGeometry * getGeometry() const
Returns pointer to geometry object using basf2 units.
double getGroupIndexDerivative(double energy) const
Returns the derivative (dn_g/dE) of group refractive index of quartz at given photon energy.
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
double getGroupIndex(double energy) const
Returns group refractive index of quartz at given photon energy.
static const InverseRaytracer * getInverseRaytracer(int moduleID)
Returns inverse ray-tracer of a given module.
static double getMaxTime()
Returns time window upper edge.
static const YScanner * getYScanner(int moduleID)
Returns y-scanner of a given module.
static const FastRaytracer * getFastRaytracer(int moduleID)
Returns fast ray-tracer of a given module.
static const BackgroundPDF * getBackgroundPDF(int moduleID)
Returns background PDF of a given module.
static double getMinTime()
Returns time window lower edge.
void prepare(double momentum, double beta, double length) const
Prepare for the PDF expansion in y for a given track mass hypothesis.
Definition: YScanner.cc:118
const PixelPositions & getPixelPositions() const
Returns pixel positions and their sizes.
Definition: YScanner.h:269
double getCosTotal() const
Returns cosine of total reflection angle.
Definition: YScanner.h:293
double getMeanEnergy() const
Returns mean photon energy.
Definition: YScanner.h:329
bool isAboveThreshold() const
Returns above Cerenkov threshold flag which is set in the prepare method.
Definition: YScanner.h:251
const TOPNominalTTS & getTTS(unsigned type) const
Returns time transition spread of a given PMT type.
Definition: TOPGeometry.cc:50

Member Function Documentation

◆ appendPDFOther()

void appendPDFOther ( const PDFConstructor pdfOther)
inline

Append most probable PDF of other track in this module.

Parameters
pdfOtherPDF of other track

Definition at line 376 of file PDFConstructor.h.

◆ appendPulls()

void appendPulls ( const TOPTrack::SelectedHit hit) const
private

Appends pulls of a photon hit.

Parameters
hitphoton hit

Definition at line 983 of file PDFConstructor.cc.

◆ cerenkovAngle()

const InverseRaytracer::CerenkovAngle & cerenkovAngle ( double  dE = 0)
inlineprivate

Returns cosine and sine of cerenkov angle.

Parameters
dEenergy difference to mean photon energy
Returns
cosine and sine of cerenkov angle

Definition at line 743 of file PDFConstructor.h.

◆ deltaXD()

double deltaXD ( double  dFic,
const InverseRaytracer::Solution sol,
double  xD 
)
inlineprivate

Returns the difference in xD between ray-traced solution rotated by dFic and input argument.

Parameters
dFicrotation angle around track direction (delta Cerenkov azimuthal angle)
solsolution of inverse raytracing
xDunfolded detection position in x
Returns
difference in xD

Definition at line 729 of file PDFConstructor.h.

◆ derivativeOfReflectedX()

double derivativeOfReflectedX ( double  x,
double  xe,
double  ze,
double  zd 
) const
private

Returns the derivative of reflected position at given x.

This function is used to find the position of reflection extreme. All arguments must be given in the mirror frame and in units of mirror radius.

Parameters
xposition in x on the mirror
xeunfolded emission position in x
zeemission position in z
zdunfolded detection position in z
Returns
the derivative

Definition at line 576 of file PDFConstructor.cc.

◆ detectionPositionX()

bool detectionPositionX ( double  xM,
int  Nxm,
std::vector< double > &  xDs,
double &  minLen 
)
private

Calculates unfolded detection position from known reflection position on the mirror and emission point.

Parameters
xMreflection position x on the mirror
Nxmreflection number before the mirror
xDsunfolded detection positions (appended at each call) [in/out]
minLenminimum of propagation lengths (updated at each call) [in/out]
Returns
true on success

Definition at line 216 of file PDFConstructor.cc.

◆ doRaytracingCorrections()

bool doRaytracingCorrections ( const InverseRaytracer::Solution sol,
double  dFic_dx,
double  xD 
)
private

Corrects the solution of inverse ray-tracing with fast ray-tracing.

Corrected solution is available in m_fastRaytracer.

Parameters
solsolution of inverse raytracing
dFic_dxderivative of Cerenkov azimuthal angle over photon detection coordinate x
xDunfolded detection position in x
Returns
true on success

Definition at line 236 of file PDFConstructor.cc.

◆ expandSignalPDF()

void expandSignalPDF ( unsigned  col,
const YScanner::Derivatives D,
SignalPDF::EPeakType  type 
)
private

Expands signal PDF in y (y-scan)

Parameters
colpixel column (0-based)
Dderivatives
typepeak type, e.g. direct or reflected

Definition at line 391 of file PDFConstructor.cc.

◆ findReflectionExtreme()

double findReflectionExtreme ( double  xE,
double  zE,
double  zD,
int  Nxm,
double  A,
const RaytracerBase::Mirror mirror 
) const
private

Finds the position on the mirror of the extreme reflection.

Parameters
xEtrue emission position in x
zEemission position in z
zDdetection position in z
Nxmsigned number of reflections before mirror
Awidth of the mirror segment
mirrorspherical mirror data
Returns
position of the extreme if exists or -A/2

Definition at line 594 of file PDFConstructor.cc.

◆ getBackgroundLogL() [1/2]

LogL getBackgroundLogL ( ) const
inline

Returns extended log likelihood for background hypothesis using default time window.

Returns
log likelihood

Definition at line 316 of file PDFConstructor.h.

◆ getBackgroundLogL() [2/2]

PDFConstructor::LogL getBackgroundLogL ( double  minTime,
double  maxTime 
) const

Returns extended log likelihood for background hypothesis.

Parameters
minTimetime window lower edge
maxTimetime window upper edge
Returns
log likelihood

Definition at line 891 of file PDFConstructor.cc.

◆ getBackgroundPDF()

const BackgroundPDF* getBackgroundPDF ( ) const
inline

Returns background PDF.

Returns
background PDF

Definition at line 178 of file PDFConstructor.h.

◆ getBkgRate()

double getBkgRate ( ) const
inline

Returns estimated background hit rate.

Returns
background hit rate per module

Definition at line 153 of file PDFConstructor.h.

◆ getCosCerenkovAngle()

double getCosCerenkovAngle ( double  E) const
inline

Returns cosine of Cerenkov angle at given photon energy.

Parameters
Ephoton energy [eV]
Returns
cosine of Cerenkov angle

Definition at line 737 of file PDFConstructor.h.

◆ getCosTotal()

double getCosTotal ( ) const
inline

Returns cosine of total reflection angle.

Returns
cosine of total reflection angle at mean photon energy for beta = 1

Definition at line 159 of file PDFConstructor.h.

◆ getDeltaRayPDF()

const DeltaRayPDF& getDeltaRayPDF ( ) const
inline

Returns delta-ray PDF.

Returns
delta-ray PDF

Definition at line 184 of file PDFConstructor.h.

◆ getDerivatives()

const std::map<double, YScanner::Derivatives>& getDerivatives ( ) const
inline

Returns a collection of derivatives for debugging purposes.

The derivatives are available only for EStoreOption::c_Full

Returns
map of xD and derivatives

Definition at line 370 of file PDFConstructor.h.

◆ getExpectedBkgPhotons() [1/2]

double getExpectedBkgPhotons ( ) const
inline

Returns the expected number of background photons within the default time window.

Photons from other tracks in the module are counted here as background.

Returns
expected number of background photons

Definition at line 203 of file PDFConstructor.h.

◆ getExpectedBkgPhotons() [2/2]

double getExpectedBkgPhotons ( double  minTime,
double  maxTime 
) const
inline

Returns the expected number of background photons within a given time window.

Photons from other tracks in the module are counted here as background.

Parameters
minTimetime window lower edge
maxTimetime window upper edge
Returns
expected number of background photons

Definition at line 254 of file PDFConstructor.h.

◆ getExpectedDeltaPhotons() [1/2]

double getExpectedDeltaPhotons ( ) const
inline

Returns the expected number of delta-ray photons within the default time window.

Returns
expected number of delta-ray photons (0 if modeling turned off)

Definition at line 196 of file PDFConstructor.h.

◆ getExpectedDeltaPhotons() [2/2]

double getExpectedDeltaPhotons ( double  minTime,
double  maxTime 
) const
inline

Returns the expected number of delta-ray photons within a given time window.

Parameters
minTimetime window lower edge
maxTimetime window upper edge
Returns
expected number of delta-ray photons (0 if modeling turned off)

Definition at line 242 of file PDFConstructor.h.

◆ getExpectedPhotons() [1/2]

double getExpectedPhotons ( ) const
inline

Returns the expected number of all photons within the default time window.

Returns
expected number of photons (signal + background + delta-ray)

Definition at line 216 of file PDFConstructor.h.

◆ getExpectedPhotons() [2/2]

double getExpectedPhotons ( double  minTime,
double  maxTime 
) const
inline

Returns the expected number of all photons within a given time window.

Parameters
minTimetime window lower edge
maxTimetime window upper edge
Returns
expected number of photons (signal + background + delta-ray)

Definition at line 269 of file PDFConstructor.h.

◆ getExpectedSignalPhotons() [1/2]

double getExpectedSignalPhotons ( ) const
inline

Returns the expected number of signal photons within the default time window.

Returns
expected number of signal photons

Definition at line 190 of file PDFConstructor.h.

◆ getExpectedSignalPhotons() [2/2]

double getExpectedSignalPhotons ( double  minTime,
double  maxTime 
) const
inline

Returns the expected number of signal photons within a given time window.

Parameters
minTimetime window lower edge
maxTimetime window upper edge
Returns
expected number of signal photons

Definition at line 227 of file PDFConstructor.h.

◆ getHypothesis()

const Const::ChargedStable& getHypothesis ( ) const
inline

Returns particle hypothesis.

Returns
particle hypothesis

Definition at line 141 of file PDFConstructor.h.

◆ getLogL() [1/3]

PDFConstructor::LogL getLogL ( ) const

Returns extended log likelihood (using the default time window)

Returns
log likelihood

Definition at line 837 of file PDFConstructor.cc.

◆ getLogL() [2/3]

PDFConstructor::LogL getLogL ( double  t0,
double  minTime,
double  maxTime,
double  sigt = 0 
) const

Returns extended log likelihood for PDF shifted in time and using different time window.

Parameters
t0time shift
minTimetime window lower edge
maxTimetime window upper edge
sigtadditional time smearing
Returns
log likelihood

Definition at line 864 of file PDFConstructor.cc.

◆ getLogL() [3/3]

LogL getLogL ( double  t0,
double  sigt = 0 
) const
inline

Returns extended log likelihood for PDF shifted in time.

Parameters
t0time shift
sigtadditional time smearing
Returns
log likelihood

Definition at line 300 of file PDFConstructor.h.

◆ getModuleID()

int getModuleID ( ) const
inline

Returns slot ID.

Returns
slot ID

Definition at line 135 of file PDFConstructor.h.

◆ getNCalls_expandPDF()

int getNCalls_expandPDF ( SignalPDF::EPeakType  type) const
inline

Returns number of calls of function expandSignalPDF for a given peak type.

Parameters
typePDF peak type
Returns
number of calls

Definition at line 363 of file PDFConstructor.h.

◆ getNCalls_setPDF()

int getNCalls_setPDF ( SignalPDF::EPeakType  type) const
inline

Returns number of calls of template function setSignalPDF<T> for a given peak type.

Parameters
typePDF peak type
Returns
number of calls

Definition at line 356 of file PDFConstructor.h.

◆ getPDFValue()

double getPDFValue ( int  pixelID,
double  time,
double  timeErr,
double  sigt = 0 
) const
inline

Returns PDF value.

Parameters
pixelIDpixel ID
timephoton hit time
timeErruncertainty of hit time
sigtadditional time smearing
Returns
PDF value

Definition at line 283 of file PDFConstructor.h.

◆ getPixelLogLs() [1/2]

const std::vector< PDFConstructor::LogL > & getPixelLogLs ( double  t0,
double  minTime,
double  maxTime,
double  sigt = 0 
) const

Returns extended log likelihoods in pixels for PDF shifted in time and using diferent time window.

Parameters
t0time shift
minTimetime window lower edge
maxTimetime window upper edge
sigtadditional time smearing
Returns
pixel log likelihoods (index = pixelID - 1)

Definition at line 921 of file PDFConstructor.cc.

◆ getPixelLogLs() [2/2]

const std::vector<LogL>& getPixelLogLs ( double  t0,
double  sigt = 0 
) const
inline

Returns extended log likelihoods in pixels for PDF shifted in time.

Parameters
t0time shift
sigtadditional time smearing
Returns
pixel log likelihoods (index = pixelID - 1)

Definition at line 332 of file PDFConstructor.h.

◆ getPulls()

const std::vector< PDFConstructor::Pull > & getPulls ( ) const

Returns photon pulls w.r.t PDF peaks.

Returns
pulls

Definition at line 971 of file PDFConstructor.cc.

◆ getSelectedHits()

const std::vector<TOPTrack::SelectedHit>& getSelectedHits ( ) const
inline

Returns selected photon hits belonging to this slot.

Returns
selected photon hits

Definition at line 147 of file PDFConstructor.h.

◆ getSignalPDF()

const std::vector<SignalPDF>& getSignalPDF ( ) const
inline

Returns signal PDF.

Returns
signal PDF in pixels (index = pixelID - 1)

Definition at line 172 of file PDFConstructor.h.

◆ initializePixelLogLs()

void initializePixelLogLs ( double  minTime,
double  maxTime 
) const
private

Initializes pixel log likelihoods.

Parameters
minTimetime window lower edge
maxTimetime window upper edge

Definition at line 951 of file PDFConstructor.cc.

◆ isValid()

bool isValid ( ) const
inline

Checks the object status.

Returns
true if track is valid and all requited reconstruction objects are available

Definition at line 113 of file PDFConstructor.h.

◆ pdfValue()

double pdfValue ( int  pixelID,
double  time,
double  timeErr,
double  sigt = 0 
) const
inlineprivate

Returns the value of PDF normalized to the number of expected photons.

Parameters
pixelIDpixel ID
timephoton hit time
timeErruncertainty of hit time
sigtadditional time smearing
Returns
PDF value

Definition at line 717 of file PDFConstructor.h.

◆ pdfValueSignalDelta()

double pdfValueSignalDelta ( int  pixelID,
double  time,
double  timeErr,
double  sigt = 0 
) const
inlineprivate

Returns the value of signal + deltaRay PDF normalized to the number of expected photons.

Parameters
pixelIDpixel ID
timephoton hit time
timeErruncertainty of hit time
sigtadditional time smearing
Returns
PDF value

Definition at line 706 of file PDFConstructor.h.

◆ prismRaytrace()

bool prismRaytrace ( const PrismSolution sol,
double  dL = 0,
double  dFic = 0,
double  de = 0 
)
private

Do forward raytracing of inverse raytracing solution in prism.

Parameters
solsolution of inverse raytracing in prism
dLstep in length along trajectory for derivative calculation
dFicstep in Cherenkov azimuthal angle for derivative calculation
destep in photon energy for derivative calculation
Returns
true on success

Definition at line 760 of file PDFConstructor.cc.

◆ prismSolution() [1/2]

PDFConstructor::PrismSolution prismSolution ( const PixelPositions::PixelData pixel,
unsigned  k,
int  nx 
)
private

General solution of inverse raytracing in prism: iterative procedure calling basic solution.

Parameters
pixelpixel data
kindex of unfolded prism exit window
nxnumber of reflections in x
Returns
solution

Definition at line 786 of file PDFConstructor.cc.

◆ prismSolution() [2/2]

PDFConstructor::PrismSolution prismSolution ( const ROOT::Math::XYZPoint &  rD,
double  L 
)
private

Basic solution of inverse raytracing in prism: assuming straight line particle trajectory.

Parameters
rDunfolded pixel position
Lemission position distance along particle trajectory
Returns
solution

Definition at line 808 of file PDFConstructor.cc.

◆ propagationLosses()

double propagationLosses ( double  E,
double  propLen,
int  nx,
int  ny,
SignalPDF::EPeakType  type 
) const
private

Returns photon propagation losses (bulk absorption, surface reflectivity, mirror reflectivity)

Parameters
Ephoton energy
propLenpropagation length
nxtotal number of reflections in x
nytotal number of reflections in y
typepeak type, e.g. direct or reflected
Returns
survival probability due to propagation losses

Definition at line 485 of file PDFConstructor.cc.

◆ rangeOfX()

bool rangeOfX ( double  z,
double &  xmi,
double &  xma 
)
private

Estimates range of unfolded x coordinate of the hits on given plane perpendicular to z-axis.

Parameters
zposition of the plane
xmilower limit [out]
xmaupper limit [out]
Returns
true if at least some photons can reach the plane within the time window

Definition at line 495 of file PDFConstructor.cc.

◆ raytrace()

bool raytrace ( const FastRaytracer rayTracer,
double  dL = 0,
double  de = 0,
double  dFic = 0 
)
private

Forward ray-tracing (called by setDerivatives)

Parameters
rayTracerforward ray-tracer object
dLvalue to be added to trajectory running parameter [cm]
devalue to be added to photon energy [eV]
dFicvalue to be added to Cherenkov azimuthal angle
Returns
true on success

Definition at line 357 of file PDFConstructor.cc.

◆ setDerivatives()

bool setDerivatives ( YScanner::Derivatives D,
double  dL,
double  de,
double  dFic 
)
private

Sets the derivatives (numerically) using forward ray-tracing.

Parameters
Dderivatives to be set
dLstep in trajectory running parameter [cm]
destep in photon energy [eV]
dFicstep in Cherenkov azimuthal angle
Returns
true on success

Definition at line 294 of file PDFConstructor.cc.

◆ setSignalPDF()

void setSignalPDF ( T &  t,
unsigned  col,
double  xD,
double  zD,
int  Nxm = 0,
double  xmMin = 0,
double  xmMax = 0 
)
private

Template function: sets signal PDF in a pixel column and for specific reflection in x.

Parameters
ttemplate parameter of type InverseRaytracerDirect or InverseRaytracerReflected
colpixel column (0-based)
xDunfolded detection position in x
zDdetection position in z
Nxmsigned number of reflections in x before mirror (dummy for direct PDF)
xmMinlower limit of the reflection positions on the mirror (dummy for direct PDF)
xmMaxupper limit of the reflection positions on the mirror (dummy for direct PDF)

Definition at line 756 of file PDFConstructor.h.

◆ setSignalPDF_reflected()

void setSignalPDF_reflected ( int  Nxm,
double  xmMin,
double  xmMax 
)
private

Sets signal PDF for reflected photons at given reflection number.

Parameters
Nxmreflection number in x before mirror
xmMinlower limit of the reflection positions on the mirror
xmMaxupper limit of the reflection positions on the mirror

Definition at line 176 of file PDFConstructor.cc.

◆ switchDeltaRayPDF()

void switchDeltaRayPDF ( bool  deltaPDFOn) const
inline

Include or exclude delta-ray PDF in log likelihood calculation.

Parameters
deltaPDFOntrue = include, false = exclude

Definition at line 129 of file PDFConstructor.h.


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