![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef MCTRUTHCLASSIFIER_MCTRUTHCLASSIFIER_H
6 #define MCTRUTHCLASSIFIER_MCTRUTHCLASSIFIER_H
28 #include "GaudiKernel/ToolHandle.h"
33 #ifndef GENERATIONBASE
44 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
61 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
63 "Use Geant4 selection for forward electrons calo clusters");
66 "Cut on the eta of the truth Particles to be extrapolated "
69 "FwdElectronTruthExtrEtaWindowCut",
71 "Cut on the delta eta of the truth Particles to be extrapolated for "
72 "Fwd electrons and the current FwdElectron");
86 #ifndef GENERATIONBASE
106 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
121 return StatusCode::SUCCESS;
124 #ifndef XAOD_STANDALONE
127 {
return StatusCode::SUCCESS;}
130 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
133 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
137 #ifndef XAOD_ANALYSIS
138 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
141 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
146 #ifndef GENERATIONBASE
147 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
150 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
153 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
156 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
159 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
162 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
170 inline double detEta(
double x,
double y)
const {
return std::abs(
x -
y); }
171 inline double detPhi(
double x,
double y)
const {
204 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
216 #ifndef GENERATIONBASE
223 m_truthParticleContainerKey{
this,
"xAODTruthParticleContainerName",
"TruthParticles",
"ReadHandleKey for xAOD::TruthParticleContainer"};
225 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
226 ToolHandle<Trk::IParticleCaloExtensionTool>
m_caloExtensionTool{
this,
"ParticleCaloExtensionTool",
""};
228 ToolHandle<xAOD::ITruthParticlesInConeTool>
229 m_truthInConeTool{
this,
"TruthInConeTool",
"xAOD::TruthParticlesInConeTool/TruthParticlesInConeTool"};
248 #ifndef XAOD_ANALYSIS
252 #ifndef GENERATIONBASE
259 #endif // MCTRUTHCLASSIFIER_MCTRUTHCLASSIFIER_H
MCTruthPartClassifier::ParticleOrigin defOrigOfNeutrino(const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const
float m_FwdElectronTruthExtrEtaWindowCut
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
void findJetConstituents(const xAOD::Jet *, std::set< const xAOD::TruthParticle * > &constituents, bool DR) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool
MCTruthPartClassifier::ParticleOrigin defOrigOfElectron(const xAOD::TruthParticleContainer *xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const
const std::string & key() const
Return the StoreGate ID for the referenced object.
virtual StatusCode finalize() override
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleContainerKey
Definition of CaloDetDescrManager.
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > checkOrigOfBkgElec(const xAOD::TruthParticle *thePart, MCTruthPartClassifier::Info *info=nullptr) const override
a link optimized in size for a GenParticle in a McEventCollection
Description of a calorimeter cluster.
float m_FwdElectronTruthExtrEtaCut
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
SG::ReadHandleKey< xAODTruthParticleLinkVector > m_truthLinkVecReadHandleKey
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool genPartToCalo(const EventContext &ctx, const xAOD::CaloCluster *clus, const xAOD::TruthParticle *thePart, bool isFwrdEle, double &dRmatch, bool &isNarrowCone, const CaloDetDescrManager &caloDDMgr) const
virtual const xAOD::TruthParticle * getGenPart(const xAOD::TrackParticle *, MCTruthPartClassifier::Info *info=nullptr) const override
const GenParticle * ConstGenParticlePtr
StatusCode initialize(bool used=true)
Wrapper to avoid constant divisions when using units.
const xAOD::TruthParticle * egammaClusMatch(const xAOD::CaloCluster *, bool, MCTruthPartClassifier::Info *info) const
MCTruthClassifier(const std::string &type)
MCTruthPartClassifier::ParticleOrigin defOrigOfMuon(const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
This class provides the client interface for accessing the detector description information common to...
int isPrompt(const unsigned int classify, bool allow_prompt_tau_decays=true)
MCTruthPartClassifier::ParticleOrigin defOrigOfTau(const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, int motherPDG, MCTruthPartClassifier::Info *info) const
ToolHandle< xAOD::ITruthParticlesInConeTool > m_truthInConeTool
Class describing a TrackParticle.
virtual ~MCTruthClassifier()=default
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > particleTruthClassifier(const xAOD::TruthParticle *, MCTruthPartClassifier::Info *info=nullptr) const override
bool m_FwdElectronUseG4Sel
double detEta(double x, double y) const
double fracParticleInJet(const xAOD::TruthParticle *, const xAOD::Jet *, bool DR, bool nparts) const
MCTruthPartClassifier::ParticleOrigin defOrigOfPhoton(const xAOD::TruthParticleContainer *m_xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info *info) const
double detPhi(double x, double y) const