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 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.
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.
const Muon::MuonSectorMapping m_sectorMap {}

Detailed Description

Definition at line 16 of file SegmentSelectionTool.h.

Member Typedef Documentation

◆ HitSummary

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 }
const Muon::MuonSectorMapping m_sectorMap
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)

◆ 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 }
#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 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 }
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.
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex

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

34{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 38 of file SegmentSelectionTool.h.

38{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 36 of file SegmentSelectionTool.h.

36{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 46 of file SegmentSelectionTool.h.

46{ 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 42 of file SegmentSelectionTool.h.

42{this, "minMMSeedHits", 6};

◆ 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.

40{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 48 of file SegmentSelectionTool.h.

48{ 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 50 of file SegmentSelectionTool.h.

50{ 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 52 of file SegmentSelectionTool.h.

52{ this, "minRpcPhiSeedHitsBO", 1};

◆ m_nStgcSeedMinHitCut

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

Definition at line 43 of file SegmentSelectionTool.h.

43{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 54 of file SegmentSelectionTool.h.

54{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 56 of file SegmentSelectionTool.h.

56{this, "minTgcPhiSeedHitsEM", 2};

◆ m_sectorMap

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

Definition at line 58 of file SegmentSelectionTool.h.

58{};

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