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_nMdtSeedOutlierCut { this, "maxMdtOutliers", 15}
 Cont on maximum number of outlies to consider the segment for seeding. 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

Segment sector deviates too much

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 82 of file SegmentSelectionTool.cxx.

84  {
86  if(segA.msSector() == segB.msSector()) {
87  return false;
88  }
90  const unsigned secMax = Muon::MuonStationIndex::numberOfSectors();
91  const unsigned deltaSec = std::abs(segA.msSector()->sector() - segB.msSector()->sector()) % secMax;
92  if (deltaSec > 1) {
93  return false;
94  }
95  const HitSummary& sumA = segA.summary();
96  const HitSummary& sumB = segB.summary();
98  if (!sumA.nPhiHits && !sumB.nPhiHits) {
99  return true;
100  }
103  else if (sumA.nPhiHits && !sumB.nPhiHits) {
104  if (!m_sectorMap.insideSector(segB.msSector()->sector(), segA.position().phi())){
105  return false;
106  }
107  } else if (!sumA.nPhiHits && sumB.nPhiHits) {
108  if (!m_sectorMap.insideSector(segA.msSector()->sector(), segB.position().phi())) {
109  return false;
110  }
111  }
113  else {
115  const double dPhi = std::abs(segA.position().deltaPhi(segB.position()));
116  if (dPhi > 5. * Gaudi::Units::deg) {
117  return false;
118  }
119  }
120  return true;
121  }

◆ initialize()

StatusCode MuonR4::SegmentSelectionTool::initialize ( )
finaloverridevirtual

Definition at line 14 of file SegmentSelectionTool.cxx.

14  {
15  ATH_CHECK(m_idHelperSvc.retrieve());
16  return StatusCode::SUCCESS;
17  }

◆ 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 18 of file SegmentSelectionTool.cxx.

19  {
20  const HitSummary& summary = segment.summary();
21 
22  switch (summary.tech) {
24  if (summary.nPrecHits < m_nMdtSeedHitCut || summary.nPrecOutlier > m_nMdtSeedOutlierCut){
25  return false;
26  }
27  const LayIdx_t layIdx {Muon::MuonStationIndex::toLayerIndex(segment.msSector()->chamberIndex())};
29  if (segment.msSector()->barrel()) {
30  switch (layIdx) {
31  case LayIdx_t::Inner:
32  case LayIdx_t::BarrelExtended:
33  return summary.nPhiHits >= m_nRpcPhiSeedHitCutBI;
34  case LayIdx_t::Middle:
35  return summary.nPhiHits >= m_nRpcPhiSeedHitCutBM;
36  case LayIdx_t::Outer:
37  return summary.nPhiHits >= m_nRpcPhiSeedHitCutBO;
38  default:
39  break;
40  }
41  } else {
43  switch (layIdx) {
44  case LayIdx_t::Inner:
45  case LayIdx_t::Extended:
46  return summary.nPhiHits >= m_nTgcPhiSeedHitCutEI;
47  case LayIdx_t::Middle:
48  return summary.nPhiHits >= m_nTgcPhiSeedHitCutEM;
49  default:
50  break;
51  }
52  }
53  break;
54  }
57  ATH_MSG_ALWAYS(__FILE__<<":"<<__LINE__<<" Implement me");
58  break;
59  }
60  default:
61  break;
62  }
63  return false;
64  }

◆ passTrackQuality()

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

Definition at line 66 of file SegmentSelectionTool.cxx.

67  {
68  const HitSummary& summary = segment.summary();
69  switch (summary.tech) {
71  return summary.nPrecHits >= m_nMdtMinHitCut;
72  }
75  return summary.nPrecHits >= m_nMdtMinHitCut;
76  }
77  default:
78  break;
79  }
80  return false;
81  }

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

Cont on maximum number of outlies to consider the segment 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 44 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 46 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 48 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 50 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 52 of file SegmentSelectionTool.h.

◆ m_sectorMap

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

Definition at line 54 of file SegmentSelectionTool.h.


The documentation for this class was generated from the following files:
MuonR4::SegmentSelectionTool::m_nMdtSeedOutlierCut
Gaudi::Property< unsigned > m_nMdtSeedOutlierCut
Cont on maximum number of outlies to consider the segment for seeding.
Definition: SegmentSelectionTool.h:42
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
deg
#define deg
Definition: SbPolyhedron.cxx:17
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
Muon::MuonStationIndex::numberOfSectors
constexpr unsigned numberOfSectors()
return total number of sectors
Definition: MuonStationIndex.h:118
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:44
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:54
ATH_MSG_ALWAYS
#define ATH_MSG_ALWAYS(x)
Definition: AthMsgStreamMacros.h:35
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:48
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:46
MuonR4::SegmentSelectionTool::HitSummary
Segment::HitSummary HitSummary
Definition: SegmentSelectionTool.h:19
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, float &out)
Definition: TauGNNUtils.cxx:412
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:52
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:50
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65