9#include <reconstruction/modules/VXDDedxPID/VXDDedxPIDRemakerModule.h>
10#include <reconstruction/dataobjects/DedxConstants.h>
35 setDescription(
"Module that re-makes VXD PID likelihoods by taking dE/dx stored in VXDDedxTracks and lookup table PDF's from DB.");
39 "Use individual hits (true) or truncated mean (false) to determine likelihoods",
false);
47 if (not
m_PXDDedxPDFs) B2FATAL(
"No PXD dE/dx PDF's available");
49 if (not ok) B2FATAL(
"Binning or ranges of PXD dE/dx PDF's differ");
52 if (not
m_SVDDedxPDFs) B2FATAL(
"No SVD Dedx PDF's available");
54 if (not ok) B2FATAL(
"Binning or ranges of SVD dE/dx PDF's differ");
80 if (not dedxTrack)
continue;
85 if (
m_usePXD) dedxTrack->addLogLikelihoods(
m_PXDDedxPDFs->getPDFs(truncated), Dedx::c_PXD, truncated);
86 if (
m_useSVD) dedxTrack->addLogLikelihoods(
m_SVDDedxPDFs->getPDFs(truncated), Dedx::c_SVD, truncated);
89 if (dedxTrack->areLogLikelihoodsAvailable()) {
90 auto* likelihoodObj =
m_dedxLikelihoods.appendNew(dedxTrack->getLogLikelihoods());
91 track.addRelationTo(likelihoodObj);
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...
DBObjPtr< SVDdEdxPDFs > m_SVDDedxPDFs
look-up tables of SVD PDF's
bool m_usePXD
use PXD data for likelihood
StoreArray< VXDDedxLikelihood > m_dedxLikelihoods
collection of VXDDedxLikelihoods
DBObjPtr< PXDdEdxPDFs > m_PXDDedxPDFs
look-up tables of PXD PDF's
StoreArray< VXDDedxTrack > m_dedxTracks
collection of VXDDedxTracks
bool m_useSVD
use SVD data for likelihood
StoreArray< Track > m_tracks
collection of Tracks
bool m_useIndividualHits
use individual hits (true) or truncated mean (false) to determine likelihoods
Debug output for VXDDedxPID module.
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.
void clearLogLikelihoods()
Clear log likelihoods (set to zero) and reset the counter of added log likelihood values.
virtual void initialize() override
Initialize the module.
virtual void event() override
This method is called for each event.
void checkPDFs()
Check the pdfs for consistency every time they change in the database.
VXDDedxPIDRemakerModule()
Default constructor.
Abstract base class for different kinds of events.