12#include <framework/core/Module.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/datastore/StoreObjPtr.h>
15#include <framework/dataobjects/EventMetaData.h>
16#include <framework/gearbox/Const.h>
17#include <framework/logging/Logger.h>
18#include <framework/utilities/FileSystem.h>
19#include <framework/gearbox/Unit.h>
20#include <framework/database/DBObjPtr.h>
23#include <mdst/dataobjects/Track.h>
26#include <ecl/dataobjects/ECLShower.h>
27#include <ecl/dataobjects/ECLPidLikelihood.h>
28#include <ecl/dbobjects/ECLChargedPidPDFs.h>
96 virtual void event()
override;
103 virtual void endRun()
override;
154 std::unordered_map<ECLChargedPidPDFs::InputVar, double>
m_variables {
195 void transfoGaussDecorr(
const unsigned int pdg,
const int charge,
const double& p,
const double& theta,
196 std::vector<double>& variables);
202 double getPdfVal(
const double& x,
const TF1* pdf);
207 static constexpr double c_sqrt2 = 1.41421356237309504880;
Class for accessing objects in the database.
The module implements charged particle identification using ECL-related observables.
virtual ~ECLChargedPIDModule()
Destructor, use to clean up anything you created in the constructor.
virtual void initialize() override
Use this to initialize resources or memory your module needs.
DBObjPtr< ECLChargedPidPDFs > m_pdfs
Interface to get the DB payload for ECL charged PID PDFs.
virtual void event() override
Called once for each event.
virtual void endRun() override
Called once when a run ends.
virtual void terminate() override
Clean up anything you created in initialize().
double getPdfVal(const double &x, const TF1 *pdf)
Extract the PDF value for a given variable from the TF1 object.
static constexpr double c_sqrt2
Definition of sqrt(2)
ECLChargedPIDModule()
Constructor, for setting module description and parameters.
int linIndex(int i, int j, int m)
Get the index corresponding to element i,j in a linearised n*m array.
StoreObjPtr< EventMetaData > m_eventMetaData
The event information.
static constexpr double c_dummyLogL
Dummy value of Log Likelihood for a particle hypothesis.
void transfoGaussDecorr(const unsigned int pdg, const int charge, const double &p, const double &theta, std::vector< double > &variables)
Transform input variables according to:
void checkPdfsDB()
Check the PDFs payload for consistency every time they change in the database.
virtual void beginRun() override
Called once before a new run begins.
std::unordered_map< ECLChargedPidPDFs::InputVar, double > m_variables
Map to contain ECL shower observables.
StoreArray< Track > m_tracks
Array of Track objects.
bool m_applyClusterTimingSel
Apply cluster timing selection.
StoreArray< ECLPidLikelihood > m_eclPidLikelihoods
Array of ECLPidLikelihood objects.
@ c_DeltaL
DeltaL (track depth)
@ c_Z40
Zernike moment 40.
@ c_E
Energy of maxE shower.
@ c_Z51
Zernike moment 51.
@ c_LAT
Lateral shower shape.
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
Abstract base class for different kinds of events.