Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TrigMultiTrkComboHypo.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /**************************************************************************
6  **
7  ** File: Trigger/TrigHypothesis/TrigBPhysHypo/TrigMultiTrkComboHypo.cxx
8  **
9  ** Description: multi-track hypothesis algorithm
10  **
11  ** Author: Heather Russell
12  **
13  **************************************************************************/
14 
15 #include <algorithm>
16 #include <numeric>
17 
18 #include "Constants.h"
19 #include "TrigMultiTrkComboHypo.h"
20 
21 #include "xAODMuon/Muon.h"
22 #include "xAODEgamma/Electron.h"
30 
33 
34 #include "AthViews/View.h"
35 #include "AthViews/ViewHelper.h"
36 #include "CxxUtils/inline_hints.h"
37 
38 #include "Math/GenVector/VectorUtil.h"
39 #include "Math/Vector2D.h"
40 
41 
46 using ROOT::Math::XYVector;
47 
48 typedef struct PDG20 PDG;
49 
50 
51 namespace {
52 
53 
54 // Break this out into a separate function to avoid some bogus
55 // warnings from gcc15.
57 bool prev_perm (std::vector<char>& v)
58 {
59  return std::ranges::prev_permutation(v).found;;
60 }
61 
62 
63 } // anonymous namespace
64 
65 
66 TrigMultiTrkComboHypo::TrigMultiTrkComboHypo(const std::string& name, ISvcLocator* pSvcLocator)
67  : ::ComboHypo(name, pSvcLocator) {}
68 
69 
71  ATH_MSG_DEBUG( "TrigMultiTrkHypo::initialize()" );
72 
74 
75  // check consistency of the properties
76  ATH_CHECK( !m_nTrk.empty() );
77 
78  if (m_nTrkCharge.empty()) {
79  ATH_MSG_INFO( "totalCharge value is not specified, no charge selection for track combinations will be used" );
80  m_nTrkCharge = std::vector<int>(m_nTrk.size(), -1);
81  }
82 
83  if (m_trkMass.empty()) {
84  ATH_MSG_INFO( "trackMasses value is not specified, muon/electron mass will be used" );
85  for (const auto& n : m_nTrk) {
86  m_trkMass.value().emplace_back(std::vector<double>(n, (m_doElectrons ? PDG::mElectron : PDG::mMuon)));
87  }
88  }
89  if (m_trkPt.empty()) {
90  ATH_MSG_INFO( "trackPtThresholds value is not specified" );
91  for (const auto& n : m_nTrk) {
92  m_trkPt.value().emplace_back(std::vector<double>(n, -100.));
93  }
94  }
95  m_trkPtMin = m_trkPt[0].back();
96  for (size_t i = 0; i < m_trkPt.size(); ++i) {
98  }
99 
100  ATH_CHECK( m_trkMass.size() == m_nTrk.size() );
101  ATH_CHECK( m_trkPt.size() == m_nTrk.size() );
102 
103  for (size_t i = 0; i < m_nTrk.size(); ++i) {
104  ATH_CHECK( m_trkMass[i].size() == m_nTrk[i] );
105  ATH_CHECK( m_trkPt[i].size() == m_nTrk[i] );
106  ATH_CHECK( std::is_sorted(m_trkPt[i].begin(), m_trkPt[i].end(), std::greater<>()) );
107  }
108 
109  for (const auto& range : m_massRange.value()) {
110  ATH_CHECK( range.first < range.second );
111  }
112 
113  // dump numerical values
114  if (msgLvl(MSG::DEBUG)) {
115  for (size_t i = 0; i < m_nTrk.size(); ++i) {
116  ATH_MSG_DEBUG( "vertex topology: nTrk = " << m_nTrk[i] );
117  for (size_t j = 0; j < m_nTrk[i]; ++j) {
118  ATH_MSG_DEBUG( " " << j + 1 << " trk: mass = " << m_trkMass[i][j] << ", Pt > " << m_trkPt[i][j] );
119  }
120  }
121  msg() << MSG::DEBUG << " mass range: {";
122  for (const auto& range : m_massRange.value()) {
123  msg() << MSG::DEBUG << " { " << range.first << ", " << range.second << " }";
124  }
125  msg() << MSG::DEBUG << " }" << std::endl;
126  }
127 
128  if (m_isStreamer) {
129  ATH_MSG_DEBUG( "Configured to run in a streamer mode: no trigger objects will be created" );
130  }
131  if (!m_isStreamer && m_trigLevel != "EF") {
132  ATH_MSG_ERROR( "Could not create trigger objects from tracks or L2 CB muons, use the streamer mode for L2 step" );
133  return StatusCode::FAILURE;
134  }
135 
136  ATH_CHECK( !((m_trigLevel == "L2IO" || m_trigLevel == "L2MT") && m_doElectrons) );
137 
138  if (m_trigLevel == "L2" || (m_trigLevel == "EF" && m_isMuTrkMode)) {
141  }
142  else if (m_trigLevel == "L2IO" || m_trigLevel == "L2MT" || m_trigLevel == "EF") {
144  }
145  else {
146  ATH_MSG_ERROR( "trigLevel should be L2, L2IO, L2MT or EF, but " << m_trigLevel << " provided" );
147  return StatusCode::FAILURE;
148  }
149 
150  ATH_CHECK( m_trigBphysContainerKey.initialize(!m_isStreamer.value()) );
151  ATH_CHECK( m_beamSpotKey.initialize(!m_isStreamer.value()) ); // need beamSpot only to create xAOD::TrigBphys object
152 
153  ATH_CHECK( m_vertexFitter.retrieve() );
154  ATH_CHECK( m_vertexPointEstimator.retrieve() );
155  ATH_CHECK( m_v0Tools.retrieve() );
156 
157  // allowed IDs to filter out incoming decisions at L2 level
158  for (const auto& item : triggerMultiplicityMap()) {
159  const HLT::Identifier id = HLT::Identifier(item.first);
160  m_allowedIDs.insert(id.numeric());
161  if (item.second.size() > 1) {
162  for (size_t i = 0; i < item.second.size(); i++) {
163  m_allowedIDs.insert(TrigCompositeUtils::createLegName(id, i).numeric());
164  }
165  }
166  }
167  if (msgLvl(MSG::DEBUG)) {
168  ATH_MSG_DEBUG( "Allowed decisions:" );
169  for (const DecisionID& id : m_allowedIDs) {
170  ATH_MSG_DEBUG( " +++ " << HLT::Identifier(id) );
171  }
172  }
173  if (m_doElectrons) {
174  for (const DecisionID& id : m_allowedIDs) {
175  std::string name = HLT::Identifier(id).name();
176  bool isMergedElectronChain = false;
177  for (size_t i = 0; i < m_mergedElectronChains.size(); ++i) {
178  if (name.find(m_mergedElectronChains.value().at(i)) != std::string::npos) {
179  isMergedElectronChain = true;
180  break;
181  }
182  }
183  (isMergedElectronChain ? m_mergedElectronIDs.insert(id) : m_resolvedElectronIDs.insert(id));
184  }
185  if (msgLvl(MSG::DEBUG)) {
186  ATH_MSG_DEBUG( "Well-separated electron decisions:" );
187  for (const DecisionID& id : m_resolvedElectronIDs) {
188  ATH_MSG_DEBUG( " +++ " << HLT::Identifier(id) );
189  }
190  ATH_MSG_DEBUG( "Overlapping electron decisions:" );
191  for (const DecisionID& id : m_mergedElectronIDs) {
192  ATH_MSG_DEBUG( " +++ " << HLT::Identifier(id) );
193  }
194  }
195  }
196 
197  if (!m_monTool.empty()) {
198  ATH_CHECK( m_monTool.retrieve() );
199  ATH_MSG_DEBUG( "GenericMonitoringTool name:" << m_monTool );
200  }
201  else {
202  ATH_MSG_DEBUG( "No GenericMonitoringTool configured: no monitoring histograms will be available" );
203  }
204 
205  return StatusCode::SUCCESS;
206 }
207 
208 
209 StatusCode TrigMultiTrkComboHypo::execute(const EventContext& context) const {
210 
211  ATH_MSG_DEBUG( "TrigMultiTrkHypo::execute() starts" );
212 
213  ATH_MSG_DEBUG( "decision input key: " << decisionsInput().at(0).key() );
214  auto previousDecisionsHandle = SG::makeHandle(decisionsInput().at(0), context);
215  CHECK( previousDecisionsHandle.isValid() );
216  ATH_MSG_DEBUG( "Running with "<< previousDecisionsHandle->size() << " previous decisions" );
217 
219 
220  const InDet::BeamSpotData* beamSpotData = nullptr;
221  if (!m_isStreamer) {
222  SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle {m_beamSpotKey, context};
223  ATH_CHECK( beamSpotHandle.isValid() );
224  beamSpotData = *beamSpotHandle;
225  }
226 
227  std::unique_ptr<TrigMultiTrkState<xAOD::MuonContainer>> muonState;
228  std::unique_ptr<TrigMultiTrkState<xAOD::ElectronContainer>> electronState;
229  TrigMultiTrkStateBase* commonState = nullptr;
230  if (m_doElectrons) {
231  electronState = std::make_unique<TrigMultiTrkState<xAOD::ElectronContainer>>(context, *previousDecisionsHandle, *outputDecisionsHandle, nullptr, beamSpotData);
232  commonState = electronState.get();
233  }
234  else {
235  muonState = std::make_unique<TrigMultiTrkState<xAOD::MuonContainer>>(context, *previousDecisionsHandle, *outputDecisionsHandle, nullptr, beamSpotData);
236  commonState = muonState.get();
237  }
238 
239  if (m_isStreamer) {
240  if (m_trigLevel == "L2") {
241  ATH_CHECK( mergeTracksFromViews(*commonState) );
242  }
243  else if (m_trigLevel == "L2IO" || m_trigLevel == "L2MT") {
244  ATH_CHECK( mergeTracksFromDecisions<xAOD::L2CombinedMuonContainer>(*commonState) );
245  }
246  else if (m_trigLevel == "EF") {
247  ATH_CHECK( (m_doElectrons ? mergeTracksFromDecisions<xAOD::ElectronContainer>(*commonState) : mergeTracksFromDecisions<xAOD::MuonContainer>(*commonState)) );
248  }
249  ATH_CHECK( filterTrackCombinations(*commonState) );
250  ATH_CHECK( copyDecisionObjects(*commonState) );
251  }
252  else {
253  auto trigBphysHandle = SG::makeHandle(m_trigBphysContainerKey, context);
254  ATH_CHECK( trigBphysHandle.record(std::make_unique<xAOD::TrigBphysContainer>(),
255  std::make_unique<xAOD::TrigBphysAuxContainer>()) );
256  commonState->setTrigBphysCollection(trigBphysHandle.ptr());
257 
258  if (m_doElectrons) {
259  ATH_CHECK( mergeLeptonsFromDecisions(*electronState) );
260  ATH_CHECK( findMultiLeptonCandidates(*electronState) );
261  ATH_CHECK( processMergedElectrons(*electronState) );
262  }
263  else if (m_isMuTrkMode) {
264  ATH_CHECK( findMuTrkCandidates(*muonState) );
265  }
266  else {
267  ATH_CHECK( mergeLeptonsFromDecisions(*muonState) );
268  ATH_CHECK( findMultiLeptonCandidates(*muonState) );
269  }
270  ATH_CHECK( createDecisionObjects(*commonState) );
271  }
272 
273  ATH_MSG_DEBUG( "TrigMultiTrkHypo::execute() terminates with StatusCode::SUCCESS" );
274  return StatusCode::SUCCESS;
275 }
276 
277 
278 template<typename T>
280 
281  auto& leptons = state.leptons();
282  leptons.clear();
283 
284  std::vector<const Decision*> previousDecisions(state.previousDecisions().begin(), state.previousDecisions().end());
285  std::map<const Decision*, int> decisionToInputCollectionIndexMap;
286  for (const auto& decision : previousDecisions) decisionToInputCollectionIndexMap.emplace(decision, 0);
288  for (size_t k = 1; k < decisionsInput().size(); ++k) {
289  auto previousDecisionsHandle = SG::makeHandle(decisionsInput().at(k), state.context());
290  CHECK( previousDecisionsHandle.isValid() );
291  ATH_MSG_DEBUG( "Adding " << previousDecisionsHandle->size() << " decisions from " << decisionsInput().at(k).key() );
292  for (const Decision* decision : *previousDecisionsHandle) {
293  previousDecisions.push_back(decision);
294  decisionToInputCollectionIndexMap.emplace(decision, static_cast<int>(k));
295  }
296  }
297  }
298 
299  // all muons/electrons from views are already connected with previous decisions by TrigMuonEFHypoAlg
300  for (const Decision* decision : previousDecisions) {
302 
303  ElementLink<T> leptonEL;
304  if (decision->hasObjectLink(TrigCompositeUtils::featureString(), ClassID_traits<T>::ID())) {
305  leptonEL = decision->objectLink<T>(TrigCompositeUtils::featureString());
306  }
307  else {
308  auto leptonLinkInfo = TrigCompositeUtils::findLink<T>(decision, TrigCompositeUtils::featureString(), true);
309  ATH_CHECK( leptonLinkInfo.isValid() );
310  leptonEL = leptonLinkInfo.link;
311  }
312 
313  const auto lepton = *leptonEL;
315  if (!lepton->trackParticle(xAOD::Muon::TrackParticleType::CombinedTrackParticle)) continue;
316  if (!lepton->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle)) continue;
317  }
319  if (!lepton->trackParticle()) continue;
320  }
321  else {
322  ATH_MSG_ERROR( "mergeLeptonsFromDecisions(): no scenario for the provided CONTAINER is specified" );
323  return StatusCode::FAILURE;
324  }
325  auto decisionEL = TrigCompositeUtils::decisionToElementLink(decision, state.context());
326 
327  auto itr = leptons.end();
328  if (m_applyOverlapRemoval) {
329  itr = std::find_if(leptons.begin(), leptons.end(),
330  [this, lepton = lepton](const auto& x){ return this->isIdenticalTracks(lepton, *x.link); });
331  }
332  if (itr == leptons.end()) {
333  leptons.push_back({leptonEL, std::vector<ElementLink<DecisionContainer>>(1, decisionEL), DecisionIDContainer()});
334  }
335  else {
336  (*itr).decisionLinks.push_back(decisionEL);
337  }
338  }
339 
340  // muon->pt() is equal to muon->trackParticle(xAOD::Muon::TrackParticleType::CombinedTrackParticle)->pt()
341  // and the later is used by TrigMuonEFHypoTool for classification of muEFCB candidates
342  std::sort(leptons.begin(), leptons.end(), [](const auto& lhs, const auto& rhs){ return ((*lhs.link)->pt() > (*rhs.link)->pt()); });
343 
344  // for each muon we extract DecisionIDs stored in the associated Decision objects and copy them at muon.decisionIDs
345  const auto& legToInputCollectionIndexMap = legToInputCollectionMap();
346  for (auto& item : leptons) {
347  for (const ElementLink<xAOD::TrigCompositeContainer>& decisionEL : item.decisionLinks) {
349  auto decisionIndex = decisionToInputCollectionIndexMap[*decisionEL];
350  for (const auto& id : TrigCompositeUtils::decisionIDs(*decisionEL)) {
352  auto legIndex = static_cast<size_t>(TrigCompositeUtils::getIndexFromLeg(id));
353  std::string chain = TrigCompositeUtils::getIDFromLeg(id).name();
354  if (legToInputCollectionIndexMap.at(chain).at(legIndex) == decisionIndex) item.decisionIDs.insert(id);
355  }
356  }
357  else {
358  TrigCompositeUtils::decisionIDs(*decisionEL, item.decisionIDs);
359  }
360  }
361  }
362 
363  if (msgLvl(MSG::DEBUG)) {
364  ATH_MSG_DEBUG( "Dump found leptons before vertex fit: " << leptons.size() << " candidates" );
365  for (const auto& item : leptons) {
366  const auto lepton = *item.link;
367  const xAOD::TrackParticle* track;
369  track = lepton->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle);
370  }
371  else {
372  track = lepton->trackParticle();
373  }
374  ATH_MSG_DEBUG( " -- lepton InDetTrackParticle pt/eta/phi/q: " << track->pt() << " / " << track->eta() << " / " << track->phi() << " / " << track->charge() );
375  ATH_MSG_DEBUG( " lepton pt (muon: CombinedTrackParticle): " << lepton->pt() << " / " << lepton->eta() << " / " << lepton->phi() << " / " << lepton->charge() );
376  ATH_MSG_DEBUG( " allowed decisions:" );
377  for (const DecisionID& id : item.decisionIDs) {
378  ATH_MSG_DEBUG( " +++ " << HLT::Identifier(id) );
379  }
380  }
381  }
382 
383  return StatusCode::SUCCESS;
384 }
385 
386 
388 
389  auto& tracks = state.tracks();
390  tracks.clear();
391 
392  std::set<const SG::View*> views;
393  for (const Decision* decision : state.previousDecisions()) {
394  if (!TrigCompositeUtils::isAnyIDPassing(decision, m_allowedIDs)) continue;
395 
396  auto viewLinkInfo = TrigCompositeUtils::findLink<ViewContainer>(decision, TrigCompositeUtils::viewString(), true);
397  ATH_CHECK( viewLinkInfo.isValid() );
398  const SG::View* view = *viewLinkInfo.link;
399  if (views.find(view) != views.end()) continue; // tracks from this view have already been fetched
400 
401  auto tracksHandle = ViewHelper::makeHandle(view, m_trackParticleContainerKey, state.context());
402  ATH_CHECK( tracksHandle.isValid() );
403  ATH_MSG_DEBUG( "tracks handle " << m_trackParticleContainerKey << " size: " << tracksHandle->size() );
404 
405  std::vector<ElementLink<xAOD::TrackParticleContainer>> tracksFromView;
406  tracksFromView.reserve(tracksHandle->size());
407  for (size_t idx = 0; idx < tracksHandle->size(); ++idx) {
408  tracksFromView.emplace_back(ViewHelper::makeLink<xAOD::TrackParticleContainer>(view, tracksHandle, idx));
409  }
410 
411  for (const auto& trackEL : tracksFromView) {
412  const xAOD::TrackParticle* track = *trackEL;
413  if (track->definingParametersCovMatrixVec().empty() || track->pt() < m_trkPtMin) continue;
414 
415  if (views.empty() || !m_applyOverlapRemoval ||
416  std::find_if(tracks.begin(), tracks.end(),
417  [this, track](const auto& x){ return isIdenticalTracks(track, *x); }) == tracks.end()) {
418  tracks.emplace_back(trackEL);
419  }
420  }
421  views.insert(view);
422  }
423  std::sort(tracks.begin(), tracks.end(), [](const auto& lhs, const auto& rhs){ return ((*lhs)->pt() > (*rhs)->pt()); });
424 
425  if (msgLvl(MSG::DEBUG)) {
426  ATH_MSG_DEBUG( "Dump found tracks before vertex fit: " << tracks.size() << " candidates" );
427  for (const auto& trackEL : tracks) {
428  const xAOD::TrackParticle* track = *trackEL;
429  ATH_MSG_DEBUG( " -- track pt/eta/phi/q: " << track->pt() << " / " << track->eta() << " / " << track->phi() << " / " << track->charge() );
430  }
431  }
432 
433  return StatusCode::SUCCESS;
434 }
435 
436 
437 template<typename CONTAINER>
439 
440  auto& tracks = state.tracks();
441  tracks.clear();
442 
443  // all muons/electrons from views are already connected with previous decisions by TrigMuonEFHypoAlg or by TrigEgammaPrecisionElectronHypoAlg
444  for (const Decision* decision : state.previousDecisions()) {
445  if (!TrigCompositeUtils::isAnyIDPassing(decision, m_allowedIDs)) continue;
446 
448  auto leptonEL = decision->objectLink<CONTAINER>(TrigCompositeUtils::featureString());
449  const auto lepton = *leptonEL;
450 
453  if (!lepton->trackParticle(xAOD::Muon::TrackParticleType::CombinedTrackParticle)) continue;
454  if (!lepton->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle)) continue;
455  trackEL = lepton->inDetTrackParticleLink();
456  }
458  if (!lepton->idTrack()) continue;
459  trackEL = lepton->idTrackLink();
460  }
462  if (!lepton->trackParticle()) continue;
463  trackEL = lepton->trackParticleLink();
464  }
465  else {
466  ATH_MSG_ERROR( "mergeTracksFromDecisions(): no scenario for the provided CONTAINER is specified" );
467  return StatusCode::FAILURE;
468  }
469 
470  if (!trackEL.isValid()) continue;
471  if (!m_applyOverlapRemoval ||
472  std::find_if(tracks.begin(), tracks.end(),
473  [this, track = *trackEL](const auto& x){ return this->isIdenticalTracks(track, *x); }) == tracks.end()) {
474  tracks.emplace_back(trackEL);
475  }
476  }
477  std::sort(tracks.begin(), tracks.end(), [](const auto& lhs, const auto& rhs){ return ((*lhs)->pt() > (*rhs)->pt()); });
478 
479  if (msgLvl(MSG::DEBUG)) {
480  ATH_MSG_DEBUG( "Dump found tracks before vertex fit: " << tracks.size() << " candidates" );
481  for (const auto& trackEL : tracks) {
482  const xAOD::TrackParticle* track = *trackEL;
483  ATH_MSG_DEBUG( " -- track pt/eta/phi/q: " << track->pt() << " / " << track->eta() << " / " << track->phi() << " / " << track->charge() );
484  }
485  }
486 
487  return StatusCode::SUCCESS;
488 }
489 
490 
492 
493  const auto& tracks = state.tracks();
494  state.setEventAccepted(false);
495 
496  // monitored variables
497  auto mon_nAcceptedTrk = Monitored::Scalar<int>("nAcceptedTrk", tracks.size());
498  auto mon_nVertexFitterCalls = Monitored::Scalar<int>("nVertexFitterCalls", 0);
499  auto mon_isEventAccepted = Monitored::Scalar<int>("acceptance", 0);
500  auto mon_timer = Monitored::Timer( "TIME_all" );
501 
503  mon_nAcceptedTrk, mon_nVertexFitterCalls, mon_isEventAccepted,
504  mon_timer);
505 
506  for (size_t iTrk = 0; iTrk < m_nTrk.size(); ++iTrk) {
507  if (state.isEventAccepted()) break;
508  size_t nTrk = m_nTrk[iTrk];
509 
510  if (tracks.size() < nTrk) {
511  ATH_MSG_DEBUG( "Could not build a subset of " << nTrk << " tracks from collection which contains only " << tracks.size() << " objects" );
512  continue;
513  }
514  ATH_MSG_DEBUG( "Consider combinations of " << nTrk << " tracks from collection which contains " << tracks.size() << " objects until find a good one" );
515 
516  std::vector<ElementLink<xAOD::TrackParticleContainer>> tracklist(nTrk);
517  std::vector<xAOD::TrackParticle::GenVecFourMom_t> p(nTrk);
518 
519  // tracks from the current combination will have non-zero value against their position in the 'idx' vector
520  // consider first nTrk tracks as an initial combination, then get the next one with std::prev_permutation()
521  std::vector<char> idx(tracks.size(), 0);
522  std::fill(idx.begin(), idx.begin() + nTrk, 1);
523  do {
524  // fill tracklist and momenta of tracks, also check that the track pT passes the threshold value
525  bool isValidCombination = true;
526  int totalCharge = 0;
527  size_t j = 0;
528  for (size_t i = 0; i < idx.size(); ++i) {
529  if (!idx[i]) continue;
530  const auto& trackEL = tracks[i];
531  tracklist[j] = trackEL;
532  const auto track = *trackEL;
533  p[j] = track->genvecP4();
534  p[j].SetM(m_trkMass[iTrk][j]);
535  totalCharge += static_cast<int>(track->charge());
536  if (p[j].Pt() < m_trkPt[iTrk][j]) {
537  isValidCombination = false;
538  break;
539  }
540  ++j;
541  }
542  if (!isValidCombination || (m_nTrkCharge[iTrk] >= 0 && totalCharge != m_nTrkCharge[iTrk]) || !passedDeltaRcut(p)) continue;
543 
544  if (msgLvl(MSG::DEBUG)) {
545  ATH_MSG_DEBUG( "Dump found tracks before vertex fit: pT / eta / phi / charge" );
546  for (size_t i = 0; i < tracklist.size(); ++i) {
547  const auto track = *tracklist[i];
548  ATH_MSG_DEBUG( "track " << i + 1 << ": " << p[i].Pt() << " / " << p[i].Eta() << " / " << p[i].Phi() << " / " << track->charge() );
549  }
550  }
551 
552  auto mass = (std::accumulate(p.begin(), p.end(), xAOD::TrackParticle::GenVecFourMom_t())).M();
553  ATH_MSG_DEBUG( "invariant mass: " << mass );
554 
555  if (!isInMassRange(mass, iTrk)) continue;
556 
557  auto fitterState = m_vertexFitter->makeState(state.context());
558  auto vertex = fit(tracklist, m_trkMass[iTrk], *fitterState);
559  ++mon_nVertexFitterCalls;
560  if (!vertex) continue;
561 
562  ATH_MSG_DEBUG( "Filter found a subset of tracks which passed the rough selection: stop looking for other combinations" );
563  state.setEventAccepted(true);
564  break;
565 
566  } while (prev_perm(idx));
567  }
568 
569  if (!state.isEventAccepted()) {
570  ATH_MSG_DEBUG( "Filter could not find a good subset of tracks" );
571  }
572 
573  mon_isEventAccepted = state.isEventAccepted();
574 
575  return StatusCode::SUCCESS;
576 }
577 
578 
579 template<typename T>
581 
582  state.trigBphysLegIndices().clear();
583  const auto& leptons = state.leptons();
584 
585  // monitored variables
586  auto mon_nAcceptedTrk = Monitored::Scalar<int>("nAcceptedTrk", leptons.size());
587  auto mon_nCombination = Monitored::Scalar<int>("nCombination", 0);
588  auto mon_nCombinationBeforeFit = Monitored::Scalar<int>("nCombinationBeforeFit", 0);
589  auto mon_nBPhysObject = Monitored::Scalar<int>("nBPhysObject", 0);
590 
591  std::vector<float> trkMassBeforeFit;
592  std::vector<float> bphysMass;
593  std::vector<float> d0track1, d0track2;
594  std::vector<float> pttrack1, pttrack2;
595  std::vector<float> etatrack1, etatrack2;
596  std::vector<int> bphysCharge;
597  auto mon_trkMassBeforeFit = Monitored::Collection("trkMassBeforeFit", trkMassBeforeFit);
598  auto mon_bphysChi2 = Monitored::Collection("bphysChi2", state.trigBphysCollection(), &xAOD::TrigBphys::fitchi2);
599  auto mon_bphysLxy = Monitored::Collection("bphysLxy", state.trigBphysCollection(), &xAOD::TrigBphys::lxy);
600  auto mon_bphysFitMass = Monitored::Collection("bphysFitMass", state.trigBphysCollection(), [](const xAOD::TrigBphys* x){ return x->fitmass()*0.001; });
601  auto mon_bphysMass = Monitored::Collection("bphysMass", bphysMass);
602  auto mon_d0track1 = Monitored::Collection("bphysd0_trk1", d0track1);
603  auto mon_d0track2 = Monitored::Collection("bphysd0_trk2", d0track2);
604  auto mon_pttrack1 = Monitored::Collection("bphysPt_trk1", pttrack1);
605  auto mon_pttrack2 = Monitored::Collection("bphysPt_trk2", pttrack2);
606  auto mon_etatrack1 = Monitored::Collection("bphysEtatrack1", etatrack1);
607  auto mon_etatrack2 = Monitored::Collection("bphysEtatrack2", etatrack2);
608  auto mon_bphysCharge = Monitored::Collection("bphysCharge", bphysCharge);
609 
610  auto mon_timer = Monitored::Timer( "TIME_all" );
611 
613  mon_nAcceptedTrk, mon_nCombination, mon_nCombinationBeforeFit, mon_nBPhysObject,
614  mon_trkMassBeforeFit, mon_bphysChi2, mon_bphysLxy, mon_bphysFitMass, mon_bphysMass, mon_bphysCharge, mon_d0track1, mon_d0track2,
615  mon_timer, mon_pttrack1, mon_pttrack2, mon_etatrack1, mon_etatrack2);
616 
617  for (size_t iTrk = 0; iTrk < m_nTrk.size(); ++iTrk) {
618  size_t nTrk = m_nTrk[iTrk];
619 
620  if (leptons.size() < nTrk) {
621  ATH_MSG_DEBUG( "Could not build a subset of " << nTrk << " legs from collection which contains only " << leptons.size() << " objects" );
622  continue;
623  }
624  ATH_MSG_DEBUG( "Consider all combinations of " << nTrk << " legs from collection which contains " << leptons.size() << " objects" );
625 
626  std::vector<size_t> leptonIndices(nTrk);
627  std::vector<ElementLink<xAOD::TrackParticleContainer>> tracklist(nTrk);
628  std::vector<xAOD::TrackParticle::GenVecFourMom_t> p(nTrk);
629 
630  std::vector<char> combination(leptons.size(), 0);
631  std::fill(combination.begin(), combination.begin() + nTrk, 1);
632  do {
633  // fill tracklist and momenta of muons in the current subset
634  bool isValidCombination = true;
635  int charge = 0;
636  size_t j = 0;
637  for (size_t i = 0; i < combination.size(); ++i) {
638  if (!combination[i]) continue;
639  leptonIndices[j] = i;
640  auto leg = *leptons[i].link;
641  charge += static_cast<int>(lround(leg->charge()));
644  trackEL = leg->inDetTrackParticleLink();
645  }
646  else {
647  trackEL = leg->trackParticleLink();
648  }
649  tracklist[j] = trackEL;
650  if (m_useLeptonMomentum) {
651  p[j] = leg->genvecP4();
652  p[j].SetM(0.); // to keep consistency with TrigComboHypoTool::compute()
653  }
654  else {
655  p[j] = (*trackEL)->genvecP4();
656  p[j].SetM(m_trkMass[iTrk][j]);
657  }
658  if (p[j].Pt() < m_trkPt[iTrk][j]) {
659  isValidCombination = false;
660  break;
661  }
662  ++j;
663  }
664  if (!isValidCombination || (m_nTrkCharge[iTrk] >= 0 && charge != m_nTrkCharge[iTrk]) || !passedDeltaRcut(p)) continue;
665 
666  if (msgLvl(MSG::DEBUG)) {
667  ATH_MSG_DEBUG( "Dump found leptons before vertex fit: pT / eta / phi / charge" );
668  for (size_t i = 0; i < tracklist.size(); ++i) {
669  const auto track = *tracklist[i];
670  ATH_MSG_DEBUG( "legs " << i + 1 << ": " << p[i].Pt() << " / " << p[i].Eta() << " / " << p[i].Phi() << " / " << track->charge() );
671  }
672  }
673 
674  auto mass = (std::accumulate(p.begin(), p.end(), xAOD::TrackParticle::GenVecFourMom_t())).M();
675  ATH_MSG_DEBUG( "invariant mass: " << mass );
676 
677  mon_nCombination++;
678  trkMassBeforeFit.push_back(mass * 0.001);
679  if (!isInMassRange(mass, iTrk)) continue;
680 
681  mon_nCombinationBeforeFit++;
682  auto fitterState = m_vertexFitter->makeState(state.context());
683  auto vertex = fit(tracklist, m_trkMass[iTrk], *fitterState);
684  if (!vertex) continue;
685  xAOD::TrigBphys* trigBphys = makeTrigBPhys(*vertex, m_trkMass[iTrk], state.beamSpot(), *fitterState);
686  if (m_useLeptonMomentum) trigBphys->setMass(mass);
687  state.addTrigBphysObject(trigBphys, leptonIndices);
688 
689  mon_nBPhysObject++;
690  bphysMass.push_back(mass * 0.001);
691  bphysCharge.push_back(charge);
692  d0track1.push_back((*tracklist[0])->d0());
693  d0track2.push_back((*tracklist[1])->d0());
694  pttrack1.push_back((*tracklist[0])->pt() * 0.001);
695  pttrack2.push_back((*tracklist[1])->pt() * 0.001);
696  etatrack1.push_back((*tracklist[0])->eta());
697  etatrack2.push_back((*tracklist[1])->eta());
698 
699  } while (prev_perm(combination));
700  }
701  return StatusCode::SUCCESS;
702 }
703 
704 
706 
707  ATH_MSG_DEBUG( "Try to find electrons originating from the same EM cluster" );
708 
709  // some electrons can be already attached to the list, add electrons from BPH-0DR3-EM7J15 clusters to the end
710  auto& leptons = state.leptons();
711 
712  if (m_mergedElectronIDs.empty()) {
713  ATH_MSG_DEBUG( "no chains similar to BPH-0DR3-EM7J15 have been requested, should not look for close-by electrons" );
714  return StatusCode::SUCCESS;
715  }
716 
717  const std::vector<double> particleMasses(2, PDG::mElectron);
718 
719  for (const Decision* decision : state.previousDecisions()) {
721 
722  auto decisionEL = TrigCompositeUtils::decisionToElementLink(decision, state.context());
724  auto electronEL = decision->objectLink<xAOD::ElectronContainer>(TrigCompositeUtils::featureString());
725  const auto electron = *electronEL;
726  if (!electron->trackParticle()) continue;
727 
728  // get all electrons from the same SG::View, i.e. from the same initialRoI
729  const auto electronContainer = electronEL.getStorableObjectPointer();
730  if (electronContainer->size() <= 1) continue;
731 
732  // add electron from decision to state.leptons
735  leptons.push_back({electronEL, std::vector<ElementLink<DecisionContainer>>(1, decisionEL), decisionIDs});
736 
737  // get initialRoI this electron originating from
738  auto roiInfo = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>(decision, TrigCompositeUtils::initialRoIString(), true);
739  ATH_CHECK( roiInfo.isValid() );
740  auto initialRoI = *roiInfo.link;
741 
742  // try to build di-electron pairs: first electron is always from decision, second from the same SG::View
743  std::vector<ElementLink<xAOD::TrackParticleContainer>> tracklist(2);
744  tracklist[0] = electron->trackParticleLink();
745  for (size_t i = 0; i < electronContainer->size(); ++i) {
746  const auto electronFromView = electronContainer->at(i);
747  if (electronFromView == electron) continue;
748  if (!electronFromView->trackParticle()) continue;
749  if (!electronFromView->caloCluster() || electronFromView->caloCluster()->et() < m_caloClusterEtThreshold) continue;
750  tracklist[1] = electronFromView->trackParticleLink();
751 
752  auto fitterState = m_vertexFitter->makeState(state.context());
753  auto vertex = fit(tracklist, particleMasses, *fitterState);
754  if (!vertex) continue;
755  xAOD::TrigBphys* trigBphys = makeTrigBPhys(*vertex, particleMasses, state.beamSpot(), *fitterState);
756  trigBphys->setRoiId(initialRoI->roiWord());
757  state.addTrigBphysObject(trigBphys, std::vector<size_t>(1, leptons.size() - 1));
758  }
759  }
760 
761  return StatusCode::SUCCESS;
762 }
763 
764 
766 
767  ATH_MSG_DEBUG( "Try to find muon + track combinations from the same SG::View" );
768 
769  auto& muons = state.leptons();
770  muons.clear();
771 
772  const std::vector<double> particleMasses(2, PDG::mMuon);
773 
774  for (const Decision* decision : state.previousDecisions()) {
775  if (!TrigCompositeUtils::isAnyIDPassing(decision, m_allowedIDs)) continue;
776 
777  auto decisionEL = TrigCompositeUtils::decisionToElementLink(decision, state.context());
779  auto muonEL = decision->objectLink<xAOD::MuonContainer>(TrigCompositeUtils::featureString());
780  const auto muon = *muonEL;
781  if (!muon->trackParticle(xAOD::Muon::TrackParticleType::CombinedTrackParticle)) continue;
782  if (!muon->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle)) continue;
783  const auto muonInDetTrack = muon->trackParticle(xAOD::Muon::TrackParticleType::InnerDetectorTrackParticle);
784  auto muonMomentum = muonInDetTrack->genvecP4();
785  muonMomentum.SetM(PDG::mMuon);
786 
787  // add muon from decision to state.leptons
790  muons.push_back({muonEL, std::vector<ElementLink<DecisionContainer>>(1, decisionEL), decisionIDs});
791 
792  ATH_MSG_DEBUG( "Found muon (CombinedTrackParticle): " << muon->pt() << " / " << muon->eta() << " / " << muon->phi() << " / " << muon->charge() );
793 
794  auto viewLinkInfo = TrigCompositeUtils::findLink<ViewContainer>(decision, TrigCompositeUtils::viewString(), true);
795  ATH_CHECK( viewLinkInfo.isValid() );
796  auto view = *viewLinkInfo.link;
797 
798  auto tracksHandle = ViewHelper::makeHandle(view, m_trackParticleContainerKey, state.context());
799  ATH_CHECK( tracksHandle.isValid() );
800  ATH_MSG_DEBUG( "Tracks container " << m_trackParticleContainerKey << " size: " << tracksHandle->size() );
801 
802  // try to fit muon and track into common vertex: first track is always muon, second tracks comes from the same SG::View
803  std::vector<ElementLink<xAOD::TrackParticleContainer>> tracklist(2);
804  tracklist[0] = muon->inDetTrackParticleLink();
805  for (size_t idx = 0; idx < tracksHandle->size(); ++idx) {
806  const xAOD::TrackParticle* track = tracksHandle->at(idx);
807 
808  if (track->pt() < m_trkPt[0][1] || isIdenticalTracks(track, muonInDetTrack)) continue;
809  auto trackMomentum = track->genvecP4();
811  if (!isInMassRange((muonMomentum + trackMomentum).M(), 0)) continue;
812  if (m_nTrkCharge[0] >= 0 && muonInDetTrack->charge() * track->charge() > 0.) continue;
813 
814  tracklist[1] = ViewHelper::makeLink<xAOD::TrackParticleContainer>(view, tracksHandle, idx);
815 
816  ATH_MSG_DEBUG( "Dump found muon+track pair before vertex fit: pT / eta / phi / charge" << endmsg <<
817  " muon: " << muonMomentum.Pt() << " / " << muonMomentum.Eta() << " / " << muonMomentum.Phi() << " / " << muon->charge() << endmsg <<
818  " track: " << trackMomentum.Pt() << " / " << trackMomentum.Eta() << " / " << trackMomentum.Phi() << " / " << track->charge() );
819 
820  auto fitterState = m_vertexFitter->makeState(state.context());
821  auto vertex = fit(tracklist, particleMasses, *fitterState);
822  if (!vertex) continue;
823  xAOD::TrigBphys* trigBphys = makeTrigBPhys(*vertex, particleMasses, state.beamSpot(), *fitterState);
824  // trigBphys->setRoiId(initialRoI->roiWord());
825  state.addTrigBphysObject(trigBphys, std::vector<size_t>(1, muons.size() - 1));
826  }
827  }
828 
829  return StatusCode::SUCCESS;
830 }
831 
832 
834 
835  if (state.isEventAccepted()) {
836  ATH_MSG_DEBUG( "Copying decisions from " << decisionsInput().at(0).key() << " to " << decisionsOutput().at(0).key() );
837  for (const Decision* previousDecision : state.previousDecisions()) {
838  if (!TrigCompositeUtils::isAnyIDPassing(previousDecision, m_allowedIDs)) continue;
839 
840  DecisionIDContainer previousDecisionIDs;
841  TrigCompositeUtils::decisionIDs(previousDecision, previousDecisionIDs);
843  std::set_intersection(previousDecisionIDs.begin(), previousDecisionIDs.end(), m_allowedIDs.begin(), m_allowedIDs.end(),
844  std::inserter(decisionIDs, decisionIDs.begin()));
845 
847  TrigCompositeUtils::linkToPrevious(decision, previousDecision, state.context());
849  }
850 
851  // copy additional decisions for combined chains, as 'HLT_e9_lhvloose_e5_lhvloose_bBeeM6000_mu4_L1BPH-0M9-EM7-EM5_MU6'
853  }
854  return StatusCode::SUCCESS;
855 }
856 
857 
859 
860  size_t idx = 0;
861  for (const xAOD::TrigBphys* triggerObject : state.trigBphysCollection()) {
862  ATH_MSG_DEBUG( "Found xAOD::TrigBphys: mass / chi2 = " << triggerObject->mass() << " / " << triggerObject->fitchi2() );
863 
864  auto triggerObjectEL = ElementLink<xAOD::TrigBphysContainer>(state.trigBphysCollection(), triggerObject->index());
865  ATH_CHECK( triggerObjectEL.isValid() );
866 
867  // create a new output Decision object, backed by the 'decisions' container.
869 
870  std::vector<const DecisionIDContainer*> previousDecisionIDs;
871  for (const size_t& i : state.getTrigBphysLegIndices(idx)) {
872 
873  // attach all previous decisions: if the same previous decision is called twice, that's fine - internally takes care of that
874  // we already have an array of links to the previous decisions, so there is no need to use TrigCompositeUtils::linkToPrevious()
875  decision->addObjectCollectionLinks(TrigCompositeUtils::seedString(), state.getDecisionLinks(i));
876  previousDecisionIDs.push_back(&state.getDecisionIDs(i));
877  }
878 
879  // set mandatory feature ElementLink to xAOD::TrigBphys object
880  decision->setObjectLink<xAOD::TrigBphysContainer>(TrigCompositeUtils::featureString(), triggerObjectEL);
881  decision->setDetail<int32_t>("noCombo", 1);
882 
883  for (const auto& tool : hypoTools()) {
884  ATH_MSG_DEBUG( "Go to " << tool );
885  if (!m_checkMultiplicity || state.checkMultiplicity(tool->legMultiplicity(), tool->legDecisionIds())) ATH_CHECK( tool->decideOnSingleObject(decision, previousDecisionIDs) );
886  }
887  ++idx;
888  }
889 
890  // copy additional decisions from Empty muon step for Combined chains, as 'HLT_e9_lhvloose_e5_lhvloose_bBeeM6000_mu4_L1BPH-0M9-EM7-EM5_MU6'
892 
893  return StatusCode::SUCCESS;
894 }
895 
896 
898 
899  if (decisionsInput().size() > 1) {
900  ATH_MSG_DEBUG( "Found more than one decision input key, decisionsInput().size = " << decisionsInput().size() );
901  for (size_t i = 1; i < decisionsInput().size(); ++i) {
902  ATH_MSG_DEBUG( "Copying decisions from " << decisionsInput().at(i).key() << " to " << decisionsOutput().at(i).key() );
903  auto previousDecisionsHandle = SG::makeHandle(decisionsInput().at(i), state.context());
904  CHECK( previousDecisionsHandle.isValid() );
905  ATH_MSG_DEBUG( "Running with "<< previousDecisionsHandle->size() << " previous decisions" );
907  for (const Decision* previousDecision : *previousDecisionsHandle) {
908  if (!TrigCompositeUtils::isAnyIDPassing(previousDecision, m_allowedIDs)) continue;
909 
910  DecisionIDContainer previousDecisionIDs;
911  TrigCompositeUtils::decisionIDs(previousDecision, previousDecisionIDs);
913  std::set_intersection(previousDecisionIDs.begin(), previousDecisionIDs.end(), m_allowedIDs.begin(), m_allowedIDs.end(),
914  std::inserter(decisionIDs, decisionIDs.begin()));
915 
917  TrigCompositeUtils::linkToPrevious(decision, previousDecision, state.context());
919  }
920  }
921  }
922  return StatusCode::SUCCESS;
923 }
924 
925 
926 std::unique_ptr<xAOD::Vertex> TrigMultiTrkComboHypo::fit(
928  const std::vector<double>& particleMasses,
929  Trk::IVKalState& fitterState) const {
930 
931  ATH_MSG_DEBUG( "Perform vertex fit" );
932  std::vector<const xAOD::TrackParticle*> tracklist(trackParticleLinks.size(), nullptr);
933  std::transform(trackParticleLinks.begin(), trackParticleLinks.end(), tracklist.begin(),
934  [](const ElementLink<xAOD::TrackParticleContainer>& link){ return *link; });
935 
936  const Trk::Perigee& perigee1 = tracklist[0]->perigeeParameters();
937  const Trk::Perigee& perigee2 = tracklist[1]->perigeeParameters();
938  int flag = 0;
939  int errorcode = 0;
940  Amg::Vector3D startingPoint = m_vertexPointEstimator->getCirclesIntersectionPoint(&perigee1, &perigee2, flag, errorcode);
941  if (errorcode != 0) startingPoint = Amg::Vector3D::Zero(3);
942  ATH_MSG_DEBUG( "Starting point: (" << startingPoint(0) << ", " << startingPoint(1) << ", " << startingPoint(2) << ")" );
943 
944  m_vertexFitter->setMassInputParticles(particleMasses, fitterState);
945  std::unique_ptr<xAOD::Vertex> vertex(m_vertexFitter->fit(tracklist, startingPoint, fitterState));
946  if (!vertex) {
947  ATH_MSG_DEBUG( "Vertex fit fails" );
948  return vertex;
949  }
950  if (vertex->chiSquared() > m_chi2) {
951  ATH_MSG_DEBUG( "Fit is successful, but vertex chi2 is too high, we are not going to save it (chi2 = " << vertex->chiSquared() << " > " << m_chi2.value() << ")" );
952  vertex.reset();
953  return vertex;
954  }
955  ATH_MSG_DEBUG( "Fit is successful" );
956  vertex->clearTracks();
957  vertex->setTrackParticleLinks(trackParticleLinks);
958  return vertex;
959 }
960 
961 
963  const xAOD::Vertex& vertex,
964  const std::vector<double>& particleMasses,
965  const xAOD::Vertex& beamSpot,
966  const Trk::IVKalState& fitterState) const {
967 
968  double invariantMass = 0.;
969  double invariantMassError = 0.;
970  if (!m_vertexFitter->VKalGetMassError(invariantMass, invariantMassError, fitterState).isSuccess()) {
971  ATH_MSG_DEBUG( "Warning from TrkVKalVrtFitter: can not calculate uncertainties" );
972  invariantMass = -9999.;
973  }
974 
976  for (size_t i = 0; i < vertex.nTrackParticles(); ++i) {
977  auto p = vertex.trackParticle(i)->genvecP4();
978  p.SetM(particleMasses[i]);
979  momentum += p;
980  }
981 
983  result->makePrivateStore();
984  result->initialise(0, momentum.Eta(), momentum.Phi(), momentum.Pt(), xAOD::TrigBphys::MULTIMU, momentum.M(), xAOD::TrigBphys::EF);
985 
986  if (m_doElectrons) result->setParticleType(xAOD::TrigBphys::JPSIEE);
987  result->setFitmass(invariantMass);
988  result->setFitchi2(vertex.chiSquared());
989  result->setFitndof(vertex.numberDoF());
990  result->setFitx(vertex.x());
991  result->setFity(vertex.y());
992  result->setFitz(vertex.z());
993  result->setTrackParticleLinks(vertex.trackParticleLinks());
994  result->setLxy(m_v0Tools->lxy(&vertex, &beamSpot));
995  result->setLxyError(m_v0Tools->lxyError(&vertex, &beamSpot));
996 
998  "TrigBphys objects:\n\t " <<
999  "roiId: " << result->roiId() << "\n\t " <<
1000  "particleType: " << result->particleType() << "\n\t " <<
1001  "level: " << result->level() << "\n\t " <<
1002  "eta: " << result->eta() << "\n\t " <<
1003  "phi: " << result->phi() << "\n\t " <<
1004  "mass: " << result->mass() << "\n\t " <<
1005  "fitmass: " << result->fitmass() << "\n\t " <<
1006  "chi2/NDF: " << result->fitchi2() << " / " << result->fitndof() << "\n\t " <<
1007  "vertex: (" << result->fitx() << ", " << result->fity() << ", " << result->fitz() << ")\n\t " <<
1008  "Lxy/LxyError: " << result->lxy() << " / " << result->lxyError() );
1009 
1010  return result;
1011 }
1012 
1013 
1015 
1016  if (lhs->charge() * rhs->charge() < 0.) return false;
1017  return (ROOT::Math::VectorUtil::DeltaR(lhs->genvecP4(), rhs->genvecP4()) < m_deltaR);
1018 }
1019 
1020 
1022 
1024 }
1025 
1027 
1028  return isIdenticalTracks(*lhs->trackParticleLink(), *rhs->trackParticleLink());
1029 }
1030 
1031 
1032 bool TrigMultiTrkComboHypo::isInMassRange(double mass, size_t idx) const {
1033 
1034  const auto& range = m_massRange[idx];
1035  return (mass > range.first && mass < range.second);
1036 }
1037 
1038 
1039 bool TrigMultiTrkComboHypo::passedDeltaRcut(const std::vector<xAOD::TrackParticle::GenVecFourMom_t>& p) const {
1040 
1041  if (m_deltaRMax == std::numeric_limits<float>::max() && m_deltaRMin == std::numeric_limits<float>::lowest()) {
1042  return true;
1043  }
1044  for (size_t i = 0; i < p.size(); ++i) {
1045  for (size_t j = i + 1; j < p.size(); ++j) {
1046  double deltaR = ROOT::Math::VectorUtil::DeltaR(p[i], p[j]);
1047  if (deltaR > m_deltaRMax || deltaR < m_deltaRMin) return false;
1048  }
1049  }
1050  return true;
1051 }
str::trackMomentum
const std::string trackMomentum
Definition: BTagTrackIpAccessor.cxx:15
xAOD::TrackParticle_v1::GenVecFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzM4D< double > > GenVecFourMom_t
Base 4 Momentum type for TrackParticle.
Definition: TrackParticle_v1.h:78
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
TrigMultiTrkComboHypo::m_mergedElectronIDs
TrigCompositeUtils::DecisionIDContainer m_mergedElectronIDs
Definition: TrigMultiTrkComboHypo.h:311
TrigMultiTrkComboHypo::createDecisionObjects
StatusCode createDecisionObjects(TrigMultiTrkStateBase &) const
Create a decision for each xAOD::TrigBphys object from state.trigBphysCollection() and save it to sta...
Definition: TrigMultiTrkComboHypo.cxx:858
electronContainer
xAOD::ElectronContainer * electronContainer
Definition: TrigGlobEffCorrValidation.cxx:187
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
inline_hints.h
get_generator_info.result
result
Definition: get_generator_info.py:21
ITrigBphysState::beamSpot
const xAOD::Vertex & beamSpot() const
Definition: ITrigBphysState.h:48
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
TrigCompositeUtils::DecisionID
unsigned int DecisionID
Definition: TrigComposite_v1.h:27
ComboHypo::decisionsOutput
const SG::WriteHandleKeyArray< TrigCompositeUtils::DecisionContainer > & decisionsOutput() const
Definition: ComboHypo.h:42
TrigCompositeUtils::DecisionContainer
xAOD::TrigCompositeContainer DecisionContainer
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigCompositeContainer.h:21
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
TrigMultiTrkComboHypo::filterTrackCombinations
StatusCode filterTrackCombinations(TrigMultiTrkStateBase &) const
Make all possible combinations from state.tracks(), fit tracks to the common vertex and set state....
Definition: TrigMultiTrkComboHypo.cxx:491
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TrigMultiTrkComboHypo::m_deltaR
Gaudi::Property< float > m_deltaR
Definition: TrigMultiTrkComboHypo.h:282
TrigMultiTrkComboHypo.h
TrigMultiTrkComboHypo::m_combineInputDecisionCollections
Gaudi::Property< bool > m_combineInputDecisionCollections
Definition: TrigMultiTrkComboHypo.h:276
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
TrigMultiTrkComboHypo::mergeLeptonsFromDecisions
StatusCode mergeLeptonsFromDecisions(TrigMultiTrkState< CONTAINER > &) const
Go through state.previousDecisions(), fetch xAOD::Muons/xAODElectron objects attached to decisions an...
Constants.h
Constants for algorithm.
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:150
Muon.h
TrigCompositeUtils::newDecisionIn
Decision * newDecisionIn(DecisionContainer *dc, const std::string &name)
Helper method to create a Decision object, place it in the container and return a pointer to it.
Definition: TrigCompositeUtilsRoot.cxx:46
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
TrigMultiTrkStateBase
Definition: TrigMultiTrkComboHypo.h:59
TrigMultiTrkComboHypo::copyDecisionObjects
StatusCode copyDecisionObjects(TrigMultiTrkStateBase &) const
All appropriate decisions from state.previousDecisions() will be copied to state.decisions() if flag ...
Definition: TrigMultiTrkComboHypo.cxx:833
TrigMultiTrkComboHypo::m_deltaRMin
Gaudi::Property< float > m_deltaRMin
Definition: TrigMultiTrkComboHypo.h:286
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
TrigMultiTrkComboHypo::m_isStreamer
Gaudi::Property< bool > m_isStreamer
Definition: TrigMultiTrkComboHypo.h:290
met::DeltaR
@ DeltaR
Definition: METRecoCommon.h:11
xAOD::TrigBphys_v1::JPSIEE
@ JPSIEE
Definition: TrigBphys_v1.h:53
L2CombinedMuonContainer.h
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
TrigMultiTrkComboHypo::m_doElectrons
Gaudi::Property< bool > m_doElectrons
Definition: TrigMultiTrkComboHypo.h:294
ViewHelper::makeHandle
SG::ReadHandle< T > makeHandle(const SG::View *view, const SG::ReadHandleKey< T > &rhKey, const EventContext &context)
navigate from the TrigComposite to nearest view and fetch object from it
Definition: ViewHelper.h:265
PDG20::mMuon
static constexpr double mMuon
Definition: Trigger/TrigHypothesis/TrigBphysHypo/src/Constants.h:12
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
TrigMultiTrkComboHypo::m_trkMass
Gaudi::Property< std::vector< std::vector< double > > > m_trkMass
Definition: TrigMultiTrkComboHypo.h:268
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
test_pyathena.pt
pt
Definition: test_pyathena.py:11
TrigCompositeUtils::insertDecisionIDs
void insertDecisionIDs(const Decision *src, Decision *dest)
Appends the decision IDs of src to the dest decision object.
Definition: TrigCompositeUtilsRoot.cxx:80
TrigMultiTrkComboHypo::m_trigLevel
Gaudi::Property< std::string > m_trigLevel
Definition: TrigMultiTrkComboHypo.h:296
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
athena.value
value
Definition: athena.py:124
TrigCompositeUtils::comboHypoAlgNodeName
const std::string & comboHypoAlgNodeName()
Definition: TrigCompositeUtilsRoot.cxx:908
TrigCompositeUtils::createAndStore
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
Definition: TrigCompositeUtilsRoot.cxx:30
TrigMultiTrkComboHypo::execute
virtual StatusCode execute(const EventContext &context) const override
Definition: TrigMultiTrkComboHypo.cxx:209
TrigMultiTrkComboHypo::fit
std::unique_ptr< xAOD::Vertex > fit(const std::vector< ElementLink< xAOD::TrackParticleContainer >> &trackParticleLinks, const std::vector< double > &particleMasses, Trk::IVKalState &fitterState) const
Perform a vertex fit on selected tracks.
Definition: TrigMultiTrkComboHypo.cxx:926
TrigMultiTrkState::leptons
std::vector< LEPTON > & leptons()
Definition: TrigMultiTrkComboHypo.h:106
TrigMultiTrkComboHypo::m_checkMultiplicity
Gaudi::Property< bool > m_checkMultiplicity
Definition: TrigMultiTrkComboHypo.h:280
Phi
@ Phi
Definition: RPCdef.h:8
ITrigBphysState::setTrigBphysCollection
void setTrigBphysCollection(xAOD::TrigBphysContainer *trigBphysCollection)
Definition: ITrigBphysState.h:46
TrigMultiTrkComboHypo::m_applyOverlapRemoval
Gaudi::Property< bool > m_applyOverlapRemoval
Definition: TrigMultiTrkComboHypo.h:274
TrigMultiTrkComboHypo::m_nTrkCharge
Gaudi::Property< std::vector< int > > m_nTrkCharge
Definition: TrigMultiTrkComboHypo.h:266
TrigMultiTrkStateBase::tracks
std::vector< ElementLink< xAOD::TrackParticleContainer > > & tracks()
Definition: TrigMultiTrkComboHypo.h:79
TrigMultiTrkComboHypo::processMergedElectrons
StatusCode processMergedElectrons(TrigMultiTrkState< xAOD::ElectronContainer > &) const
Make all possible combinations from electrons originating from the same BPH-0DR3-EM7J15 cluster,...
Definition: TrigMultiTrkComboHypo.cxx:705
TrigBphysAuxContainer.h
ViewHelper.h
x
#define x
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
ComboHypo
Definition: ComboHypo.h:31
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
TrigMultiTrkComboHypo::m_vertexPointEstimator
ToolHandle< InDet::VertexPointEstimator > m_vertexPointEstimator
Definition: TrigMultiTrkComboHypo.h:303
TrigMultiTrkComboHypo::m_mergedElectronChains
Gaudi::Property< std::vector< std::string > > m_mergedElectronChains
Definition: TrigMultiTrkComboHypo.h:298
TrigMultiTrkComboHypo::mergeTracksFromViews
StatusCode mergeTracksFromViews(TrigMultiTrkStateBase &) const
Go through state.previousDecisions() and fetch xAOD::TrackParticle objects associated with the neares...
Definition: TrigMultiTrkComboHypo.cxx:387
xAOD::Electron_v1::trackParticleLink
const ElementLink< TrackParticleContainer > & trackParticleLink(size_t index=0) const
ElementLink to the xAOD::TrackParticle/s that match the electron candidate.
Definition: Electron_v1.cxx:68
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:274
PDG20
Definition: Trigger/TrigHypothesis/TrigBphysHypo/src/Constants.h:9
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
TrigCompositeUtils.h
TrigMultiTrkComboHypo::m_trackParticleContainerKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackParticleContainerKey
Definition: TrigMultiTrkComboHypo.h:256
xAOD::TrigBphys_v1::setRoiId
void setRoiId(uint32_t id)
set method: roiId
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
TrigMultiTrkComboHypo::m_caloClusterEtThreshold
Gaudi::Property< double > m_caloClusterEtThreshold
Definition: TrigMultiTrkComboHypo.h:300
lumiFormat.i
int i
Definition: lumiFormat.py:85
ComboHypo::hypoTools
ToolHandleArray< ComboHypoToolBase > & hypoTools()
Definition: ComboHypo.h:45
TrigCompositeUtils::initialRoIString
const std::string & initialRoIString()
Definition: TrigCompositeUtilsRoot.cxx:868
TrigMultiTrkComboHypo::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: TrigMultiTrkComboHypo.h:307
ITrigBphysState::context
const EventContext & context() const
Definition: ITrigBphysState.h:42
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::WriteHandle::ptr
pointer_type ptr()
Dereference the pointer.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TrigBphys.h
TrigMultiTrkComboHypo::initialize
virtual StatusCode initialize() override
Definition: TrigMultiTrkComboHypo.cxx:70
master.flag
bool flag
Definition: master.py:29
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:37
TrigMultiTrkComboHypo::m_useLeptonMomentum
Gaudi::Property< bool > m_useLeptonMomentum
Definition: TrigMultiTrkComboHypo.h:278
xAOD::TrigBphys_v1::setMass
void setMass(float)
Set the mass of the object.
TrigMultiTrkComboHypo::m_isMuTrkMode
Gaudi::Property< bool > m_isMuTrkMode
Definition: TrigMultiTrkComboHypo.h:292
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
TRT::Track::d0
@ d0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:62
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
TrigCompositeUtils::decisionToElementLink
ElementLink< DecisionContainer > decisionToElementLink(const Decision *d, const EventContext &ctx)
Takes a raw pointer to a Decision and returns an ElementLink to the Decision.
Definition: TrigCompositeUtilsRoot.cxx:122
xAOD::TauHelpers::trackParticleLinks
std::vector< ElementLink< xAOD::TrackParticleContainer > > trackParticleLinks(const xAOD::TauJet *tau, xAOD::TauJetParameters::TauTrackFlag flag=xAOD::TauJetParameters::TauTrackFlag::classifiedCharged)
Definition: TauxAODHelpers.cxx:22
TrigMultiTrkStateBase::trigBphysLegIndices
std::vector< std::vector< size_t > > & trigBphysLegIndices()
Definition: TrigMultiTrkComboHypo.h:77
compute_lumi.leg
leg
Definition: compute_lumi.py:95
TrigMultiTrkComboHypo::isInMassRange
bool isInMassRange(double mass, size_t idx) const
Definition: TrigMultiTrkComboHypo.cxx:1032
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
xAOD::TrigBphys_v1::fitchi2
float fitchi2() const
accessor method: chi2 from vertex fit
TrigMultiTrkComboHypo::m_allowedIDs
TrigCompositeUtils::DecisionIDContainer m_allowedIDs
Definition: TrigMultiTrkComboHypo.h:309
ComboHypo::triggerMultiplicityMap
const Combo::MultiplicityReqMap & triggerMultiplicityMap() const
Definition: ComboHypo.h:43
xAOD::TrackParticle_v1::genvecP4
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector form.
Definition: TrackParticle_v1.cxx:116
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
TrigMultiTrkComboHypo::makeTrigBPhys
xAOD::TrigBphys * makeTrigBPhys(const xAOD::Vertex &vertex, const std::vector< double > &particleMasses, const xAOD::Vertex &beamSpot, const Trk::IVKalState &fitterState) const
Construct the trigger object that may be stored for debugging or matching.
Definition: TrigMultiTrkComboHypo.cxx:962
TrigMultiTrkStateBase::getDecisionIDs
virtual TrigCompositeUtils::DecisionIDContainer & getDecisionIDs(size_t)=0
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
TrigMultiTrkComboHypo::copyAdditionalDecisionObjects
StatusCode copyAdditionalDecisionObjects(TrigMultiTrkStateBase &) const
For chains from CombinedSlice (similar to 'HLT_e9_lhvloose_e5_lhvloose_bBeeM6000_mu4_L1BPH-0M9-EM7-EM...
Definition: TrigMultiTrkComboHypo.cxx:897
PDG20::mElectron
static constexpr double mElectron
Definition: Trigger/TrigHypothesis/TrigBphysHypo/src/Constants.h:11
fill
void fill(H5::Group &out_file, size_t iterations)
Definition: test-hdf5-writer.cxx:95
TrigCompositeUtils::featureString
const std::string & featureString()
Definition: TrigCompositeUtilsRoot.cxx:884
ComboHypo::initialize
virtual StatusCode initialize() override
Definition: ComboHypo.cxx:22
TrigMultiTrkState::addTrigBphysObject
virtual void addTrigBphysObject(xAOD::TrigBphys *trigBphysObject, const std::vector< size_t > &legIndices) override final
Definition: TrigMultiTrkComboHypo.h:113
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
xAOD::TrigBphys_v1::EF
@ EF
Definition: TrigBphys_v1.h:85
TrigCompositeUtils::Decision
xAOD::TrigComposite Decision
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:20
TrigMultiTrkComboHypo::m_massRange
Gaudi::Property< std::vector< std::pair< double, double > > > m_massRange
Definition: TrigMultiTrkComboHypo.h:272
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
TrigMultiTrkComboHypo::findMuTrkCandidates
StatusCode findMuTrkCandidates(TrigMultiTrkState< xAOD::MuonContainer > &) const
Build J/psi candidates from muon from SG::View and tracks from the same SG::View, to be used for Tag-...
Definition: TrigMultiTrkComboHypo.cxx:765
charge
double charge(const T &p)
Definition: AtlasPID.h:931
TrigMultiTrkComboHypo::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: TrigMultiTrkComboHypo.h:262
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
TrigMultiTrkComboHypo::mergeTracksFromDecisions
StatusCode mergeTracksFromDecisions(TrigMultiTrkStateBase &) const
Go through state.previousDecisions(), fetch xAOD::Muons/xAODElectron objects attached to decisions an...
Definition: TrigMultiTrkComboHypo.cxx:438
item
Definition: ItemListSvc.h:43
TrigMultiTrkState
State class for TrigMultiTrkComboHypo algorithm.
Definition: TrigMultiTrkComboHypo.h:89
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
xAOD::Electron_v1
Definition: Electron_v1.h:34
TrigMultiTrkComboHypo::isIdenticalTracks
bool isIdenticalTracks(const xAOD::TrackParticle *lhs, const xAOD::TrackParticle *rhs) const
Attempts to identify identical tracks by selection on DeltaR.
Definition: TrigMultiTrkComboHypo.cxx:1014
TrigMultiTrkComboHypo::findMultiLeptonCandidates
StatusCode findMultiLeptonCandidates(TrigMultiTrkState< CONTAINER > &) const
Make all possible combinations from state.leptons(), fit tracks to the common vertex,...
TrigMultiTrkComboHypo::m_trkPt
Gaudi::Property< std::vector< std::vector< double > > > m_trkPt
Definition: TrigMultiTrkComboHypo.h:270
ITrigBphysState::previousDecisions
const TrigCompositeUtils::DecisionContainer & previousDecisions() const
Definition: ITrigBphysState.h:43
TrigCompositeUtils::createLegName
HLT::Identifier createLegName(const HLT::Identifier &chainIdentifier, size_t counter)
Generate the HLT::Identifier which corresponds to a specific leg of a given chain.
Definition: TrigCompositeUtilsRoot.cxx:166
TrigMultiTrkComboHypo::m_deltaRMax
Gaudi::Property< float > m_deltaRMax
Definition: TrigMultiTrkComboHypo.h:284
TrigMultiTrkComboHypo::m_v0Tools
ToolHandle< Trk::V0Tools > m_v0Tools
Definition: TrigMultiTrkComboHypo.h:305
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
TrackParticle.h
python.PyAthena.v
v
Definition: PyAthena.py:154
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
TrigCompositeUtils::linkToPrevious
void linkToPrevious(Decision *d, const std::string &previousCollectionKey, size_t previousIndex)
Links to the previous object, location of previous 'seed' decision supplied by hand.
Definition: TrigCompositeUtilsRoot.cxx:139
xAOD::Muon_v1::inDetTrackParticleLink
const ElementLink< TrackParticleContainer > & inDetTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
TrigCompositeUtils::seedString
const std::string & seedString()
Definition: TrigCompositeUtilsRoot.cxx:888
TrigCompositeUtils::isLegId
bool isLegId(const HLT::Identifier &legIdentifier)
Recognise whether the chain ID is a leg ID.
Definition: TrigCompositeUtilsRoot.cxx:204
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
InDet::BeamSpotData
Definition: BeamSpotData.h:21
ATH_NOINLINE
#define ATH_NOINLINE
Definition: inline_hints.h:54
Prompt::Def::Pt
@ Pt
Definition: VarHolder.h:76
TrigCompositeUtils::getIndexFromLeg
int32_t getIndexFromLeg(const HLT::Identifier &legIdentifier)
Extract the numeric index of a leg identifier.
Definition: TrigCompositeUtilsRoot.cxx:191
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition: TrigComposite_v1.h:28
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
ComboHypo::legToInputCollectionMap
const Combo::LegMap & legToInputCollectionMap() const
Definition: ComboHypo.h:44
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
TrigMultiTrkComboHypo::m_nTrk
Gaudi::Property< std::vector< unsigned int > > m_nTrk
Definition: TrigMultiTrkComboHypo.h:264
Trk::IVKalState
Definition: IVKalState.h:21
TrigMultiTrkComboHypo::m_trkPtMin
double m_trkPtMin
Definition: TrigMultiTrkComboHypo.h:313
TrigMultiTrkStateBase::setEventAccepted
void setEventAccepted(bool flag=true)
Definition: TrigMultiTrkComboHypo.h:75
DEBUG
#define DEBUG
Definition: page_access.h:11
ITrigBphysState::decisions
TrigCompositeUtils::DecisionContainer & decisions()
Definition: ITrigBphysState.h:44
HLTIdentifier.h
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
TrigCompositeUtils::decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Definition: TrigCompositeUtilsRoot.cxx:67
TrigMultiTrkComboHypo::m_resolvedElectronIDs
TrigCompositeUtils::DecisionIDContainer m_resolvedElectronIDs
Definition: TrigMultiTrkComboHypo.h:310
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
HLT::Identifier::name
std::string name() const
reports human redable name if it is enabled or, empty string
Definition: HLTIdentifier.cxx:14
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
ComboHypo::decisionsInput
const SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > & decisionsInput() const
Definition: ComboHypo.h:41
TrigMultiTrkStateBase::checkMultiplicity
virtual bool checkMultiplicity(const std::vector< int > &legMultiplicity, const std::vector< HLT::Identifier > &legDecisionIDs) const =0
python.BuildSignatureFlags.beamSpot
AthConfigFlags beamSpot(AthConfigFlags flags, str instanceName, str recoMode)
Definition: BuildSignatureFlags.py:455
TrigMultiTrkStateBase::getDecisionLinks
virtual std::vector< ElementLink< TrigCompositeUtils::DecisionContainer > > & getDecisionLinks(size_t)=0
TrigMultiTrkComboHypo::passedDeltaRcut
bool passedDeltaRcut(const std::vector< xAOD::TrackParticle::GenVecFourMom_t > &momenta) const
Definition: TrigMultiTrkComboHypo.cxx:1039
Electron.h
TrigMultiTrkComboHypo::TrigMultiTrkComboHypo
TrigMultiTrkComboHypo()=delete
xAOD::TrigBphys
TrigBphys_v1 TrigBphys
Definition: TrigBphys.h:18
TrigCompositeUtils::getIDFromLeg
HLT::Identifier getIDFromLeg(const HLT::Identifier &legIdentifier)
Generate the HLT::Identifier which corresponds to the chain name from the leg name.
Definition: TrigCompositeUtilsRoot.cxx:180
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
View.h
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
xAOD::TrigBphys_v1::lxy
float lxy() const
accessor method: lxy
Definition: TrigBphys_v1.cxx:387
TrigBphysContainer.h
xAOD::TrigBphys_v1::MULTIMU
@ MULTIMU
Definition: TrigBphys_v1.h:55
set_intersection
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
SG::View
Definition: View.h:25
TrigMultiTrkStateBase::isEventAccepted
int isEventAccepted() const
Definition: TrigMultiTrkComboHypo.h:76
TrigMultiTrkStateBase::getTrigBphysLegIndices
std::vector< size_t > & getTrigBphysLegIndices(size_t idx)
Definition: TrigMultiTrkComboHypo.h:78
TrigCompositeUtils::isAnyIDPassing
bool isAnyIDPassing(const Decision *d, const DecisionIDContainer &required)
Checks if any of the DecisionIDs passed in arg required is availble in Decision object.
Definition: TrigCompositeUtilsRoot.cxx:108
TrigComposite.h
makeComparison.deltaR
float deltaR
Definition: makeComparison.py:36
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
TrigCompositeUtils::viewString
const std::string & viewString()
Definition: TrigCompositeUtilsRoot.cxx:880
Monitored::Timer
A monitored timer.
Definition: MonitoredTimer.h:32
xAOD::TrigBphys_v1
Class describing a Bphysics online composite object.
Definition: TrigBphys_v1.h:44
TrackParticleContainer.h
Eta
@ Eta
Definition: RPCdef.h:8
TrigMultiTrkComboHypo::m_trigBphysContainerKey
SG::WriteHandleKey< xAOD::TrigBphysContainer > m_trigBphysContainerKey
Definition: TrigMultiTrkComboHypo.h:259
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
ITrigBphysState::trigBphysCollection
xAOD::TrigBphysContainer & trigBphysCollection()
Definition: ITrigBphysState.h:45
TrigMultiTrkComboHypo::m_vertexFitter
ToolHandle< Trk::TrkVKalVrtFitter > m_vertexFitter
Definition: TrigMultiTrkComboHypo.h:304
drawFromPickle.view
view
Definition: drawFromPickle.py:294
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
TrigMultiTrkComboHypo::m_chi2
Gaudi::Property< float > m_chi2
Definition: TrigMultiTrkComboHypo.h:288