ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4::SegmentSelectionTool Class Reference

#include <SegmentSelectionTool.h>

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

Public Member Functions

virtual StatusCode initialize () override final
virtual bool passSeedingQuality (const EventContext &ctx, const xAOD::MuonSegment &segment) const override final
 Returns whether a segment provides enough mdt & phi measurements to use it for track finding seeding.
virtual bool passTrackQuality (const EventContext &ctx, const xAOD::MuonSegment &segment) const override final
 Returns whether a segment passes the base selection quality in order to be picked up onto a track.
virtual bool compatibleForTrack (const EventContext &ctx, const xAOD::MuonSegment &segA, const xAOD::MuonSegment &segB) const override final
 Returns whether two segments are compatible enough to be put both onto the track seed.

Private Attributes

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

Detailed Description

Definition at line 16 of file SegmentSelectionTool.h.

Member Function Documentation

◆ compatibleForTrack()

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

Returns whether two segments are compatible enough to be put both onto the track seed.

Parameters
ctxEvent context to access conditions & geometry data
segmentReference to the segment to consider

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

90 {
92 if(segA.chamberIndex() == segB.chamberIndex() ||
93 segA.etaIndex() * segB.etaIndex() < 0) {
94 return false;
95 }
97 if (!segA.nPhiLayers() && !segB.nPhiLayers()) {
98 return true;
99 }
102 else if (segA.nPhiLayers() && !segB.nPhiLayers()) {
103 if (!ExpandedSector{segA.position().phi()}.isNeighbour(
104 ExpandedSector{static_cast<unsigned>(segB.sector()), ExpandedSector::SectorProjector::center})){
105 return false;
106 }
107 } else if (!segA.nPhiLayers() && segB.nPhiLayers()) {
108 if (!ExpandedSector{segB.position().phi()}.isNeighbour(
109 ExpandedSector{static_cast<unsigned>(segA.sector()), ExpandedSector::SectorProjector::center})){
110 return false;
111 }
112 }
114 else {
116 const double dPhi = std::abs(segA.position().deltaPhi(segB.position()));
117 if (dPhi > 5. * Gaudi::Units::deg) {
118 return false;
119 }
120 }
121 return true;
122 }
@ center
Project the segment onto the overlap with the previous sector.
::Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index.
Amg::Vector3D position() const
Returns the position as Amg::Vector.
int etaIndex() const
Returns the eta index, which corresponds to stationEta in the offline identifiers (and the ).
std::uint8_t nPhiLayers() const
Returns the number of trigger phi hits.
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)

◆ initialize()

StatusCode MuonR4::SegmentSelectionTool::initialize ( )
finaloverridevirtual

Definition at line 15 of file SegmentSelectionTool.cxx.

15 {
16 ATH_CHECK(m_idHelperSvc.retrieve());
17 return StatusCode::SUCCESS;
18 }
#define ATH_CHECK
Evaluate an expression and check for errors.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.

◆ passSeedingQuality()

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

Returns whether a segment provides enough mdt & phi measurements to use it for track finding seeding.

Parameters
ctxEvent context to access conditions & geometry data
segmentReference to the segment to consider

Apply a minimal threshold on the rpc phi trigger hits

Apply another threshold on the TGC trigger hits

Definition at line 19 of file SegmentSelectionTool.cxx.

20 {
21
22 switch (segment.technology()) {
23 using enum TechnologyIndex;
24 case MDT: {
25 if (segment.nPrecisionHits() < m_nMdtSeedHitCut ||
27 return false;
28 }
29 const LayerIndex layIdx {toLayerIndex(segment.chamberIndex())};
31 if (isBarrel(segment.chamberIndex())) {
32 switch (toLayerIndex(segment.chamberIndex())) {
33 using enum LayerIndex;
34 case Inner:
35 case BarrelExtended:
36 return segment.nPhiLayers() >= m_nRpcPhiSeedHitCutBI;
37 case Middle:
38 return segment.nPhiLayers() >= m_nRpcPhiSeedHitCutBM;
39 case Outer:
40 return segment.nPhiLayers() >= m_nRpcPhiSeedHitCutBO;
41 default:
42 break;
43 }
44 } else {
46 switch (layIdx) {
47 using enum LayerIndex;
48 case Extended:
49 return true;
50 case Inner:
51 return segment.nPhiLayers() >= m_nTgcPhiSeedHitCutEI;
52 case Middle:
53 return segment.nPhiLayers() >= m_nTgcPhiSeedHitCutEM;
54 default:
55 break;
56 }
57 }
58 break;
59 }
60 case MM: {
61 return segment.nPrecisionHits() >= m_nMmSeedMinHitCut;
62 }
63 case STGC: {
64 return segment.nPrecisionHits() >= m_nStgcSeedMinHitCut;
65 }
66 default:
67 break;
68 }
69 return false;
70 }
@ STGC
Definition RegSelEnums.h:39
@ MM
Definition RegSelEnums.h:38
@ MDT
Definition RegSelEnums.h:31
Gaudi::Property< unsigned > m_nMdtSeedHitCut
Cut on minimum number of Mdt hits to consider the segment for seeding.
Gaudi::Property< unsigned > m_nRpcPhiSeedHitCutBI
Minimum number of Rpc phi hits in BI to consider the segment for seeding.
Gaudi::Property< unsigned > m_nTgcPhiSeedHitCutEM
Minimum number of Tgc phi hits in EM to consider the segment for seeding.
Gaudi::Property< unsigned > m_nRpcPhiSeedHitCutBM
Minimum number of Rpc phi hits in BM to consider the segment for seeding.
Gaudi::Property< unsigned > m_nTgcPhiSeedHitCutEI
Minimum number of Tgc phi hits in EI to consider the segment for seeding.
Gaudi::Property< unsigned > m_nRpcPhiSeedHitCutBO
Minimum number of Rpc phi hits in BO to consider the segment for seeding.
Gaudi::Property< unsigned > m_nStgcSeedMinHitCut
Gaudi::Property< unsigned > m_nMmSeedMinHitCut
Minimum number of Nsw hits for seeding.
Gaudi::Property< unsigned > m_nMdtSeedOutlierCut
Minimun.
std::uint8_t nPrecisionOutliers() const
Returns the number of precision outliers.
std::uint8_t nPrecisionHits() const
Returns the number of precision hits.
::Muon::MuonStationIndex::TechnologyIndex technology() const
Returns the main technology of the segment.
TechnologyIndex
enum to classify the different layers in the muon spectrometer
bool isBarrel(const ChIndex index)
Returns true if the chamber index points to a barrel chamber.
LayerIndex
enum to classify the different layers in the muon spectrometer
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex

◆ passTrackQuality()

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

Returns whether a segment passes the base selection quality in order to be picked up onto a track.

Parameters
ctxEvent context to access conditions & geometry data
segmentReference to the segment to consider

Definition at line 72 of file SegmentSelectionTool.cxx.

73 {
74 switch (segment.technology()) {
75 using enum TechnologyIndex;
76 case MDT: {
77 return segment.nPrecisionHits() >= m_nMdtMinHitCut;
78 }
79 case MM:
80 case STGC:{
81 return segment.nPrecisionHits() >= m_nMdtMinHitCut;
82 }
83 default:
84 break;
85 }
86 return false;
87 }
Gaudi::Property< unsigned > m_nMdtMinHitCut
Cut on minimum number of Mdt hits to consider the segment for tracking.

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 35 of file SegmentSelectionTool.h.

35{this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ 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 39 of file SegmentSelectionTool.h.

39{this, "minMdtHits" , 3};

◆ 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 37 of file SegmentSelectionTool.h.

37{this, "minMdtSeedHits" , 4};

◆ 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 47 of file SegmentSelectionTool.h.

47{ this, "maxMdtOutliers", 15};

◆ m_nMmSeedMinHitCut

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

Minimum number of Nsw hits for seeding.

Definition at line 43 of file SegmentSelectionTool.h.

43{this, "minMMSeedHits", 6};

◆ m_nNswMinHitCut

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

Minimum number of Nsw hits.

Definition at line 41 of file SegmentSelectionTool.h.

41{this, "minNswHits", 5};

◆ 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 49 of file SegmentSelectionTool.h.

49{ this, "minRpcPhiSeedHitsBI", 2};

◆ 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 51 of file SegmentSelectionTool.h.

51{ this, "minRpcPhiSeedHitsBM", 2};

◆ 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 53 of file SegmentSelectionTool.h.

53{ this, "minRpcPhiSeedHitsBO", 1};

◆ m_nStgcSeedMinHitCut

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

Definition at line 44 of file SegmentSelectionTool.h.

44{this, "minsTgcSeedHits", 6};

◆ 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 55 of file SegmentSelectionTool.h.

55{this, "minTgcPhiSeedHitsEI", 1};

◆ 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 57 of file SegmentSelectionTool.h.

57{this, "minTgcPhiSeedHitsEM", 2};

The documentation for this class was generated from the following files: