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#include "HepPDT/ParticleDataTable.hh"
25
26// Forward declarations
31
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 );
44
45 // Athena algorithm's Hooks
46 StatusCode initialize();
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
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...
const HepPDT::ParticleDataTable * m_pdt
Particle Property service.
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()
const GenParticle * ConstGenParticlePtr
Definition GenParticle.h:38