ATLAS Offline Software
Loading...
Searching...
No Matches
FourLeptonVertexingAlgorithm.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 DERIVATIONFRAMEWORK_FourLeptonVertexingAlgorithm_H
5#define DERIVATIONFRAMEWORK_FourLeptonVertexingAlgorithm_H
6
7// Gaudi & Athena basics
25namespace DerivationFramework {
27 public:
28 FourLeptonVertexingAlgorithm(const std::string& n, ISvcLocator* p);
29 StatusCode initialize() override;
30 StatusCode execute(const EventContext& ctx) const override;
31 StatusCode finalize() override;
32
33 using LeptonQuadruplet = std::array<const xAOD::IParticle*, 4>;
34
35 private:
36 bool passSelection(const xAOD::Electron* elec) const;
37 bool passSelection(const xAOD::Muon* muon) const;
38 bool passSelection(const LeptonQuadruplet& quad) const;
39
40 std::vector<LeptonQuadruplet> buildAllQuadruplets(const EventContext& ctx) const;
41
42 std::unique_ptr<xAOD::Vertex> fitQuadruplet(const EventContext& ctx, const LeptonQuadruplet& quad) const;
43
44 const xAOD::TrackParticle* trackParticle(const xAOD::IParticle* part) const;
45 int charge(const xAOD::IParticle* part) const;
46
48 SG::ReadHandleKey<xAOD::MuonContainer> m_muonKey{this, "MuonContainer", "Muons",
49 "Location of the input muon container in the StoreGate"};
50 SG::ReadHandleKey<xAOD::ElectronContainer> m_elecKey{this, "ElectronContainer", "Electrons",
51 "Location of the electron container in the store gate"};
52 SG::ReadHandleKey<xAOD::EventInfo> m_evtKey{this, "EventInfoKey", "EventInfo"};
53
54 ToolHandle<CP::IMuonSelectionTool> m_muonSelTool{this, "MuonSelectionTool", "",
55 "Applied preselection on the muons. Will be ignored if empty"};
56 ToolHandle<IAsgElectronLikelihoodTool> m_elecSelTool{this, "ElectronSelectionTool", "",
57 "Applied preselection on the electrons. Will be ignored if empty"};
58
59 ToolHandle<Trk::IVertexFitter> m_fitter{this, "VertexFitter", "", "Vertex fitter tool"};
60
61 Gaudi::Property<float> m_minMuonPt{this, "MinMuonPt", 3. * Gaudi::Units::GeV,
62 "Minimum pt cut applied on the muon -- Unfortunately not handled by the MST"};
63 Gaudi::Property<float> m_minElecPt{this, "MinElecPt", 4.5 * Gaudi::Units::GeV, " Minimum pt cut applied on the electron"};
64
65 using MuonTrk = xAOD::Muon::TrackParticleType;
66 Gaudi::Property<int> m_muonTrkProp{this, "PickMuonTrk", MuonTrk::InnerDetectorTrackParticle,
67 "Pick the proper track particle from the muon"};
68 MuonTrk m_muonTrk{MuonTrk::Primary};
69
70 Gaudi::Property<bool> m_elecUseGSF{this, "PickElecGsfTrk", true,
71 "If this property is set to true it will pick up the electron GSF track"};
72
73 Gaudi::Property<float> m_z0Cut{this, "DeltaZ0Cut", 7.5 * Gaudi::Units::mm,
74 "All leptons in the quadruplet have to be seperated from each other by maximum"};
75
76
77 Gaudi::Property<float> m_lowSFOS_Cut{this, "LowSFOSMass", 3.5 * Gaudi::Units::GeV, "Minimal mass for the lower SFOS pair"};
78 Gaudi::Property<float> m_highPair_Cut{this, "HighMassPair", 40.*Gaudi::Units::GeV, "Minimum mass for the largest lepton pair"};
79
80 Gaudi::Property<float> m_LeadPtCut{this, "LeadingLeptonPt", 15. *Gaudi::Units::GeV,"Minimal momentum of the leading lepton in the quad "};
81 Gaudi::Property<float> m_SubLeadPtCut{this, "SubLeadingLeptonPt", 10. *Gaudi::Units::GeV,"Minimal momentum of the leading lepton in the quad "};
82
83 Gaudi::Property<float> m_VtxChi2Cut{this, "VertexChi2Cut", 20, "Maximal chii n.D.o.F cut on the reconstructed vertex" };
84
85
86 SG::WriteHandleKey<xAOD::VertexContainer> m_vtxKey{this, "OutVertexContainer", "FourLeptonVertices", "Output vertex container"};
87 Gaudi::Property<bool> m_pruneCov{this, "PruneCovariance", true, "Clears the covariance vector"};
88 Gaudi::Property<bool> m_pruneWeight{this, "PruneTrackWeights", true, "Clears the track weight vector"};
89
91 mutable std::array<std::atomic<unsigned int>, 8> m_num_lep ATLAS_THREAD_SAFE {};
92 mutable std::array<std::atomic<unsigned int>, 8> m_num_ele ATLAS_THREAD_SAFE {};
93 mutable std::array<std::atomic<unsigned int>, 8> m_num_muo ATLAS_THREAD_SAFE {};
94
96 mutable std::atomic<unsigned int> m_tried_fits{0};
98 mutable std::atomic<unsigned int> m_good_fits{0};
99
100
101 };
102
103} // namespace DerivationFramework
104#endif
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.
Define macros for attributes used to control the static checker.
An algorithm that can be simultaneously executed in multiple threads.
const xAOD::TrackParticle * trackParticle(const xAOD::IParticle *part) const
SG::WriteHandleKey< xAOD::VertexContainer > m_vtxKey
std::array< std::atomic< unsigned int >, 8 > m_num_lep ATLAS_THREAD_SAFE
Simple counter to evaluate the number of leptons per event.
ToolHandle< IAsgElectronLikelihoodTool > m_elecSelTool
SG::ReadHandleKey< xAOD::ElectronContainer > m_elecKey
std::atomic< unsigned int > m_good_fits
How many vertex fits were actually successful.
std::array< const xAOD::IParticle *, 4 > LeptonQuadruplet
FourLeptonVertexingAlgorithm(const std::string &n, ISvcLocator *p)
SG::ReadHandleKey< xAOD::MuonContainer > m_muonKey
Input containers.
std::vector< LeptonQuadruplet > buildAllQuadruplets(const EventContext &ctx) const
std::atomic< unsigned int > m_tried_fits
How many vertex fits were attempted.
std::unique_ptr< xAOD::Vertex > fitQuadruplet(const EventContext &ctx, const LeptonQuadruplet &quad) const
StatusCode execute(const EventContext &ctx) const override
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.
Class providing the definition of the 4-vector interface.
THE reconstruction tool.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Muon_v1 Muon
Reference the current persistent version:
Electron_v1 Electron
Definition of the current "egamma version".