ATLAS Offline Software
Loading...
Searching...
No Matches
PFLeptonSelector.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef PFLEPTONSELECTOR_H
5#define PFLEPTONSELECTOR_H
6
8
12
15
17
19{
20
21public:
23 PFLeptonSelector(const std::string& name, ISvcLocator* pSvcLocator);
26
28 StatusCode initialize();
29 StatusCode execute(const EventContext& ctx) const;
30 StatusCode finalize();
31
32private:
34 StatusCode selectElectrons(SG::WriteHandle<ConstDataVector<xAOD::ElectronContainer>>& selectedElectronsWriteHandle,
35 const SG::WriteHandle<ConstDataVector<CaloCellContainer>>& leptonCaloCellsWriteHandle) const;
36
38 void storeElectronCells(const xAOD::Egamma& electron,
39 SG::WriteHandle<ConstDataVector<CaloCellContainer>> leptonCaloCellsWriteHandle) const;
40
42 StatusCode selectMuons(SG::WriteHandle<ConstDataVector<xAOD::MuonContainer>>& selectedMuonsWriteHandle,
43 const SG::WriteHandle<ConstDataVector<CaloCellContainer>>& leptonCaloCellsWriteHandle) const;
44
46 void storeMuonCells(const xAOD::Muon& muon,
47 SG::WriteHandle<ConstDataVector<CaloCellContainer>> leptonCaloCellsWriteHandle) const;
48
50 void storeLeptonCells(const xAOD::CaloCluster& theCluster,
51 SG::WriteHandle<ConstDataVector<CaloCellContainer>> leptonCaloCellsWriteHandle) const;
52
54 StatusCode recordLeptonContainers(
55 SG::WriteHandle<ConstDataVector<xAOD::ElectronContainer>>& selectedElectronsWriteHandle,
57 SG::WriteHandle<ConstDataVector<CaloCellContainer>> leptonCaloCellsWriteHandle) const;
58
61 this,
62 "inputElectronsName",
63 "Electrons",
64 "ReadHandle for the ElectronContainer to be used as input"
65 };
66
69 "inputMuonsName",
70 "Muons",
71 "ReadHandle for the MuonContainer to be used as input" };
72
76 this,
77 "outputElectronsName",
78 "eflowRec_selectedElectrons",
79 "WriteHandle for the ElectronContainer, that will be filled with electrons passing the electron ID in "
80 "PFLeptonSelector::selectElectrons"
81 };
82
86 this,
87 "outputMuonsName",
88 "eflowRec_selectedMuons",
89 "WriteHandle for the MuonContainer, that will be filled with muons passing the muon ID in "
90 "PFLeptonSelector::selectMuons"
91 };
92
95 this,
96 "outputLeptonCellsName",
97 "eflowRec_leptonCellContainer",
98 "WriteHandle for the CaloCellContainer, that will store calorimeter cells associated to leptons"
99 };
100
102 Gaudi::Property<bool> m_storeLeptonCells{ this, "storeLeptonCells", false, "Toggle storage of lepton CaloCells" };
103
104 Gaudi::Property<std::string> m_electronID{ this, "electronID", "LHMedium", "Select electron ID" };
105
110 Gaudi::Property<bool> m_selectElectrons{ this, "selectElectrons", true, "Toggle usage of electron ID" };
111
116 Gaudi::Property<bool> m_selectMuons{ this, "selectMuons", true, "Toggle usage of muon ID" };
117};
118#endif
DataVector adapter that acts like it holds const pointers.
defines an "iterator" over instances of a given type in StoreGateSvc
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: