ATLAS Offline Software
Loading...
Searching...
No Matches
TruthParticleID/McParticleTools/src/TruthIsolationTool.h
Go to the documentation of this file.
1
2
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
25// Forward declarations
30
32 public AthAlgTool
33{
34
36 // Public methods:
38 public:
39 TruthIsolationTool( const std::string& type,
40 const std::string& name,
41 const IInterface* parent );
43
44 // Athena algorithm's Hooks
45 StatusCode initialize();
46
48 // Const methods:
50
58 const std::string&
59 etIsolationsName( const std::string& mcEvtName ) const;
60
62 // Non-const methods:
64
70 StatusCode buildEtIsolations( const std::string& mcEvtName,
72
75 StatusCode registerAlias( const std::string& originalMcEvtColl,
76 const std::string& aliasMcEvtColl );
77
79 // Private methods:
81 private:
82
86 StatusCode buildEtIsolations( const std::string& mcEvtName,
87 const HepMC::GenEvent* genEvt,
88 const std::size_t genIdx,
89 TruthEtIsolations& etIsols,
91
95 void computeIso( const std::list<HepMC::ConstGenParticlePtr>& parts,
97 TruthEtIsolations& etIsolations,
99
103 void setupTruthEtIsolationsPrefix( Gaudi::Details::PropertyBase& truthEtIsolationsPrefix );
104
108 void setupMcEventsOutput( Gaudi::Details::PropertyBase& mcEventsOutputName );
109
111 // Private data:
113 private:
114
119 StringProperty m_prefix;
120
123 StringProperty m_mcEventsOutputName;
124
129 DoubleProperty m_ptGamMin;
130
131 typedef std::unordered_map<std::string, std::string> EtIsolMap_t;
135
136};
137
138
139#endif
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
interface for AlgTools which want to compute and/or retrieve isolation energies for/from HepMC::GenEv...
ParticleSelect
enumerator to decide which strategy to apply in the selection of particles during the Et-isolation co...
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
container which holds isolation informations for a given HepMC::GenParticle (labelled by barcode) for...
std::unordered_map< std::string, std::string > EtIsolMap_t
void setupMcEventsOutput(Gaudi::Details::PropertyBase &mcEventsOutputName)
Callback method to ensure consistency of output McEventCollection key.
StringProperty m_mcEventsOutputName
Name of the McEventCollection we should attach isolations to.
EtIsolMap_t m_etIsolMap
A map of McEventCollection StoreGate locations to the according StoreGate location of TruthEtIsolatio...
StatusCode registerAlias(const std::string &originalMcEvtColl, const std::string &aliasMcEvtColl)
Make an alias in the map of isolation energies.
StatusCode buildEtIsolations(const std::string &mcEvtName, ITruthIsolationTool::ParticleSelect sel)
Computes the isolation energies for each of the HepMC::GenEvent contained into the McEventCollection.
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...
void setupTruthEtIsolationsPrefix(Gaudi::Details::PropertyBase &truthEtIsolationsPrefix)
Callback method to ensure consistency of the TruthEtIsolations prefix key.
TruthIsolationTool(const std::string &type, const std::string &name, const IInterface *parent)
const std::string & etIsolationsName(const std::string &mcEvtName) const
Return the name of the TruthEtIsolations container (ie: its StoreGate location) given the StoreGate l...
StringProperty m_prefix
Prefix for the TruthEtIsolations container.
DoubleProperty m_ptGamMin
Minimum transverse energy of gammas to be taken into account into the isolation computation.
virtual ~TruthIsolationTool()
HepMC3::ConstGenParticlePtr ConstGenParticlePtr
Definition GenParticle.h:20
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39