ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
MuonCombined::MuonSegmentTagTool Class Reference

#include <MuonSegmentTagTool.h>

Inheritance diagram for MuonCombined::MuonSegmentTagTool:
Collaboration diagram for MuonCombined::MuonSegmentTagTool:

Public Member Functions

 MuonSegmentTagTool (const std::string &type, const std::string &name, const IInterface *parent)
 
 ~MuonSegmentTagTool ()=default
 
StatusCode initialize () override
 
StatusCode finalize () override
 
void tag (const EventContext &ctx, const InDetCandidateCollection &inDetCandidates, const std::vector< const Muon::MuonSegment * > &segments, InDetCandidateToTagMap *tagMap) const override
 IMuonSegmentTagTool interface: build muons from ID and MuonSegments. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

using SegmentMap = std::map< const Muon::MuonSegment *, ElementLink< xAOD::MuonSegmentContainer > >
 
using SurfDef = MuonCombined::MuonSegmentTagSurfaces::SurfDef
 
using SortedSegmentMap = std::map< int, std::vector< const Muon::MuonSegment * > >
 The segment vector is sorted into a map where the key is the associated surface definition of each segment. More...
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void printTable (const std::vector< std::string > &didEx, const std::vector< std::string > &segStation, const std::vector< std::vector< std::string >> &segToSurf) const
 method for extra DEBUG More...
 
std::vector< const Muon::MuonSegment * > getCandidateSegments (const std::vector< const Muon::MuonSegment * > &segments) const
 Filters the input segments based on the number of hits fit quality etc. More...
 
SortedSegmentMap findPopulatedStations (const std::vector< const Muon::MuonSegment * > &filteredSegments) const
 Creates the sorted segment map. More...
 
SortedSegmentMap findCandidateStations (const MuonCombined::InDetCandidate &Id_trk, const SortedSegmentMap &filteredSegments) const
 Returns an array encoding which muon segments are compatible with the IdCandidate. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Static Private Member Functions

static double getPropDistance (const Trk::TrackParameters &start_pars, const Trk::Surface &target_surf)
 Returns the straight line distance estimation of the parameters to the surface. More...
 

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
ServiceHandle< Muon::IMuonEDMHelperSvcm_edmHelperSvc
 
ToolHandle< Muon::MuonEDMPrinterToolm_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
 
ToolHandle< IMuTagMatchingToolm_MuTagMatchingTool {this, "MuTagMatchingTool", "MuTagMatchingTool/MuTagMatchingTool"}
 
ToolHandle< IMuTagAmbiguitySolverToolm_MuTagAmbiguitySolverTool
 
ToolHandle< Muon::IMuonSegmentSelectionToolm_segmentSelector
 
ToolHandle< Muon::IMuonSegmentHitSummaryToolm_hitSummaryTool
 
Gaudi::Property< bool > m_doSegmentsFilter {this, "DoSegmentsFilter", true, "flag to switch segment filtering on/off (for trigger)"}
 
Gaudi::Property< bool > m_doTable {this, "DoOverviewTable", false}
 
Gaudi::Property< bool > m_doBidirectional
 
Gaudi::Property< bool > m_doPtDependentPullCut {this, "DoPtDependentPullCut", false, "flag to enable the pT-dependent pull cut"}
 
Gaudi::Property< bool > m_removeLowPLowFieldRegion
 
Gaudi::Property< int > m_segmentQualityCut {this, "SegmentQualityCut", 1, "minimum segment quality"}
 
Gaudi::Property< unsigned int > m_nmdtHits {this, "nmdtHits", 4}
 
Gaudi::Property< unsigned int > m_nmdtHoles {this, "nmdtHoles", 3}
 
Gaudi::Property< unsigned int > m_nmdtHitsML {this, "nmdtHitsML", 2}
 
Gaudi::Property< bool > m_triggerHitCut {this, "TriggerHitCut", true, "apply Trigger hit cut if trigger hits are expected"}
 
Gaudi::Property< bool > m_ignoreSiAssocated
 
const MuonCombined::MuonSegmentTagSurfaces m_surfaces {}
 
const Muon::MuonSectorMapping m_sectorMapping {}
 sector mapping helper More...
 
std::atomic_uint m_ntotTracks {0}
 
std::atomic_uint m_nangleMatch {0}
 
std::atomic_uint m_npmatch {0}
 
std::atomic_uint m_natMSEntrance {0}
 
std::atomic_uint m_naccepted {0}
 
std::array< std::atomic_uint, SurfDef::NumSurf > m_extrapolated ATLAS_THREAD_SAFE {0}
 
std::array< std::atomic_uint, SurfDef::NumSurf > m_goodExtrapolated ATLAS_THREAD_SAFE {0}
 
std::array< std::atomic_uint, SurfDef::NumSurf > m_recycledIntersect ATLAS_THREAD_SAFE {0}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 38 of file MuonSegmentTagTool.h.

Member Typedef Documentation

◆ SegmentMap

Definition at line 39 of file MuonSegmentTagTool.h.

◆ SortedSegmentMap

using MuonCombined::MuonSegmentTagTool::SortedSegmentMap = std::map<int, std::vector<const Muon::MuonSegment*> >
private

The segment vector is sorted into a map where the key is the associated surface definition of each segment.

Definition at line 61 of file MuonSegmentTagTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ SurfDef

Definition at line 40 of file MuonSegmentTagTool.h.

Constructor & Destructor Documentation

◆ MuonSegmentTagTool()

MuonCombined::MuonSegmentTagTool::MuonSegmentTagTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 49 of file MuonSegmentTagTool.cxx.

49  :
51  declareInterface<IMuonSegmentTagTool>(this);
52  }

◆ ~MuonSegmentTagTool()

MuonCombined::MuonSegmentTagTool::~MuonSegmentTagTool ( )
default

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode MuonCombined::MuonSegmentTagTool::finalize ( )
override

Definition at line 71 of file MuonSegmentTagTool.cxx.

71  {
72  ATH_MSG_INFO("Total number of considered ID tracks " << m_ntotTracks);
73  ATH_MSG_INFO("Total number of ID tracks with angular match " << m_nangleMatch);
74  ATH_MSG_INFO("Total number of preselected ID tracks " << m_npmatch);
75  ATH_MSG_INFO("Total number of ID tracks at MS entry " << m_natMSEntrance);
76  ATH_MSG_INFO("Total number of accepted ID tracks " << m_naccepted);
77  for (unsigned int i = 0; i < SurfDef::NumSurf; ++i) {
78  const double recyc_extr = m_recycledIntersect[i] + m_extrapolated[i];
79  auto calc_ratio = [&recyc_extr](unsigned int N) -> double { return recyc_extr > 0. ? 100. * N / recyc_extr : 0; };
80  ATH_MSG_INFO("Layer " << m_surfaces.stationType(i) << " processed " << int(recyc_extr) << " extrapolated " << m_extrapolated[i]
81  << " (" << calc_ratio(m_extrapolated[i]) << " %) "
82  << " recycled " << m_recycledIntersect[i] << " (" << calc_ratio(m_recycledIntersect[i]) << "%) "
83  << " good " << m_goodExtrapolated[i] << " (" << calc_ratio(m_goodExtrapolated[i]) << "%)");
84  }
85  return StatusCode::SUCCESS;
86  }

◆ findCandidateStations()

MuonSegmentTagTool::SortedSegmentMap MuonCombined::MuonSegmentTagTool::findCandidateStations ( const MuonCombined::InDetCandidate Id_trk,
const SortedSegmentMap filteredSegments 
) const
private

Returns an array encoding which muon segments are compatible with the IdCandidate.

Definition at line 566 of file MuonSegmentTagTool.cxx.

567  {
568  SortedSegmentMap sortedSegments;
569 
570  bool hasAngleMatch{false}, hasMatch{false};
571  const Trk::Track* track = id_cand.indetTrackParticle().track();
572  const Amg::Vector3D id_mom = track->perigeeParameters()->momentum();
573 
574  const double qID = track->perigeeParameters()->charge();
575  const double pID = id_mom.mag();
576 
577  if (pID <= 20000. * (qID * id_mom.eta() - 2)) { return sortedSegments; }
578 
579  const Trk::CaloExtension* extension = id_cand.getCaloExtension();
580  const Trk::TrackParameters* ms_entry = extension ? extension->muonEntryLayerIntersection() : nullptr;
581  const double ThetaID = (ms_entry ? ms_entry->position() : id_mom).theta();
582 
583  std::vector<int> id_sectors;
584  if (ms_entry) m_sectorMapping.getSectors(ms_entry->position().phi(), id_sectors);
585  auto sector_match = [&, this](const Amg::Vector3D& seg_pos) -> bool {
586  if (!ms_entry) return std::abs(qID * seg_pos.deltaPhi(id_mom) - qID / pID) < 0.6;
587  std::vector<int> seg_sectors;
588  m_sectorMapping.getSectors(seg_pos.phi(), seg_sectors);
589  return std::find_if(id_sectors.begin(), id_sectors.end(), [&seg_sectors](const int id_sec) {
590  return std::find(seg_sectors.begin(), seg_sectors.end(), id_sec) != seg_sectors.end();
591  }) != id_sectors.end();
592  };
593 
594  for (const auto& key_pair : filteredSegments) {
595  const int surf_def = key_pair.first;
596  const std::vector<const Muon::MuonSegment*>& source_vec = key_pair.second;
597  std::vector<const Muon::MuonSegment*> target_vec;
598  target_vec.reserve(source_vec.size());
599  for (const Muon::MuonSegment* itSeg : source_vec) {
600  const Amg::Vector3D& pos = itSeg->globalPosition();
601  const double dTheta = pos.theta() - ThetaID;
602  const bool theta_match = ms_entry ? std::abs(dTheta) < 0.2 : (qID * dTheta < 0.2 && qID * dTheta > -0.6);
603  if (!theta_match) {
604  ATH_MSG_VERBOSE("dTheta cut failed");
605  continue;
606  }
607  if (!sector_match(pos)) {
608  ATH_MSG_VERBOSE("dPhi cut failed");
609  continue;
610  }
611  hasAngleMatch = true;
612  const Identifier chId = m_edmHelperSvc->chamberId(*itSeg);
613  if (!m_idHelperSvc->isCsc(chId)) hasMatch = true;
614  target_vec.push_back(itSeg);
615  }
616  if (target_vec.empty()) continue;
617  sortedSegments[surf_def] = std::move(target_vec);
618  }
619  if (hasAngleMatch) ++m_nangleMatch;
620  if (hasMatch)
621  ++m_npmatch;
622  else
623  sortedSegments.clear();
624  return sortedSegments;
625  }

◆ findPopulatedStations()

MuonSegmentTagTool::SortedSegmentMap MuonCombined::MuonSegmentTagTool::findPopulatedStations ( const std::vector< const Muon::MuonSegment * > &  filteredSegments) const
private

Creates the sorted segment map.

Definition at line 553 of file MuonSegmentTagTool.cxx.

554  {
555  SortedSegmentMap sortedSegments{};
556  for (const Muon::MuonSegment* itSeg : filteredSegments) {
557  const Identifier chId = m_edmHelperSvc->chamberId(*itSeg);
558  const int surf_def = MuonCombined::MuonSegmentTagSurfaces::stIdxToSurfDef(m_idHelperSvc->stationIndex(chId),
559  m_idHelperSvc->stationEta(chId) > 0);
560  std::vector<const Muon::MuonSegment*>& surf_vec = sortedSegments[surf_def];
561  if (surf_vec.empty()) surf_vec.reserve(filteredSegments.size());
562  surf_vec.push_back(itSeg);
563  }
564  return sortedSegments;
565  }

◆ getCandidateSegments()

std::vector< const Muon::MuonSegment * > MuonCombined::MuonSegmentTagTool::getCandidateSegments ( const std::vector< const Muon::MuonSegment * > &  segments) const
private

Filters the input segments based on the number of hits fit quality etc.

Update ME: Need to think about cuts for the NSW!

Definition at line 504 of file MuonSegmentTagTool.cxx.

505  {
506  if (!m_doSegmentsFilter) {
507  ATH_MSG_VERBOSE("No segment filtering required. ");
508  return segments;
509  }
510  std::vector<const Muon::MuonSegment*> FilteredSegmentCollection;
511  FilteredSegmentCollection.reserve(segments.size());
512 
513  for (const Muon::MuonSegment* itSeg : segments) {
514  int quality = m_segmentSelector->quality(*itSeg);
515  ATH_MSG_DEBUG(" Segment quality " << quality);
516  if (quality < m_segmentQualityCut) continue;
517  Muon::IMuonSegmentHitSummaryTool::HitCounts hitCounts = m_hitSummaryTool->getHitCounts(*itSeg);
518  if (hitCounts.ncscHits() > 0)
519  ATH_MSG_DEBUG(" CSC segment ");
520  else {
521  if (hitCounts.nmdtHoles >= m_nmdtHoles) continue;
522  if (hitCounts.nmdtHits() < m_nmdtHits) continue; // precision hits
523  if (hitCounts.nmdtHitsMl1 > 0 && hitCounts.nmdtHitsMl1 < m_nmdtHitsML) continue;
524  if (hitCounts.nmdtHitsMl2 > 0 && hitCounts.nmdtHitsMl2 < m_nmdtHitsML) continue;
525  // If Trigger hits are expected one should at least find one
526  ATH_MSG_DEBUG(" expected TrigHits " << hitCounts.nexpectedTrigHitLayers << " TrigHits found "
527  << hitCounts.nphiTrigHitLayers + hitCounts.netaTrigHitLayers);
528  if (m_triggerHitCut && hitCounts.nexpectedTrigHitLayers > 1 && hitCounts.nphiTrigHitLayers == 0 &&
529  hitCounts.netaTrigHitLayers == 0)
530  continue;
531  }
532  if (m_segmentQualityCut > 0) {
533  Identifier chId = m_edmHelperSvc->chamberId(*itSeg);
534  StationIndex stIndex = m_idHelperSvc->stationIndex(chId);
535  if (!m_triggerHitCut && stIndex == Muon::MuonStationIndex::EM) {
536  // don't apply the TGC requirement for the first station as it sometimes has not trigger hits due to TGC acceptance
537  int stationEta = m_idHelperSvc->stationEta(chId);
538  if (std::abs(stationEta) != 1) {
539  // remove EM segments without trigger hits
540  if (hitCounts.nphiTrigHitLayers == 0 && hitCounts.netaTrigHitLayers == 0) continue;
541  }
542  }
543  if (stIndex == Muon::MuonStationIndex::EI) {
544  // remove CSC segment with hits in only one projection
546  if (m_idHelperSvc->isCsc(chId) && !hitCounts.ncscHits.hasEtaAndPhi()) continue;
547  }
548  }
549  FilteredSegmentCollection.emplace_back(itSeg);
550  }
551  return FilteredSegmentCollection;
552  }

◆ getPropDistance()

double MuonCombined::MuonSegmentTagTool::getPropDistance ( const Trk::TrackParameters start_pars,
const Trk::Surface target_surf 
)
inlinestaticprivate

Returns the straight line distance estimation of the parameters to the surface.

Definition at line 626 of file MuonSegmentTagTool.cxx.

626  {
627  Trk::DistanceSolution distSol = target_surf.straightLineDistanceEstimate(start_pars.position(), start_pars.momentum().normalized());
628  if (distSol.numberOfSolutions() > 0) return distSol.first();
629  return distSol.toPointOfClosestApproach();
630  }

◆ initialize()

StatusCode MuonCombined::MuonSegmentTagTool::initialize ( )
override

Definition at line 54 of file MuonSegmentTagTool.cxx.

54  {
55  ATH_CHECK(m_printer.retrieve());
56  ATH_CHECK(m_MuTagMatchingTool.retrieve());
58  ATH_CHECK(m_idHelperSvc.retrieve());
59  ATH_CHECK(m_edmHelperSvc.retrieve());
60  ATH_CHECK(m_segmentSelector.retrieve());
61 
62  ATH_MSG_INFO("Initializing MuonSegmentTagTool");
63 
64  ATH_MSG_DEBUG("Initialisation started ");
65  ATH_MSG_DEBUG("================================ ");
66  ATH_MSG_DEBUG("=Proprieties are ");
67  ATH_MSG_DEBUG("================================ ");
68  return StatusCode::SUCCESS;
69  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& MuonCombined::IMuonSegmentTagTool::interfaceID ( )
inlinestaticinherited

Definition at line 27 of file IMuonSegmentTagTool.h.

27  {
28  static const InterfaceID IID_IMuonSegmentTagTool("MuonCombined::IMuonSegmentTagTool", 1, 0);
29  return IID_IMuonSegmentTagTool;
30  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ printTable()

void MuonCombined::MuonSegmentTagTool::printTable ( const std::vector< std::string > &  didEx,
const std::vector< std::string > &  segStation,
const std::vector< std::vector< std::string >> &  segToSurf 
) const
private

method for extra DEBUG

Definition at line 464 of file MuonSegmentTagTool.cxx.

465  {
466  ATH_MSG_DEBUG(std::setw(6) << ""
467  << "EX? (o: no extrap, X: extrap failed, V: extrap OK)");
468 
469  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Surface" << std::setw(2) << "";
470  for (unsigned int segment_counter = 0; segment_counter < segStation.size(); ++segment_counter) {
471  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << std::setw(10) << segStation[segment_counter];
472  }
474 
475  unsigned int extrapolation_counter(0);
476  std::string signstr("");
477  if (m_doBidirectional) signstr = "+";
478 
479  for (int counter = 0; counter < SurfDef::NumSurf; ++counter) {
480  if (msgLvl(MSG::DEBUG))
481  msg(MSG::DEBUG) << std::setw(5) << m_surfaces.stationType(counter) << signstr << std::setw(3)
482  << didEx[extrapolation_counter];
483  for (unsigned int segment_counter = 0; segment_counter < segStation.size(); ++segment_counter) {
484  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << std::setw(10) << (segToSurf[extrapolation_counter])[segment_counter];
485  } // end loop segments
487  ++extrapolation_counter;
488  } // end loop surfaces
489 
490  if (m_doBidirectional) {
491  signstr = "-";
492  for (unsigned int counter = 0; counter < SurfDef::NumSurf; ++counter) {
493  if (msgLvl(MSG::DEBUG))
494  msg(MSG::DEBUG) << std::setw(5) << m_surfaces.stationType(counter) << signstr << std::setw(3)
495  << didEx[extrapolation_counter];
496  for (unsigned int segment_counter = 0; segment_counter < segStation.size(); ++segment_counter) {
497  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << std::setw(10) << (segToSurf[extrapolation_counter])[segment_counter];
498  } // end loop segments
500  ++extrapolation_counter;
501  } // end loop surfaces
502  }
503  }

◆ 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> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ tag()

void MuonCombined::MuonSegmentTagTool::tag ( const EventContext &  ctx,
const InDetCandidateCollection inDetCandidates,
const std::vector< const Muon::MuonSegment * > &  segments,
InDetCandidateToTagMap tagMap 
) const
overridevirtual

IMuonSegmentTagTool interface: build muons from ID and MuonSegments.

Associate the segments to the Track

Start the extrapolations through the spectrometer

update the extensions

Do not use the intersections in the back extrapolations

Actually this should never happen for the forward extrapolation

Segments found here

Recylce the intersections to get as close as possible to the target surfaces. In this case switch off the extrapolations

Find the intersection matching at best to the target surface

There exist tracks in the transition region between the endcaps & the barrel which have associated segment candidates with Barrel & Endcap like surfaces. However, if the previous surface was on a barrel and we start to extrapolate from the Barrel to an endcap like surface. It is very likely to fail hence use as a fall back the MS entrance again

Next surface succesfully reached

Some debugging statements

m_dotable

Check if there exists already a segment on the same surface. No need to redo the extrapolations twice

Implements MuonCombined::IMuonSegmentTagTool.

Definition at line 87 of file MuonSegmentTagTool.cxx.

88  {
89  if (inDetCandidates.empty()) return;
90 
91  std::vector<const Muon::MuonSegment*> FilteredSegmentCollection = getCandidateSegments(segments);
92 
93  ATH_MSG_DEBUG("Filtered segments... in: " << segments.size() << ", out: " << FilteredSegmentCollection.size());
94 
95  if (FilteredSegmentCollection.empty()) return;
96 
97  unsigned int trackCount{0};
98  ATH_MSG_DEBUG("performing tag of " << inDetCandidates.size() << " tracks with " << FilteredSegmentCollection.size()
99  << " segments. ");
100  // Checking which surfaces have segments, to avoid useless extrapolations
101 
102  const SortedSegmentMap populStat = findPopulatedStations(FilteredSegmentCollection);
103 
104  std::vector<MuonCombined::MuonSegmentInfo> segmentsInfoSelected;
105  segmentsInfoSelected.reserve(FilteredSegmentCollection.size());
106  for (const MuonCombined::InDetCandidate* idTP : inDetCandidates) {
107  // ensure that the id trackparticle has a track
108  // Ignore if this is a siAssociated disk (and property set).
109  if (m_ignoreSiAssocated && idTP->isSiliconAssociated()) continue;
110 
111  ++trackCount;
112 
113  bool matchedSegment{false};
114  const xAOD::TrackParticle& track = idTP->indetTrackParticle();
115 
116  //
117  // Remove low p and low Field region defined by p < 6 and eta between 1.4-1.7
118  //
120  const double eta = std::abs(track.eta());
121  const double p = std::abs(1.0 / track.qOverP());
122  if (eta > 1.4 && eta < 1.7 && p < 6000.) continue;
123  }
124  ATH_MSG_DEBUG("Treating track " << trackCount << " " << idTP->toString());
125 
127  if (!track.summaryValue(numSCTHits, xAOD::numberOfSCTHits)) ATH_MSG_DEBUG("TrackParticle missing numberOfSCTHits");
128  if (!track.summaryValue(numPixelHits, xAOD::numberOfPixelHits)) ATH_MSG_DEBUG("TrackParticle missing numberOfPixelHits");
129 
130  unsigned int nrIDetaHits = numSCTHits + numPixelHits;
131  const bool trkEtaInfo = nrIDetaHits >= 5;
132  if (!trkEtaInfo) ATH_MSG_DEBUG("Track has no ID eta information! (" << nrIDetaHits << " etaHits)");
133 
134  ++m_ntotTracks;
135 
137  const SortedSegmentMap assocStat = m_doBidirectional ? populStat : findCandidateStations(*idTP, populStat);
138  if (assocStat.empty()) continue;
139 
140  const unsigned int num_assoc_segs =
141  std::accumulate(populStat.begin(), populStat.end(), 0,
142  [](unsigned int N, const std::pair<int, std::vector<const Muon::MuonSegment*>>& seg_stat) {
143  return N + seg_stat.second.size();
144  });
145 
146  std::vector<MuonCombined::MuonSegmentInfo> segmentsInfo;
147  segmentsInfo.reserve(num_assoc_segs);
148  const int multiply = 1 + m_doBidirectional;
149 
150  std::optional<std::vector<std::string>> didExtrapolate =
151  m_doTable ? std::make_optional<std::vector<std::string>>(SurfDef::NumSurf * multiply, "o") : std::nullopt;
152  std::optional<std::vector<std::string>> segStation =
153  m_doTable ? std::make_optional<std::vector<std::string>>(num_assoc_segs, "XXX") : std::nullopt;
154  std::optional<std::vector<std::vector<std::string>>> trkToSegment =
155  m_doTable ? std::make_optional<std::vector<std::vector<std::string>>>(SurfDef::NumSurf * multiply, *segStation)
156  : std::nullopt;
157 
158  const int numberOfExtrapolations = 1 + m_doBidirectional;
159  std::array<std::shared_ptr<const Trk::TrackParameters>, 2> trackAtMSEntrance;
160 
162  for (int i_extrapolations = 0; i_extrapolations < numberOfExtrapolations; ++i_extrapolations) {
163  // in case of along momentum extrapolation, use pre-existing extrapolation if available
164  const Trk::CaloExtension* extension = idTP->getCaloExtension();
165  const Muon::MuonSystemExtension* msExtension = idTP->getExtension();
166  std::vector<Intersection> intersections;
167  if (i_extrapolations == 0) {
169  if (msExtension) intersections = msExtension->layerIntersections();
170  if (extension && extension->muonEntryLayerIntersection()) {
172  trackAtMSEntrance[i_extrapolations] = pars.uniqueClone();
173  ATH_MSG_DEBUG("Got MS entry pos: r " << pars.position().perp() << " z " << pars.position().z() << " momentum "
174  << pars.momentum().perp() << " cov " << pars.covariance());
175  }
177  } else
178  intersections.clear();
180  if (!trackAtMSEntrance[i_extrapolations]) {
181  trackAtMSEntrance[i_extrapolations] =
182  m_MuTagMatchingTool->ExtrapolateTrktoMSEntrance(ctx, *track.track(), Trk::alongMomentum);
183  }
184 
185  if (!trackAtMSEntrance[i_extrapolations]) {
186  ATH_MSG_DEBUG("there is no track at MS entrance... not tagging for direction " << i_extrapolations);
187  continue;
188  }
189  ++m_natMSEntrance;
190 
191  std::shared_ptr<const Trk::TrackParameters> atSurface{trackAtMSEntrance[i_extrapolations]},
192  nextSurface{trackAtMSEntrance[i_extrapolations]};
193  bool barrel_extp{false}, endcap_extp{false};
194 
195  ATH_MSG_DEBUG("Start extrapolation " << i_extrapolations << " found in total " << num_assoc_segs
196  << " associated segments.");
197 
198  for (auto& stat_pair : assocStat) {
199  const int surface_counter = stat_pair.first;
200  const int extrapolation_counter = i_extrapolations * SurfDef::NumSurf + surface_counter;
201  const std::vector<const Muon::MuonSegment*>& targets = stat_pair.second;
202 
203  ATH_MSG_DEBUG("Surface " << m_surfaces.stationType(surface_counter));
205  if (m_doTable) (*didExtrapolate)[extrapolation_counter] = "X";
206 
207  std::optional<std::vector<std::string>> segVsSurf =
208  m_doTable ? std::make_optional<std::vector<std::string>>(num_assoc_segs, "xxx") : std::nullopt;
209  const Trk::Surface* surface = m_surfaces.getSurface(surface_counter);
210 
211  const bool is_barrel = surface_counter < SurfDef::EIA;
214  bool extrapolate{true};
215  if (!intersections.empty()) {
216  const bool is_aside = surface_counter < SurfDef::EIC;
218  Intersection best_intersec;
219  for (const Intersection& intersect : intersections) {
220  if (m_surfaces.stIdxToSurfDef(intersect.layerSurface.stIndex(), is_aside) != surface_counter) continue;
221  if (!best_intersec.trackParameters || std::abs(getPropDistance(*intersect.trackParameters, *surface)) <
222  std::abs(getPropDistance(*best_intersec.trackParameters, *surface)))
223  best_intersec = intersect;
224  }
225  if (best_intersec.trackParameters) {
226  atSurface = best_intersec.trackParameters;
227  extrapolate = false;
228  barrel_extp |= is_barrel;
229  endcap_extp |= !is_barrel;
230  ++m_recycledIntersect[surface_counter];
231  }
232  }
233 
234  if (extrapolate) {
235  if (m_doTable) (*didExtrapolate)[extrapolation_counter] = "V";
240  if (!is_barrel && barrel_extp && !endcap_extp) {
241  atSurface = trackAtMSEntrance[i_extrapolations];
242  endcap_extp = true;
243  }
244  const Trk::PropDirection surf_dir =
245  getPropDistance(*atSurface, *surface) > 0 ? Trk::alongMomentum : Trk::oppositeMomentum;
246  ATH_MSG_DEBUG("Extrapolate " << m_surfaces.stationType(surface_counter) << " from (" << atSurface->position().perp()
247  << ", " << atSurface->position().z() << "), to surface "
248  << "(" << surface->globalReferencePoint().perp() << ","
249  << surface->globalReferencePoint().z() << ") "
250  << (surf_dir == Trk::alongMomentum ? "along" : "opposite") << " momentum");
251 
252  nextSurface = m_MuTagMatchingTool->ExtrapolateTrktoMSSurface(ctx, *surface, *atSurface, surf_dir);
254  ++m_extrapolated[surface_counter];
255  if (nextSurface) {
256  atSurface = nextSurface;
257  barrel_extp |= is_barrel;
258  endcap_extp |= !is_barrel;
260  if (m_doTable) (*trkToSegment)[extrapolation_counter] = (*segVsSurf);
261  } else {
262  continue;
263  }
264  } else if (m_doTable)
265  (*didExtrapolate)[extrapolation_counter] = "S";
266 
267  ++m_goodExtrapolated[surface_counter];
268 
269  std::vector<SegmentExtrCache> seg_extps{};
270  seg_extps.reserve(targets.size());
271  ATH_MSG_VERBOSE("Perform segment matching");
272  int segmentCount{-1}; // Variable used for debugging
273  for (const Muon::MuonSegment* seg_ptr : targets) {
274  ++segmentCount;
275  if (m_doTable) { (*segStation)[segmentCount] = " "; }
276 
279  bool isMatched{false};
280  if (!m_doTable) {
281  isMatched = m_MuTagMatchingTool->match(*atSurface, *seg_ptr, surface_counter);
282  } else {
283  if (!m_MuTagMatchingTool->surfaceMatch(*seg_ptr, surface_counter)) {
284  (*segVsSurf)[segmentCount] = "surface";
285  continue;
286  }
287  ATH_MSG_VERBOSE("treating track " << trackCount << " (extrapolation = " << i_extrapolations << ") and Segment "
288  << (*segStation)[segmentCount] << " (segment " << segmentCount << ")");
289 
290  if (!m_MuTagMatchingTool->phiMatch(*atSurface, *seg_ptr)) {
291  (*segVsSurf)[segmentCount] = "RghPhi";
292  continue;
293  }
294  if (trkEtaInfo) {
295  if (is_barrel) {
296  if (!m_MuTagMatchingTool->thetaMatch(*atSurface, *seg_ptr)) {
297  (*segVsSurf)[segmentCount] = "RghTheta";
298  continue;
299  }
300  } else {
301  if (!m_MuTagMatchingTool->rMatch(*atSurface, *seg_ptr)) {
302  (*segVsSurf)[segmentCount] = "RghR";
303  continue;
304  }
305  }
306  isMatched = true;
307  } else { // trk has no eta info
308  ATH_MSG_DEBUG("bypassed roughEta/roughR cut since ID has no eta info!");
309  isMatched = true;
310  }
311  }
312 
313  if (!isMatched) {
314  if (m_doTable) {
315  ATH_MSG_DEBUG("isMatched is " << isMatched << " at this point, incoherent!");
316  if (!trkEtaInfo)
317  (*segVsSurf)[segmentCount] = "posPhi";
318  else
319  (*segVsSurf)[segmentCount] = "pos";
320  }
321  continue;
322  }
325 
326  std::shared_ptr<const Trk::AtaPlane> atSegSurface;
328  std::vector<SegmentExtrCache>::const_iterator cache_itr = std::find_if(
329  seg_extps.begin(), seg_extps.end(),
330  [seg_ptr](const SegmentExtrCache& cache) { return cache.segment_surface == &(seg_ptr->associatedSurface()); });
331  if (cache_itr != seg_extps.end()) {
332  atSegSurface = cache_itr->segment_pars;
333  ATH_MSG_DEBUG("Recycle extrapolation");
334  } else {
335  const Trk::PropDirection seg_dir =
336  getPropDistance(*atSurface, seg_ptr->associatedSurface()) > 0 ? Trk::alongMomentum : Trk::oppositeMomentum;
337  ATH_MSG_DEBUG("Extrapolate "
338  << m_surfaces.stationType(surface_counter) << " from (" << atSurface->position().perp() << ", "
339  << atSurface->position().z() << "), to segment "
340  << "(" << seg_ptr->globalPosition().perp() << "," << seg_ptr->globalPosition().z() << ") "
341  << (seg_dir == Trk::alongMomentum ? "along" : "opposite") << " momentum");
342  atSegSurface = m_MuTagMatchingTool->ExtrapolateTrktoSegmentSurface(ctx, *seg_ptr, *atSurface, seg_dir);
343  seg_extps.emplace_back(atSegSurface, seg_ptr->associatedSurface());
344  }
345  if (!atSegSurface || !atSegSurface->covariance() || !Amg::hasPositiveDiagElems(*atSegSurface->covariance()))
346  continue;
347  const AmgSymMatrix(5) invCov = atSegSurface->covariance()->inverse();
348  if (!Amg::hasPositiveDiagElems(invCov)) continue;
349 
350  MuonCombined::MuonSegmentInfo info =
351  m_MuTagMatchingTool->muTagSegmentInfo(ctx, track.track(), *seg_ptr, atSegSurface);
352  isMatched = m_MuTagMatchingTool->matchSegmentPosition(info, trkEtaInfo);
353  if (!isMatched) {
354  if (m_doTable) {
355  if (!trkEtaInfo)
356  (*segVsSurf)[segmentCount] = "posPhi";
357  else
358  (*segVsSurf)[segmentCount] = "pos";
359  }
360  continue;
361  }
362  isMatched = m_MuTagMatchingTool->matchSegmentDirection(info, trkEtaInfo);
363 
364  if (!isMatched) {
365  if (m_doTable) {
366  if (!trkEtaInfo)
367  (*segVsSurf)[segmentCount] = "dirPhi";
368  else
369  (*segVsSurf)[segmentCount] = "dir";
370  }
371  continue;
372  }
373 
374  isMatched = m_MuTagMatchingTool->matchDistance(info);
375 
376  if (!isMatched) {
377  if (m_doTable) { (*segVsSurf)[segmentCount] = "dist"; }
378  continue;
379  }
380 
381  isMatched = m_MuTagMatchingTool->matchCombinedPull(info);
382  if (!isMatched) {
383  if (m_doTable) { (*segVsSurf)[segmentCount] = "cpull"; }
384  continue;
385  }
386 
388  isMatched = m_MuTagMatchingTool->matchPtDependentPull(info, *track.track());
389  if (!isMatched) {
390  if (m_doTable) { (*segVsSurf)[segmentCount] = "ptpull"; }
391  continue;
392  }
393  }
394  if (m_doTable) (*segVsSurf)[segmentCount] = "TAG";
395  matchedSegment = true;
396  ATH_MSG_DEBUG("Tagged the track with Segment " << segmentCount);
397 
398  segmentsInfo.push_back(std::move(info));
399 
400  } // end loop over segments
401 
402  if (m_doTable) (*trkToSegment)[extrapolation_counter] = (*segVsSurf);
403  } // end loop over MS surfaces
404 
405  } // end loop over nr Directions of extrapolation.
406 
407  if (m_doTable) { printTable(*didExtrapolate, *segStation, *trkToSegment); }
408 
409  if (!matchedSegment) {
410  ATH_MSG_DEBUG("ID " << std::setw(3) << trackCount << " could not be matched with any segment on any abstract surface");
411  continue;
412  }
413 
414  // The loop over SM surfaces yielded matches for the extrapolated track.
415  // Per match, a MuTagObject is created and added to the MuTagObjectContainer
416  // A Track which has at least one match with the extrapolated track may be called a muon
417  //----------------------------------------------------------------
418  //----------------------------------------------------------------
419  if (!segmentsInfo.empty()) {
420  ++m_naccepted;
421  ATH_MSG_DEBUG("number of accepted tracks " << m_naccepted << " segmentsInfo size " << segmentsInfo.size());
422 
423  std::vector<MuonCombined::MuonSegmentInfo> segmentsInfoSolved =
424  m_MuTagAmbiguitySolverTool->selectBestMuTaggedSegments(ctx, segmentsInfo);
425  segmentsInfoSelected.insert(segmentsInfoSelected.end(), std::make_move_iterator(segmentsInfoSolved.begin()),
426  std::make_move_iterator(segmentsInfoSolved.end()));
427  ATH_MSG_DEBUG("segmentsInfoSelected size " << segmentsInfoSelected.size());
428  }
429 
430  } // end loop over tracks
431 
432  ATH_MSG_DEBUG("segmentsInfoSelected size after track loop " << segmentsInfoSelected.size());
433  std::vector<MuonCombined::MuonSegmentInfo> segmentsInfoFinal =
434  m_MuTagAmbiguitySolverTool->solveAmbiguities(ctx, segmentsInfoSelected);
435  ATH_MSG_DEBUG("segmentsInfoFinal size " << segmentsInfoFinal.size());
436 
437  if (msgLevel(MSG::DEBUG)) {
438  for (unsigned int ns1 = 0; ns1 < segmentsInfoFinal.size(); ++ns1) {
439  if (ns1 == 0)
440  ATH_MSG_DEBUG(m_printer->print(*segmentsInfoFinal[ns1].track));
441  else if (segmentsInfoFinal[ns1].track != segmentsInfoFinal[ns1 - 1].track)
442  ATH_MSG_DEBUG(m_printer->print(*segmentsInfoFinal[ns1].track));
443  ATH_MSG_DEBUG(m_printer->print(*segmentsInfoFinal[ns1].segment));
444  }
445  }
446 
447  for (const InDetCandidate* idTP : inDetCandidates) {
448  const Trk::Track* track = idTP->indetTrackParticle().track();
449  std::vector<MuonCombined::MuonSegmentInfo> segmentsInfoTag;
450  segmentsInfoTag.reserve(segmentsInfoFinal.size());
451 
452  for (unsigned int ns1 = 0; ns1 < segmentsInfoFinal.size(); ++ns1) {
453  if (segmentsInfoFinal[ns1].track == track && segmentsInfoFinal[ns1].nsegments > 0) {
454  segmentsInfoTag.push_back(segmentsInfoFinal[ns1]);
455  }
456  }
457  if (segmentsInfoTag.empty()) continue;
458  ATH_MSG_DEBUG("make Segment Tag object for " << m_printer->print(*track) << " nr segments " << segmentsInfoTag.size());
459  SegmentTag* tag = new SegmentTag(segmentsInfoTag);
460  tagMap->addEntry(idTP, tag);
461  }
462  }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/3]

std::array<std::atomic_uint, SurfDef::NumSurf> m_extrapolated MuonCombined::MuonSegmentTagTool::ATLAS_THREAD_SAFE {0}
mutableprivate

Definition at line 111 of file MuonSegmentTagTool.h.

◆ ATLAS_THREAD_SAFE [2/3]

std::array<std::atomic_uint, SurfDef::NumSurf> m_goodExtrapolated MuonCombined::MuonSegmentTagTool::ATLAS_THREAD_SAFE {0}
mutableprivate

Definition at line 112 of file MuonSegmentTagTool.h.

◆ ATLAS_THREAD_SAFE [3/3]

std::array<std::atomic_uint, SurfDef::NumSurf> m_recycledIntersect MuonCombined::MuonSegmentTagTool::ATLAS_THREAD_SAFE {0}
mutableprivate

Definition at line 113 of file MuonSegmentTagTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doBidirectional

Gaudi::Property<bool> MuonCombined::MuonSegmentTagTool::m_doBidirectional
private
Initial value:
{this, "DoBidirectionalExtrapolation", false,
"flag to toggle to bidirectional extrapolation"}

Definition at line 87 of file MuonSegmentTagTool.h.

◆ m_doPtDependentPullCut

Gaudi::Property<bool> MuonCombined::MuonSegmentTagTool::m_doPtDependentPullCut {this, "DoPtDependentPullCut", false, "flag to enable the pT-dependent pull cut"}
private

Definition at line 89 of file MuonSegmentTagTool.h.

◆ m_doSegmentsFilter

Gaudi::Property<bool> MuonCombined::MuonSegmentTagTool::m_doSegmentsFilter {this, "DoSegmentsFilter", true, "flag to switch segment filtering on/off (for trigger)"}
private

Definition at line 85 of file MuonSegmentTagTool.h.

◆ m_doTable

Gaudi::Property<bool> MuonCombined::MuonSegmentTagTool::m_doTable {this, "DoOverviewTable", false}
private

Definition at line 86 of file MuonSegmentTagTool.h.

◆ m_edmHelperSvc

ServiceHandle<Muon::IMuonEDMHelperSvc> MuonCombined::MuonSegmentTagTool::m_edmHelperSvc
private
Initial value:
{this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}

Definition at line 72 of file MuonSegmentTagTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_hitSummaryTool

ToolHandle<Muon::IMuonSegmentHitSummaryTool> MuonCombined::MuonSegmentTagTool::m_hitSummaryTool
private
Initial value:
{this, "MuonSegmentHitSummaryTool",
"Muon::MuonSegmentHitSummaryTool/MuonSegmentHitSummaryTool"}

Definition at line 82 of file MuonSegmentTagTool.h.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonCombined::MuonSegmentTagTool::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 71 of file MuonSegmentTagTool.h.

◆ m_ignoreSiAssocated

Gaudi::Property<bool> MuonCombined::MuonSegmentTagTool::m_ignoreSiAssocated
private
Initial value:
{this, "IgnoreSiAssociatedCandidates", true,
"If true, ignore InDetCandidates which are SiAssociated"}

Definition at line 99 of file MuonSegmentTagTool.h.

◆ m_MuTagAmbiguitySolverTool

ToolHandle<IMuTagAmbiguitySolverTool> MuonCombined::MuonSegmentTagTool::m_MuTagAmbiguitySolverTool
private
Initial value:
{this, "MuTagAmbiguitySolverTool",
"MuTagAmbiguitySolverTool/MuTagAmbiguitySolverTool"}

Definition at line 77 of file MuonSegmentTagTool.h.

◆ m_MuTagMatchingTool

ToolHandle<IMuTagMatchingTool> MuonCombined::MuonSegmentTagTool::m_MuTagMatchingTool {this, "MuTagMatchingTool", "MuTagMatchingTool/MuTagMatchingTool"}
private

Definition at line 76 of file MuonSegmentTagTool.h.

◆ m_naccepted

std::atomic_uint MuonCombined::MuonSegmentTagTool::m_naccepted {0}
mutableprivate

Definition at line 110 of file MuonSegmentTagTool.h.

◆ m_nangleMatch

std::atomic_uint MuonCombined::MuonSegmentTagTool::m_nangleMatch {0}
mutableprivate

Definition at line 107 of file MuonSegmentTagTool.h.

◆ m_natMSEntrance

std::atomic_uint MuonCombined::MuonSegmentTagTool::m_natMSEntrance {0}
mutableprivate

Definition at line 109 of file MuonSegmentTagTool.h.

◆ m_nmdtHits

Gaudi::Property<unsigned int> MuonCombined::MuonSegmentTagTool::m_nmdtHits {this, "nmdtHits", 4}
private

Definition at line 94 of file MuonSegmentTagTool.h.

◆ m_nmdtHitsML

Gaudi::Property<unsigned int> MuonCombined::MuonSegmentTagTool::m_nmdtHitsML {this, "nmdtHitsML", 2}
private

Definition at line 96 of file MuonSegmentTagTool.h.

◆ m_nmdtHoles

Gaudi::Property<unsigned int> MuonCombined::MuonSegmentTagTool::m_nmdtHoles {this, "nmdtHoles", 3}
private

Definition at line 95 of file MuonSegmentTagTool.h.

◆ m_npmatch

std::atomic_uint MuonCombined::MuonSegmentTagTool::m_npmatch {0}
mutableprivate

Definition at line 108 of file MuonSegmentTagTool.h.

◆ m_ntotTracks

std::atomic_uint MuonCombined::MuonSegmentTagTool::m_ntotTracks {0}
mutableprivate

Definition at line 106 of file MuonSegmentTagTool.h.

◆ m_printer

ToolHandle<Muon::MuonEDMPrinterTool> MuonCombined::MuonSegmentTagTool::m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
private

Definition at line 75 of file MuonSegmentTagTool.h.

◆ m_removeLowPLowFieldRegion

Gaudi::Property<bool> MuonCombined::MuonSegmentTagTool::m_removeLowPLowFieldRegion
private
Initial value:
{this, "RemoveLowPLowFieldRegion", false,
"remove track with p < 6 GeV in eta 1.4-17 region (low p and low field)"}

Definition at line 90 of file MuonSegmentTagTool.h.

◆ m_sectorMapping

const Muon::MuonSectorMapping MuonCombined::MuonSegmentTagTool::m_sectorMapping {}
private

sector mapping helper

Definition at line 104 of file MuonSegmentTagTool.h.

◆ m_segmentQualityCut

Gaudi::Property<int> MuonCombined::MuonSegmentTagTool::m_segmentQualityCut {this, "SegmentQualityCut", 1, "minimum segment quality"}
private

Definition at line 93 of file MuonSegmentTagTool.h.

◆ m_segmentSelector

ToolHandle<Muon::IMuonSegmentSelectionTool> MuonCombined::MuonSegmentTagTool::m_segmentSelector
private
Initial value:
{this, "MuonSegmentSelectionTool",
"Muon::MuonSegmentSelectionTool/MuonSegmentSelectionTool"}

Definition at line 80 of file MuonSegmentTagTool.h.

◆ m_surfaces

const MuonCombined::MuonSegmentTagSurfaces MuonCombined::MuonSegmentTagTool::m_surfaces {}
private

Definition at line 102 of file MuonSegmentTagTool.h.

◆ m_triggerHitCut

Gaudi::Property<bool> MuonCombined::MuonSegmentTagTool::m_triggerHitCut {this, "TriggerHitCut", true, "apply Trigger hit cut if trigger hits are expected"}
private

Definition at line 98 of file MuonSegmentTagTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
MuonCombined::MuonSegmentTagTool::m_doBidirectional
Gaudi::Property< bool > m_doBidirectional
Definition: MuonSegmentTagTool.h:87
MuonCombined::MuonSegmentTagTool::m_segmentQualityCut
Gaudi::Property< int > m_segmentQualityCut
Definition: MuonSegmentTagTool.h:93
MuonCombined::MuonSegmentTagTool::m_nangleMatch
std::atomic_uint m_nangleMatch
Definition: MuonSegmentTagTool.h:107
Amg::hasPositiveDiagElems
bool hasPositiveDiagElems(const AmgSymMatrix(N) &mat)
Returns true if all diagonal elements of the covariance matrix are finite aka sane in the above defin...
Definition: EventPrimitivesCovarianceHelpers.h:96
MuonCombined::MuonSegmentTagTool::tag
void tag(const EventContext &ctx, const InDetCandidateCollection &inDetCandidates, const std::vector< const Muon::MuonSegment * > &segments, InDetCandidateToTagMap *tagMap) const override
IMuonSegmentTagTool interface: build muons from ID and MuonSegments.
Definition: MuonSegmentTagTool.cxx:87
MuonCombined::MuonSegmentTagTool::m_naccepted
std::atomic_uint m_naccepted
Definition: MuonSegmentTagTool.h:110
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Trk::DistanceSolution::toPointOfClosestApproach
double toPointOfClosestApproach() const
Distance to point of closest approach along direction.
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
MuonCombined::MuonSegmentTagTool::m_doPtDependentPullCut
Gaudi::Property< bool > m_doPtDependentPullCut
Definition: MuonSegmentTagTool.h:89
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Trk::DistanceSolution
Definition: DistanceSolution.h:25
Trk::CaloExtension
Tracking class to hold the extrapolation from a particle from the ID to the muon system (or the other...
Definition: CaloExtension.h:18
Muon::IMuonSegmentHitSummaryTool::HitCounts::nmdtHitsMl1
uint8_t nmdtHitsMl1
Definition: IMuonSegmentHitSummaryTool.h:40
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Trk::oppositeMomentum
@ oppositeMomentum
Definition: PropDirection.h:21
Trk::DistanceSolution::numberOfSolutions
int numberOfSolutions() const
Number of intersection solutions.
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::Surface::straightLineDistanceEstimate
virtual DistanceSolution straightLineDistanceEstimate(const Amg::Vector3D &pos, const Amg::Vector3D &dir) const =0
fast straight line distance evaluation to Surface
MuonCombined::MuonSegmentTagTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonSegmentTagTool.h:71
Muon::MuonSectorMapping::getSectors
void getSectors(double phi, std::vector< int > &sectors) const
returns the main sector plus neighboring if the phi position is in an overlap region
Definition: MuonSectorMapping.h:93
MuonCombined::MuonSegmentTagTool::m_hitSummaryTool
ToolHandle< Muon::IMuonSegmentHitSummaryTool > m_hitSummaryTool
Definition: MuonSegmentTagTool.h:82
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
Muon::IMuonSegmentHitSummaryTool::EtaPhiHitCount::hasEtaAndPhi
bool hasEtaAndPhi() const
Definition: IMuonSegmentHitSummaryTool.h:23
MuonCombined::MuonSegmentTagSurfaces::getSurface
const Trk::Surface * getSurface(SurfDef surf) const
Definition: MuonSegmentTagSurfaces.h:57
MuonCombined::MuonSegmentTagTool::findPopulatedStations
SortedSegmentMap findPopulatedStations(const std::vector< const Muon::MuonSegment * > &filteredSegments) const
Creates the sorted segment map.
Definition: MuonSegmentTagTool.cxx:553
MuonCombined::MuonSegmentTagSurfaces::stIdxToSurfDef
static int stIdxToSurfDef(Muon::MuonStationIndex::StIndex st_idx, bool pos_eta)
Transforms the Muon Station index to a SurfDef index.
Definition: MuonSegmentTagSurfaces.cxx:21
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
MuonCombined::InDetCandidate
Definition: InDetCandidate.h:18
MuonCombined::MuonSegmentTagTool::m_surfaces
const MuonCombined::MuonSegmentTagSurfaces m_surfaces
Definition: MuonSegmentTagTool.h:102
xAOD::numberOfPixelHits
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
Definition: TrackingPrimitives.h:259
InDetSecVtxTruthMatchUtils::isMatched
bool isMatched(int matchInfo)
Definition: InDetSecVtxTruthMatchTool.h:48
Trk::alongMomentum
@ alongMomentum
Definition: PropDirection.h:20
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::DistanceSolution::first
double first() const
Distance to first intersection solution along direction.
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MuonCombined::MuonSegmentTagTool::m_nmdtHits
Gaudi::Property< unsigned int > m_nmdtHits
Definition: MuonSegmentTagTool.h:94
Trk::CaloExtension::muonEntryLayerIntersection
const TrackParameters * muonEntryLayerIntersection() const
access to intersection with the muon entry layer return NULL if the intersection failed
Definition: CaloExtension.h:70
AmgSymMatrix
#define AmgSymMatrix(dim)
Definition: EventPrimitives.h:52
Muon::IMuonSegmentHitSummaryTool::HitCounts::netaTrigHitLayers
uint8_t netaTrigHitLayers
Definition: IMuonSegmentHitSummaryTool.h:52
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
MuonCombined::MuonSegmentTagTool::m_MuTagMatchingTool
ToolHandle< IMuTagMatchingTool > m_MuTagMatchingTool
Definition: MuonSegmentTagTool.h:76
MuonCombined::MuonSegmentTagTool::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonSegmentTagTool.h:72
MuonCombined::MuonSegmentTagTool::m_ntotTracks
std::atomic_uint m_ntotTracks
Definition: MuonSegmentTagTool.h:106
Muon::IMuonSegmentHitSummaryTool::HitCounts::nmdtHits
uint8_t nmdtHits() const
Returns the number of hits in both MDT layers.
Definition: IMuonSegmentHitSummaryTool.h:60
MuonCombined::MuonSegmentTagTool::m_nmdtHitsML
Gaudi::Property< unsigned int > m_nmdtHitsML
Definition: MuonSegmentTagTool.h:96
MuonCombined::MuonSegmentTagTool::m_triggerHitCut
Gaudi::Property< bool > m_triggerHitCut
Definition: MuonSegmentTagTool.h:98
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
MuonCombined::MuonSegmentTagTool::m_sectorMapping
const Muon::MuonSectorMapping m_sectorMapping
sector mapping helper
Definition: MuonSegmentTagTool.h:104
Muon::IMuonSegmentHitSummaryTool::HitCounts::nexpectedTrigHitLayers
uint8_t nexpectedTrigHitLayers
Definition: IMuonSegmentHitSummaryTool.h:54
MuonCombined::MuonSegmentTagTool::findCandidateStations
SortedSegmentMap findCandidateStations(const MuonCombined::InDetCandidate &Id_trk, const SortedSegmentMap &filteredSegments) const
Returns an array encoding which muon segments are compatible with the IdCandidate.
Definition: MuonSegmentTagTool.cxx:566
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MuonCombined::MuonSegmentTagSurfaces::stationType
const std::string stationType(unsigned int count) const
Definition: MuonSegmentTagSurfaces.h:50
MuonCombined::MuonSegmentTagTool::m_doSegmentsFilter
Gaudi::Property< bool > m_doSegmentsFilter
Definition: MuonSegmentTagTool.h:85
lumiFormat.i
int i
Definition: lumiFormat.py:92
xAOD::numPixelHits
@ numPixelHits
Definition: TrackingPrimitives.h:533
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Muon::MuonStationIndex::EI
@ EI
Definition: MuonStationIndex.h:26
MuonCombined::MuonSegmentTagTool::m_doTable
Gaudi::Property< bool > m_doTable
Definition: MuonSegmentTagTool.h:86
Muon::MuonSystemExtension
Tracking class to hold the extrapolation from a particle from the calo entry to the end of muon syste...
Definition: MuonSystemExtension.h:18
xAOD::numSCTHits
@ numSCTHits
Definition: TrackingPrimitives.h:534
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MuonCombined::MuonSegmentTagTool::m_MuTagAmbiguitySolverTool
ToolHandle< IMuTagAmbiguitySolverTool > m_MuTagAmbiguitySolverTool
Definition: MuonSegmentTagTool.h:77
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonCombined::MuonSegmentTagTool::m_segmentSelector
ToolHandle< Muon::IMuonSegmentSelectionTool > m_segmentSelector
Definition: MuonSegmentTagTool.h:80
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
MuonCombined::MuonSegmentTagTool::SortedSegmentMap
std::map< int, std::vector< const Muon::MuonSegment * > > SortedSegmentMap
The segment vector is sorted into a map where the key is the associated surface definition of each se...
Definition: MuonSegmentTagTool.h:61
MuonCombined::MuonSegmentTagTool::printTable
void printTable(const std::vector< std::string > &didEx, const std::vector< std::string > &segStation, const std::vector< std::vector< std::string >> &segToSurf) const
method for extra DEBUG
Definition: MuonSegmentTagTool.cxx:464
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
MuonCombined::MuonSegmentTagTool::m_nmdtHoles
Gaudi::Property< unsigned int > m_nmdtHoles
Definition: MuonSegmentTagTool.h:95
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Muon::IMuonSegmentHitSummaryTool::HitCounts::nphiTrigHitLayers
uint8_t nphiTrigHitLayers
Number of eta stereo hits.
Definition: IMuonSegmentHitSummaryTool.h:51
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonCombined::MuonSegmentTagTool::getPropDistance
static double getPropDistance(const Trk::TrackParameters &start_pars, const Trk::Surface &target_surf)
Returns the straight line distance estimation of the parameters to the surface.
Definition: MuonSegmentTagTool.cxx:626
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
MuonCombined::MuonSegmentTagTool::m_ignoreSiAssocated
Gaudi::Property< bool > m_ignoreSiAssocated
Definition: MuonSegmentTagTool.h:99
Muon::IMuonSegmentHitSummaryTool::HitCounts
Definition: IMuonSegmentHitSummaryTool.h:37
MuonCombined::MuonSegmentTagTool::m_natMSEntrance
std::atomic_uint m_natMSEntrance
Definition: MuonSegmentTagTool.h:109
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
Muon::IMuonSegmentHitSummaryTool::HitCounts::nmdtHoles
uint8_t nmdtHoles
Definition: IMuonSegmentHitSummaryTool.h:42
Muon::IMuonSegmentHitSummaryTool::HitCounts::ncscHits
EtaPhiHitCount ncscHits
Definition: IMuonSegmentHitSummaryTool.h:45
MuonCombined::MuonSegmentTagTool::m_printer
ToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition: MuonSegmentTagTool.h:75
a
TList * a
Definition: liststreamerinfos.cxx:10
MuonCombined::MuonSegmentTagTool::m_npmatch
std::atomic_uint m_npmatch
Definition: MuonSegmentTagTool.h:108
h
Amg::intersect
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the closest approach of two lines.
Definition: GeoPrimitivesHelpers.h:302
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonCombined
The MuonTagToSegMap is an auxillary construct that links the MuonSegments associated with a combined ...
Definition: IMuonSystemExtensionTool.h:23
Muon::nsw::STGTPSegments::MergedSegmentProperty::dTheta
@ dTheta
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:569
Muon::MuonSystemExtension::layerIntersections
const std::vector< Intersection > & layerIntersections() const
access to the intersections with the layers.
Definition: MuonSystemExtension.h:62
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
MuonHough::extrapolate
float extrapolate(const MuonLayerHough::Maximum &ref, const MuonLayerHough::Maximum &ex, bool doparabolic=false)
Definition: MuonLayerHough.cxx:519
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
MuonCombined::MuonSegmentTagTool::m_removeLowPLowFieldRegion
Gaudi::Property< bool > m_removeLowPLowFieldRegion
Definition: MuonSegmentTagTool.h:90
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:127
test_pyathena.counter
counter
Definition: test_pyathena.py:15
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
MuonCombined::MuonSegmentTagTool::getCandidateSegments
std::vector< const Muon::MuonSegment * > getCandidateSegments(const std::vector< const Muon::MuonSegment * > &segments) const
Filters the input segments based on the number of hits fit quality etc.
Definition: MuonSegmentTagTool.cxx:504
Muon::MuonStationIndex::EM
@ EM
Definition: MuonStationIndex.h:26
fitman.k
k
Definition: fitman.py:528
Muon::IMuonSegmentHitSummaryTool::HitCounts::nmdtHitsMl2
uint8_t nmdtHitsMl2
Definition: IMuonSegmentHitSummaryTool.h:41