ATLAS Offline Software
ElectronLRTOverlapRemovalTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // ElectronLRTOverlapRemovalTool.h
7 // Author: Jonathan Long, jonathan.long AT cern.ch
8 //
9 // Implements overlap removal between standard and LRT electrons.
11 
12 #ifndef LRTELECTRONANALYSISTOOLS_ELECTRONLRTOVERLAPREMOVALTOOL_H
13 #define LRTELECTRONANALYSISTOOLS_ELECTRONLRTOVERLAPREMOVALTOOL_H
14 
17 
18 #include <string>
19 #include <map>
20 
23 #include "xAODEgamma/Electron.h"
24 
25 #include <AsgTools/ToolHandle.h>
26 #include <AsgTools/AsgTool.h>
28 
29 namespace CP
30 {
31 
34  {
35 
36  public:
38 
39 
41  ElectronLRTOverlapRemovalTool(const std::string &name);
42  virtual ~ElectronLRTOverlapRemovalTool() = default;
44  virtual StatusCode initialize();
45 
48  virtual void checkOverlap(const xAOD::ElectronContainer &promptCollection,
49  const xAOD::ElectronContainer &lrtCollection,
50  std::set<const xAOD::Electron *> &ElectronsToRemove) const;
51 
52  private:
53  Gaudi::Property<int> m_strategy{this, "overlapStrategy", CP::IElectronLRTOverlapRemovalTool::defaultStrategy, "Overlap removal strategy to use (0 = default)"};
54  Gaudi::Property<float> m_ORThreshold{this, "ORThreshold", 0.001, "Delta R threshold for matching in overlap removal."};
55  Gaudi::Property<bool> m_isDAOD{this, "isDAOD", true, "Switch for running on AOD (false) or DAOD (true)"};
56  Gaudi::Property<std::string> m_IDWorkingPoint{this, "IDWorkingPoint", "DFCommonElectronsLHVeryLooseNoPix", "ID working point for checking if ID is passed"};
58  ToolHandle<IAsgElectronLikelihoodTool> m_electronLLHToolVeryLooseNoPix{this, "ElectronLLHToolVeryLooseNoPix", "", "Electron LLH tool to use for the overlap removal"};
59  ToolHandle<IAsgElectronLikelihoodTool> m_electronLLHToolLooseNoPix{this, "ElectronLLHToolLooseNoPix", "", "Electron LLH tool to use for the overlap removal"};
60  ToolHandle<IAsgElectronLikelihoodTool> m_electronLLHToolMediumNoPix{this, "ElectronLLHToolMediumNoPix", "", "Electron LLH tool to use for the overlap removal"};
61  ToolHandle<IAsgElectronLikelihoodTool> m_electronLLHToolTightNoPix{this, "ElectronLLHToolTightNoPix", "", "Electron LLH tool to use for the overlap removal"};
62 
63  bool electronPassesID(const xAOD::Electron *electron, const std::string& IDWorkingPoint) const;
64 
65  }; // end namespace CP
66 
67 }
68 #endif // LRTELECTRONANALYSISTOOLS_ELECTRONLRTOVERLAPREMOVALTOOL_H
CP::ElectronLRTOverlapRemovalTool::m_ORThreshold
Gaudi::Property< float > m_ORThreshold
Allows for setting the overlap removal strategy in case of future variations.
Definition: ElectronLRTOverlapRemovalTool.h:54
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
CP::IElectronLRTOverlapRemovalTool::defaultStrategy
@ defaultStrategy
Definition: IElectronLRTOverlapRemovalTool.h:49
CP::ElectronLRTOverlapRemovalTool::m_strategy
Gaudi::Property< int > m_strategy
Definition: ElectronLRTOverlapRemovalTool.h:53
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::ElectronLRTOverlapRemovalTool
Class-algorithm for electron particle collection merging.
Definition: ElectronLRTOverlapRemovalTool.h:34
IAsgElectronLikelihoodTool.h
ElectronContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::ElectronLRTOverlapRemovalTool::checkOverlap
virtual void checkOverlap(const xAOD::ElectronContainer &promptCollection, const xAOD::ElectronContainer &lrtCollection, std::set< const xAOD::Electron * > &ElectronsToRemove) const
Check the overlap between the prompt and LRT electron collections.
Definition: ElectronLRTOverlapRemovalTool.cxx:109
CP::ElectronLRTOverlapRemovalTool::electronPassesID
bool electronPassesID(const xAOD::Electron *electron, const std::string &IDWorkingPoint) const
Definition: ElectronLRTOverlapRemovalTool.cxx:75
CP::ElectronLRTOverlapRemovalTool::m_electronLLHToolMediumNoPix
ToolHandle< IAsgElectronLikelihoodTool > m_electronLLHToolMediumNoPix
Definition: ElectronLRTOverlapRemovalTool.h:60
IElectronLRTOverlapRemovalTool.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
CP::ElectronLRTOverlapRemovalTool::ElectronLRTOverlapRemovalTool
ElectronLRTOverlapRemovalTool(const std::string &name)
Standard algorithm methods:
Definition: ElectronLRTOverlapRemovalTool.cxx:15
CP::ElectronLRTOverlapRemovalTool::m_isDAOD
Gaudi::Property< bool > m_isDAOD
Delta R threshold for matching in overlap removal.
Definition: ElectronLRTOverlapRemovalTool.h:55
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
CP::ElectronLRTOverlapRemovalTool::m_IDWorkingPoint
Gaudi::Property< std::string > m_IDWorkingPoint
Switches method for retrieving electron ID.
Definition: ElectronLRTOverlapRemovalTool.h:56
xAOD::Electron_v1
Definition: Electron_v1.h:34
CP::ElectronLRTOverlapRemovalTool::~ElectronLRTOverlapRemovalTool
virtual ~ElectronLRTOverlapRemovalTool()=default
TrackParticle.h
CP::ElectronLRTOverlapRemovalTool::m_electronLLHToolLooseNoPix
ToolHandle< IAsgElectronLikelihoodTool > m_electronLLHToolLooseNoPix
Definition: ElectronLRTOverlapRemovalTool.h:59
CP::ElectronLRTOverlapRemovalTool::initialize
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: ElectronLRTOverlapRemovalTool.cxx:22
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
CP::ElectronLRTOverlapRemovalTool::m_electronLLHToolVeryLooseNoPix
ToolHandle< IAsgElectronLikelihoodTool > m_electronLLHToolVeryLooseNoPix
Switches method for retrieving electron ID.
Definition: ElectronLRTOverlapRemovalTool.h:58
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
Electron.h
ToolHandle.h
CP::ElectronLRTOverlapRemovalTool::m_electronLLHToolTightNoPix
ToolHandle< IAsgElectronLikelihoodTool > m_electronLLHToolTightNoPix
Definition: ElectronLRTOverlapRemovalTool.h:61
AsgTool.h
CP::IElectronLRTOverlapRemovalTool
Definition: IElectronLRTOverlapRemovalTool.h:28