ATLAS Offline Software
Loading...
Searching...
No Matches
PFLeptonSelector.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef PFLEPTONSELECTOR_H
5#define PFLEPTONSELECTOR_H
6
8
11
14
16
18{
19
20public:
22 PFLeptonSelector(const std::string& name, ISvcLocator* pSvcLocator);
25
27 StatusCode initialize();
28 StatusCode execute(const EventContext& ctx) const;
29 StatusCode finalize();
30
31private:
33 StatusCode selectElectrons(SG::WriteHandle<ConstDataVector<xAOD::ElectronContainer>>& selectedElectronsWriteHandle,
34 const SG::WriteHandle<ConstDataVector<CaloCellContainer>>& leptonCaloCellsWriteHandle) const;
35
37 void storeElectronCells(const xAOD::Egamma& electron,
38 SG::WriteHandle<ConstDataVector<CaloCellContainer>> leptonCaloCellsWriteHandle) const;
39
41 StatusCode selectMuons(SG::WriteHandle<ConstDataVector<xAOD::MuonContainer>>& selectedMuonsWriteHandle,
42 const SG::WriteHandle<ConstDataVector<CaloCellContainer>>& leptonCaloCellsWriteHandle) const;
43
45 void storeMuonCells(const xAOD::Muon& muon,
46 SG::WriteHandle<ConstDataVector<CaloCellContainer>> leptonCaloCellsWriteHandle) const;
47
49 void storeLeptonCells(const xAOD::CaloCluster& theCluster,
50 SG::WriteHandle<ConstDataVector<CaloCellContainer>> leptonCaloCellsWriteHandle) const;
51
53 StatusCode recordLeptonContainers(
54 SG::WriteHandle<ConstDataVector<xAOD::ElectronContainer>>& selectedElectronsWriteHandle,
56 SG::WriteHandle<ConstDataVector<CaloCellContainer>> leptonCaloCellsWriteHandle) const;
57
60 this,
61 "inputElectronsName",
62 "Electrons",
63 "ReadHandle for the ElectronContainer to be used as input"
64 };
65
68 "inputMuonsName",
69 "Muons",
70 "ReadHandle for the MuonContainer to be used as input" };
71
75 this,
76 "outputElectronsName",
77 "eflowRec_selectedElectrons",
78 "WriteHandle for the ElectronContainer, that will be filled with electrons passing the electron ID in "
79 "PFLeptonSelector::selectElectrons"
80 };
81
85 this,
86 "outputMuonsName",
87 "eflowRec_selectedMuons",
88 "WriteHandle for the MuonContainer, that will be filled with muons passing the muon ID in "
89 "PFLeptonSelector::selectMuons"
90 };
91
94 this,
95 "outputLeptonCellsName",
96 "eflowRec_leptonCellContainer",
97 "WriteHandle for the CaloCellContainer, that will store calorimeter cells associated to leptons"
98 };
99
101 Gaudi::Property<bool> m_storeLeptonCells{ this, "storeLeptonCells", false, "Toggle storage of lepton CaloCells" };
102
103 Gaudi::Property<std::string> m_electronID{ this, "electronID", "LHMedium", "Select electron ID" };
104
109 Gaudi::Property<bool> m_selectElectrons{ this, "selectElectrons", true, "Toggle usage of electron ID" };
110
115 Gaudi::Property<bool> m_selectMuons{ this, "selectMuons", true, "Toggle usage of muon ID" };
116};
117#endif
DataVector adapter that acts like it holds const pointers.
An algorithm that can be simultaneously executed in multiple threads.
Container class for CaloCell.
DataVector adapter that acts like it holds const pointers.
StatusCode selectElectrons(SG::WriteHandle< ConstDataVector< xAOD::ElectronContainer > > &selectedElectronsWriteHandle, const SG::WriteHandle< ConstDataVector< CaloCellContainer > > &leptonCaloCellsWriteHandle) const
Select electrons to use.
StatusCode execute(const EventContext &ctx) const
void storeLeptonCells(const xAOD::CaloCluster &theCluster, SG::WriteHandle< ConstDataVector< CaloCellContainer > > leptonCaloCellsWriteHandle) const
puts set of lepton cells into the lepton container
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsReadHandleKey
ReadHandle for the ElectronContainer to be used as input.
StatusCode initialize()
Gaudi AthAlgorithm hooks.
void storeMuonCells(const xAOD::Muon &muon, SG::WriteHandle< ConstDataVector< CaloCellContainer > > leptonCaloCellsWriteHandle) const
store the cells of the muons
SG::WriteHandleKey< ConstDataVector< xAOD::ElectronContainer > > m_selectedElectronsWriteHandleKey
WriteHandle for the ElectronContainer, that will be filled with electrons passing the electron ID in ...
StatusCode selectMuons(SG::WriteHandle< ConstDataVector< xAOD::MuonContainer > > &selectedMuonsWriteHandle, const SG::WriteHandle< ConstDataVector< CaloCellContainer > > &leptonCaloCellsWriteHandle) const
select muons to use
SG::WriteHandleKey< ConstDataVector< CaloCellContainer > > m_leptonCaloCellsWriteHandleKey
WriteHandle for the CaloCellContainer, that will store calorimeter cells associated to leptons.
SG::WriteHandleKey< ConstDataVector< xAOD::MuonContainer > > m_selectedMuonsWriteHandleKey
WriteHandle for the MuonContainer, that will be filled with muons passing the muon ID in PFLeptonSele...
StatusCode recordLeptonContainers(SG::WriteHandle< ConstDataVector< xAOD::ElectronContainer > > &selectedElectronsWriteHandle, SG::WriteHandle< ConstDataVector< xAOD::MuonContainer > > &selectedMuonsWriteHandle, SG::WriteHandle< ConstDataVector< CaloCellContainer > > leptonCaloCellsWriteHandle) const
Put lepton containers and list of lepton cells into Storegate.
Gaudi::Property< std::string > m_electronID
Gaudi::Property< bool > m_storeLeptonCells
Toggle storage of lepton CaloCells.
Gaudi::Property< bool > m_selectElectrons
Toggle to determine whether we select any electrons or not - if selected then tracks matched to those...
SG::ReadHandleKey< xAOD::MuonContainer > m_muonsReadHandleKey
ReadHandle for the MuonContainer to be used as input.
PFLeptonSelector(const std::string &name, ISvcLocator *pSvcLocator)
Default constructor.
void storeElectronCells(const xAOD::Egamma &electron, SG::WriteHandle< ConstDataVector< CaloCellContainer > > leptonCaloCellsWriteHandle) const
store the cells of the electrons
Gaudi::Property< bool > m_selectMuons
Toggle to determine whether we select any muons or not - if selected then tracks matched to those muo...
~PFLeptonSelector()
Default destructor.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition Egamma.h:17
Muon_v1 Muon
Reference the current persistent version: