ATLAS Offline Software
Loading...
Searching...
No Matches
ElectronLRTMergingAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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
18#include <AsgTools/ToolHandle.h>
19
21
28
29namespace CP
30{
33 {
35 public:
37
38 public:
39 StatusCode initialize() override;
40
41 public:
42 StatusCode execute(const EventContext &ctx) const override;
43
44 private:
46
48
49 Gaudi::Property<bool> m_createViewCollection{this, "CreateViewCollection", true, "Create a view to avoid deep copy"};
50
51 Gaudi::Property<bool> m_doRemoval{this, "doRemoval", true, "Remove overlapping electrons from output collection."};
52
53 Gaudi::Property<float> m_ORThreshold{this, "ORThreshold", 0.001, "Delta R threshold for matching in overlap removal."};
54
57 Gaudi::Property<int> m_ORstrategy{this, "overlapStrategy", CP::IElectronLRTOverlapRemovalTool::defaultStrategy, "Overlap removal strategy to use (0 = default)"};
58
59 Gaudi::Property<bool> m_isDAOD{this, "isDAOD", true, "Switch for running on AOD (false) or DAOD (true)"};
60
61 SG::ReadHandleKey<xAOD::ElectronContainer> m_promptElectronLocation{this, "PromptElectronLocation", "Electrons", "Prompt electrons to merge"};
62
63 SG::ReadHandleKey<xAOD::ElectronContainer> m_lrtElectronLocation{this, "LRTElectronLocation", "LRTElectrons", "LRT electrons to merge"};
64
65 SG::WriteHandleKey<xAOD::ElectronContainer> m_outElectronLocation{this, "OutputCollectionName", "StdWithLRTElectrons", "Name for combined output collection"};
66
68
69 ToolHandle<CP::IElectronLRTOverlapRemovalTool> m_overlapRemovalTool{this, "overlapRemovalTool", "", "Tool used to check overlaps between standard and LRT electrons"};
70
72
74
76 void mergeElectron(const xAOD::ElectronContainer &electronCol,
77 xAOD::ElectronContainer *outputCol,
78 const std::set<const xAOD::Electron *> &LRTElectronsToRemove) const;
79
81 void mergeElectron(const xAOD::ElectronContainer &electronCol,
83 const std::set<const xAOD::Electron *> &LRTElectronsToRemove) const;
84
89 };
90}
91#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
Handle class for reading from StoreGate.
Property holding a SG store/key/clid from which a WriteHandle is made.
Handle class for recording to StoreGate.
DataVector adapter that acts like it holds const pointers.
this wraps the Electron LRT collection merger in a CP algorithm
SG::WriteHandleKey< ConstDataVector< xAOD::ElectronContainer > > m_outElectronViewLocation
Combined electron collection.
Gaudi::Property< float > m_ORThreshold
Remove overlapping electrons from output collection.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_lrtIsLRTKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_lrtElectronLocation
Standard electron collection to be merged.
Gaudi::Property< bool > m_isDAOD
StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< int > m_ORstrategy
Delta R threshold for matching in overlap removal.
ToolHandle< CP::IElectronLRTOverlapRemovalTool > m_overlapRemovalTool
Combined electron view collection, set from m_outElectronLocation in initialize().
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_promptIsLRTKey
Gaudi::Property< bool > m_doRemoval
Create a view to avoid deep copy.
void mergeElectron(const xAOD::ElectronContainer &electronCol, xAOD::ElectronContainer *outputCol, const std::set< const xAOD::Electron * > &LRTElectronsToRemove) const
The lrt electron overlap removal tool.
SG::WriteHandleKey< xAOD::ElectronContainer > m_outElectronLocation
LRT electron collection to be merged.
SG::ReadHandleKey< xAOD::ElectronContainer > m_promptElectronLocation
Switches method for retrieving electron ID.
Gaudi::Property< bool > m_createViewCollection
Protected data:
DataVector adapter that acts like it holds const pointers.
the base class for EventLoop reentrant algorithms
AnaReentrantAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Select isolated Photons, Electrons and Muons.
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".