ATLAS Offline Software
Loading...
Searching...
No Matches
TrigBmumuxComboHypo.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIG_TrigBmumuxComboHypo_H
6#define TRIG_TrigBmumuxComboHypo_H
7
8#include <string>
9#include <vector>
10#include <utility>
11
12#include "Gaudi/Property.h"
20
23
26
30
33
34#include "ITrigBphysState.h"
36
37#include "Constants.h"
38typedef struct PDG20 PDG;
40
46 public:
47 TrigBmumuxState() = delete;
56 virtual ~TrigBmumuxState() = default;
57
58 // EFCB muon candidates from mergeMuonsFromDecisions()
59 struct Muon {
61 std::vector<ElementLink<TrigCompositeUtils::DecisionContainer>> decisionLinks;
63 };
64 std::vector<Muon> muons;
65
66 // tracks from mergeTracksFromViews()
67 std::vector<ElementLink<xAOD::TrackParticleContainer>> tracks;
68 bool isCompositeRoI = false;
69
70 // dimuon candidates from findDimuonCandidates()
73 std::vector<std::array<size_t, 2>> trigBphysMuonIndices; // {mu1, mu2} indices in state.muons for dimuon in state.dimuons
74
75 // tracks to be fitted with given dimuon candidate from findBmumuxCandidates_selectTracks()
76 std::vector<ElementLink<xAOD::TrackParticleContainer>> selectedTracks;
77 std::map<const xAOD::TrackParticle*, double> selectedTrackZ0; // track z0 impact parameters wrt dimuon vertex
78
79 // track combinations from findBmumuxCandidates_fit(makeCombinations = true)
80 std::map<size_t, size_t> trackCombinations; // key = track index for dimuon + track case OR state.getCombinationKey(trk1, trk2) for track + track case : number of found combinations
81
82 // sorted vector of track combinations which failed vertex fit from findBmumuxCandidates_fastFit()
83 std::vector<size_t> badTrackCombinations;
84
85 size_t getCombinationKey(size_t i1, size_t i2) const { size_t n = selectedTracks.size(); return (i1 < i2 ? i1 + n * i2 : i2 + n * i1); }
86 void addTrackCombination(size_t i1) { trackCombinations[i1]++; }
87 void addTrackCombination(size_t i1, size_t i2) { trackCombinations[getCombinationKey(i1, i2)]++; }
88 void addTrackCombination(size_t i1, size_t i2, size_t i3) { addTrackCombination(i1, i2); addTrackCombination(i1, i3); addTrackCombination(i2, i3); }
89 bool isBadCombination(size_t i1) const { return std::binary_search(badTrackCombinations.begin(), badTrackCombinations.end(), i1); }
90 bool isBadCombination(size_t i1, size_t i2, size_t i3) const { return (isBadCombination(getCombinationKey(i1, i2)) || isBadCombination(getCombinationKey(i1, i3)) || isBadCombination(getCombinationKey(i2, i3))); }
91
92 StatusCode addTriggerObject(xAOD::TrigBphys* triggerObject) {
93 if (!triggerObject) {
94 return StatusCode::FAILURE;
95 }
96 trigBphysCollection().push_back(triggerObject);
97 return StatusCode::SUCCESS;
98 }
99
100};
101
102
116 public:
117 TrigBmumuxComboHypo(const std::string& name, ISvcLocator* pSvcLocator);
119
120 virtual StatusCode initialize() override;
121 virtual StatusCode execute(const EventContext& context) const override;
122
123 enum Decay : size_t {
124 kPsi_2mu, // psi -> mu+ mu-
125 kB_2mu1trk, // B -> mu+ mu- trk1
126 kB_2mu2trk, // B -> mu+ mu- trk1 trk2
127 kDs, // D_s+ -> K+ K- pi+
128 kDplus, // D+ -> K- pi+ pi+
129 kD0, // D0 -> K- pi+
130 kB_PsiPi, // psi + pion from D*+
131 kFastFit_2trk, // trk1 + trk2
132 kFastFit_2mu1trk // dimuon + trk1
133 };
134
135 private:
136
141 StatusCode mergeMuonsFromDecisions(TrigBmumuxState&) const;
142
147 StatusCode mergeTracksFromViews(TrigBmumuxState&) const;
148
153 StatusCode findDimuonCandidates(TrigBmumuxState&) const;
154
158 StatusCode findBmumuxCandidates(TrigBmumuxState&) const;
159
163 StatusCode findBmumuxCandidates_selectTracks(TrigBmumuxState&, size_t dimuonIndex) const;
164
170 StatusCode findBmumuxCandidates_fastFit(TrigBmumuxState&, size_t dimuonIndex) const;
171
176 StatusCode findBmumuxCandidates_fit(TrigBmumuxState&, size_t dimuonIndex, bool makeCombinations = false) const;
177
182 StatusCode createDecisionObjects(TrigBmumuxState&) const;
183
192 std::unique_ptr<xAOD::Vertex> fit(
193 const EventContext& context,
194 const std::vector<ElementLink<xAOD::TrackParticleContainer>>& trackParticleLinks,
195 Decay decay = kPsi_2mu,
196 const xAOD::Vertex* dimuon = nullptr) const;
197
207 TrigBmumuxState& state,
208 const xAOD::Vertex& vertex,
210 const std::vector<double>& trkMass = {PDG::mMuon, PDG::mMuon},
211 const ElementLink<xAOD::TrigBphysContainer>& dimuonLink = ElementLink<xAOD::TrigBphysContainer>()) const;
212
217 bool isIdenticalTracks(const xAOD::TrackParticle* lhs, const xAOD::TrackParticle* rhs) const;
218 bool isIdenticalTracks(const xAOD::Muon* lhs, const xAOD::Muon* rhs) const;
223 bool isInSameRoI(const xAOD::Muon*, const xAOD::TrackParticle*) const;
224 bool passDimuonTrigger(const std::vector<const TrigCompositeUtils::DecisionIDContainer*>& previousDecisionIDs) const;
225
229 bool isInMassRange(double mass, const std::pair<double, double>& range) const { return (mass > range.first && mass < range.second); }
235 double Lxy(const Amg::Vector3D& productionVertex, const xAOD::Vertex& decayVertex) const;
236
243 xAOD::TrackParticle::GenVecFourMom_t momentum(const xAOD::Vertex& vertex, const std::vector<double>& trkMass) const;
244
246 "TrackCollectionKey", "InDetTrackParticles", "input TrackParticle container name"};
248 "MuonCollectionKey", "Muons", "input EF Muon container name"};
250 "TrigBphysCollectionKey", "TrigBphysContainer", "output TrigBphysContainer name"};
252 m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
253
254 // general properties
255 Gaudi::Property<double> m_deltaR {this,
256 "DeltaR", 0.01, "minimum deltaR between same-sign tracks (overlap removal)"};
257 Gaudi::Property<double> m_trkZ0 {this,
258 "TrkZ0", 50., "maximum z0 impact parameter of the track wrt the fitted dimuon vertex; no preselection if negative"};
259 Gaudi::Property<double> m_roiEtaWidth {this,
260 "RoiEtaWidth", 0.75, "extent of the RoI in eta from initial muon, to be check for SuperRoI"};
261 Gaudi::Property<double> m_roiPhiWidth {this,
262 "RoiPhiWidth", 0.75, "extent of the RoI in phi from initial muon, to be check for SuperRoI"};
263 Gaudi::Property<size_t> m_fitAttemptsWarningThreshold {this,
264 "FitAttemptsWarningThreshold", 200, "Events processing this many calls of the vertex fitter will generate a WARNING message (time-out protect)"};
265 Gaudi::Property<size_t> m_fitAttemptsBreakThreshold {this,
266 "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)"};
267 Gaudi::Property<double> m_fastFit_2trk_chi2 {this,
268 "FastFit_2trk_chi2", 50., "maximum chi2 for fast fit of trk1 + trk2"};
269 Gaudi::Property<double> m_fastFit_2mu1trk_chi2 {this,
270 "FastFit_2mu1trk_chi2", 60., "maximum chi2 for fast fit of dimuon + trk1"};
271
272 // dimuon properties
273 Gaudi::Property<bool> m_dimuon_rejectSameChargeTracks {this,
274 "Dimuon_rejectSameChargeTracks", true, "if true, the only (mu+, mu-) pairs will be kept (no wrong-charge combinations)"};
275 Gaudi::Property<std::pair<double, double>> m_dimuon_massRange {this,
276 "Dimuon_massRange", {100., 5500.}, "dimuon mass range"};
277 Gaudi::Property<double> m_dimuon_chi2 {this,
278 "Dimuon_chi2", 20., "maximum chi2 of the dimuon vertex"};
279
280 // B+ -> mu+ mu- K+
281 Gaudi::Property<bool> m_BplusToMuMuKaon {this,
282 "BplusToMuMuKaon", true, "switch on/off B+ -> mu+ mu- K+ decay"};
283 Gaudi::Property<double> m_BplusToMuMuKaon_minKaonPt {this,
284 "BplusToMuMuKaon_minKaonPt", 100., "minimum pT of kaon track"};
285 Gaudi::Property<std::pair<double, double>> m_BplusToMuMuKaon_massRange {this,
286 "BplusToMuMuKaon_massRange", {4500., 5900.}, "B+ mass range"};
287 Gaudi::Property<float> m_BplusToMuMuKaon_chi2 {this,
288 "BplusToMuMuKaon_chi2", 50., "maximum chi2 of the fitted B+ vertex"};
289 Gaudi::Property<bool> m_BplusToMuMuKaon_useFastFit {this,
290 "BplusToMuMuKaon_useFastFit", false, "true: perform vertex fit depending on only if fast fit; false: always perform vertex fit"};
291
292 // B_c+ -> J/psi(-> mu+ mu-) pi+
293 Gaudi::Property<bool> m_BcToMuMuPion {this,
294 "BcToMuMuPion", true, "switch on/off B_c+ -> J/psi(-> mu+ mu-) pi+ decay"};
295 Gaudi::Property<double> m_BcToMuMuPion_minPionPt {this,
296 "BcToMuMuPion_minPionPt", 2000., "minimum pT of pion track"};
297 Gaudi::Property<std::pair<double, double>> m_BcToMuMuPion_dimuonMassRange {this,
298 "BcToMuMuPion_dimuonMassRange", {2500., 4300.}, "dimuon mass range for B_c+ decay"};
299 Gaudi::Property<std::pair<double, double>> m_BcToMuMuPion_massRange {this,
300 "BcToMuMuPion_massRange", {5500., 7300.}, "B_c+ mass range"};
301 Gaudi::Property<float> m_BcToMuMuPion_chi2 {this,
302 "BcToMuMuPion_chi2", 50., "maximum chi2 of the fitted B_c+ vertex"};
303 Gaudi::Property<bool> m_BcToMuMuPion_useFastFit {this,
304 "BcToMuMuPion_useFastFit", false, "true: perform vertex fit depending on only if fast fit; false: always perform vertex fit"};
305
306 // B_s0 -> mu+ mu- phi(-> K+ K-)
307 Gaudi::Property<bool> m_BsToMuMuPhi1020 {this,
308 "BsToMuMuPhi1020", true, "switch on/off B_s0 -> mu+ mu- phi(-> K+ K-) decay"};
309 Gaudi::Property<bool> m_BsToMuMuPhi1020_rejectSameChargeTracks {this,
310 "BsToMuMuPhi1020_rejectSameChargeTracks", true, "if true, the only (K+, K-) pairs will be kept (no wrong-charge combinations)"};
311 Gaudi::Property<double> m_BsToMuMuPhi1020_minKaonPt {this,
312 "BsToMuMuPhi1020_minKaonPt", 100., "minimum pT of kaon tracks"};
313 Gaudi::Property<std::pair<double, double>> m_BsToMuMuPhi1020_massRange {this,
314 "BsToMuMuPhi1020_massRange", {4800., 5800.}, "B_s0 mass range"};
315 Gaudi::Property<std::pair<double, double>> m_BsToMuMuPhi1020_phiMassRange {this,
316 "BsToMuMuPhi1020_phiMassRange", {940., 1100.}, "phi1020 mass range"};
317 Gaudi::Property<float> m_BsToMuMuPhi1020_chi2 {this,
318 "BsToMuMuPhi1020_chi2", 60., "maximum chi2 of the fitted B+ vertex"};
319 Gaudi::Property<bool> m_BsToMuMuPhi1020_useFastFit {this,
320 "BsToMuMuPhi1020_useFastFit", false, "true: perform vertex fit depending on only if fast fit; false: always perform vertex fit"};
321
322 // B0 -> mu+ mu- K*0(-> K+ pi-)
323 Gaudi::Property<bool> m_BdToMuMuKstar0 {this,
324 "BdToMuMuKstar0", true, "switch on/off B0 -> mu+ mu- K*0(-> K+ pi-) decay"};
325 Gaudi::Property<bool> m_BdToMuMuKstar0_rejectSameChargeTracks {this,
326 "BdToMuMuKstar0_rejectSameChargeTracks", true, "if true, the only (K+, pi-) and (K-, pi+) pairs will be kept (no wrong-charge combinations)"};
327 Gaudi::Property<double> m_BdToMuMuKstar0_minKaonPt {this,
328 "BdToMuMuKstar0_minKaonPt", 100., "minimum pT of kaon track"};
329 Gaudi::Property<double> m_BdToMuMuKstar0_minPionPt {this,
330 "BdToMuMuKstar0_minPionPt", 100., "minimum pT of pion track"};
331 Gaudi::Property<std::pair<double, double>> m_BdToMuMuKstar0_massRange {this,
332 "BdToMuMuKstar0_massRange", {4600., 5900.}, "B0 mass range"};
333 Gaudi::Property<std::pair<double, double>> m_BdToMuMuKstar0_KstarMassRange {this,
334 "BdToMuMuKstar0_KstarMassRange", {700., 1100.}, "K*0 mass range"};
335 Gaudi::Property<float> m_BdToMuMuKstar0_chi2 {this,
336 "BdToMuMuKstar0_chi2", 60., "maximum chi2 of the fitted B0 vertex"};
337 Gaudi::Property<bool> m_BdToMuMuKstar0_useFastFit {this,
338 "BdToMuMuKstar0_useFastFit", true, "true: perform vertex fit depending on only if fast fit; false: always perform vertex fit"};
339
340 // Lambda_b0 -> J/psi(-> mu+ mu-) p K-
341 Gaudi::Property<bool> m_LambdaBToMuMuProtonKaon {this,
342 "LambdaBToMuMuProtonKaon", true, "switch on/off Lambda_b0 -> J/psi(-> mu+ mu-) p K- decay"};
344 "LambdaBToMuMuProtonKaon_rejectSameChargeTracks", false, "if true, the only (p, K-) and (anti-p, K+) pairs will be kept (no wrong-charge combinations)"};
345 Gaudi::Property<double> m_LambdaBToMuMuProtonKaon_minProtonPt {this,
346 "LambdaBToMuMuProtonKaon_minProtonPt", 1000., "minimum pT of proton track"};
347 Gaudi::Property<double> m_LambdaBToMuMuProtonKaon_minKaonPt {this,
348 "LambdaBToMuMuProtonKaon_minKaonPt", 1000., "minimum pT of kaon track"};
349 Gaudi::Property<double> m_LambdaBToMuMuProtonKaon_minKstarMass {this,
350 "LambdaBToMuMuProtonKaon_minKstarMass", 1300., "min value for both mass(trk1=kaon, trk2=pion) and mass(trk1=pion, trk2=kaon)"};
351 Gaudi::Property<std::pair<double, double>> m_LambdaBToMuMuProtonKaon_dimuonMassRange {this,
352 "LambdaBToMuMuProtonKaon_dimuonMassRange", {2500., 4300.}, "dimuon mass range for Lambda_b0 decay"};
353 Gaudi::Property<std::pair<double, double>> m_LambdaBToMuMuProtonKaon_massRange {this,
354 "LambdaBToMuMuProtonKaon_massRange", {4800., 6400.}, "Lambda_b0 mass range"};
355 Gaudi::Property<float> m_LambdaBToMuMuProtonKaon_chi2 {this,
356 "LambdaBToMuMuProtonKaon_chi2", 60., "maximum chi2 of the fitted Lambda_b0 vertex"};
357 Gaudi::Property<bool> m_LambdaBToMuMuProtonKaon_useFastFit {this,
358 "LambdaBToMuMuProtonKaon_useFastFit", true, "true: perform vertex fit depending on only if fast fit; false: always perform vertex fit"};
359
360 // B_c+ -> J/psi(-> mu+ mu-) D_s+(->phi(-> K+ K-) pi+)
361 Gaudi::Property<bool> m_BcToDsMuMu {this,
362 "BcToDsMuMu", true, "switch on/off B_c+ -> J/psi(-> mu+ mu-) D_s+(->phi(-> K+ K-) pi+) decay"};
363 Gaudi::Property<double> m_BcToDsMuMu_minKaonPt {this,
364 "BcToDsMuMu_minKaonPt", 1000., "minimum pT of kaon track from phi(1020)"};
365 Gaudi::Property<double> m_BcToDsMuMu_minPionPt {this,
366 "BcToDsMuMu_minPionPt", 1000., "minimum pT of pion track from D_s+"};
367 Gaudi::Property<std::pair<double, double>> m_BcToDsMuMu_massRange {this,
368 "BcToDsMuMu_massRange", {5500., 7300.}, "B_c+ mass range"};
369 Gaudi::Property<std::pair<double, double>> m_BcToDsMuMu_dimuonMassRange {this,
370 "BcToDsMuMu_dimuonMassRange", {2500., 4300.}, "dimuon mass range for B_c+ -> J/psi D_s+ decay"};
371 Gaudi::Property<std::pair<double, double>> m_BcToDsMuMu_phiMassRange {this,
372 "BcToDsMuMu_phiMassRange", {940., 1100.}, "phi(1020) mass range"};
373 Gaudi::Property<std::pair<double, double>> m_BcToDsMuMu_DsMassRange {this,
374 "BcToDsMuMu_DsMassRange", {1750., 2100.}, "D_s+ mass range"};
375 Gaudi::Property<float> m_BcToDsMuMu_chi2 {this,
376 "BcToDsMuMu_chi2", 60., "maximum chi2 of the fitted B_c+ vertex"};
377 Gaudi::Property<bool> m_BcToDsMuMu_useFastFit {this,
378 "BcToDsMuMu_useFastFit", true, "true: perform vertex fit depending on only if fast fit; false: always perform vertex fit"};
379
380 // B_c+ -> J/psi(-> mu+ mu-) D+(-> K- pi+ pi+)
381 Gaudi::Property<bool> m_BcToDplusMuMu {this,
382 "BcToDplusMuMu", true, "switch on/off B_c+ -> J/psi(-> mu+ mu-) D+(-> K- pi+ pi+) decay"};
383 Gaudi::Property<double> m_BcToDplusMuMu_minKaonPt {this,
384 "BcToDplusMuMu_minKaonPt", 1000., "minimum pT of kaon track from D+"};
385 Gaudi::Property<double> m_BcToDplusMuMu_minPionPt {this,
386 "BcToDplusMuMu_minPionPt", 1000., "minimum pT of pion track from D+"};
387 Gaudi::Property<std::pair<double, double>> m_BcToDplusMuMu_massRange {this,
388 "BcToDplusMuMu_massRange", {5500., 7300.}, "B_c+ mass range"};
389 Gaudi::Property<std::pair<double, double>> m_BcToDplusMuMu_dimuonMassRange {this,
390 "BcToDplusMuMu_dimuonMassRange", {2500., 4300.}, "dimuon mass range for B_c+ -> J/psi D+ decay"};
391 Gaudi::Property<std::pair<double, double>> m_BcToDplusMuMu_DplusMassRange {this,
392 "BcToDplusMuMu_DplusMassRange", {1750., 2000.}, "D+ mass range"};
393 Gaudi::Property<float> m_BcToDplusMuMu_chi2 {this,
394 "BcToDplusMuMu_chi2", 60., "maximum chi2 of the fitted B_c+ vertex"};
395 Gaudi::Property<bool> m_BcToDplusMuMu_useFastFit {this,
396 "BcToDplusMuMu_useFastFit", true, "true: perform vertex fit depending on only if fast fit; false: always perform vertex fit"};
397
398 // B_c+ -> J/psi(-> mu+ mu-) D*+(-> D0(-> K- pi+) pi+)
399 Gaudi::Property<bool> m_BcToDstarMuMu {this,
400 "BcToDstarMuMu", true, "switch on/off partial reconstruction of B_c+ -> J/psi(-> mu+ mu-) D0(-> K- pi+) X decay"};
401 Gaudi::Property<bool> m_BcToDstarMuMu_makeDstar {this,
402 "BcToDstarMuMu_makeDstar", true, "switch on/off full reconstruction of B_c+ -> J/psi(-> mu+ mu-) D*+(-> D0(-> K- pi+) pi+) decay"};
403 Gaudi::Property<double> m_BcToDstarMuMu_minD0KaonPt {this,
404 "BcToDstarMuMu_minD0KaonPt", 1000., "minimum pT of kaon track from D0"};
405 Gaudi::Property<double> m_BcToDstarMuMu_minD0PionPt {this,
406 "BcToDstarMuMu_minD0PionPt", 1000., "minimum pT of pion track from D0"};
407 Gaudi::Property<double> m_BcToDstarMuMu_minDstarPionPt {this,
408 "BcToDstarMuMu_minDstarPionPt", 500., "minimum pT of pion track from D*+"};
409 Gaudi::Property<double> m_BcToDstarMuMu_maxDstarPionZ0 {this,
410 "BcToDstarMuMu_maxDstarPionZ0", 5., "maximum z0 impact parameter of the pion track from D*+ wrt the fitted dimuon vertex; no preselection if negative"};
411 Gaudi::Property<std::pair<double, double>> m_BcToDstarMuMu_massRange {this,
412 "BcToDstarMuMu_massRange", {5500., 7300.}, "B_c+ mass range"};
413 Gaudi::Property<std::pair<double, double>> m_BcToDstarMuMu_dimuonMassRange {this,
414 "BcToDstarMuMu_dimuonMassRange", {2500., 4300.}, "dimuon mass range for B_c+ -> J/psi D+ decay"};
415 Gaudi::Property<std::pair<double, double>> m_BcToDstarMuMu_D0MassRange {this,
416 "BcToDstarMuMu_D0MassRange", {1750., 2000.}, "D0 mass range"};
417 Gaudi::Property<std::pair<double, double>> m_BcToDstarMuMu_DstarMassRange {this,
418 "BcToDstarMuMu_DstarMassRange", {-1., 2110.}, "D*+ mass range"};
419 Gaudi::Property<float> m_BcToDstarMuMu_chi2 {this,
420 "BcToDstarMuMu_chi2", 60., "maximum chi2 of the fitted B_c+ vertex"};
421
422 // external tools
423 ToolHandle<InDet::VertexPointEstimator> m_vertexPointEstimator {this,
424 "VertexPointEstimator", "", "tool to find starting point for the vertex fitter"};
425 ToolHandle<Trk::TrkVKalVrtFitter> m_vertexFitter {this,
426 "VertexFitter", "", "VKalVrtFitter tool to fit tracks into the common vertex"};
427 ToolHandle<Reco::ITrackToVertex> m_trackToVertexTool {this,
428 "TrackToVertexTool", "", "tool to extrapolate track to vertex or beamspot"};
429 ToolHandle<GenericMonitoringTool> m_monTool {this,
430 "MonTool", "", "monitoring tool"};
431
433
434 const static std::vector<std::vector<double>> s_trkMass;
435
436};
437
438#endif // TRIG_TrigBmumuxComboHypo_H
439
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
value_type push_back(value_type pElem)
Add an element to the end of the collection.
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.
Gaudi::Property< bool > m_dimuon_rejectSameChargeTracks
Gaudi::Property< bool > m_BcToDplusMuMu_useFastFit
StatusCode findBmumuxCandidates_fit(TrigBmumuxState &, size_t dimuonIndex, bool makeCombinations=false) const
Perform fit of B decays for the topologies described above if makeCombinations = false.
Gaudi::Property< std::pair< double, double > > m_BcToMuMuPion_massRange
Gaudi::Property< float > m_BdToMuMuKstar0_chi2
ToolHandle< Trk::TrkVKalVrtFitter > m_vertexFitter
Gaudi::Property< bool > m_BdToMuMuKstar0_rejectSameChargeTracks
Gaudi::Property< bool > m_BdToMuMuKstar0_useFastFit
Gaudi::Property< double > m_BdToMuMuKstar0_minPionPt
Gaudi::Property< std::pair< double, double > > m_BcToDplusMuMu_massRange
std::unique_ptr< xAOD::Vertex > fit(const EventContext &context, const std::vector< ElementLink< xAOD::TrackParticleContainer > > &trackParticleLinks, Decay decay=kPsi_2mu, const xAOD::Vertex *dimuon=nullptr) const
Perform a vertex fit on selected tracks.
Gaudi::Property< std::pair< double, double > > m_BcToDsMuMu_phiMassRange
Gaudi::Property< std::pair< double, double > > m_BcToDstarMuMu_D0MassRange
Gaudi::Property< std::pair< double, double > > m_BcToDplusMuMu_DplusMassRange
Gaudi::Property< bool > m_BcToDsMuMu
Gaudi::Property< double > m_fastFit_2mu1trk_chi2
Gaudi::Property< bool > m_BcToMuMuPion
Gaudi::Property< double > m_BplusToMuMuKaon_minKaonPt
Gaudi::Property< std::pair< double, double > > m_BsToMuMuPhi1020_massRange
Gaudi::Property< double > m_BcToDsMuMu_minPionPt
Gaudi::Property< std::pair< double, double > > m_BdToMuMuKstar0_massRange
TrigCompositeUtils::DecisionIDContainer m_allowedIDs
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Gaudi::Property< bool > m_LambdaBToMuMuProtonKaon
Gaudi::Property< double > m_roiPhiWidth
Gaudi::Property< bool > m_LambdaBToMuMuProtonKaon_rejectSameChargeTracks
Gaudi::Property< double > m_BcToMuMuPion_minPionPt
SG::WriteHandleKey< xAOD::TrigBphysContainer > m_trigBphysContainerKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerKey
Gaudi::Property< double > m_dimuon_chi2
Gaudi::Property< float > m_BsToMuMuPhi1020_chi2
Gaudi::Property< bool > m_BcToDsMuMu_useFastFit
Gaudi::Property< double > m_BsToMuMuPhi1020_minKaonPt
ToolHandle< InDet::VertexPointEstimator > m_vertexPointEstimator
bool passDimuonTrigger(const std::vector< const TrigCompositeUtils::DecisionIDContainer * > &previousDecisionIDs) const
Gaudi::Property< std::pair< double, double > > m_BsToMuMuPhi1020_phiMassRange
Gaudi::Property< float > m_BcToDsMuMu_chi2
Gaudi::Property< std::pair< double, double > > m_BplusToMuMuKaon_massRange
Gaudi::Property< std::pair< double, double > > m_BcToDsMuMu_DsMassRange
Gaudi::Property< float > m_BcToMuMuPion_chi2
Gaudi::Property< double > m_BcToDstarMuMu_minD0KaonPt
Gaudi::Property< double > m_BdToMuMuKstar0_minKaonPt
double Lxy(const Amg::Vector3D &productionVertex, const xAOD::Vertex &decayVertex) const
Calculate the Lxy (~distance between vertices) It is defined as the transverse distance between the p...
Gaudi::Property< bool > m_LambdaBToMuMuProtonKaon_useFastFit
ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool
Gaudi::Property< std::pair< double, double > > m_LambdaBToMuMuProtonKaon_massRange
StatusCode findBmumuxCandidates(TrigBmumuxState &) const
Find B decays by appling next three subprocedures to each found dimuon candidate.
Gaudi::Property< std::pair< double, double > > m_dimuon_massRange
StatusCode mergeMuonsFromDecisions(TrigBmumuxState &) const
Go through state.previousDecisions(), fetch xAOD::Muons objects attached to decisions and save links ...
Gaudi::Property< float > m_BplusToMuMuKaon_chi2
Gaudi::Property< bool > m_BsToMuMuPhi1020
Gaudi::Property< double > m_LambdaBToMuMuProtonKaon_minKaonPt
Gaudi::Property< bool > m_BplusToMuMuKaon
Gaudi::Property< bool > m_BdToMuMuKstar0
Gaudi::Property< double > m_BcToDstarMuMu_minD0PionPt
StatusCode findBmumuxCandidates_selectTracks(TrigBmumuxState &, size_t dimuonIndex) const
Select tracks in vicinity of given dimuon vertex.
StatusCode findBmumuxCandidates_fastFit(TrigBmumuxState &, size_t dimuonIndex) const
Go through (dimuon+track) and (track+track) combinations found by findBmumuxCandidates_fit(makeCombin...
Gaudi::Property< std::pair< double, double > > m_BcToDstarMuMu_DstarMassRange
xAOD::TrigBphys * makeTriggerObject(TrigBmumuxState &state, const xAOD::Vertex &vertex, xAOD::TrigBphys::pType type=xAOD::TrigBphys::MULTIMU, const std::vector< double > &trkMass={PDG::mMuon, PDG::mMuon}, const ElementLink< xAOD::TrigBphysContainer > &dimuonLink=ElementLink< xAOD::TrigBphysContainer >()) const
Construct the trigger object that may be stored for debugging or matching.
Gaudi::Property< double > m_BcToDstarMuMu_minDstarPionPt
Gaudi::Property< std::pair< double, double > > m_LambdaBToMuMuProtonKaon_dimuonMassRange
Gaudi::Property< bool > m_BplusToMuMuKaon_useFastFit
Gaudi::Property< bool > m_BsToMuMuPhi1020_useFastFit
bool isInSameRoI(const xAOD::Muon *, const xAOD::TrackParticle *) const
Attempts to identify if the track is in the same RoI as the muon by comparing the angle with the RoI ...
Gaudi::Property< std::pair< double, double > > m_BcToDplusMuMu_dimuonMassRange
TrigBmumuxComboHypo()=delete
virtual StatusCode initialize() override
Gaudi::Property< double > m_roiEtaWidth
Gaudi::Property< std::pair< double, double > > m_BcToDsMuMu_massRange
Gaudi::Property< double > m_BcToDplusMuMu_minPionPt
Gaudi::Property< bool > m_BcToDstarMuMu
Gaudi::Property< std::pair< double, double > > m_BdToMuMuKstar0_KstarMassRange
static const std::vector< std::vector< double > > s_trkMass
Gaudi::Property< bool > m_BcToDstarMuMu_makeDstar
Gaudi::Property< std::pair< double, double > > m_BcToDstarMuMu_massRange
SG::ReadHandleKey< xAOD::MuonContainer > m_muonContainerKey
ToolHandle< GenericMonitoringTool > m_monTool
Gaudi::Property< double > m_BcToDstarMuMu_maxDstarPionZ0
Gaudi::Property< bool > m_BcToDplusMuMu
Gaudi::Property< double > m_LambdaBToMuMuProtonKaon_minProtonPt
Gaudi::Property< bool > m_BcToMuMuPion_useFastFit
Gaudi::Property< size_t > m_fitAttemptsBreakThreshold
Gaudi::Property< std::pair< double, double > > m_BcToDsMuMu_dimuonMassRange
Gaudi::Property< float > m_BcToDstarMuMu_chi2
Gaudi::Property< double > m_deltaR
Gaudi::Property< size_t > m_fitAttemptsWarningThreshold
Gaudi::Property< float > m_LambdaBToMuMuProtonKaon_chi2
bool isIdenticalTracks(const xAOD::Muon *lhs, const xAOD::Muon *rhs) const
Gaudi::Property< std::pair< double, double > > m_BcToMuMuPion_dimuonMassRange
Gaudi::Property< double > m_fastFit_2trk_chi2
StatusCode mergeTracksFromViews(TrigBmumuxState &) const
Go through state.previousDecisions() and fetch xAOD::TrackParticle objects associated with the neares...
virtual StatusCode execute(const EventContext &context) const override
TrigBmumuxComboHypo(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< bool > m_BsToMuMuPhi1020_rejectSameChargeTracks
StatusCode createDecisionObjects(TrigBmumuxState &) const
Create a decision for each xAOD::TrigBphys object from state.trigBphysCollection() and save it to sta...
Gaudi::Property< float > m_BcToDplusMuMu_chi2
StatusCode findDimuonCandidates(TrigBmumuxState &) const
Make all possible dimuon combinations from state.muons(), fit muon InDet tracks to the common vertex,...
bool isInMassRange(double mass, const std::pair< double, double > &range) const
Checks that the given mass value falls into the specified range.
bool isIdenticalTracks(const xAOD::TrackParticle *lhs, const xAOD::TrackParticle *rhs) const
Attempts to identify identical tracks by selection on DeltaR.
Gaudi::Property< double > m_trkZ0
Gaudi::Property< double > m_BcToDplusMuMu_minKaonPt
Gaudi::Property< double > m_LambdaBToMuMuProtonKaon_minKstarMass
Gaudi::Property< std::pair< double, double > > m_BcToDstarMuMu_dimuonMassRange
Gaudi::Property< double > m_BcToDsMuMu_minKaonPt
xAOD::TrackParticle::GenVecFourMom_t momentum(const xAOD::Vertex &vertex, const std::vector< double > &trkMass) const
Calculate 4-momentum of the fitted vertex particle assuming the given masses.
State class for TrigBmumuxComboHypo algorithm.
std::vector< Muon > muons
std::map< const xAOD::TrackParticle *, double > selectedTrackZ0
void addTrackCombination(size_t i1)
void addTrackCombination(size_t i1, size_t i2, size_t i3)
bool isBadCombination(size_t i1) const
void addTrackCombination(size_t i1, size_t i2)
std::vector< ElementLink< xAOD::TrackParticleContainer > > selectedTracks
bool isBadCombination(size_t i1, size_t i2, size_t i3) const
xAOD::VertexAuxContainer dimuonsStore
TrigBmumuxState()=delete
virtual ~TrigBmumuxState()=default
std::map< size_t, size_t > trackCombinations
StatusCode addTriggerObject(xAOD::TrigBphys *triggerObject)
std::vector< size_t > badTrackCombinations
size_t getCombinationKey(size_t i1, size_t i2) const
xAOD::VertexContainer dimuons
TrigBmumuxState(const EventContext &context, const TrigCompositeUtils::DecisionContainer &previousDecisions, TrigCompositeUtils::DecisionContainer &decisions, xAOD::TrigBphysContainer *trigBphysCollection=nullptr, const InDet::BeamSpotData *beamSpotData=nullptr)
std::vector< ElementLink< xAOD::TrackParticleContainer > > tracks
std::vector< std::array< size_t, 2 > > trigBphysMuonIndices
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzM4D< double > > GenVecFourMom_t
Base 4 Momentum type for TrackParticle.
pType
enum for different particle types
Eigen::Matrix< double, 3, 1 > Vector3D
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
std::set< DecisionID > DecisionIDContainer
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
TrigBphys_v1 TrigBphys
Definition TrigBphys.h:18
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
Muon_v1 Muon
Reference the current persistent version:
TrigBphysContainer_v1 TrigBphysContainer
ElementLink< xAOD::MuonContainer > link
std::vector< ElementLink< TrigCompositeUtils::DecisionContainer > > decisionLinks
TrigCompositeUtils::DecisionIDContainer decisionIDs