ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
MuonR4::SegmentSelectionTool Class Reference

#include <SegmentSelectionTool.h>

Inheritance diagram for MuonR4::SegmentSelectionTool:
Collaboration diagram for MuonR4::SegmentSelectionTool:

Public Types

using HitSummary = Segment::HitSummary
 

Public Member Functions

virtual StatusCode initialize () override final
 
virtual bool passSeedingQuality (const EventContext &ctx, const Segment &segment) const override final
 
virtual bool passTrackQuality (const EventContext &ctx, const Segment &segment) const override final
 
virtual bool compatibleForTrack (const EventContext &ctx, const Segment &segA, const Segment &segB) const override final
 

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 IdHelperSvc to decode the Identifiers. More...
 
Gaudi::Property< unsigned > m_nMdtSeedHitCut {this, "minMdtSeedHits" , 4}
 Cut on minimum number of Mdt hits to consider the segment for seeding
More...
 
Gaudi::Property< unsigned > m_nMdtMinHitCut {this, "minMdtHits" , 3}
 Cut on minimum number of Mdt hits to consider the segment for tracking. More...
 
Gaudi::Property< unsigned > m_nNswMinHitCut {this, "minNswHits", 5}
 Minimum number of Nsw hits. More...
 
Gaudi::Property< unsigned > m_nMmSeedMinHitCut {this, "minMMSeedHits", 6}
 Minimum number of Nsw hits for seeding. More...
 
Gaudi::Property< unsigned > m_nStgcSeedMinHitCut {this, "minsTgcSeedHits", 6}
 
Gaudi::Property< unsigned > m_nMdtSeedOutlierCut { this, "maxMdtOutliers", 15}
 Minimun. More...
 
Gaudi::Property< unsigned > m_nRpcPhiSeedHitCutBI { this, "minRpcPhiSeedHitsBI", 2}
 Minimum number of Rpc phi hits in BI to consider the segment for seeding. More...
 
Gaudi::Property< unsigned > m_nRpcPhiSeedHitCutBM { this, "minRpcPhiSeedHitsBM", 2}
 Minimum number of Rpc phi hits in BM to consider the segment for seeding. More...
 
Gaudi::Property< unsigned > m_nRpcPhiSeedHitCutBO { this, "minRpcPhiSeedHitsBO", 1}
 Minimum number of Rpc phi hits in BO to consider the segment for seeding. More...
 
Gaudi::Property< unsigned > m_nTgcPhiSeedHitCutEI {this, "minTgcPhiSeedHitsEI", 1}
 Minimum number of Tgc phi hits in EI to consider the segment for seeding. More...
 
Gaudi::Property< unsigned > m_nTgcPhiSeedHitCutEM {this, "minTgcPhiSeedHitsEM", 2}
 Minimum number of Tgc phi hits in EM to consider the segment for seeding. More...
 
const Muon::MuonSectorMapping m_sectorMap {}
 

Detailed Description

Definition at line 16 of file SegmentSelectionTool.h.

Member Typedef Documentation

◆ HitSummary

Definition at line 19 of file SegmentSelectionTool.h.

Member Function Documentation

◆ compatibleForTrack()

bool MuonR4::SegmentSelectionTool::compatibleForTrack ( const EventContext &  ctx,
const Segment segA,
const Segment segB 
) const
finaloverridevirtual

Segment is on the same spectrometer layer

If both segments don't have phi information, then they may be compatible

If one segment has phi information and the other doesn't then just check whether it's possible that the segment with phi is also in the same sector as the other

Both segments have phi information. Ensure that their phi is within 5 degrees

Accept only segments that are 5 degree apart

Definition at line 86 of file SegmentSelectionTool.cxx.

88  {
90  if(segA.msSector() == segB.msSector()) {
91  return false;
92  }
93  const HitSummary& sumA = segA.summary();
94  const HitSummary& sumB = segB.summary();
96  if (!sumA.nPhiHits && !sumB.nPhiHits) {
97  return true;
98  }
101  else if (sumA.nPhiHits && !sumB.nPhiHits) {
102  if (!m_sectorMap.insideSector(segB.msSector()->sector(), segA.position().phi())){
103  return false;
104  }
105  } else if (!sumA.nPhiHits && sumB.nPhiHits) {
106  if (!m_sectorMap.insideSector(segA.msSector()->sector(), segB.position().phi())) {
107  return false;
108  }
109  }
111  else {
113  const double dPhi = std::abs(segA.position().deltaPhi(segB.position()));
114  if (dPhi > 5. * Gaudi::Units::deg) {
115  return false;
116  }
117  }
118  return true;
119  }

◆ initialize()

StatusCode MuonR4::SegmentSelectionTool::initialize ( )
finaloverridevirtual

Definition at line 16 of file SegmentSelectionTool.cxx.

16  {
17  ATH_CHECK(m_idHelperSvc.retrieve());
18  return StatusCode::SUCCESS;
19  }

◆ passSeedingQuality()

bool MuonR4::SegmentSelectionTool::passSeedingQuality ( const EventContext &  ctx,
const Segment segment 
) const
finaloverridevirtual

Apply a minimal threshold on the rpc phi trigger hits

Apply another threshold on the TGC trigger hits

Definition at line 20 of file SegmentSelectionTool.cxx.

21  {
22  const HitSummary& summary = segment.summary();
23 
24  switch (summary.tech) {
26  if (summary.nPrecHits < m_nMdtSeedHitCut || summary.nPrecOutlier > m_nMdtSeedOutlierCut){
27  return false;
28  }
29  const LayIdx_t layIdx {Muon::MuonStationIndex::toLayerIndex(segment.msSector()->chamberIndex())};
31  if (segment.msSector()->barrel()) {
32  switch (layIdx) {
33  case LayIdx_t::Inner:
34  case LayIdx_t::BarrelExtended:
35  return summary.nPhiHits >= m_nRpcPhiSeedHitCutBI;
36  case LayIdx_t::Middle:
37  return summary.nPhiHits >= m_nRpcPhiSeedHitCutBM;
38  case LayIdx_t::Outer:
39  return summary.nPhiHits >= m_nRpcPhiSeedHitCutBO;
40  default:
41  break;
42  }
43  } else {
45  switch (layIdx) {
46  case LayIdx_t::Extended:
47  return true;
48  case LayIdx_t::Inner:
49  return summary.nPhiHits >= m_nTgcPhiSeedHitCutEI;
50  case LayIdx_t::Middle:
51  return summary.nPhiHits >= m_nTgcPhiSeedHitCutEM;
52  default:
53  break;
54  }
55  }
56  break;
57  }
59  return summary.nPrecHits >= m_nMmSeedMinHitCut;
60  }
62  return summary.nPrecHits >= m_nStgcSeedMinHitCut;
63  }
64  default:
65  break;
66  }
67  return false;
68  }

◆ passTrackQuality()

bool MuonR4::SegmentSelectionTool::passTrackQuality ( const EventContext &  ctx,
const Segment segment 
) const
finaloverridevirtual

Definition at line 70 of file SegmentSelectionTool.cxx.

71  {
72  const HitSummary& summary = segment.summary();
73  switch (summary.tech) {
75  return summary.nPrecHits >= m_nMdtMinHitCut;
76  }
79  return summary.nPrecHits >= m_nMdtMinHitCut;
80  }
81  default:
82  break;
83  }
84  return false;
85  }

Member Data Documentation

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MuonR4::SegmentSelectionTool::m_idHelperSvc {this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

IdHelperSvc to decode the Identifiers.

Definition at line 34 of file SegmentSelectionTool.h.

◆ m_nMdtMinHitCut

Gaudi::Property<unsigned> MuonR4::SegmentSelectionTool::m_nMdtMinHitCut {this, "minMdtHits" , 3}
private

Cut on minimum number of Mdt hits to consider the segment for tracking.

Definition at line 38 of file SegmentSelectionTool.h.

◆ m_nMdtSeedHitCut

Gaudi::Property<unsigned> MuonR4::SegmentSelectionTool::m_nMdtSeedHitCut {this, "minMdtSeedHits" , 4}
private

Cut on minimum number of Mdt hits to consider the segment for seeding

Definition at line 36 of file SegmentSelectionTool.h.

◆ m_nMdtSeedOutlierCut

Gaudi::Property<unsigned> MuonR4::SegmentSelectionTool::m_nMdtSeedOutlierCut { this, "maxMdtOutliers", 15}
private

Minimun.

Cont on maximum number of outlies to consider the segment for seeding

Definition at line 46 of file SegmentSelectionTool.h.

◆ m_nMmSeedMinHitCut

Gaudi::Property<unsigned> MuonR4::SegmentSelectionTool::m_nMmSeedMinHitCut {this, "minMMSeedHits", 6}
private

Minimum number of Nsw hits for seeding.

Definition at line 42 of file SegmentSelectionTool.h.

◆ m_nNswMinHitCut

Gaudi::Property<unsigned> MuonR4::SegmentSelectionTool::m_nNswMinHitCut {this, "minNswHits", 5}
private

Minimum number of Nsw hits.

Definition at line 40 of file SegmentSelectionTool.h.

◆ m_nRpcPhiSeedHitCutBI

Gaudi::Property<unsigned> MuonR4::SegmentSelectionTool::m_nRpcPhiSeedHitCutBI { this, "minRpcPhiSeedHitsBI", 2}
private

Minimum number of Rpc phi hits in BI to consider the segment for seeding.

Definition at line 48 of file SegmentSelectionTool.h.

◆ m_nRpcPhiSeedHitCutBM

Gaudi::Property<unsigned> MuonR4::SegmentSelectionTool::m_nRpcPhiSeedHitCutBM { this, "minRpcPhiSeedHitsBM", 2}
private

Minimum number of Rpc phi hits in BM to consider the segment for seeding.

Definition at line 50 of file SegmentSelectionTool.h.

◆ m_nRpcPhiSeedHitCutBO

Gaudi::Property<unsigned> MuonR4::SegmentSelectionTool::m_nRpcPhiSeedHitCutBO { this, "minRpcPhiSeedHitsBO", 1}
private

Minimum number of Rpc phi hits in BO to consider the segment for seeding.

Definition at line 52 of file SegmentSelectionTool.h.

◆ m_nStgcSeedMinHitCut

Gaudi::Property<unsigned> MuonR4::SegmentSelectionTool::m_nStgcSeedMinHitCut {this, "minsTgcSeedHits", 6}
private

Definition at line 43 of file SegmentSelectionTool.h.

◆ m_nTgcPhiSeedHitCutEI

Gaudi::Property<unsigned> MuonR4::SegmentSelectionTool::m_nTgcPhiSeedHitCutEI {this, "minTgcPhiSeedHitsEI", 1}
private

Minimum number of Tgc phi hits in EI to consider the segment for seeding.

Definition at line 54 of file SegmentSelectionTool.h.

◆ m_nTgcPhiSeedHitCutEM

Gaudi::Property<unsigned> MuonR4::SegmentSelectionTool::m_nTgcPhiSeedHitCutEM {this, "minTgcPhiSeedHitsEM", 2}
private

Minimum number of Tgc phi hits in EM to consider the segment for seeding.

Definition at line 56 of file SegmentSelectionTool.h.

◆ m_sectorMap

const Muon::MuonSectorMapping MuonR4::SegmentSelectionTool::m_sectorMap {}
private

Definition at line 58 of file SegmentSelectionTool.h.


The documentation for this class was generated from the following files:
MuonR4::SegmentSelectionTool::m_nMdtSeedOutlierCut
Gaudi::Property< unsigned > m_nMdtSeedOutlierCut
Minimun.
Definition: SegmentSelectionTool.h:46
MuonR4::SegmentSelectionTool::m_nStgcSeedMinHitCut
Gaudi::Property< unsigned > m_nStgcSeedMinHitCut
Definition: SegmentSelectionTool.h:43
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
deg
#define deg
Definition: SbPolyhedron.cxx:17
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
TauClusterVars::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
Definition: ConstituentLoaderTauCluster.cxx:119
Muon::MuonSectorMapping::insideSector
bool insideSector(int sector, double phi) const
checks whether the phi position is consistent with sector
Definition: MuonSectorMapping.h:74
MuonR4::SegmentSelectionTool::m_nRpcPhiSeedHitCutBI
Gaudi::Property< unsigned > m_nRpcPhiSeedHitCutBI
Minimum number of Rpc phi hits in BI to consider the segment for seeding.
Definition: SegmentSelectionTool.h:48
MuonR4::SegmentSelectionTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.
Definition: SegmentSelectionTool.h:34
MuonR4::SegmentSelectionTool::m_sectorMap
const Muon::MuonSectorMapping m_sectorMap
Definition: SegmentSelectionTool.h:58
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MuonR4::SegmentSelectionTool::m_nMdtSeedHitCut
Gaudi::Property< unsigned > m_nMdtSeedHitCut
Cut on minimum number of Mdt hits to consider the segment for seeding
Definition: SegmentSelectionTool.h:36
MuonR4::SegmentSelectionTool::m_nRpcPhiSeedHitCutBO
Gaudi::Property< unsigned > m_nRpcPhiSeedHitCutBO
Minimum number of Rpc phi hits in BO to consider the segment for seeding.
Definition: SegmentSelectionTool.h:52
MuonR4::SegmentSelectionTool::m_nRpcPhiSeedHitCutBM
Gaudi::Property< unsigned > m_nRpcPhiSeedHitCutBM
Minimum number of Rpc phi hits in BM to consider the segment for seeding.
Definition: SegmentSelectionTool.h:50
MuonR4::SegmentSelectionTool::HitSummary
Segment::HitSummary HitSummary
Definition: SegmentSelectionTool.h:19
MuonR4::SegmentSelectionTool::m_nMmSeedMinHitCut
Gaudi::Property< unsigned > m_nMmSeedMinHitCut
Minimum number of Nsw hits for seeding.
Definition: SegmentSelectionTool.h:42
Muon::MuonStationIndex::toLayerIndex
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
MuonR4::SegmentSelectionTool::m_nTgcPhiSeedHitCutEM
Gaudi::Property< unsigned > m_nTgcPhiSeedHitCutEM
Minimum number of Tgc phi hits in EM to consider the segment for seeding.
Definition: SegmentSelectionTool.h:56
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
MuonR4::SegmentSelectionTool::m_nMdtMinHitCut
Gaudi::Property< unsigned > m_nMdtMinHitCut
Cut on minimum number of Mdt hits to consider the segment for tracking.
Definition: SegmentSelectionTool.h:38
MuonR4::SegmentSelectionTool::m_nTgcPhiSeedHitCutEI
Gaudi::Property< unsigned > m_nTgcPhiSeedHitCutEI
Minimum number of Tgc phi hits in EI to consider the segment for seeding.
Definition: SegmentSelectionTool.h:54
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65