ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
EgammaAnalysisAlgorithms
EgammaAnalysisAlgorithms
ElectronLRTMergingAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// ElectronLRTMergingAlg
7
// Author: Jonathan Long, jonathan.long@cern.ch
8
// Algorithm invoking std+lrt electron merger, based on the
9
// MuonLRTMergingAlg, author: Max Goblirsch-Kolb
11
12
#ifndef ASG_ANALYSIS_ALGORITHMS__ELECTRON_LRT_MERGING_ALGORITHM__H
13
#define ASG_ANALYSIS_ALGORITHMS__ELECTRON_LRT_MERGING_ALGORITHM__H
14
15
#include <
AnaAlgorithm/AnaReentrantAlgorithm.h
>
16
#include <
xAODEgamma/ElectronContainer.h
>
17
#include <
EgammaAnalysisInterfaces/IElectronLRTOverlapRemovalTool.h
>
18
#include <
AsgTools/ToolHandle.h
>
19
20
#include "
AthContainers/ConstDataVector.h
"
21
22
#include <
AsgTools/PropertyWrapper.h
>
23
#include <
AsgDataHandles/WriteHandleKey.h
>
24
#include <
AsgDataHandles/ReadHandleKey.h
>
25
#include <
AsgDataHandles/WriteHandle.h
>
26
#include <
AsgDataHandles/ReadHandle.h
>
27
#include <
AsgDataHandles/WriteDecorHandleKey.h
>
28
29
namespace
CP
30
{
32
class
ElectronLRTMergingAlg
final :
public
EL::AnaReentrantAlgorithm
33
{
35
public
:
36
ElectronLRTMergingAlg
(
const
std::string &
name
,
37
ISvcLocator *pSvcLocator);
38
39
public
:
40
StatusCode
initialize
()
override
;
41
42
public
:
43
StatusCode
execute
(
const
EventContext &ctx)
const override
;
44
45
private
:
47
49
50
Gaudi::Property<bool>
m_createViewCollection
{
this
,
"CreateViewCollection"
,
true
,
"Create a view to avoid deep copy"
};
51
52
Gaudi::Property<bool>
m_doRemoval
{
this
,
"doRemoval"
,
true
,
"Remove overlapping electrons from output collection."
};
53
54
Gaudi::Property<float>
m_ORThreshold
{
this
,
"ORThreshold"
, 0.001,
"Delta R threshold for matching in overlap removal."
};
55
58
Gaudi::Property<int>
m_ORstrategy
{
this
,
"overlapStrategy"
,
CP::IElectronLRTOverlapRemovalTool::defaultStrategy
,
"Overlap removal strategy to use (0 = default)"
};
59
60
Gaudi::Property<bool>
m_isDAOD
{
this
,
"isDAOD"
,
true
,
"Switch for running on AOD (false) or DAOD (true)"
};
61
62
SG::ReadHandleKey<xAOD::ElectronContainer>
m_promptElectronLocation
{
this
,
"PromptElectronLocation"
,
"Electrons"
,
"Prompt electrons to merge"
};
63
64
SG::ReadHandleKey<xAOD::ElectronContainer>
m_lrtElectronLocation
{
this
,
"LRTElectronLocation"
,
"LRTElectrons"
,
"LRT electrons to merge"
};
65
66
SG::WriteHandleKey<xAOD::ElectronContainer>
m_outElectronLocation
{
this
,
"OutputCollectionName"
,
"StdWithLRTElectrons"
,
"Name for combined output collection"
};
67
68
ToolHandle<CP::IElectronLRTOverlapRemovalTool>
m_overlapRemovalTool
{
this
,
"overlapRemovalTool"
,
""
,
"Tool used to check overlaps between standard and LRT electrons"
};
69
71
73
75
void
mergeElectron
(
const
xAOD::ElectronContainer
&electronCol,
76
xAOD::ElectronContainer
*outputCol,
77
const
std::set<const xAOD::Electron *> &LRTElectronsToRemove)
const
;
78
80
void
mergeElectron
(
const
xAOD::ElectronContainer
&electronCol,
81
ConstDataVector<xAOD::ElectronContainer>
*outputCol,
82
const
std::set<const xAOD::Electron *> &LRTElectronsToRemove)
const
;
83
84
SG::WriteDecorHandleKey<xAOD::ElectronContainer>
m_promptIsLRTKey
85
{
this
,
"PromptIsLRTKey"
,
m_promptElectronLocation
,
"isLRT"
};
86
SG::WriteDecorHandleKey<xAOD::ElectronContainer>
m_lrtIsLRTKey
87
{
this
,
"LRTIsLRTKey"
,
m_lrtElectronLocation
,
"isLRT"
};
88
};
89
}
90
#endif
AnaReentrantAlgorithm.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ReadHandle.h
Handle class for reading from StoreGate.
WriteDecorHandleKey.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
WriteHandle.h
Handle class for recording to StoreGate.
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
ElectronContainer.h
IElectronLRTOverlapRemovalTool.h
PropertyWrapper.h
ToolHandle.h
CP::ElectronLRTMergingAlg::ElectronLRTMergingAlg
ElectronLRTMergingAlg(const std::string &name, ISvcLocator *pSvcLocator)
the standard constructor
Definition
ElectronLRTMergingAlg.cxx:23
CP::ElectronLRTMergingAlg::m_ORThreshold
Gaudi::Property< float > m_ORThreshold
Remove overlapping electrons from output collection.
Definition
ElectronLRTMergingAlg.h:54
CP::ElectronLRTMergingAlg::m_lrtIsLRTKey
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_lrtIsLRTKey
Definition
ElectronLRTMergingAlg.h:87
CP::ElectronLRTMergingAlg::m_lrtElectronLocation
SG::ReadHandleKey< xAOD::ElectronContainer > m_lrtElectronLocation
Standard electron collection to be merged.
Definition
ElectronLRTMergingAlg.h:64
CP::ElectronLRTMergingAlg::m_isDAOD
Gaudi::Property< bool > m_isDAOD
Definition
ElectronLRTMergingAlg.h:60
CP::ElectronLRTMergingAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition
ElectronLRTMergingAlg.cxx:56
CP::ElectronLRTMergingAlg::m_ORstrategy
Gaudi::Property< int > m_ORstrategy
Delta R threshold for matching in overlap removal.
Definition
ElectronLRTMergingAlg.h:58
CP::ElectronLRTMergingAlg::m_overlapRemovalTool
ToolHandle< CP::IElectronLRTOverlapRemovalTool > m_overlapRemovalTool
Combined electron collection.
Definition
ElectronLRTMergingAlg.h:68
CP::ElectronLRTMergingAlg::m_promptIsLRTKey
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_promptIsLRTKey
Definition
ElectronLRTMergingAlg.h:85
CP::ElectronLRTMergingAlg::m_doRemoval
Gaudi::Property< bool > m_doRemoval
Create a view to avoid deep copy.
Definition
ElectronLRTMergingAlg.h:52
CP::ElectronLRTMergingAlg::mergeElectron
void mergeElectron(const xAOD::ElectronContainer &electronCol, xAOD::ElectronContainer *outputCol, const std::set< const xAOD::Electron * > &LRTElectronsToRemove) const
The lrt electron overlap removal tool.
Definition
ElectronLRTMergingAlg.cxx:138
CP::ElectronLRTMergingAlg::m_outElectronLocation
SG::WriteHandleKey< xAOD::ElectronContainer > m_outElectronLocation
LRT electron collection to be merged.
Definition
ElectronLRTMergingAlg.h:66
CP::ElectronLRTMergingAlg::initialize
StatusCode initialize() override
Definition
ElectronLRTMergingAlg.cxx:28
CP::ElectronLRTMergingAlg::m_promptElectronLocation
SG::ReadHandleKey< xAOD::ElectronContainer > m_promptElectronLocation
Switches method for retrieving electron ID.
Definition
ElectronLRTMergingAlg.h:62
CP::ElectronLRTMergingAlg::m_createViewCollection
Gaudi::Property< bool > m_createViewCollection
Protected data:
Definition
ElectronLRTMergingAlg.h:50
CP::IElectronLRTOverlapRemovalTool::defaultStrategy
@ defaultStrategy
Definition
IElectronLRTOverlapRemovalTool.h:49
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition
ConstDataVector.h:76
EL::AnaReentrantAlgorithm
the base class for EventLoop reentrant algorithms
Definition
AnaReentrantAlgorithm.h:51
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
xAOD::name
name
Definition
TriggerMenuJson_v1.cxx:29
xAOD::ElectronContainer
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
Definition
Event/xAOD/xAODEgamma/xAODEgamma/ElectronContainer.h:17
Generated on
for ATLAS Offline Software by
1.17.0