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

#include <TrackSummaryTool.h>

Inheritance diagram for MuonR4::TrackSummaryTool:
Collaboration diagram for MuonR4::TrackSummaryTool:

Public Member Functions

virtual StatusCode initialize () override final
virtual HitSummary makeSummary (const EventContext &ctx, const ConstTrack_t trackProxy) const override final
virtual HitSummary makeSummary (const EventContext &ctx, const Track_t trackProxy) const override final
virtual HitSummary makeSummary (const EventContext &ctx, std::span< const xAOD::MuonSegment *const > segments) const override final
virtual HitSummary makeSummary (const EventContext &ctx, const Trk::Track &track) const override final
virtual void copySummary (const HitSummary &summary, const xAOD::IParticle &track) const override final

Private Types

using Stat_t = HitSummary::Status

Private Member Functions

void incrementSummary (const Identifier &hitId, const Stat_t status, const unsigned prdDim, HitSummary &summary) const
 Increments the hit summary based on the identifier extracted from the measurement.
template<Acts::TrackProxyConcept T>
HitSummary makeSummaryImpl (const EventContext &ctx, const T &track) const
 Implementation for making a hit summary.
void complementaryHole (const Identifier &gasGapId, const MuonGMR4::MuonReadoutElement *reEle, HitSummary &summary) const
 Checks whether a measurement state is expected for the complementary readout plane for a given gasGapId.

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "IdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 IdHelperSvc to decode the Identifiers.
Gaudi::Property< bool > m_fillHoles {this, "fillHoles", true}
 Toggle whether holes states shall be copied to the xAOD object.
Gaudi::Property< bool > m_fillOutliers {this, "fillOutliers", true}
 Toggle whether outlier states shall be copied to the xAOD object.
Gaudi::Property< bool > m_reDoSegments {this, "recomputeSegment", true}
 Toggle whether the segment summary shall be recomputed.

Detailed Description

Member Typedef Documentation

◆ Stat_t

Member Function Documentation

◆ complementaryHole()

void MuonR4::TrackSummaryTool::complementaryHole ( const Identifier & gasGapId,
const MuonGMR4::MuonReadoutElement * reEle,
HitSummary & summary ) const
private

Checks whether a measurement state is expected for the complementary readout plane for a given gasGapId.

(E.g. in case of phi gasGap, the check is performed for the eta ones and vice versa). Increments the hole summary if complementary hit is expected

Parameters
gasGapIdIdentifier of the trigger gasgap of interest
reEleAssociated readout element to the gas gap
summaryReference to the summary where the counts shall be incremented

Definition at line 33 of file MuonSpectrometer/MuonPhaseII/MuonTrackBuilding/MuonTrackFindingTools/src/TrackSummaryTool.cxx.

35 {
36 if (!reEle) {
37 ATH_MSG_WARNING(__func__<<"() "<<__LINE__<<" - No readout element associated "
38 <<m_idHelperSvc->toString(gasGapId));
39 return;
40 }
41 const bool measPhi = m_idHelperSvc->measuresPhi(gasGapId);
42 switch(reEle->detectorType()) {
43 using enum ActsTrk::DetectorType;
44 case Rpc:{
45 const auto* castRE = static_cast<const MuonGMR4::RpcReadoutElement*>(reEle);
46 if (castRE->nPhiStrips() || measPhi) {
47 const RpcIdHelper& idHelper{m_idHelperSvc->rpcIdHelper()};
48 const Identifier holeId = idHelper.panelID(gasGapId, idHelper.gasGap(gasGapId), !measPhi);
49 incrementSummary(holeId, Stat_t::Hole, 1, summary);
50 }
51 break;
52 } case Tgc: {
53 const auto* castRE = static_cast<const MuonGMR4::TgcReadoutElement*>(reEle);
54 const TgcIdHelper& idHelper{m_idHelperSvc->tgcIdHelper()};
55 const Identifier holeId = idHelper.channelID(gasGapId,
56 idHelper.gasGap(gasGapId), !measPhi, 1);
57
58 if (castRE->numChannels(castRE->measurementHash(holeId))){
59 incrementSummary(holeId, Stat_t::Hole, 1, summary);
60 }
61 break;
62 } case sTgc: {
63 const sTgcIdHelper& idHelper{m_idHelperSvc->stgcIdHelper()};
64 switch (idHelper.channelType(gasGapId)) {
66 case Strip:
67 incrementSummary(idHelper.channelID(gasGapId,
68 idHelper.multilayer(gasGapId),
69 idHelper.gasGap(gasGapId), Wire, 1),
70 Stat_t::Hole, 1, summary);
71 break;
72 case Wire:
73 incrementSummary(idHelper.channelID(gasGapId,
74 idHelper.multilayer(gasGapId),
75 idHelper.gasGap(gasGapId), Strip, 1),
76 Stat_t::Hole, 1, summary);
77 default:
78 break;
79 }
80 }
81 default:
82 break;
83 }
84 }
#define ATH_MSG_WARNING(x)
virtual DetectorType detectorType() const =0
Returns the detector element type.
void incrementSummary(const Identifier &hitId, const Stat_t status, const unsigned prdDim, HitSummary &summary) const
Increments the hit summary based on the identifier extracted from the measurement.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
IdHelperSvc to decode the Identifiers.
int gasGap(const Identifier &id) const override
get the hashes
Identifier panelID(const Identifier &padID, int gasGap, int measuresPhi) const
int gasGap(const Identifier &id) const override
get the hashes
Identifier channelID(int stationName, int stationEta, int stationPhi, int gasGap, int isStrip, int channel) const
int multilayer(const Identifier &id) const
int channelType(const Identifier &id) const
int gasGap(const Identifier &id) const override
get the hashes
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channelType, int channel) const
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.
@ Tgc
Resitive Plate Chambers.
@ sTgc
Micromegas (NSW).
@ Rpc
Monitored Drift Tubes.

◆ copySummary()

void MuonR4::TrackSummaryTool::copySummary ( const HitSummary & summary,
const xAOD::IParticle & track ) const
finaloverridevirtual

Precision hits

Trigger hits

Definition at line 273 of file MuonSpectrometer/MuonPhaseII/MuonTrackBuilding/MuonTrackFindingTools/src/TrackSummaryTool.cxx.

274 {
275 ATH_MSG_DEBUG("Copy the summary \n "<<summary<<"\n pT: "<<(track.pt() * 1.e-3)
276 <<", eta: "<<track.eta()<<", phi: "<<track.phi());
277
278 auto acc = [&track](const xAOD::MuonSummaryType type) -> std::uint8_t& {
279 const std::string accName = SG::AuxTypeRegistry::instance().getName(
281 const SG::Decorator<std::uint8_t> dec{accName};
282 return dec(track);
283 };
284 using enum xAOD::MuonSummaryType;
286 acc(innerSmallHits) = summary.value(Cat_t::Precision, Stat_t::OnTrack, LayerIndex::Inner, true);
287 acc(innerLargeHits) = summary.value(Cat_t::Precision, Stat_t::OnTrack, LayerIndex::Inner, false);
288 acc(middleSmallHits) = summary.value(Cat_t::Precision, Stat_t::OnTrack, LayerIndex::Middle, true);
289 acc(middleLargeHits) = summary.value(Cat_t::Precision, Stat_t::OnTrack, LayerIndex::Middle, false);
290 acc(outerSmallHits) = summary.value(Cat_t::Precision, Stat_t::OnTrack, LayerIndex::Outer, true);
291 acc(outerLargeHits) = summary.value(Cat_t::Precision, Stat_t::OnTrack, LayerIndex::Outer, false);
292 acc(extendedSmallHits) = summary.value(Cat_t::Precision, Stat_t::OnTrack, LayerIndex::Extended, true);
293 acc(extendedLargeHits) = summary.value(Cat_t::Precision, Stat_t::OnTrack, LayerIndex::Extended, false);
294 if (m_fillHoles) {
295 acc(innerSmallHoles) = summary.value(Cat_t::Precision, Stat_t::Hole, LayerIndex::Inner, true);
296 acc(innerLargeHoles) = summary.value(Cat_t::Precision, Stat_t::Hole, LayerIndex::Inner, false);
297 acc(middleSmallHoles) = summary.value(Cat_t::Precision, Stat_t::Hole, LayerIndex::Middle, true);
298 acc(middleLargeHoles) = summary.value(Cat_t::Precision, Stat_t::Hole, LayerIndex::Middle, false);
299 acc(outerSmallHoles) = summary.value(Cat_t::Precision, Stat_t::Hole, LayerIndex::Outer, true);
300 acc(outerLargeHoles) = summary.value(Cat_t::Precision, Stat_t::Hole, LayerIndex::Outer, false);
301 acc(extendedSmallHoles) = summary.value(Cat_t::Precision, Stat_t::Hole, LayerIndex::Extended, true);
302 acc(extendedLargeHoles) = summary.value(Cat_t::Precision, Stat_t::Hole, LayerIndex::Extended, false);
303 }
304 if (m_fillOutliers) {
305 acc(innerClosePrecisionHits) = summary.value(Cat_t::Precision, Stat_t::Outlier, LayerIndex::Inner, false)
306 + summary.value(Cat_t::Precision, Stat_t::Outlier, LayerIndex::Inner, true);
307
308 acc(middleClosePrecisionHits) = summary.value(Cat_t::Precision, Stat_t::Outlier, LayerIndex::Middle, false)
309 + summary.value(Cat_t::Precision, Stat_t::Outlier, LayerIndex::Middle, true);
310
311 acc(outerClosePrecisionHits) = summary.value(Cat_t::Precision, Stat_t::Outlier, LayerIndex::Outer, false)
312 + summary.value(Cat_t::Precision, Stat_t::Outlier, LayerIndex::Outer, true);
313
314 acc(extendedClosePrecisionHits) = summary.value(Cat_t::Precision, Stat_t::Outlier, LayerIndex::Extended, false)
315 + summary.value(Cat_t::Precision, Stat_t::Outlier, LayerIndex::Extended, true);
316 }
317
319 acc(innerTriggerEtaHits) = summary.value(Cat_t::TriggerEta, Stat_t::OnTrack, LayerIndex::Inner, true)
320 + summary.value(Cat_t::TriggerEta, Stat_t::OnTrack, LayerIndex::Inner, false);
321
322 acc(middleTriggerEtaHits) = summary.value(Cat_t::TriggerEta, Stat_t::OnTrack, LayerIndex::Middle, true)
323 + summary.value(Cat_t::TriggerEta, Stat_t::OnTrack, LayerIndex::Middle, false);
324
325 acc(outerTriggerEtaHits) = summary.value(Cat_t::TriggerEta, Stat_t::OnTrack, LayerIndex::Outer, true)
326 + summary.value(Cat_t::TriggerEta, Stat_t::OnTrack, LayerIndex::Outer, false);
327
328
329 if (m_fillHoles) {
330 acc(innerTriggerEtaHoles) = summary.value(Cat_t::TriggerEta, Stat_t::Hole, LayerIndex::Inner, true)
331 + summary.value(Cat_t::TriggerEta, Stat_t::Hole, LayerIndex::Inner, false);
332
333 acc(middleTriggerEtaHoles) = summary.value(Cat_t::TriggerEta, Stat_t::Hole, LayerIndex::Middle, true)
334 + summary.value(Cat_t::TriggerEta, Stat_t::Hole, LayerIndex::Middle, false);
335
336 acc(outerTriggerEtaHoles) = summary.value(Cat_t::TriggerEta, Stat_t::Hole, LayerIndex::Outer, true)
337 + summary.value(Cat_t::TriggerEta, Stat_t::Hole, LayerIndex::Outer, false);
338 }
339 acc(innerTriggerPhiHits) = summary.value(Cat_t::TriggerPhi, Stat_t::OnTrack, LayerIndex::Inner, true)
340 + summary.value(Cat_t::TriggerPhi, Stat_t::OnTrack, LayerIndex::Inner, false);
341
342 acc(middleTriggerPhiHits) = summary.value(Cat_t::TriggerPhi, Stat_t::OnTrack, LayerIndex::Middle, true)
343 + summary.value(Cat_t::TriggerPhi, Stat_t::OnTrack, LayerIndex::Middle, false);
344
345 acc(outerTriggerPhiHits) = summary.value(Cat_t::TriggerPhi, Stat_t::OnTrack, LayerIndex::Outer, true)
346 + summary.value(Cat_t::TriggerPhi, Stat_t::OnTrack, LayerIndex::Outer, false);
347
348 if (m_fillHoles) {
349 acc(innerTriggerPhiHoles) = summary.value(Cat_t::TriggerPhi, Stat_t::Hole, LayerIndex::Inner, true)
350 + summary.value(Cat_t::TriggerPhi, Stat_t::Hole, LayerIndex::Inner, false);
351
352 acc(middleTriggerPhiHoles) = summary.value(Cat_t::TriggerPhi, Stat_t::Hole, LayerIndex::Middle, true)
353 + summary.value(Cat_t::TriggerPhi, Stat_t::Hole, LayerIndex::Middle, false);
354
355 acc(outerTriggerPhiHoles) = summary.value(Cat_t::TriggerPhi, Stat_t::Hole, LayerIndex::Outer, true)
356 + summary.value(Cat_t::TriggerPhi, Stat_t::Hole, LayerIndex::Outer, false);
357 }
358 }
#define ATH_MSG_DEBUG(x)
Gaudi::Property< bool > m_fillHoles
Toggle whether holes states shall be copied to the xAOD object.
Gaudi::Property< bool > m_fillOutliers
Toggle whether outlier states shall be copied to the xAOD object.
std::string getName(SG::auxid_t auxid) const
Return the name of an aux data item.
static AuxTypeRegistry & instance()
Return the singleton registry instance.
SG::Decorator< T, ALLOC > Decorator
Helper class to provide type-safe access to aux data, specialized for JaggedVecElt.
Definition AuxElement.h:576
SG::auxid_t auxid() const
Return the aux id for this variable.
const SG::Accessor< uint8_t > & muonTrackSummaryAccessorV1(xAOD::MuonSummaryType type)
Helper function for managing MuonTrackSummary Accessor objects.
MuonSummaryType
Enumerates the different types of information stored in Summary.

◆ incrementSummary()

void MuonR4::TrackSummaryTool::incrementSummary ( const Identifier & hitId,
const Stat_t status,
const unsigned prdDim,
HitSummary & summary ) const
private

Increments the hit summary based on the identifier extracted from the measurement.

Parameters
hitIdIdentifier from the measurement or the hole for which the summary needs to be incremented
statusContribution of the measurement towards the track fit
prdDimDimension of the measurement 0 -> combined measurement (eta + phi), 2 (eta +phi)
summaryReference to the summary where the counts shall be incremented

Hit is not a muon hit

Mdt twin tubes

Combined measurement or it's a 2D BI strip

Definition at line 143 of file MuonSpectrometer/MuonPhaseII/MuonTrackBuilding/MuonTrackFindingTools/src/TrackSummaryTool.cxx.

146 {
148 const TechIdx techIdx = m_idHelperSvc->technologyIndex(hitId);
149
151 if (techIdx == TechIdx::TechnologyUnknown) {
152 return;
153 }
154 const ChIndex chIdx = m_idHelperSvc->chamberIndex(hitId);
155 const LayerIndex layer{toLayerIndex(chIdx)};
156 const bool small{isSmall(chIdx)};
157
158 Cat_t cat1{Cat_t::nCategories}, cat2{Cat_t::nCategories};
159
160 if (techIdx == TechIdx::MDT || techIdx == TechIdx::MM) {
161 cat1 = Cat_t::Precision;
163 if (prdDim == 2){
164 cat2 = Cat_t::TriggerPhi;
165 }
166 } else if (techIdx == TechIdx::RPC || techIdx == TechIdx::TGC) {
168 if (prdDim == 0 || prdDim == 2) {
169 cat1 = Cat_t::TriggerEta;
170 cat2 = Cat_t::TriggerPhi;
171 } else if (m_idHelperSvc->measuresPhi(hitId)) {
172 cat1 = Cat_t::TriggerPhi;
173 } else {
174 cat1 = Cat_t::TriggerEta;
175 }
176 } else if (techIdx == TechIdx::STGC) {
177 switch(m_idHelperSvc->stgcIdHelper().channelType(hitId)) {
179 cat1 = Cat_t::sTgcPad;
180 break;
182 cat1 = Cat_t::TriggerPhi;
183 break;
185 cat1 = Cat_t::Precision;
186 break;
187 } default: {
188 ATH_MSG_ERROR(__FILE__ << ":" << __LINE__ << " Unknown stgc channel type");
189 break;
190 }
191 }
192 } else {
193 ATH_MSG_ERROR(__FILE__ << ":" << __LINE__ << " Unkown technology index "<<techIdx);
194 return;
195 }
196
197 if (cat1 != Cat_t::nCategories){
198 ATH_MSG_VERBOSE("Increment "<<cat1<<", "<<status<<", layer: "
199 <<layer<<", small: "<<(small ? "yes" : "no"));
200 ++summary.value(cat1, status, layer, small);
201 }
202 if (cat2 != Cat_t::nCategories) {
203 ATH_MSG_VERBOSE("Increment "<<cat2<<", "<<status<<", layer: "
204 <<layer<<", small: "<<(small ? "yes" : "no"));
205 ++summary.value(cat2, status, layer, small);
206 }
207 }
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
TechnologyIndex
enum to classify the different layers in the muon spectrometer
bool isSmall(const ChIndex index)
Returns true if the chamber index is in a small sector.
LayerIndex
enum to classify the different layers in the muon spectrometer
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
@ layer
Definition HitInfo.h:79

◆ initialize()

StatusCode MuonR4::TrackSummaryTool::initialize ( )
finaloverridevirtual

Definition at line 29 of file MuonSpectrometer/MuonPhaseII/MuonTrackBuilding/MuonTrackFindingTools/src/TrackSummaryTool.cxx.

29 {
30 ATH_CHECK(m_idHelperSvc.retrieve());
31 return StatusCode::SUCCESS;
32 }
#define ATH_CHECK
Evaluate an expression and check for errors.

◆ makeSummary() [1/4]

HitSummary MuonR4::TrackSummaryTool::makeSummary ( const EventContext & ctx,
const ConstTrack_t trackProxy ) const
finaloverridevirtual

Definition at line 85 of file MuonSpectrometer/MuonPhaseII/MuonTrackBuilding/MuonTrackFindingTools/src/TrackSummaryTool.cxx.

86 {
87 return makeSummaryImpl(ctx, trackProxy);
88 }
HitSummary makeSummaryImpl(const EventContext &ctx, const T &track) const
Implementation for making a hit summary.

◆ makeSummary() [2/4]

HitSummary MuonR4::TrackSummaryTool::makeSummary ( const EventContext & ctx,
const Track_t trackProxy ) const
finaloverridevirtual

◆ makeSummary() [3/4]

HitSummary MuonR4::TrackSummaryTool::makeSummary ( const EventContext & ctx,
const Trk::Track & track ) const
finaloverridevirtual

Definition at line 247 of file MuonSpectrometer/MuonPhaseII/MuonTrackBuilding/MuonTrackFindingTools/src/TrackSummaryTool.cxx.

248 {
249 HitSummary summary{};
250 for (const Trk::TrackStateOnSurface* tsos : *track.trackStateOnSurfaces()) {
252 if (tsos->type(Hole)){
253 incrementSummary(tsos->surface().associatedDetectorElementIdentifier(),
254 Stat_t::Hole, 1, summary);
255 continue;
256 }
257 const auto* meas = tsos->measurementOnTrack();
258 if (!meas) {
259 continue;
260 }
261 Stat_t state = tsos->type(Outlier) ? Stat_t::Outlier : Stat_t::OnTrack;
262 if (const auto* rot = dynamic_cast<const Trk::RIO_OnTrack*>(meas); rot != nullptr) {
263 incrementSummary(rot->identify(), state, 1, summary);
264 } else if (const auto* rot = dynamic_cast<const Trk::CompetingRIOsOnTrack*>(meas); rot != nullptr) {
265 for (unsigned n = 0; n <rot->numberOfContainedROTs(); ++n) {
266 incrementSummary(rot->rioOnTrack(n).identify(), state, 1, summary);
267 }
268 }
269 }
270 return summary;
271 }

◆ makeSummary() [4/4]

HitSummary MuonR4::TrackSummaryTool::makeSummary ( const EventContext & ctx,
std::span< const xAOD::MuonSegment *const > segments ) const
finaloverridevirtual

Definition at line 209 of file MuonSpectrometer/MuonPhaseII/MuonTrackBuilding/MuonTrackFindingTools/src/TrackSummaryTool.cxx.

210 {
211 HitSummary summary{};
212 for (const xAOD::MuonSegment* seg : segments) {
213 const LayerIndex lay = toLayerIndex(seg->chamberIndex());
214 const bool small = isSmall(seg->chamberIndex());
215 if (!m_reDoSegments) {
216 summary.value(Cat_t::Precision, Stat_t::OnTrack, lay, small) = seg->nPrecisionHits();
217 summary.value(Cat_t::TriggerEta, Stat_t::OnTrack, lay, small) = seg->nTrigEtaLayers();
218 summary.value(Cat_t::TriggerPhi, Stat_t::OnTrack, lay, small) = seg->nPhiLayers();
219
220 summary.value(Cat_t::Precision, Stat_t::Outlier, lay, small) = seg->nPrecisionOutliers();
221 summary.value(Cat_t::TriggerEta, Stat_t::Outlier, lay, small) = seg->nTriggerEtaOutliers();
222 summary.value(Cat_t::TriggerPhi, Stat_t::Outlier, lay, small) = seg->nTriggerPhiOutliers();
223
224 summary.value(Cat_t::Precision, Stat_t::Hole, lay, small) = seg->nPrecisionHoles();
225 summary.value(Cat_t::TriggerEta, Stat_t::Hole, lay, small) = seg->nTriggerEtaHoles();
226 summary.value(Cat_t::TriggerPhi, Stat_t::Hole, lay, small) = seg->nTriggerPhiHoles();
227
228 } else {
229 const std::size_t nHits = nMeasurements(*seg);
230 for (std::size_t hit = 0; hit < nHits; ++hit) {
231 Stat_t state = isOutlierMeasurement(*seg, hit) ? Stat_t::Outlier : Stat_t::OnTrack;
232 const auto* uncalibMeas = dynamic_cast<const xAOD::MuonMeasurement*>(getMeasurement(*seg, hit));
233 // for the combined sTgc space point we have to fill the primary and secodnray measuremment seperately to resolve the strip/pad/wire combinations
234 if(uncalibMeas->type() == xAOD::UncalibMeasType::sTgcStripType && uncalibMeas->numDimensions() == 0){
235 const auto* combinedMeas = static_cast<const xAOD::CombinedMuonStrip*>(uncalibMeas);
236 incrementSummary(combinedMeas->primaryStrip()->identify(), state, combinedMeas->primaryStrip()->numDimensions(), summary);
237 incrementSummary(combinedMeas->secondaryStrip()->identify(), state, combinedMeas->secondaryStrip()->numDimensions(), summary);
238
239 } else {
240 incrementSummary(uncalibMeas->identify(), state, uncalibMeas->numDimensions(), summary);
241 }
242 }
243 }
244 }
245 return summary;
246 }
static const uint32_t nHits
Gaudi::Property< bool > m_reDoSegments
Toggle whether the segment summary shall be recomputed.
const xAOD::UncalibratedMeasurement * getMeasurement(const xAOD::MuonSegment &segment, const std::size_t n)
Returns the n-th uncalibrated measurement.
std::size_t nMeasurements(const xAOD::MuonSegment &segment)
Returns the number of associated Uncalibrated measurements.
bool isOutlierMeasurement(const xAOD::MuonSegment &segment, const std::size_t n)
Returns whether the n-the uncalibrated measurement is an outlier.
MuonMeasurement_v1 MuonMeasurement
MuonSegment_v1 MuonSegment
Reference the current persistent version:
CombinedMuonStrip_v1 CombinedMuonStrip

◆ makeSummaryImpl()

template<Acts::TrackProxyConcept T>
HitSummary MuonR4::TrackSummaryTool::makeSummaryImpl ( const EventContext & ctx,
const T & track ) const
private

Implementation for making a hit summary.

Surface is not active

Definition at line 96 of file MuonSpectrometer/MuonPhaseII/MuonTrackBuilding/MuonTrackFindingTools/src/TrackSummaryTool.cxx.

97 {
98 HitSummary summary{};
99 trackProxy.container().trackStateContainer().visitBackwards(trackProxy.tipIndex(),
100 [&](const auto& state){
101 Stat_t status{Stat_t::OnTrack};
102 if (state.typeFlags().isOutlier()){
103 status = Stat_t::Outlier;
104 } else if (state.typeFlags().isHole()) {
105 status = Stat_t::Hole;
106 }
107 if (state.hasUncalibratedSourceLink()) {
108 const auto* uncalib = dynamic_cast<const xAOD::MuonMeasurement*>(xAODUncalibMeasCalibrator::unpack(state.getUncalibratedSourceLink()));
109 if (!uncalib) {
110 return;
111 }
112 // for the combined sTgc space point we have to fill the primary and secondary measuremment seperately to resolve the strip/pad/wire combinations
113 if(uncalib->numDimensions() == 0) {
114 const auto* combinedMeas = dynamic_cast<const xAOD::CombinedMuonStrip*>(uncalib);
115 incrementSummary(combinedMeas->primaryStrip()->identify(), status, combinedMeas->primaryStrip()->numDimensions(), summary);
116 incrementSummary(combinedMeas->secondaryStrip()->identify(), status, combinedMeas->secondaryStrip()->numDimensions(), summary);
117 } else {
118 incrementSummary(uncalib->identify(), status, uncalib->numDimensions(), summary);
119 complementaryHole(uncalib->identify(), uncalib->readoutElement(), summary);
120 }
121 } else if (state.hasReferenceSurface()) {
122 const Acts::Surface& surf{state.referenceSurface()};
124 if (!surf.isSensitive() || !surf.isAlignable()) {
125 return;
126 }
127 const auto* detEl = dynamic_cast<const ActsTrk::ISurfacePlacement*>(surf.surfacePlacement());
128 if (!detEl || !MuonGMR4::isMuon(detEl->detectorType())) {
129 return;
130 }
131 incrementSummary(detEl->identify(), status, 1, summary);
132 complementaryHole(detEl->identify(),
133 dynamic_cast<const MuonGMR4::MuonReadoutElement*>(detEl->detectorElement()),
134 summary);
135 }
136 });
137 ATH_MSG_DEBUG("Obtained track summary from track with "<<Acts::toString(trackProxy.fourMomentum())
138 <<", q: "<<trackProxy.qOverP()
139 <<", chi2: "<<(trackProxy.chi2()/ std::max(trackProxy.nDoF(), 1u))
140 <<", nDoF: "<<trackProxy.nDoF()<<"\n"<<summary);
141 return summary;
142 }
if(pathvar)
void complementaryHole(const Identifier &gasGapId, const MuonGMR4::MuonReadoutElement *reEle, HitSummary &summary) const
Checks whether a measurement state is expected for the complementary readout plane for a given gasGap...
bool isMuon(const ActsTrk::DetectorType type)
Returns whether the parsed type is muon.

Member Data Documentation

◆ m_fillHoles

Gaudi::Property<bool> MuonR4::TrackSummaryTool::m_fillHoles {this, "fillHoles", true}
private

Toggle whether holes states shall be copied to the xAOD object.

Definition at line 76 of file MuonSpectrometer/MuonPhaseII/MuonTrackBuilding/MuonTrackFindingTools/src/TrackSummaryTool.h.

76{this, "fillHoles", true};

◆ m_fillOutliers

Gaudi::Property<bool> MuonR4::TrackSummaryTool::m_fillOutliers {this, "fillOutliers", true}
private

Toggle whether outlier states shall be copied to the xAOD object.

Definition at line 78 of file MuonSpectrometer/MuonPhaseII/MuonTrackBuilding/MuonTrackFindingTools/src/TrackSummaryTool.h.

78{this, "fillOutliers", true};

◆ m_idHelperSvc

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

IdHelperSvc to decode the Identifiers.

Definition at line 74 of file MuonSpectrometer/MuonPhaseII/MuonTrackBuilding/MuonTrackFindingTools/src/TrackSummaryTool.h.

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

◆ m_reDoSegments

Gaudi::Property<bool> MuonR4::TrackSummaryTool::m_reDoSegments {this, "recomputeSegment", true}
private

Toggle whether the segment summary shall be recomputed.

Definition at line 80 of file MuonSpectrometer/MuonPhaseII/MuonTrackBuilding/MuonTrackFindingTools/src/TrackSummaryTool.h.

80{this, "recomputeSegment", true};

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