12#include <mdst/dataobjects/MCParticle.h>
20#include <framework/core/Module.h>
21#include <framework/datastore/StoreArray.h>
22#include <framework/gearbox/Const.h>
63 virtual void event()
override;
68 virtual void endRun()
override;
81 static constexpr float c_PID = 0.5;
271 std::vector<float>
m_th_binedges = {0.0, 0.2164208, 0.385, 0.561996, 1.13, 1.57, 1.88, 2.2462387, 2.47, 2.7070057, 3.1415926};
282 bool mergeSigCharge =
false);
308 bool mergeSampleCharge =
false);
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.)
static const ParticleSet chargedStableSet
set of charged stable particles
static const ParticleType invalidParticle
Invalid particle, used internally.
static constexpr unsigned int c_chargedStableHypos
The maximal number of charged stable particle hypotheses.
std::vector< float > m_trackClusterMatch
Flag for track-cluster matching condition.
ECLChargedPIDDataAnalysisValidationModule()
Constructor of the module.
bool isValidChargedPdg(const int pdg) const
Check if the input pdgId is that of a valid charged stable particle.
std::vector< float > m_th_binedges
Binning w/ variable bin size for track polar angle (in [rad]).
std::set< int > m_inputPdgIdSet
The pdgId set of the charged stable particles of interest.
virtual void initialize() override
Initializes the module.
virtual void event() override
Called once for each event.
std::vector< float > m_p
Track momentum in [GeV/c].
virtual void endRun() override
Called once when a run ends.
std::vector< float > m_deltalogl_sig_bkg
Delta Log-likelihood "signal" vs.
void paintUnderOverflow(TH1F *h)
Draw u/oflow content on top of first/last visible bin.
virtual void terminate() override
Termination action.
std::vector< float > m_p_binedges
Binning w/ variable bin size for track momentum (in [GeV/c]).
static constexpr float c_PID
Definition of the PID cut threshold to compute the efficiency.
std::vector< float > m_pt
Track transverse momentum in [GeV/c].
void dumpPIDEfficiencyFakeRate(TTree *sampleTree, const Const::ChargedStable &sampleHypo, const int sampleCharge, const Const::ChargedStable &sigHypo, bool mergeSampleCharge=false)
Dump PID efficiency / fake rate vs clusterTheta, clusterPhi, p... for a fixed cut on PID as previousl...
bool m_saveValidationTree
Save the TTree in the output file alongside the histograms.
std::vector< float > m_logl_bkg
Log-likelihood for the "background" particle hypothesis.
virtual void beginRun() override
Called once before a new run begins.
std::vector< float > m_clusterPhi
Cluster azimuthal angle in [rad].
std::vector< TFile * > m_outputFile
Output ROOT::TFile that contains the info to plot.
std::vector< float > m_clusterTheta
Cluster polar angle in [rad].
std::map< Const::ChargedStable, bool > m_mergeChargeFlagByHypo
A map to tell for each charged stable particle hypothesis whether particle and antiparticle should be...
std::vector< TTree * > m_tree
A ROOT::TTree filled with the info to make control plots.
std::vector< unsigned int > m_mergeChargeOfPdgIds
The (unsigned) pdgId list of the charged stable particles for which particle and antiparticle should ...
void dumpPIDVars(TTree *sampleTree, const Const::ChargedStable &sigHypo, const int sigCharge, const Const::ChargedStable &bkgHypo, bool mergeSigCharge=false)
Dump PID vars.
virtual ~ECLChargedPIDDataAnalysisValidationModule()
Destructor of the module.
std::vector< std::vector< float > > m_pids_glob
List of global PIDs, defined by the likelihood ratio:
std::vector< float > m_clusterReg
Cluster ECL region.
void dumpTrkClusMatchingEfficiency(TTree *sampleTree, const Const::ChargedStable &sampleHypo, const int sampleCharge, bool mergeSampleCharge=false)
Dump track-to-ECL-cluster matching efficiency vs clusterTheta, clusterPhi, pt....
StoreArray< MCParticle > m_MCParticles
MCParticles.
std::vector< float > m_trkPhi
Track azimuthal angle in [rad].
std::vector< float > m_trkTheta
Track polar angle in [rad].
std::vector< float > m_logl_sig
Log-likelihood for the "signal" particle hypothesis.
std::string m_outputFileName
Base name of the output ROOT::TFile.
std::vector< int > m_inputPdgIdList
The pdgId list of the charged stable particles of interest.
Accessor to arrays stored in the data store.
Abstract base class for different kinds of events.