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;
258 std::vector<std::vector<float>> m_pids_glob = std::vector<std::vector<float>>(
c_chargedStableHypos,
265 std::vector<float> m_p_binedges = {0.0, 0.5, 0.75, 1.0, 3.0, 5.0};
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};
274 StoreArray<MCParticle> m_MCParticles;
279 void dumpPIDVars(TTree* sampleTree,
const Const::ChargedStable& sigHypo,
const int sigCharge,
const Const::ChargedStable& bkgHypo,
280 bool mergeSigCharge =
false);
293 void dumpPIDEfficiencyFakeRate(TTree* sampleTree,
const Const::ChargedStable& sampleHypo,
const int sampleCharge,
294 const Const::ChargedStable& sigHypo,
bool mergeSampleCharge =
false);
305 void dumpTrkClusMatchingEfficiency(TTree* sampleTree,
const Const::ChargedStable& sampleHypo,
const int sampleCharge,
306 bool mergeSampleCharge =
false);
311 inline bool isValidChargedPdg(
const int pdg)
const
319 void paintUnderOverflow(TH1F* h);
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.
This module dumps a tree and a set of histograms of ECL PID-related info used for validation,...
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.
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.
virtual void terminate() override
Termination action.
static constexpr float c_PID
Defintion of the PID cut threshold to compute the efficiency.
std::vector< float > m_pt
Track transverse momentum in [GeV/c].
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 ...
virtual ~ECLChargedPIDDataAnalysisValidationModule()
Destructor of the module.
std::vector< float > m_clusterReg
Cluster ECL region.
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.
Abstract base class for different kinds of events.