ATLAS Offline Software
IsoCloseByCorrectionAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef IsoCloseByCorrectionAlg_H
6 #define IsoCloseByCorrectionAlg_H
7 
8 // Gaudi & Athena basics
12 #include "GaudiKernel/SystemOfUnits.h"
21 #include "xAODMuon/MuonContainer.h"
27 namespace CP {
28 
30  public:
31  IsoCloseByCorrectionAlg(const std::string& name, ISvcLocator* svcLoc);
32 
33  StatusCode execute(const EventContext& ctx) const override;
34  StatusCode initialize() override;
35 
36  private:
37  StatusCode applySelection(const EventContext& ctx,
38  const xAOD::Electron* elec,
39  const SG::Decorator<char>& isOK) const;
40  StatusCode applySelection(const EventContext& ctx,
41  const xAOD::Photon* phot,
42  const SG::Decorator<char>& isOK) const;
43  StatusCode applySelection(const EventContext& ctx,
44  const xAOD::Muon* muon,
45  const SG::Decorator<char>& isOK) const;
46  template <class CONT_TYPE>
47  StatusCode selectLeptonsAndPhotons(const EventContext& ctx, CONT_TYPE particles, const SG::Decorator<char>& isOK) const;
48 
50  SG::ReadHandleKeyArray<xAOD::IParticleContainer> m_contKeys{this, "ParticleContainerKeys", {} };
51 
54 
59 
61  ToolHandle<CP::IMuonSelectionTool> m_muonSelTool{this, "MuonSelectionTool", ""};
62  ToolHandle<IAsgElectronLikelihoodTool> m_elecSelTool{this, "ElectronSelectionTool", ""};
63  ToolHandle<IAsgPhotonIsEMSelector> m_photSelTool{this, "PhotonSelectionTool", ""};
64 
66  ToolHandle<CP::IIsolationCloseByCorrectionTool> m_closeByCorrTool{this, "IsoCloseByCorrectionTool", "",
67  "The isolation close by correction tool."};
68 
70  Gaudi::Property<float> m_minElecPt{this, "MinElecPt", 0,
71  "Minimum pt cut that the electron needs to pass in order to be selected"};
72  Gaudi::Property<float> m_minMuonPt{this, "MinMuonPt", 0,
73  "Minimum pt cut that the muon needs to pass in order to be selected"};
74  Gaudi::Property<float> m_minPhotPt{this, "MinPhotPt", 0,
75  "Minimum pt cut that the photon needs to pass in order to be selected"};
76 
77  // Name of the isolation selection decoration
78  Gaudi::Property<std::string> m_quality_name{
79  this, "SelectionDecorator", "isoSelIsOK",
80  "Name of the char auxdata defining whether the particle shall be considered for iso correction"};
81  };
82 } // namespace CP
83 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
CP::IsoCloseByCorrectionAlg::m_muonSelTool
ToolHandle< CP::IMuonSelectionTool > m_muonSelTool
tools for selection of incoming particles
Definition: IsoCloseByCorrectionAlg.h:61
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
CP::IsoCloseByCorrectionAlg::m_minMuonPt
Gaudi::Property< float > m_minMuonPt
Definition: IsoCloseByCorrectionAlg.h:72
CP::IsoCloseByCorrectionAlg::m_quality_name
Gaudi::Property< std::string > m_quality_name
Definition: IsoCloseByCorrectionAlg.h:78
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
IAsgPhotonIsEMSelector.h
IIsolationCloseByCorrectionTool.h
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
CP::IsoCloseByCorrectionAlg::m_contKeys
SG::ReadHandleKeyArray< xAOD::IParticleContainer > m_contKeys
Input containers to retrieve from the storegate.
Definition: IsoCloseByCorrectionAlg.h:50
CP::IsoCloseByCorrectionAlg::m_muonSelKey
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_muonSelKey
For lepton/photon selection, normally one uses either a decorator xxxSelKey, or a tool xxxSelTool,...
Definition: IsoCloseByCorrectionAlg.h:56
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
CP::IsoCloseByCorrectionAlg::m_minElecPt
Gaudi::Property< float > m_minElecPt
Kinematic cuts - if needed.
Definition: IsoCloseByCorrectionAlg.h:70
CP::IsoCloseByCorrectionAlg::selectLeptonsAndPhotons
StatusCode selectLeptonsAndPhotons(const EventContext &ctx, CONT_TYPE particles, const SG::Decorator< char > &isOK) const
Definition: IsoCloseByCorrectionAlg.cxx:120
CP::IsoCloseByCorrectionAlg::m_photSelTool
ToolHandle< IAsgPhotonIsEMSelector > m_photSelTool
Definition: IsoCloseByCorrectionAlg.h:63
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:49
CP::IsoCloseByCorrectionAlg::IsoCloseByCorrectionAlg
IsoCloseByCorrectionAlg(const std::string &name, ISvcLocator *svcLoc)
Definition: IsoCloseByCorrectionAlg.cxx:19
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
IMuonSelectionTool.h
CP::IsoCloseByCorrectionAlg::m_photSelKey
SG::ReadDecorHandleKey< xAOD::PhotonContainer > m_photSelKey
Definition: IsoCloseByCorrectionAlg.h:58
IAsgElectronLikelihoodTool.h
SG::Decorator< char >
ElectronContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::IsoCloseByCorrectionAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition: IsoCloseByCorrectionAlg.cxx:46
CP::IsoCloseByCorrectionAlg::initialize
StatusCode initialize() override
Definition: IsoCloseByCorrectionAlg.cxx:21
AthReentrantAlgorithm.h
CP::IsoCloseByCorrectionAlg::applySelection
StatusCode applySelection(const EventContext &ctx, const xAOD::Electron *elec, const SG::Decorator< char > &isOK) const
Definition: IsoCloseByCorrectionAlg.cxx:170
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
CP::IsoCloseByCorrectionAlg::m_minPhotPt
Gaudi::Property< float > m_minPhotPt
Definition: IsoCloseByCorrectionAlg.h:74
xAOD::Electron_v1
Definition: Electron_v1.h:34
MuonContainer.h
CP::IsoCloseByCorrectionAlg
Definition: IsoCloseByCorrectionAlg.h:29
xAOD::Photon_v1
Definition: Photon_v1.h:37
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
CP::IsoCloseByCorrectionAlg::m_closeByCorrTool
ToolHandle< CP::IIsolationCloseByCorrectionTool > m_closeByCorrTool
The closeBy isolation correction tool.
Definition: IsoCloseByCorrectionAlg.h:66
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
CP::IsoCloseByCorrectionAlg::m_elecSelTool
ToolHandle< IAsgElectronLikelihoodTool > m_elecSelTool
Definition: IsoCloseByCorrectionAlg.h:62
checker_macros.h
Define macros for attributes used to control the static checker.
CP::IsoCloseByCorrectionAlg::m_elecSelKey
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_elecSelKey
Definition: IsoCloseByCorrectionAlg.h:57
PhotonContainer.h