ATLAS Offline Software
Loading...
Searching...
No Matches
IsoCloseByCorrectionTrkSelAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef IsoCloseByCorrectionTrkSelAlg_H
6#define IsoCloseByCorrectionTrkSelAlg_H
7
8// Gaudi & Athena basics
14#include "GaudiKernel/SystemOfUnits.h"
31
32namespace CP {
33
35 public:
36 IsoCloseByCorrectionTrkSelAlg(const std::string& name, ISvcLocator* svcLoc);
37
38 StatusCode execute(const EventContext& ctx) const override;
39 StatusCode initialize() override;
40 StatusCode finalize() override;
41
42 private:
43 bool passSelection(const EventContext& ctx, const xAOD::Electron* elec) const;
44 bool passSelection(const EventContext& ctx, const xAOD::Photon* phot) const;
45 bool passSelection(const EventContext& ctx, const xAOD::Muon* muon) const;
46 using LepContainer = std::set<const xAOD::IParticle*>;
47 template <class CONT_TYPE>
48 StatusCode loadTracks(const EventContext& ctx, const SG::ReadHandleKey<CONT_TYPE>& key, TrackSet& tracks,
49 LepContainer& prim_objs) const;
50
52 SG::ReadHandleKey<xAOD::MuonContainer> m_muonKey{this, "MuonContainer", "Muons"};
53 SG::ReadHandleKey<xAOD::ElectronContainer> m_elecKey{this, "EleContainer", "Electrons"};
54 SG::ReadHandleKey<xAOD::PhotonContainer> m_photKey{this, "PhotContainer", "Photons"};
55
57 Gaudi::Property<std::string> m_selDecoration{this, "SelectionDecorator", "",
58 "Optional char decorator flag that the leptons have to pass in order to be selected"};
59
65 ToolHandle<CP::IMuonSelectionTool> m_muonSelTool{this, "MuonSelectionTool", ""};
66 ToolHandle<IAsgElectronLikelihoodTool> m_elecSelTool{this, "ElectronSelectionTool", ""};
67 ToolHandle<IAsgPhotonIsEMSelector> m_photSelTool{this, "PhotonSelectionTool", ""};
68
70 ToolHandle<CP::IIsolationCloseByCorrectionTool> m_closeByCorrTool{this, "IsoCloseByCorrectionTool", "",
71 "The isolation close by correction tool."};
72
74 Gaudi::Property<float> m_minElecPt{this, "MinElecPt", 4.5 * Gaudi::Units::GeV,
75 "Minimum pt cut that the electron needs to pass in order to be selected"};
76 Gaudi::Property<float> m_minMuonPt{this, "MinMuonPt", 3. * Gaudi::Units::GeV,
77 "Minimum pt cut that the muon needs to pass in order to be selected"};
78 Gaudi::Property<float> m_minPhotPt{this, "MinPhotPt", 25. * Gaudi::Units::GeV,
79 "Minimum pt cut that the photon needs to pass in order to be selected"};
80
81 Gaudi::Property<float> m_maxConeSize{this, "ConeSize", 0.3};
82
84 Gaudi::Property<std::string> m_stream{this, "OutputStream", "", "Stream"};
85 SG::ThinningHandleKey<xAOD::TrackParticleContainer> m_thinKey{this, "ThinninKey", "InDetTrackParticles",
86 "Apply the thinning decision to. Decision is set to OR"};
87
89 "The associated track particles can be written to an outpt container"};
90
93 mutable std::array<std::atomic<Long64_t>, 3> m_accepted_trks ATLAS_THREAD_SAFE;
94 mutable std::array<std::atomic<Long64_t>, 3> m_selected_obj ATLAS_THREAD_SAFE;
96 mutable std::atomic<Long64_t> m_tot_trks{};
97 };
98} // namespace CP
99#endif
DataVector adapter that acts like it holds const pointers.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
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.
HandleKey object for adding thinning to an object.
Define macros for attributes used to control the static checker.
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadDecorHandleKey< xAOD::MuonContainer > m_mounSelKey
The keys serve to declare the data dependency on the optional selection decorator properly.
SG::ReadHandleKey< xAOD::PhotonContainer > m_photKey
ToolHandle< CP::IMuonSelectionTool > m_muonSelTool
Optionally the user can also parse the elec / muon / photon selection tools.
SG::WriteHandleKey< ConstDataVector< xAOD::TrackParticleContainer > > m_trkKey
Optionally the user can also dump a TrackParticleContainer containing all the tracks entring the cone...
ToolHandle< IAsgPhotonIsEMSelector > m_photSelTool
SG::ReadDecorHandleKey< xAOD::PhotonContainer > m_photSelKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonKey
Input containers to retrieve from the storegate.
std::array< std::atomic< Long64_t >, 3 > m_accepted_trks ATLAS_THREAD_SAFE
Array counting the number of accepted tracks per object type muon[0], electron[1],...
ToolHandle< CP::IIsolationCloseByCorrectionTool > m_closeByCorrTool
These tools shall be configured to pick up the same Inner detector tracks as for the isolation buildi...
SG::ReadHandleKey< xAOD::ElectronContainer > m_elecKey
Gaudi::Property< float > m_minElecPt
Kinematic cuts. The selection tools do not support kinematic cut selection unfortunately.
IsoCloseByCorrectionTrkSelAlg(const std::string &name, ISvcLocator *svcLoc)
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_thinKey
StatusCode loadTracks(const EventContext &ctx, const SG::ReadHandleKey< CONT_TYPE > &key, TrackSet &tracks, LepContainer &prim_objs) const
std::atomic< Long64_t > m_tot_trks
Total track counter.
ToolHandle< IAsgElectronLikelihoodTool > m_elecSelTool
StatusCode execute(const EventContext &ctx) const override
std::set< const xAOD::IParticle * > LepContainer
bool passSelection(const EventContext &ctx, const xAOD::Electron *elec) const
Gaudi::Property< std::string > m_selDecoration
External selection criteria.
Gaudi::Property< std::string > m_stream
Output stream to be used for the thinning decision.
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_elecSelKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
HandleKey object for adding thinning to an object.
Property holding a SG store/key/clid from which a WriteHandle is made.
Select isolated Photons, Electrons and Muons.
Muon_v1 Muon
Reference the current persistent version:
Photon_v1 Photon
Definition of the current "egamma version".
Electron_v1 Electron
Definition of the current "egamma version".