ATLAS Offline Software
TruthParticleID/McParticleTools/src/TruthIsolationTool.h
Go to the documentation of this file.
1 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef MCPARTICLETOOLS_TRUTHISOLATIONTOOL_H
8 #define MCPARTICLETOOLS_TRUTHISOLATIONTOOL_H
9 
10 // STL includes
11 #include <string>
12 #include <list>
13 #include <unordered_map>
14 
15 // FrameWork includes
16 #include "GaudiKernel/ServiceHandle.h"
18 
19 // McParticleKernel includes
21 
22 // McParticleEvent includes
24 #include "HepPDT/ParticleDataTable.hh"
25 
26 // Forward declarations
27 class McEventCollection;
28 class TruthEtIsolations;
31 
32 class TruthIsolationTool : virtual public ITruthIsolationTool,
33  public AthAlgTool
34 {
35 
37  // Public methods:
39  public:
40  TruthIsolationTool( const std::string& type,
41  const std::string& name,
42  const IInterface* parent );
43  virtual ~TruthIsolationTool();
44 
45  // Athena algorithm's Hooks
47 
49  // Const methods:
51 
59  const std::string&
60  etIsolationsName( const std::string& mcEvtName ) const;
61 
63  // Non-const methods:
65 
71  StatusCode buildEtIsolations( const std::string& mcEvtName,
73 
76  StatusCode registerAlias( const std::string& originalMcEvtColl,
77  const std::string& aliasMcEvtColl );
78 
80  // Private methods:
82  private:
83 
87  StatusCode buildEtIsolations( const std::string& mcEvtName,
88  const HepMC::GenEvent* genEvt,
89  const std::size_t genIdx,
90  TruthEtIsolations& etIsols,
92 
96  void computeIso( const std::list<HepMC::ConstGenParticlePtr>& parts,
98  TruthEtIsolations& etIsolations,
100 
104  void setupTruthEtIsolationsPrefix( Gaudi::Details::PropertyBase& truthEtIsolationsPrefix );
105 
109  void setupMcEventsOutput( Gaudi::Details::PropertyBase& mcEventsOutputName );
110 
112  // Private data:
114  private:
115 
118  const HepPDT::ParticleDataTable * m_pdt;
119 
124  StringProperty m_prefix;
125 
128  StringProperty m_mcEventsOutputName;
129 
134  DoubleProperty m_ptGamMin;
135 
136  typedef std::unordered_map<std::string, std::string> EtIsolMap_t;
140 
141 };
142 
143 
144 #endif
TruthIsolationTool::~TruthIsolationTool
virtual ~TruthIsolationTool()
TruthIsolationTool
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.h:34
GenParticle_fwd.h
TruthIsolationTool::m_pdt
const HepPDT::ParticleDataTable * m_pdt
Particle Property service.
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.h:118
TruthIsolationTool::computeIso
void computeIso(const std::list< HepMC::ConstGenParticlePtr > &parts, const HepMC::ConstGenParticlePtr &p, TruthEtIsolations &etIsolations, ITruthIsolationTool::ParticleSelect sel)
Computes and stores the list of transverse isolation energies for various cone sizes into the TruthEt...
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.cxx:220
TruthIsolationTool::EtIsolMap_t
std::unordered_map< std::string, std::string > EtIsolMap_t
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.h:136
TruthIsolationTool::m_mcEventsOutputName
StringProperty m_mcEventsOutputName
Name of the McEventCollection we should attach isolations to.
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.h:128
TruthIsolationTool::etIsolationsName
const std::string & etIsolationsName(const std::string &mcEvtName) const
Return the name of the TruthEtIsolations container (ie: its StoreGate location) given the StoreGate l...
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.cxx:109
TruthIsolationTool::m_etIsolMap
EtIsolMap_t m_etIsolMap
A map of McEventCollection StoreGate locations to the according StoreGate location of TruthEtIsolatio...
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.h:139
TruthIsolationTool::setupMcEventsOutput
void setupMcEventsOutput(Gaudi::Details::PropertyBase &mcEventsOutputName)
Callback method to ensure consistency of output McEventCollection key.
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.cxx:293
ITruthIsolationTool::ParticleSelect
ParticleSelect
enumerator to decide which strategy to apply in the selection of particles during the Et-isolation co...
Definition: ITruthIsolationTool.h:43
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
TruthIsolationTool::registerAlias
StatusCode registerAlias(const std::string &originalMcEvtColl, const std::string &aliasMcEvtColl)
Make an alias in the map of isolation energies.
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.cxx:299
ITruthIsolationTool
Definition: ITruthIsolationTool.h:33
TruthIsolationTool::m_ptGamMin
DoubleProperty m_ptGamMin
Minimum transverse energy of gammas to be taken into account into the isolation computation.
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.h:134
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
sel
sel
Definition: SUSYToolsTester.cxx:97
TruthIsolationTool::initialize
StatusCode initialize()
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.cxx:81
AthAlgTool.h
GenEvent_fwd.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TruthParticleParamDefs.h
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
TruthIsolationTool::buildEtIsolations
StatusCode buildEtIsolations(const std::string &mcEvtName, ITruthIsolationTool::ParticleSelect sel)
Computes the isolation energies for each of the HepMC::GenEvent contained into the McEventCollection.
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.cxx:121
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TruthIsolationTool::setupTruthEtIsolationsPrefix
void setupTruthEtIsolationsPrefix(Gaudi::Details::PropertyBase &truthEtIsolationsPrefix)
Callback method to ensure consistency of the TruthEtIsolations prefix key.
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.cxx:287
TruthEtIsolations
Definition: TruthEtIsolations.h:40
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
doL1CaloHVCorrections.parts
parts
Definition: doL1CaloHVCorrections.py:334
AthAlgTool
Definition: AthAlgTool.h:26
TruthIsolationTool::m_prefix
StringProperty m_prefix
Prefix for the TruthEtIsolations container.
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.h:124
TruthIsolationTool::TruthIsolationTool
TruthIsolationTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TruthParticleID/McParticleTools/src/TruthIsolationTool.cxx:41
ITruthIsolationTool.h