5#ifndef MCTRUTHCLASSIFIER_MCTRUTHCLASSIFIER_H
6#define MCTRUTHCLASSIFIER_MCTRUTHCLASSIFIER_H
28#include "GaudiKernel/ToolHandle.h"
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");
104#if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
119 return StatusCode::SUCCESS;
121 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
125 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
130#ifndef GENERATIONBASE
139 virtual std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin>
159 inline double detEta(
double x,
double y)
const {
return std::abs(
x -
y); }
162 if (det >
M_PI) det = det - 2. *
M_PI;
163 if (det < -
M_PI) det = det + 2. *
M_PI;
164 return std::abs(det);
205#if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
216#ifndef GENERATIONBASE
225#if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
228 ToolHandle<xAOD::ITruthParticlesInConeTool>
229 m_truthInConeTool{
this,
"TruthInConeTool",
"xAOD::TruthParticlesInConeTool/TruthParticlesInConeTool"};
252#ifndef GENERATIONBASE
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition of CaloDetDescrManager.
ATLAS-specific HepMC functions.
Wrapper to avoid constant divisions when using units.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Principal data class for CaloCell clusters.
This class provides the client interface for accessing the detector description information common to...
a link optimized in size for a GenParticle in a McEventCollection
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
bool TruthLoopDetectionMethod3(const xAOD::TruthVertex *childOrigVtx, const xAOD::TruthParticle *parent) const
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > particleHepMCTruthClassifier(const HepMcParticleLink &theLink, MCTruthPartClassifier::Info *info=nullptr) const override final
MCTruthPartClassifier::ParticleOrigin defOrigOfElectron(const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info &info) const
SG::ReadHandleKey< xAODTruthParticleLinkVector > m_truthLinkVecReadHandleKey
bool TruthLoopDetectionMethod1(const xAOD::TruthVertex *childOrigVtx, const xAOD::TruthParticle *parent) const
ToolHandle< xAOD::ITruthParticlesInConeTool > m_truthInConeTool
MCTruthPartClassifier::ParticleOrigin defOrigOfNeutrino(const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info &info) const
double fracParticleInJet(const xAOD::TruthParticle *, const xAOD::Jet *, bool DR, bool nparts) const
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
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 * egammaClusMatch(const xAOD::CaloCluster *, bool, MCTruthPartClassifier::Info *info) const override final
MCTruthPartClassifier::ParticleOrigin defOrigOfMuon(const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info &info) const
MCTruthPartClassifier::ParticleOrigin defOrigOfPhoton(const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, bool &isPrompt, MCTruthPartClassifier::Info &info) const
virtual ~MCTruthClassifier()=default
float m_FwdElectronTruthExtrEtaWindowCut
double detEta(double x, double y) const
virtual std::pair< MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin > particleTruthClassifier(const xAOD::TruthParticle *, MCTruthPartClassifier::Info *info=nullptr) const override final
bool m_FwdElectronUseG4Sel
void findJetConstituents(const xAOD::Jet *, std::set< const xAOD::TruthParticle * > &constituents, bool DR) const
MCTruthClassifier(const std::string &type)
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool
bool TruthLoopDetectionMethod2(const xAOD::TruthParticle *child, const xAOD::TruthParticle *parent) const
float m_FwdElectronTruthExtrEtaCut
double detPhi(double x, double y) const
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleContainerKey
virtual const xAOD::TruthParticle * getGenPart(const xAOD::TrackParticle *, MCTruthPartClassifier::Info *info=nullptr) const override final
MCTruthPartClassifier::ParticleOrigin defOrigOfTau(const xAOD::TruthParticleContainer &xTruthParticleContainer, const xAOD::TruthParticle *, int motherPDG, MCTruthPartClassifier::Info &info) const
Property holding a SG store/key/clid from which a ReadHandle is made.
Class describing an electron.
Class describing an photon.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Jet_v1 Jet
Definition of the current "jet version".
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TruthVertex_v1 TruthVertex
Typedef to implementation.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.