ATLAS Offline Software
IsoCloseByCorrectionAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 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, const xAOD::Electron* elec) const;
38  StatusCode applySelection(const EventContext& ctx, const xAOD::Photon* phot) const;
39  StatusCode applySelection(const EventContext& ctx, const xAOD::Muon* muon) const;
40  template <class CONT_TYPE>
41  StatusCode selectLeptonsAndPhotons(const EventContext& ctx, CONT_TYPE particles) const;
42 
44  SG::ReadHandleKeyArray<xAOD::IParticleContainer> m_contKeys{this, "ParticleContainerKeys", {} };
45 
48 
53 
55  ToolHandle<CP::IMuonSelectionTool> m_muonSelTool{this, "MuonSelectionTool", ""};
56  ToolHandle<IAsgElectronLikelihoodTool> m_elecSelTool{this, "ElectronSelectionTool", ""};
57  ToolHandle<IAsgPhotonIsEMSelector> m_photSelTool{this, "PhotonSelectionTool", ""};
58 
60  ToolHandle<CP::IIsolationCloseByCorrectionTool> m_closeByCorrTool{this, "IsoCloseByCorrectionTool", "",
61  "The isolation close by correction tool."};
62 
64  Gaudi::Property<float> m_minElecPt{this, "MinElecPt", 0,
65  "Minimum pt cut that the electron needs to pass in order to be selected"};
66  Gaudi::Property<float> m_minMuonPt{this, "MinMuonPt", 0,
67  "Minimum pt cut that the muon needs to pass in order to be selected"};
68  Gaudi::Property<float> m_minPhotPt{this, "MinPhotPt", 0,
69  "Minimum pt cut that the photon needs to pass in order to be selected"};
70 
71  };
72 } // namespace CP
73 #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:55
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
CP::IsoCloseByCorrectionAlg::m_minMuonPt
Gaudi::Property< float > m_minMuonPt
Definition: IsoCloseByCorrectionAlg.h:66
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:44
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:50
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
CP::IsoCloseByCorrectionAlg::m_minElecPt
Gaudi::Property< float > m_minElecPt
Kinematic cuts - if needed.
Definition: IsoCloseByCorrectionAlg.h:64
CP::IsoCloseByCorrectionAlg::m_photSelTool
ToolHandle< IAsgPhotonIsEMSelector > m_photSelTool
Definition: IsoCloseByCorrectionAlg.h:57
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::IsoCloseByCorrectionAlg::IsoCloseByCorrectionAlg
IsoCloseByCorrectionAlg(const std::string &name, ISvcLocator *svcLoc)
Definition: IsoCloseByCorrectionAlg.cxx:18
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:83
IMuonSelectionTool.h
CP::IsoCloseByCorrectionAlg::m_photSelKey
SG::ReadDecorHandleKey< xAOD::PhotonContainer > m_photSelKey
Definition: IsoCloseByCorrectionAlg.h:52
IAsgElectronLikelihoodTool.h
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:45
CP::IsoCloseByCorrectionAlg::initialize
StatusCode initialize() override
Definition: IsoCloseByCorrectionAlg.cxx:20
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
CP::IsoCloseByCorrectionAlg::m_minPhotPt
Gaudi::Property< float > m_minPhotPt
Definition: IsoCloseByCorrectionAlg.h:68
xAOD::Electron_v1
Definition: Electron_v1.h:34
MuonContainer.h
CP::IsoCloseByCorrectionAlg
Definition: IsoCloseByCorrectionAlg.h:29
CP::IsoCloseByCorrectionAlg::selectLeptonsAndPhotons
StatusCode selectLeptonsAndPhotons(const EventContext &ctx, CONT_TYPE particles) const
Definition: IsoCloseByCorrectionAlg.cxx:108
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:60
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:56
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:51
CP::IsoCloseByCorrectionAlg::applySelection
StatusCode applySelection(const EventContext &ctx, const xAOD::Electron *elec) const
Definition: IsoCloseByCorrectionAlg.cxx:156
PhotonContainer.h