9#include <reconstruction/modules/MdstPID/MdstPIDModule.h>
10#include <klm/muid/MuidElementNumbers.h>
20 setDescription(
"Create MDST PID format (PIDLikelihood objects) from subdetector PID info.");
31 "if set to True, subtract the maximum of log likelihoods to reduce the range of values",
false);
57 for (
int itra = 0; itra <
m_tracks.getEntries(); ++itra) {
64 track->addRelationTo(
m_pid);
98 if (logl->
getFlag() != 1)
return;
110 if (logl->
getFlag() != 1)
return;
155 if (abs(muid->getPDGCode()) != abs(
Const::muon.getPDGCode())) {
156 B2WARNING(
"MdstPID, KLMMuidLikelihood: extrapolation with other than muon hypothesis ignored");
160 if (muid->getOutcome() == MuidElementNumbers::c_NotReached)
163 if (muid->getJunkPDFValue())
This is a class to store ARICH likelihoods in the datastore.
int getFlag() const
Get reconstruction flag.
float getLogL(const Const::ChargedStable &part) const
Return log likelihood for a given particle.
Container for likelihoods obtained by the CDC dE/dx PID (CDCDedxPIDModule).
double getLogL(const Const::ChargedStable &type) const
returns unnormalised log-likelihood value for a particle hypothesis using CDC information.
static const ChargedStable muon
muon particle
static const ParticleSet chargedStableSet
set of charged stable particles
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
Container for likelihoods with ECL PID (ECLChargedPIDModule)
float getLogLikelihood(const Const::ChargedStable &type) const
returns log-likelihood value for a particle hypothesis.
Class to store the likelihoods from KLM with additional information related to the extrapolation.
StoreArray< KLMMuidLikelihood > m_muid
Optional collection of KLMMuidLikelihood.
bool areLikelihoodsValid(const T *logl)
Check for validity of log likelihood values (NaN and +Inf are not allowed).
StoreArray< VXDDedxLikelihood > m_vxdDedxLikelihoods
Optional collection of VXDDedxLikelihoods.
bool m_subtractMaximum
if true subtract the maximum of log likelihoods
virtual void initialize() override
Initialize the module.
virtual void event() override
Called for each event.
StoreArray< TOPLikelihood > m_topLikelihoods
Optional collection of TOPLikelihoods.
MdstPIDModule()
Constructor.
StoreArray< ECLPidLikelihood > m_eclLikelihoods
Optional collection of ECLPidLikelihoods.
PIDLikelihood * m_pid
pointer to the object to be filled
std::map< Const::ChargedStable, std::string > m_chargedNames
names of charged particles (used in error messages)
StoreArray< Track > m_tracks
Required collection of Tracks.
StoreArray< ARICHLikelihood > m_arichLikelihoods
Optional collection of ARICHLikelihoods.
void setLikelihoods(const TOPLikelihood *logl)
Set TOP log likelihoods and corresponding reconstruction flag.
StoreArray< CDCDedxLikelihood > m_cdcDedxLikelihoods
Optional collection of CDCDedxLikelihoods.
StoreArray< PIDLikelihood > m_pidLikelihoods
collection of PIDLikelihoods
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void subtractMaximum()
Subtract the maximum of log likelihoods of each detector component in order to reduce the range of va...
void setLogLikelihood(Const::EDetector det, const Const::ChargedStable &part, float logl)
Set log likelihood for a given detector and particle.
Class to store TOP log likelihoods (output of TOPReconstructor).
int getFlag() const
Return reconstruction flag.
float getLogL(const Const::ChargedStable &part) const
Return log likelihood for a given particle.
Class that bundles various TrackFitResults.
Container for likelihoods obtained by the VXD dE/dx PID (VXDDedxPIDModule).
double getLogL(const Const::ChargedStable &type) const
returns unnormalised log-likelihood value for a particle hypothesis using SVD (and/or PXD) informatio...
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.