ATLAS Offline Software
NewVrtSecInclusiveAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // NewVrtSecInclusiveAlg.h, (c) ATLAS Detector software
7 // author: Vadim Kostyukhin (vadim.kostyukhin@cern.ch)
9 
14 #ifndef VKalVrt_NewVrtSecInclusiveAlg_H
15 #define VKalVrt_NewVrtSecInclusiveAlg_H
16 
17 #include <string>
18 #include <vector>
19 
21 #include "GaudiKernel/ToolHandle.h"
26 #include "xAODMuon/MuonContainer.h"
29 #include "xAODJet/JetContainer.h"
30 
31 
32 namespace Rec {
33 
35  public:
36 
37  NewVrtSecInclusiveAlg( const std::string& name, ISvcLocator* pSvcLocator );
38 
39  StatusCode initialize() override;
40  StatusCode execute(const EventContext &ctx) const override;
41  StatusCode finalize() override;
42 
43  private:
44 
45  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_tpContainerKey{this,"TrackParticleContainer","InDetTrackParticles","Read TrackParticle container"};
46  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_gsfContainerKey{this,"GSFTrackParticleContainer","GSFTrackParticles","Read GSFTrackParticle container"};
47  SG::ReadHandleKey<xAOD::MuonContainer> m_muonContainerKey{this,"MuonContainer","Muons","Read muon container"};
48  SG::ReadHandleKey<xAOD::ElectronContainer> m_electronContainerKey{this,"ElectronContainer","Electrons","Read electron container"};
49  SG::ReadHandleKey<xAOD::VertexContainer> m_pvContainerKey{this,"PrimaryVertexContainer","PrimaryVertices","Read PrimaryVertices container"};
50  SG::ReadHandleKey<xAOD::JetContainer> m_jetContainerKey{this,"JetContainer","AntiKt4EMPFlowJets","Read Jets container"};
51  SG::ReadHandleKey<xAOD::VertexContainer> m_btsvContainerKey{this,"BTagSVContainer","BTagging_AntiKt4EMPFlowSecVtx","Read BTagiingSV container"};
52 
53  SG::WriteHandleKey<xAOD::VertexContainer> m_foundVerticesKey{this,"BVertexContainerName","AllBVertices","Found vertices container"};
54  ToolHandle < Rec::IVrtInclusive > m_bvertextool{this, "BVertexTool", "Rec::NewVrtSecInclusiveTool/SVTool"};
55 
56  Gaudi::Property<bool> m_addIDTracks{this, "AddIDTracks", true, "Set to true if you want to add ID tracks to the pool"};
57  Gaudi::Property<bool> m_addGSFTracks{this, "AddGSFTracks", false, "Set to true if you want to add GSF tracks to the pool"};
58  Gaudi::Property<bool> m_addMuonTracks{this, "AddMuonTracks", false, "Set to true if you want to add ID tracks from muons to the pool"};
59  Gaudi::Property<bool> m_addElectronTracks{this, "AddElectronTracks", false, "Set to true if you want to add GSF tracks from electrons to the pool"};
60  Gaudi::Property<bool> m_removeNonLepVerts{this, "RemoveNonLepVertices", false, "Set to true if you want to remove vertices with no associated lepton tracks"};
61 
62  void addInDetTracks(const EventContext &, std::unordered_set<const xAOD::TrackParticle*>&) const;
63  void addGSFTracks(const EventContext &, std::unordered_set<const xAOD::TrackParticle*>&) const;
64  void addMuonTracks(const EventContext &, std::unordered_set<const xAOD::TrackParticle*>&) const;
65  void addElectronTracks(const EventContext &, std::unordered_set<const xAOD::TrackParticle*>&) const;
66  bool vertexHasNoLep(const EventContext &, const xAOD::Vertex*) const;
67  };
68 }
69 
70 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
Rec::NewVrtSecInclusiveAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition: NewVrtSecInclusiveAlg.cxx:52
Rec::NewVrtSecInclusiveAlg::vertexHasNoLep
bool vertexHasNoLep(const EventContext &, const xAOD::Vertex *) const
Definition: NewVrtSecInclusiveAlg.cxx:220
Rec::NewVrtSecInclusiveAlg::m_btsvContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_btsvContainerKey
Definition: NewVrtSecInclusiveAlg.h:51
Rec::NewVrtSecInclusiveAlg::m_gsfContainerKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_gsfContainerKey
Definition: NewVrtSecInclusiveAlg.h:46
Rec::NewVrtSecInclusiveAlg::finalize
StatusCode finalize() override
Definition: NewVrtSecInclusiveAlg.cxx:47
SG::ReadHandleKey< xAOD::TrackParticleContainer >
Rec::NewVrtSecInclusiveAlg::m_muonContainerKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonContainerKey
Definition: NewVrtSecInclusiveAlg.h:47
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
Rec::NewVrtSecInclusiveAlg::m_pvContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_pvContainerKey
Definition: NewVrtSecInclusiveAlg.h:49
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
ElectronContainer.h
Rec::NewVrtSecInclusiveAlg::m_electronContainerKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronContainerKey
Definition: NewVrtSecInclusiveAlg.h:48
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition: FakeTrackBuilder.h:10
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Rec::NewVrtSecInclusiveAlg::addElectronTracks
void addElectronTracks(const EventContext &, std::unordered_set< const xAOD::TrackParticle * > &) const
Definition: NewVrtSecInclusiveAlg.cxx:200
Rec::NewVrtSecInclusiveAlg::m_bvertextool
ToolHandle< Rec::IVrtInclusive > m_bvertextool
Definition: NewVrtSecInclusiveAlg.h:54
Rec::NewVrtSecInclusiveAlg::m_addElectronTracks
Gaudi::Property< bool > m_addElectronTracks
Definition: NewVrtSecInclusiveAlg.h:59
Rec::NewVrtSecInclusiveAlg::m_jetContainerKey
SG::ReadHandleKey< xAOD::JetContainer > m_jetContainerKey
Definition: NewVrtSecInclusiveAlg.h:50
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
Rec::NewVrtSecInclusiveAlg::NewVrtSecInclusiveAlg
NewVrtSecInclusiveAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: NewVrtSecInclusiveAlg.cxx:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Rec::NewVrtSecInclusiveAlg::m_addGSFTracks
Gaudi::Property< bool > m_addGSFTracks
Definition: NewVrtSecInclusiveAlg.h:57
MuonContainer.h
VertexContainer.h
Rec::NewVrtSecInclusiveAlg::addGSFTracks
void addGSFTracks(const EventContext &, std::unordered_set< const xAOD::TrackParticle * > &) const
Definition: NewVrtSecInclusiveAlg.cxx:184
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
JetContainer.h
Rec::NewVrtSecInclusiveAlg::m_removeNonLepVerts
Gaudi::Property< bool > m_removeNonLepVerts
Definition: NewVrtSecInclusiveAlg.h:60
Rec::NewVrtSecInclusiveAlg::m_addMuonTracks
Gaudi::Property< bool > m_addMuonTracks
Definition: NewVrtSecInclusiveAlg.h:58
Rec::NewVrtSecInclusiveAlg
Definition: NewVrtSecInclusiveAlg.h:34
Rec::NewVrtSecInclusiveAlg::initialize
StatusCode initialize() override
Definition: NewVrtSecInclusiveAlg.cxx:33
Rec::NewVrtSecInclusiveAlg::addMuonTracks
void addMuonTracks(const EventContext &, std::unordered_set< const xAOD::TrackParticle * > &) const
Definition: NewVrtSecInclusiveAlg.cxx:168
IVrtInclusive.h
Rec::NewVrtSecInclusiveAlg::m_addIDTracks
Gaudi::Property< bool > m_addIDTracks
Definition: NewVrtSecInclusiveAlg.h:56
Rec::NewVrtSecInclusiveAlg::m_tpContainerKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tpContainerKey
Definition: NewVrtSecInclusiveAlg.h:45
TrackParticleContainer.h
Rec::NewVrtSecInclusiveAlg::addInDetTracks
void addInDetTracks(const EventContext &, std::unordered_set< const xAOD::TrackParticle * > &) const
Definition: NewVrtSecInclusiveAlg.cxx:156
Rec::NewVrtSecInclusiveAlg::m_foundVerticesKey
SG::WriteHandleKey< xAOD::VertexContainer > m_foundVerticesKey
Definition: NewVrtSecInclusiveAlg.h:53