ATLAS Offline Software
Loading...
Searching...
No Matches
PhotonTruthTool.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id$
16
17
18#ifndef EGAMMAD3PDANALYSIS_PHOTONTRUTHTOOL_H
19#define EGAMMAD3PDANALYSIS_PHOTONTRUTHTOOL_H
20
21
24#include "GaudiKernel/ToolHandle.h"
25#include "xAODEgamma/Photon.h"
28#include <string>
29
30
31namespace D3PD {
32
34 : public AthAlgTool
35{
36public:
43 PhotonTruthTool (const std::string& type,
44 const std::string& name,
45 const IInterface* parent);
46
47
49 virtual StatusCode initialize();
50
58 toTruthParticle (const xAOD::Photon& g) const;
59
60
68 bool getMCConv (const xAOD::TruthParticle* truePart,
69 float& RconvMC,
70 float& ZconvMC) const;
71
72
74 bool isPromptPhotonMC (const xAOD::TruthParticle* truePart) const;
75
76
78 bool isPromptParticleMC (const xAOD::TruthParticle* truePart) const;
79
80
82 bool isQuarkBremMC (const xAOD::TruthParticle* truePart) const;
83
84
85private:
87 bool isFinalStatePhotonMC (const xAOD::TruthParticle* truePart) const;
88
89
91 bool isFinalState(const xAOD::TruthParticle* truePart) const;
92
93
96 getMother(const xAOD::TruthParticle* p) const;
97
98
100 const xAOD::TruthVertex*
101 getMotherVert(const xAOD::TruthParticle* p) const;
102
103
105 std::vector<const xAOD::TruthParticle*>
106 getMothers(const xAOD::TruthParticle* p) const;
107
108
110 ToolHandle<IMCTruthClassifier> m_classifier;
111
114
117
120};
121
122
123} // namespace D3PD
124
125
126#endif // EGAMMAD3PDANALYSIS_PHOTONTRUTHTOOL_H
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
PhotonTruthTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
ToolHandle< IMCTruthClassifier > m_classifier
Property: classifier tool.
bool isPromptPhotonMC(const xAOD::TruthParticle *truePart) const
Test for a prompt photon.
bool isQuarkBremMC(const xAOD::TruthParticle *truePart) const
Test for a brem.
bool getMCConv(const xAOD::TruthParticle *truePart, float &RconvMC, float &ZconvMC) const
Check a truth particle for a conversion.
const xAOD::TruthVertex * getMotherVert(const xAOD::TruthParticle *p) const
Get the mother vertex for p.
virtual StatusCode initialize()
Standard Gaudi initialize method.
bool isFinalStatePhotonMC(const xAOD::TruthParticle *truePart) const
Test for a final-state photon.
const xAOD::TruthParticle * getMother(const xAOD::TruthParticle *p) const
Get the (first) mother particle of p.
bool isPromptParticleMC(const xAOD::TruthParticle *truePart) const
Test for a prompt particle.
bool isFinalState(const xAOD::TruthParticle *truePart) const
Test for a final-state particle.
std::vector< const xAOD::TruthParticle * > getMothers(const xAOD::TruthParticle *p) const
Return list of mother particles of p.
bool m_useG4Particles
Property.
float m_zTruthConv
Property: Conversion vertex z cut.
float m_rTruthConv
Property: Conversion vertex r cut.
const xAOD::TruthParticle * toTruthParticle(const xAOD::Photon &g) const
Go from a photon to a matching TruthParticle.
Block filler tool for noisy FEB information.
TruthVertex_v1 TruthVertex
Typedef to implementation.
Definition TruthVertex.h:15
TruthParticle_v1 TruthParticle
Typedef to implementation.
Photon_v1 Photon
Definition of the current "egamma version".