ATLAS Offline Software
Loading...
Searching...
No Matches
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
18#include <AsgTools/ToolHandle.h>
19
21
28
29namespace CP
30{
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,
82 const std::set<const xAOD::Electron *> &LRTElectronsToRemove) const;
83
88 };
89}
90#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.
ElectronLRTMergingAlg(const std::string &name, ISvcLocator *pSvcLocator)
the standard constructor
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 collection.
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
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".