ATLAS Offline Software
Loading...
Searching...
No Matches
TrigBhhComboHypo.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIG_TrigBhhComboHypo_H
6#define TRIG_TrigBhhComboHypo_H
7
8#include <string>
9#include <vector>
10#include <utility>
11
12#include "Gaudi/Property.h"
20
23
26
29
32
33#include "ITrigBphysState.h"
35
36#include "Constants.h"
37typedef struct PDG20 PDG;
38
39
45 public:
46 TrigBhhState() = delete;
53 virtual ~TrigBhhState() = default;
54
55 // EFCB muon candidates from mergeMuonsFromDecisions()
56 struct Muon {
58 std::vector<ElementLink<TrigCompositeUtils::DecisionContainer>> decisionLinks;
60 };
61 std::vector<Muon> muons;
62
63 // tracks from mergeTracksFromViews()
64 std::vector<ElementLink<xAOD::TrackParticleContainer>> tracks;
65};
66
67
75 public:
76 TrigBhhComboHypo(const std::string& name, ISvcLocator* pSvcLocator);
77 TrigBhhComboHypo() = delete;
78
79 virtual StatusCode initialize() override;
80 virtual StatusCode execute(const EventContext& context) const override;
81
82 private:
87 StatusCode mergeMuonsFromDecisions(TrigBhhState&) const;
88
94 StatusCode mergeTracksFromViews(TrigBhhState&) const;
95
100 StatusCode findBhhCandidates(TrigBhhState&) const;
101
106 StatusCode createDecisionObjects(TrigBhhState&) const;
107
115 std::unique_ptr<xAOD::Vertex> fit(
116 const EventContext& context,
117 const std::vector<ElementLink<xAOD::TrackParticleContainer>>& trackParticleLinks,
118 const std::vector<double>& trkMass = {PDG::mKaon, PDG::mKaon}) const;
119
128 StatusCode fillTriggerObject(
129 xAOD::TrigBphys& triggerObject,
130 const xAOD::Vertex& vertex,
131 const Amg::Vector3D& productionVertex,
132 const std::vector<double>& trkMass = {PDG::mKaon, PDG::mKaon}) const;
133
139 bool isIdenticalTracks(const xAOD::TrackParticle* lhs, const xAOD::TrackParticle* rhs) const;
140 bool isIdenticalTracks(const xAOD::Muon* lhs, const xAOD::Muon* rhs) const;
141
146 double Lxy(const Amg::Vector3D& productionVertex, const Amg::Vector3D& decayVertex, const std::vector<xAOD::TrackParticle::GenVecFourMom_t>& momenta) const;
147
149 "TrackCollectionKey", "InDetTrackParticles", "input TrackParticle container name"};
151 "TrigBphysCollectionKey", "TrigBphysContainer", "output TrigBphysContainer name"};
153 m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
154
155 // general properties
156 Gaudi::Property<bool> m_applyMuonRemoval {this, "ApplyMuonRemoval", false,
157 "if True, remove tracks accosiated with muons from m_trackParticleContainer"};
158 Gaudi::Property<double> m_deltaR {this,
159 "DeltaR", 0.01, "minimum deltaR between same-sign tracks (overlap removal)"};
160 Gaudi::Property<double> m_trkPt {this,
161 "Bhh_trackPtThreshold", 2000., "minimum track transverse momenta"};
162 Gaudi::Property<std::pair<double, double>> m_massRange {this,
163 "Bhh_massRange", {4500., 6500.}, "B0/B_s0 mass range"};
164 Gaudi::Property<double> m_chi2 {this,
165 "Bhh_chi2", 20., "maximum chi2 of the fitted B0 vertex"};
166 Gaudi::Property<size_t> m_fitAttemptsWarningThreshold {this,
167 "FitAttemptsWarningThreshold", 200, "Events processing this many calls of the vertex fitter will generate a WARNING message (time-out protect)"};
168 Gaudi::Property<size_t> m_fitAttemptsBreakThreshold {this,
169 "FitAttemptsBreakThreshold", 1000, "Events processing this many calls of the vertex fitter will generate a second WARNING message and the loop over combinations will be terminated at this point (time-out protect)"};
170
171 // external tools
172 ToolHandle<InDet::VertexPointEstimator> m_vertexPointEstimator {this,
173 "VertexPointEstimator", "", "tool to find starting point for the vertex fitter"};
174 ToolHandle<Trk::TrkVKalVrtFitter> m_vertexFitter {this,
175 "VertexFitter", "", "VKalVrtFitter tool to fit tracks into the common vertex"};
176 ToolHandle<GenericMonitoringTool> m_monTool {this,
177 "MonTool", "", "monitoring tool"};
178
180};
181
182#endif // TRIG_TrigBhhComboHypo_H
Header file to be included by clients of the Monitored infrastructure.
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.
struct PDG20 PDG
ComboHypo(const std::string &name, ISvcLocator *pSvcLocator)
Definition ComboHypo.cxx:13
TrigCompositeUtils::DecisionContainer & decisions()
ITrigBphysState()=delete
const TrigCompositeUtils::DecisionContainer & previousDecisions() const
xAOD::TrigBphysContainer & trigBphysCollection()
const EventContext & context() const
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.
ToolHandle< InDet::VertexPointEstimator > m_vertexPointEstimator
StatusCode fillTriggerObject(xAOD::TrigBphys &triggerObject, const xAOD::Vertex &vertex, const Amg::Vector3D &productionVertex, const std::vector< double > &trkMass={PDG::mKaon, PDG::mKaon}) const
Fill the trigger object that may be stored for debugging or matching.
Gaudi::Property< double > m_chi2
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerKey
TrigBhhComboHypo()=delete
StatusCode mergeMuonsFromDecisions(TrigBhhState &) const
Go through state.previousDecisions(), fetch xAOD::Muons objects attached to decisions and save links ...
ToolHandle< Trk::TrkVKalVrtFitter > m_vertexFitter
TrigBhhComboHypo(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< double > m_trkPt
virtual StatusCode execute(const EventContext &context) const override
bool isIdenticalTracks(const xAOD::TrackParticle *lhs, const xAOD::TrackParticle *rhs) const
Returns false for the tracks with opposite charges.
Gaudi::Property< std::pair< double, double > > m_massRange
SG::WriteHandleKey< xAOD::TrigBphysContainer > m_trigBphysContainerKey
ToolHandle< GenericMonitoringTool > m_monTool
bool isIdenticalTracks(const xAOD::Muon *lhs, const xAOD::Muon *rhs) const
TrigCompositeUtils::DecisionIDContainer m_allowedIDs
Gaudi::Property< double > m_deltaR
Gaudi::Property< size_t > m_fitAttemptsBreakThreshold
virtual StatusCode initialize() override
std::unique_ptr< xAOD::Vertex > fit(const EventContext &context, const std::vector< ElementLink< xAOD::TrackParticleContainer > > &trackParticleLinks, const std::vector< double > &trkMass={PDG::mKaon, PDG::mKaon}) const
Perform a vertex fit on selected tracks.
Gaudi::Property< bool > m_applyMuonRemoval
double Lxy(const Amg::Vector3D &productionVertex, const Amg::Vector3D &decayVertex, const std::vector< xAOD::TrackParticle::GenVecFourMom_t > &momenta) const
Returns the transverse decay length of a particle Lxy in [mm].
Gaudi::Property< size_t > m_fitAttemptsWarningThreshold
StatusCode findBhhCandidates(TrigBhhState &) const
Make all possible combinations from state.tracks(), fit tracks to the common vertex,...
StatusCode mergeTracksFromViews(TrigBhhState &) const
Go through state.previousDecisions() and fetch xAOD::TrackParticle objects associated with the neares...
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
StatusCode createDecisionObjects(TrigBhhState &) const
Create a decision for each xAOD::TrigBphys object from state.trigBphysCollection() and use hypoTools(...
State class for TrigBhhComboHypo algorithm.
TrigBhhState()=delete
std::vector< ElementLink< xAOD::TrackParticleContainer > > tracks
TrigBhhState(const EventContext &context, const TrigCompositeUtils::DecisionContainer &previousDecisions, TrigCompositeUtils::DecisionContainer &decisions, xAOD::TrigBphysContainer *trigBphysCollection=nullptr, const InDet::BeamSpotData *beamSpotData=nullptr)
virtual ~TrigBhhState()=default
std::vector< Muon > muons
Eigen::Matrix< double, 3, 1 > Vector3D
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
std::set< DecisionID > DecisionIDContainer
TrigBphys_v1 TrigBphys
Definition TrigBphys.h:18
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
Muon_v1 Muon
Reference the current persistent version:
TrigBphysContainer_v1 TrigBphysContainer
std::vector< ElementLink< TrigCompositeUtils::DecisionContainer > > decisionLinks
ElementLink< xAOD::MuonContainer > link
TrigCompositeUtils::DecisionIDContainer decisionIDs