12#include <klm/dataobjects/bklm/BKLMElementNumbers.h>
13#include <klm/dataobjects/eklm/EKLMElementNumbers.h>
16#include <framework/datastore/RelationsObject.h>
17#include <framework/gearbox/Const.h>
static constexpr int getMaximalLayerNumber()
Get maximal layer number (1-based).
Provides a type-safe way to pass members of the chargedStableSet set.
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
int getIndex() const
This particle's index in the associated set.
static const ChargedStable muon
muon particle
static const ChargedStable pion
charged pion particle
static const ChargedStable proton
proton particle
static const ChargedStable kaon
charged kaon particle
static const ChargedStable electron
electron particle
static const ChargedStable deuteron
deuteron particle
static constexpr int getMaximalLayerNumber()
Get maximal layer number.
Class to store the likelihoods from KLM with additional information related to the extrapolation.
double getLogL_pi() const
Get the log-likelihood for the pion hypothesis.
int getPDGCode() const
Get the PDG code of the particle hypothesis used during the extrapolation.
void setExtLayer(int layer)
Set the outermost EKLM layer crossed in the extrapolation.
double getLogL_d() const
Get the log-likelihood for the deuteron hypothesis.
int m_ExtLayer
Outermost KLM layer crossed in the extrapolation.
void setExtLayerPattern(unsigned int pattern)
Set the pattern of the layers crossed in the extrapolation.
void setLogL(double logL, int pdg)
Set the log-likelihood.
void setLogL_pi(double logL)
Set the log-likelihood for the pion hypothesis.
void setExtEKLMEfficiencyValue(int layer, float efficiency)
Set the efficiency of a given EKLM layer.
KLMMuidLikelihood()
Constructor.
~KLMMuidLikelihood()
Destructor.
void setExtBKLMEfficiencyValue(int layer, float efficiency)
Set the efficiency of a given BKLM layer.
int getEndcapHitLayer() const
Get the outermost EKLM layer actually crossed by the track.
void setPionPDFValue(double pdfValue)
Set the normalized PDF for the pion hypothesis.
void setChiSquared(double chiSquared)
Set the chi-squared of the extrapolation.
void setHitLayerPattern(unsigned int pattern)
Set the pattern of the layers actually crossed by the track.
unsigned int m_Outcome
Outcome of this extrapolation.
double getElectronPDFValue() const
Get the normalized PDF for the electron hypothesis.
unsigned int getHitLayerPattern() const
Get the pattern of the layers actually crossed by the track.
bool m_IsForward
Flag to determine if this extrapolation is in forward or backward B/EKLM.
int m_BarrelExtLayer
Outermost BKLM layer crossed in the extrapolation.
float m_LogL[Const::ChargedStable::c_SetSize]
Array of log-likelihoods.
double getLogL_e() const
Get the log-likelihood for the electron hypothesis.
void setLogL_d(double logL)
Set the log-likelihood for the deuteron hypothesis.
void setBarrelExtLayer(int layer)
Set the outermost BKLM layer crossed in the extrapolation.
void setLogL_mu(double logL)
Set the log-likelihood for the muon hypothesis.
void setIsForward(bool isForward)
Set if this extrapolation is in forward or backward B/EKLM.
int m_EndcapHitLayer
Outermost EKLM layer actually crossed by the track.
void setJunkPDFValue(bool flag)
Set the junk flag (1 if junk, 0 if not).
int m_BarrelHitLayer
Outermost BKLM layer actually crossed by the track.
void setPDGCode(int pdg)
Set the PDG code of the particle hypothesis used during the extrapolation.
bool isExtrapolatedEndcapLayerCrossed(int layer) const
Check whether the given EKLM layer is crossed during extrapolation.
double getLogL_p() const
Get the log-likelihood for the proton hypothesis.
int m_EndcapExtLayer
Outermost EKLM layer crossed in the extrapolation.
unsigned int m_ExtLayerPattern
Pattern of the layers crossed in the extrapolation (bits 0..14 = BKLM layers 1..15,...
void setLogL_p(double logL)
Set the log-likelihood for the proton hypothesis.
bool getIsForward() const
Return if this extrapolation is in forward or backward B/EKLM.
unsigned int m_HitLayerPattern
Pattern of the layers actually crossed by the track (bits 0..14 = BKLM layers 1..15,...
void setDeuteronPDFValue(double pdfValue)
Set the normalized PDF for the deuteron hypothesis.
void setElectronPDFValue(double pdfValue)
Set the normalized PDF for the electron hypothesis.
void setDegreesOfFreedom(int dof)
Set the number of degrees of freedom (= 2 times the number of KLM hits) for the chi-square computatio...
int getDegreesOfFreedom() const
Get the number of degrees of freedom (= 2 times the number of KLM hits) for the chi-squared computati...
unsigned int getTotalBarrelHits() const
Get the total number of crossed BKLM layers.
void setLogL_e(double logL)
Set the log-likelihood for the electron hypothesis.
float m_ExtEKLMEfficiencyValue[EKLMElementNumbers::getMaximalLayerNumber()]
Array of EKLM layer efficiencies.
int m_HitLayer
Outermost KLM layer actually crossed by the track.
float getExtEKLMEfficiencyValue(int layer) const
Get the efficiency of a given EKLM layer.
double getKaonPDFValue() const
Get the normalized PDF for the kaon hypothesis.
unsigned int getOutcome() const
Get the outcome of this extrapolation.
unsigned int getTotalEndcapHits() const
Get the total number of crossed EKLM layers.
int getCharge() const
Get the charge of the particle hypothesis used during the extrapolation.
int getHitLayer() const
Get the outermost KLM layer actually crossed by the track.
void setKaonPDFValue(double pdfValue)
Set the normalized PDF for the kaon hypothesis.
double getPionPDFValue() const
Get the normalized PDF for the pion hypothesis.
int getExtLayer() const
Get the outermost KLM layer crossed in the extrapolation.
double getDeuteronPDFValue() const
Get the normalized PDF for the deuteron hypothesis.
void setPDFValue(double pdfValue, int pdg)
Set the normalized PDF.
double getChiSquared() const
Get the chi-squared of the extrapolation.
int getBarrelExtLayer() const
Get the outermost BKLM layer crossed in the extrapolation.
void setEndcapExtLayer(int layer)
Set the outermost EKLM layer crossed in the extrapolation.
float m_ChiSquared
Chi-squared of the extrapolation.
double getPDFValue(int pdg) const
Get the normalized PDF.
void setMuonPDFValue(double pdfValue)
Set the normalized PDF for the muon hypothesis.
void setProtonPDFValue(double pdfValue)
Set the normalized PDF for the proton hypothesis.
float getExtBKLMEfficiencyValue(int layer) const
Get the efficiency of a given BKLM layer.
double getProtonPDFValue() const
Get the normalized PDF for the proton hypothesis.
void setBarrelHitLayer(int layer)
Set the outermost BKLM layer actually crossed by the track.
int m_DegreesOfFreedom
Number of degrees of freedom (= 2 times the number of KLM hits) for the chi-squared computation.
double getLogL_mu() const
Get the log-likelihood for the muon hypothesis.
bool getJunkPDFValue() const
Get the junk flag (1 if junk, 0 if not).
bool m_JunkPDFValue
Junk flag (1 if junk, 0 if not).
void setOutcome(unsigned int outcome)
Set the outcome of this extrapolation.
float m_ExtBKLMEfficiencyValue[BKLMElementNumbers::getMaximalLayerNumber()]
Array of BKLM layer efficiencies.
void setLogL_K(double logL)
Set the log-likelihood for the kaon hypothesis.
double getLogL(int pdg) const
Get the log-likelihood.
bool isExtrapolatedBarrelLayerCrossed(int layer) const
Check whether the given BKLM layer is crossed during extrapolation.
double getMuonPDFValue() const
Get the normalized PDF for the muon hypothesis.
void setHitLayer(int layer)
Set the outermost KLM layer actually crossed by the track.
double getLogL_K() const
Get the log-likelihood for the kaon hypothesis.
unsigned int getExtLayerPattern() const
Get the pattern of the layers crossed in the extrapolation.
int m_PDGCode
PDG code of the particle hypothesis used during the extrapolation.
void setEndcapHitLayer(int layer)
Set the outermost EKLM layer actually crossed by the track.
float m_PDFValue[Const::ChargedStable::c_SetSize]
Array of normalized PDFs.
int getEndcapExtLayer() const
Get the outermost EKLM layer crossed in the extrapolation.
int getBarrelHitLayer() const
Get the outermost BKLM layer actually crossed by the track.
Defines interface for accessing relations of objects in StoreArray.
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.