ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4 Namespace Reference

This header ties the generic definitions in this package. More...

Namespaces

namespace  HoughHelpers
namespace  SegmentFit

Classes

class  BucketDumperAlg
class  CalibratedSpacePoint
 The calibrated Space point is created during the calibration process. More...
class  EtaHoughTransformAlg
 Algorithm to handle the eta hough transform. More...
struct  HitSummary
 Summary struct to hold the hit counts on the track per MS layer. More...
struct  HoughEventData_impl
 Templated event data class for the phase-2 muon hough transform. More...
class  HoughMaximum
 Data class to represent an eta maximum in hough space. More...
class  ISegmentSelectionTool
class  ISpacePointCalibrator
 Interface class to refine the space point calibration with an external seed. More...
class  ITrackSummaryTool
 Interface tool to calculate the hit summary of tracks & track seeds in the MuonSpectrometer. More...
class  MdtDigitizationTool
class  MdtMeasViewAlg
class  MeasurementMarkerAlg
 Algorithm that marks the uncalibrated measurements making up a segment, where the segment passes an arbitrary selection requirement. More...
class  MlHitDumperAlg
class  MM_DigitizationTool
class  MmFastDigiTool
class  MsTrackFindingAlg
class  MsTrackSeed
class  MsTrackSeeder
 Helper class to group muon sgements that may belong to a muon trajectory. More...
class  MuonDigitizationTool
 Barebone implementation of the I/O infrastructure for all MuonDigitizationTools. More...
class  NswSegmentFinderAlg
class  PatternCnvAlg
 The MuonPatternCnvAlg converts the SegmentSeeds produced by the R4 pattern recognition chain into the segment seeds that can be consumed by the legacy muon segment maker. More...
class  PhiHoughTransformAlg
 Algorithm to handle the phi hough transform. More...
class  PrepDataToSimHitAssocAlg
 The PrepDataToSimHitAssocAlg matches the uncalibrated measurements to the MuonSimHits or to the MuonSDO objects. More...
class  RecoSegToTruthAssocAlg
 Algorithm to match the reconstructed muon segment with the truth segment & with the truth particle. More...
class  RpcClusteringAlg
class  RpcFastDigiTool
class  RpcMeasViewAlg
class  RpcRdoToRpcPrepDataTool
class  Segment
 Placeholder for what will later be the muon segment EDM representation. More...
class  SegmentActsRefitAlg
class  SegmentDumperAlg
class  SegmentFitParDecorAlg
 Algorithm to decorate the segment fit parameters in the chamber's frame onto the xAOD::MuonSegment Additionally, the ElementLinks to the associated measurements are decorated. More...
class  SegmentFittingAlg
 Algorithm to handle segment fits. More...
class  SegmentMarkerAlg
class  SegmentSeed
 Representation of a segment seed (a fully processed hough maximum) produced by the hough transform. More...
class  SegmentSelectionTool
class  SegmentViewAlg
class  SimHitToTruthPartAssocAlg
 This algorihm associates the SDO / sim hit Identifiers to the truth particle using the HepMCParticle uniqueID to match both. More...
class  SpacePoint
 The muon space point is the combination of two uncalibrated measurements one of them measures the eta and the other the phi coordinate. More...
class  SpacePointBucket
 : The muon space point bucket represents a collection of points that will bre processed together in the pattern seeding. More...
class  SpacePointCalibrator
class  SpacePointCsvDumperAlg
class  SpacePointMakerAlg
class  SpacePointPerLayerSorter
 The SpacePointPerLayerSorter sort two given space points by their layer Identifier. More...
class  SpacePointPerLayerSplitter
 The SpacePointPerLayerSplitter takes a set of spacepoints already sorted by layer Identifier (see MuonSpacePoint/SpacePointPerLayerSorter.h) and splits them into two sets of hits, one for MDT hits and the other one for strip detector hits. More...
class  SPIdDumperAlg
class  sTgcDigitizationTool
class  sTgcFastDigiTool
class  sTgcMeasViewAlg
class  TgcFastDigiTool
class  TrackSummaryTool
class  TrackToTruthPartAssocAlg
 The TrackToTruthPartAssocAlg matches the reconstructed tracks to truth muons. More...
class  TrkSegmentCnvAlg
 The TrkSegmentCnvAlg converts the SegmentSeeds produced by the R4 pattern recognition chain into the segment seeds that can be consumed by the legacy muon segment maker. More...
class  TruthHitSummaryAlg
class  TruthMeasMarkerAlg
class  TruthOverlay
class  TruthSegmentCsvDumperAlg
class  TruthSegmentMaker
class  TruthSegToTruthPartAssocAlg
 The TruthSegToTruthPartAssocAlg associates the TruthSegments with the primary TruthParticle from the IP. More...
class  xAODSegmentCnvAlg
 The xAODSegmentCnvAlg takes MuonR4::Segments and converts them into a xAOD::MuonSegmentContainer. More...
class  xRpcMeasToRpcTrkPrdCnvAlg
 Conversion algorithm to turn xAOD::RpcMeasurements into Trk::RpcPrepData. More...

Typedefs

using HoughEventData = HoughEventData_impl<ActsPeakFinderForMuon, ActsPeakFinderForMuonCfg>
using HoughHitType = const SpacePoint*
using HoughPlane = Acts::HoughTransformUtils::HoughPlane<HoughHitType>
using ActsPeakFinderForMuon = Acts::HoughTransformUtils::PeakFinders::IslandsAroundMax<HoughHitType>
using ActsPeakFinderForMuonCfg = Acts::HoughTransformUtils::PeakFinders::IslandsAroundMaxConfig
using EtaHoughMaxContainer = DataVector<HoughMaximum>
using SegmentSeedContainer = DataVector<SegmentSeed>
using SegmentContainer = DataVector<Segment>
using SpacePointContainer = DataVector<SpacePointBucket>
 Abrivation of the space point container type.
using Cov_t = SpacePoint::Cov_t
using HitVec = SpacePointPerLayerSplitter::HitVec
using MsTrackSeedContainer = std::vector<MsTrackSeed>
using CalibSpacePointVec = ISpacePointCalibrator::CalibSpacePointVec
using CalibSpacePointPtr = ISpacePointCalibrator::CalibSpacePointPtr
using State = CalibratedSpacePoint::State
using SegLink_t = ElementLink<MuonR4::SegmentContainer>
 Abrivation of the link to the reco segment container.
using PrdCont_t = xAOD::UncalibratedMeasurementContainer
 Abrivation to call an uncalibrated measurement container.
using PrdLink_t = ElementLink<PrdCont_t>
 Abrivation to call the link to an element inside an uncalibrated measurement container.
using PrdLinkVec_t = std::vector<PrdLink_t>
 Abrivation of a collection of Prd links.
using SegPars_t = xAOD::MeasVector<Acts::toUnderlying(ParamDefs::nPars)>
 Abrivation of the decorated local segment parameters.
using TechIdx_t = Muon::MuonStationIndex::TechnologyIndex
using PrimitiveVec = MuonValR4::IPatternVisualizationTool::PrimitiveVec
using CovIdx = SpacePoint::CovIdx
 ########################################## SpacePointMakerAlg #########################################
using SearchTree_t = MsTrackSeeder::SearchTree_t
using SectorProjector = MsTrackSeeder::SectorProjector
using Cat_t = HitSummary::HitCategory
using Stat_t = HitSummary::Status
using LayerIndex = HitSummary::LayerIndex
using SegLinkVec_t = std::vector<SegLink_t>
using MarkerHandle_t = SG::WriteDecorHandle<PrdCont_t, bool>
using LinkHandle_t = SG::WriteDecorHandle<PrdCont_t, SegLinkVec_t>
using WriteDecorKey_t = SG::WriteDecorHandleKey<xAOD::UncalibratedMeasurementContainer>
using SegPars = xAOD::MeasVector<Acts::toUnderlying(ParamDefs::nPars)>

Functions

double houghTanBeta (const Amg::Vector3D &v)
 Returns the hough tanBeta [y] / [z].
double houghTanAlpha (const Amg::Vector3D &v)
 : Returns the hough tanAlpha [x] / [z]
std::ostream & operator<< (std::ostream &ostr, const MuonR4::MsTrackSeed &seed)
const SegmentdetailedSegment (const xAOD::MuonSegment &seg)
 Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.
std::vector< const xAOD::UncalibratedMeasurement * > collectMeasurements (const xAOD::MuonSegment &segment, bool skipOutlier=true)
 Helper function to extract the measurements from the segment.
std::string printID (const xAOD::MuonSegment &seg)
 Print the chamber ID of a segment, e.g.
std::size_t nMeasurements (const xAOD::MuonSegment &segment)
 Returns the number of associated Uncalibrated measurements.
const xAOD::UncalibratedMeasurementgetMeasurement (const xAOD::MuonSegment &segment, const std::size_t n)
 Returns the n-th uncalibrated measurement.
bool isOutlierMeasurement (const xAOD::MuonSegment &segment, const std::size_t n)
 Returns whether the n-the uncalibrated measurement is an outlier.
const xAOD::MuonSimHitgetTruthMatchedHit (const xAOD::UncalibratedMeasurement &prdHit)
 Returns the MuonSimHit, if there's any, matched to the uncalibrated muon measurement.
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits (const xAOD::MuonSegment &segment)
 : Returns all sim hits matched to a xAOD::MuonSegment
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits (const std::vector< const SpacePoint * > &spacePoints)
 Returns all sim hits that are matched to a collection of space points.
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits (const std::vector< const CalibratedSpacePoint * > &measurements)
 Returns all sim hits that are matched to a collection of calibrated space points.
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits (const Segment &seg)
 Returns all sim hits that are matched to the reconstructed segment.
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits (const SegmentSeed &seed)
 Returns all sim hits that are matched to the segmentSeed.
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits (const SpacePointBucket &bucket)
 Returns all sim hits that are matched to the spacePoint bucket.
const xAOD::TruthParticlegetTruthMatchedParticle (const xAOD::MuonSegment &segment)
 Returns the particle truth-matched to the segment.
const xAOD::MuonSegmentgetMatchedTruthSegment (const xAOD::MuonSegment &segment)
 Returns the truth-matched segment.
std::vector< const xAOD::MuonSegment * > getTruthSegments (const xAOD::TruthParticle &truthMuon)
 Returns the segments associated to the truth muon.
constexpr TechIdx_t toTechIdx (const xAOD::UncalibMeasType aodType)
bool passesThrough (const SpacePointBucket::chamberLocation &loc, double y0, double tanBeta)
double proximity (const SpacePoint *dc, double y0, double tanBeta)
constexpr double chamberCoverage (const std::array< double, 2 > &seedEdges, const std::array< double, 2 > &chambEdges)
 Calculates how much of the unkknown coordinate along the tube range is covered by the chamber of interest.
std::string to_string (const SectorProjector proj)

Variables

constexpr unsigned minLayers {4}

Detailed Description

This header ties the generic definitions in this package.

The SegmentActsRefitAlg is designed to test the Acts tracking geometry & the global chi2 fitter at chamber level.

Added a flag in MuonConfig to turn off the R4 sTGC Digitization until fully validated.

: The sTgcMeasViewAlg takes all sTgcStrip, sTgcWire & sTgcPad measurements and pushes them into a common sTgcMeasContainer which is a SG::VIEW_ELEMENTS container

: The RpcMeasViewAlg takes the BI & legacy Rpc measurements and pushes them into a common RpcMeasurmentContainer which is a SG::VIEW_ELEMENTS container

: The MdtMeasViewAlg takes the MdtMeasurments && the MdtTwinMeasurements and combined them into a common MdtDriftCircleContainer

The MuonStripCsvDumperAlg reads the RpcStripContainer and dumps information to csv files The files are used for the algorithm development in acts.

Set of helper functions to fetch the links to the xAOD::MuonSimHits from the uncalibrated measurements.

MsTrackSeed represents the collection of segments that may be compatible with a muon track trajectory hypothesis.

copyright am arsch

the accumulator, and the peak finder.

To construct a seed, the segments are projected onto a cylinder which is roughly intersecting the middle stations of the spectrometer.

The links are decorated by the PrepDataToSimHitAssocAlg which is residing inside the MuonTruthAlgsR4 package. Before using these functions ensure that the algorithms are ran accordingly

Using FastDigi tool at the moment.

Uncalibrated xAOD measurements are collected from previously fitted segments and then passed through the global chi2 fitter. If the fit succeeded, a new xAOD::MuonSegment is created and the parameters as well as the hit summary are saved.

Typedef Documentation

◆ ActsPeakFinderForMuon

using MuonR4::ActsPeakFinderForMuon = Acts::HoughTransformUtils::PeakFinders::IslandsAroundMax<HoughHitType>

Definition at line 30 of file MuonHoughDefs.h.

◆ ActsPeakFinderForMuonCfg

using MuonR4::ActsPeakFinderForMuonCfg = Acts::HoughTransformUtils::PeakFinders::IslandsAroundMaxConfig

Definition at line 32 of file MuonHoughDefs.h.

◆ CalibSpacePointPtr

◆ CalibSpacePointVec

◆ Cat_t

◆ Cov_t

◆ CovIdx

########################################## SpacePointMakerAlg #########################################

Definition at line 131 of file SpacePointMakerAlg.cxx.

◆ EtaHoughMaxContainer

◆ HitVec

◆ HoughEventData

◆ HoughHitType

Definition at line 24 of file MuonHoughDefs.h.

◆ HoughPlane

using MuonR4::HoughPlane = Acts::HoughTransformUtils::HoughPlane<HoughHitType>

Definition at line 26 of file MuonHoughDefs.h.

◆ LayerIndex

◆ LinkHandle_t

◆ MarkerHandle_t

◆ MsTrackSeedContainer

Definition at line 63 of file MsTrackSeed.h.

◆ PrdCont_t

Abrivation to call an uncalibrated measurement container.

Definition at line 21 of file xAODSegmentCnvAlg.cxx.

◆ PrdLink_t

Abrivation to call the link to an element inside an uncalibrated measurement container.

Definition at line 24 of file xAODSegmentCnvAlg.cxx.

◆ PrdLinkVec_t

typedef std::vector< PrdLink_t > MuonR4::PrdLinkVec_t = std::vector<PrdLink_t>

Abrivation of a collection of Prd links.

Definition at line 26 of file xAODSegmentCnvAlg.cxx.

◆ PrimitiveVec

◆ SearchTree_t

◆ SectorProjector

◆ SegLink_t

Abrivation of the link to the reco segment container.

Definition at line 19 of file xAODSegmentCnvAlg.cxx.

◆ SegLinkVec_t

typedef std::vector< SegLink_t > MuonR4::SegLinkVec_t = std::vector<SegLink_t>

Definition at line 15 of file MeasurementMarkerAlg.cxx.

◆ SegmentContainer

◆ SegmentSeedContainer

◆ SegPars

using MuonR4::SegPars = xAOD::MeasVector<Acts::toUnderlying(ParamDefs::nPars)>

Definition at line 15 of file SegmentFitParDecorAlg.cxx.

◆ SegPars_t

using MuonR4::SegPars_t = xAOD::MeasVector<Acts::toUnderlying(ParamDefs::nPars)>

Abrivation of the decorated local segment parameters.

Definition at line 28 of file xAODSegmentCnvAlg.cxx.

◆ SpacePointContainer

◆ Stat_t

◆ State

◆ TechIdx_t

◆ WriteDecorKey_t

Function Documentation

◆ chamberCoverage()

double MuonR4::chamberCoverage ( const std::array< double, 2 > & seedEdges,
const std::array< double, 2 > & chambEdges )
constexpr

Calculates how much of the unkknown coordinate along the tube range is covered by the chamber of interest.

Parameters
seedEdgesArray encoding the minimal [0] and maximal [1] possible position of the muon along the tube /strip
chambEdgesArray encoding the minmal [1] and maximal [1] position along the strip of a chamber

Partial overlap. The lower side of the seed is covered by the chamber.

Reverse case with the upper side of the seed covered

The chamber is fully embedded in the possible seed range

Definition at line 43 of file EtaHoughTransformAlg.cxx.

44 {
45 // The seed is full embedded
46 if (chambEdges[0] <= seedEdges[0] && chambEdges[1] >= seedEdges[1]) {
47 return 1.;
48 }
50 else if (chambEdges[0]<= seedEdges[0]) {
51 return (chambEdges[1] - seedEdges[0]) / (seedEdges[1] - seedEdges[0]);
52 }
54 else if (chambEdges[1] >= seedEdges[1]) {
55 return (seedEdges[1] - chambEdges[0]) / (seedEdges[1] - seedEdges[0]);
56 }
58 else if (seedEdges[0] <= chambEdges[0] && seedEdges[1] >= chambEdges[1]) {
59 return (chambEdges[1] - chambEdges[0]) / (seedEdges[1] - seedEdges[0]);
60 }
61 return 0.;
62 }

◆ collectMeasurements()

std::vector< const xAOD::UncalibratedMeasurement * > MuonR4::collectMeasurements ( const xAOD::MuonSegment & segment,
bool skipOutlier = true )

Helper function to extract the measurements from the segment.

Parameters
segmentReference to the segment of interest
skipOutlierSwitch toggling whether outlier measurements or invalid calib state measurements should be ignored

Definition at line 56 of file TrackingHelpers.cxx.

57 {
58 std::vector<const xAOD::UncalibratedMeasurement*> out{};
59 const PrdLinkVec_t& links{acc_prdLinks(segment)};
60 out.reserve(links.size());
61 for (std::size_t l = 0 ; l < links.size(); ++l) {
62 const PrdLink_t& link{links[l]};
63 if (!skipOutlier || !isOutlierMeasurement(segment, l)) {
64 out.push_back(*link);
65 }
66 }
67 return out;
68 }
std::vector< PrdLink_t > PrdLinkVec_t
Abrivation of a collection of Prd links.
bool isOutlierMeasurement(const xAOD::MuonSegment &segment, const std::size_t n)
Returns whether the n-the uncalibrated measurement is an outlier.
ElementLink< PrdCont_t > PrdLink_t
Abrivation to call the link to an element inside an uncalibrated measurement container.
l
Printing final latex table to .tex output file.

◆ detailedSegment()

const Segment * MuonR4::detailedSegment ( const xAOD::MuonSegment & seg)

Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.

The segment should be decorated with 'parentSegment' decoration.

Parameters
segReference to the segment of interest.

Definition at line 24 of file TrackingHelpers.cxx.

24 {
26 static const SG::ConstAccessor<SegLink_t> acc{"parentSegment"};
27 if (acc.isAvailable(seg)){
28 const SegLink_t& link{acc(seg)};
29 if (link.isValid()){
30 return *link;
31 }
32 }
33 return nullptr;
34 }
Helper class to provide constant type-safe access to aux data.
ElementLink< MuonR4::SegmentContainer > SegLink_t
Abrivation of the link to the reco segment container.

◆ getMatchedTruthSegment()

const xAOD::MuonSegment * MuonR4::getMatchedTruthSegment ( const xAOD::MuonSegment & segment)

Returns the truth-matched segment.

Definition at line 121 of file MuonSimHitHelpers.cxx.

121 {
122 static const SG::ConstAccessor<SegLink_t> acc{"truthSegmentLink"};
123 if (acc.isAvailable(segment)) {
124 const SegLink_t& link{acc(segment)};
125 if (link.isValid()){
126 return *link;
127 }
128 }
129 return nullptr;
130 }

◆ getMatchingSimHits() [1/6]

std::unordered_set< const xAOD::MuonSimHit * > MuonR4::getMatchingSimHits ( const Segment & seg)

Returns all sim hits that are matched to the reconstructed segment.

Definition at line 95 of file MuonSimHitHelpers.cxx.

95 {
96 std::vector<const CalibratedSpacePoint*> calibSps{};
97 calibSps.reserve(segment.measurements().size());
98 std::ranges::transform(segment.measurements(), std::back_inserter(calibSps), [](const auto& meas){return meas.get();});
99 return getMatchingSimHits(calibSps);
100 }
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits(const xAOD::MuonSegment &segment)
: Returns all sim hits matched to a xAOD::MuonSegment

◆ getMatchingSimHits() [2/6]

std::unordered_set< const xAOD::MuonSimHit * > MuonR4::getMatchingSimHits ( const SegmentSeed & seed)

Returns all sim hits that are matched to the segmentSeed.

Definition at line 107 of file MuonSimHitHelpers.cxx.

107 {
108 return getMatchingSimHits(seed.getHitsInMax());
109 }

◆ getMatchingSimHits() [3/6]

std::unordered_set< const xAOD::MuonSimHit * > MuonR4::getMatchingSimHits ( const SpacePointBucket & bucket)

Returns all sim hits that are matched to the spacePoint bucket.

Definition at line 101 of file MuonSimHitHelpers.cxx.

101 {
102 std::vector<const SpacePoint*> spacePoints{};
103 spacePoints.reserve(bucket.size());
104 std::ranges::transform(bucket, std::back_inserter(spacePoints), [](const SpacePointBucket::value_type& sp){return sp.get();});
105 return getMatchingSimHits(spacePoints);
106 }
static Double_t sp

◆ getMatchingSimHits() [4/6]

std::unordered_set< const xAOD::MuonSimHit * > MuonR4::getMatchingSimHits ( const std::vector< const CalibratedSpacePoint * > & measurements)

Returns all sim hits that are matched to a collection of calibrated space points.

Definition at line 79 of file MuonSimHitHelpers.cxx.

79 {
80 std::unordered_set<const xAOD::MuonSimHit*> hits{};
81 for (const CalibratedSpacePoint* meas : measurements) {
82 const SpacePoint* sp = meas->spacePoint();
83 if (!sp) continue;
84 const xAOD::MuonSimHit* primHit{getTruthMatchedHit(*sp->primaryMeasurement())};
85 const xAOD::MuonSimHit* secHit{sp->dimension() == 2 ? getTruthMatchedHit(*sp->secondaryMeasurement()) : nullptr};
86 if(primHit){
87 hits.insert(primHit);
88 }
89 if (secHit && secHit != primHit) {
90 hits.insert(secHit);
91 }
92 }
93 return hits;
94 }
const xAOD::MuonSimHit * getTruthMatchedHit(const xAOD::UncalibratedMeasurement &prdHit)
Returns the MuonSimHit, if there's any, matched to the uncalibrated muon measurement.
MuonSimHit_v1 MuonSimHit
Defined the version of the MuonSimHit.
Definition MuonSimHit.h:12

◆ getMatchingSimHits() [5/6]

std::unordered_set< const xAOD::MuonSimHit * > MuonR4::getMatchingSimHits ( const std::vector< const SpacePoint * > & spacePoints)

Returns all sim hits that are matched to a collection of space points.

For each spacepoint, the hit truth matching to the primary and secondary prd are retrieved. The secondary hit is only added if it's different from the primary one.

Definition at line 64 of file MuonSimHitHelpers.cxx.

64 {
65 std::unordered_set<const xAOD::MuonSimHit*> hits{};
66 for (const SpacePoint* sp : spacePoints) {
67 const xAOD::MuonSimHit* primHit{getTruthMatchedHit(*sp->primaryMeasurement())};
68 const xAOD::MuonSimHit* secHit{sp->dimension() == 2 ? getTruthMatchedHit(*sp->secondaryMeasurement()) : nullptr};
69 if(primHit){
70 hits.insert(primHit);
71 }
72 if (secHit && secHit != primHit) {
73 hits.insert(secHit);
74 }
75 }
76 return hits;
77 }

◆ getMatchingSimHits() [6/6]

std::unordered_set< const xAOD::MuonSimHit * > MuonR4::getMatchingSimHits ( const xAOD::MuonSegment & segment)

: Returns all sim hits matched to a xAOD::MuonSegment

Definition at line 38 of file MuonSimHitHelpers.cxx.

38 {
39
40 static const SG::ConstAccessor<SimHitLinkVec_t> acc_simLink{"simHitLinks"};
41 static const SG::ConstAccessor<PrdLinkVec_t> acc_prdLink{"prdLinks"};
42 std::unordered_set<const xAOD::MuonSimHit*> hits{};
43 if (acc_simLink.isAvailable(segment)){
44 hits.reserve(acc_simLink(segment).size());
45 for (const SimHitLink_t& link : acc_simLink(segment)) {
46 if (link.isValid()) {
47 hits.insert(*link);
48 }
49 }
50 } else if (acc_prdLink.isAvailable(segment)){
51 for (const PrdLink_t& link : acc_prdLink(segment)) {
52 if(!link.isValid()){
53 continue;
54 };
55 const xAOD::MuonSimHit* hit = getTruthMatchedHit(**link);
56 if (hit){
57 hits.insert(hit);
58 }
59 }
60 }
61 return hits;
62 }
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.

◆ getMeasurement()

const xAOD::UncalibratedMeasurement * MuonR4::getMeasurement ( const xAOD::MuonSegment & segment,
const std::size_t n )

Returns the n-th uncalibrated measurement.

Parameters
segmentReference to the segment of interest
nIndex of the measurement to retrieve

Definition at line 39 of file TrackingHelpers.cxx.

40 {
41 if (!acc_prdLinks.isAvailable(segment)) {
42 return nullptr;
43 }
44 assert(n < nMeasurements(segment));
45 const PrdLink_t& link{acc_prdLinks(segment)[n]};
46 return link.isValid() ? *link : nullptr;
47 }
std::size_t nMeasurements(const xAOD::MuonSegment &segment)
Returns the number of associated Uncalibrated measurements.

◆ getTruthMatchedHit()

const xAOD::MuonSimHit * MuonR4::getTruthMatchedHit ( const xAOD::UncalibratedMeasurement & prdHit)

Returns the MuonSimHit, if there's any, matched to the uncalibrated muon measurement.

Definition at line 27 of file MuonSimHitHelpers.cxx.

27 {
28 static const SG::ConstAccessor<SimHitLink_t> acc("simHitLink");
29 if (acc.isAvailable(prdHit)){
30 const SimHitLink_t& link{acc(prdHit)};
31 if (link.isValid()) {
32 return (*link);
33 }
34 }
35 return nullptr;
36 }

◆ getTruthMatchedParticle()

const xAOD::TruthParticle * MuonR4::getTruthMatchedParticle ( const xAOD::MuonSegment & segment)

Returns the particle truth-matched to the segment.

Definition at line 110 of file MuonSimHitHelpers.cxx.

110 {
112 static const SG::ConstAccessor<TruthLink_t> acc{"truthParticleLink"};
113 if (acc.isAvailable(segment)){
114 const TruthLink_t& link {acc(segment)};
115 if (link.isValid()) {
116 return *link;
117 }
118 }
119 return nullptr;
120 }
ElementLink< xAOD::TruthParticleContainer > TruthLink_t

◆ getTruthSegments()

std::vector< const xAOD::MuonSegment * > MuonR4::getTruthSegments ( const xAOD::TruthParticle & truthMuon)

Returns the segments associated to the truth muon.

Definition at line 131 of file MuonSimHitHelpers.cxx.

131 {
132 static const SG::ConstAccessor<SegLinkVec_t> acc{"truthSegmentLinks"};
133 std::vector<const xAOD::MuonSegment*> segments{};
134
135 if (!acc.isAvailable(truthMuon)) {
136 return segments;
137 }
138 for (const SegLink_t& link : acc(truthMuon)) {
139 segments.emplace_back(*link);
140 }
141 return segments;
142 }

◆ houghTanAlpha()

double MuonR4::houghTanAlpha ( const Amg::Vector3D & v)

: Returns the hough tanAlpha [x] / [z]

Parameters
vArbitrary direction vector

Definition at line 30 of file SegmentFitterEventData.cxx.

30 {
31 constexpr double eps = std::numeric_limits<float>::epsilon();
32 return v.x() / ( std::abs(v.z()) > eps ? v.z() : eps);
33 }

◆ houghTanBeta()

double MuonR4::houghTanBeta ( const Amg::Vector3D & v)

Returns the hough tanBeta [y] / [z].

Parameters
vArbitrary direction vector

Definition at line 26 of file SegmentFitterEventData.cxx.

26 {
27 constexpr double eps = std::numeric_limits<float>::epsilon();
28 return v.y() / ( std::abs(v.z()) > eps ? v.z() : eps);
29 }

◆ isOutlierMeasurement()

bool MuonR4::isOutlierMeasurement ( const xAOD::MuonSegment & segment,
const std::size_t n )

Returns whether the n-the uncalibrated measurement is an outlier.

Parameters
segmentReference to the segment of interest
nIndex of the measurement to retrieve

Definition at line 48 of file TrackingHelpers.cxx.

49 {
50 if(!acc_prdState.isAvailable(segment)) {
51 return false;
52 }
53 assert (n < acc_prdState(segment).size());
54 return acc_prdState(segment)[n] != Acts::toUnderlying(CalibratedSpacePoint::State::Valid);
55 }

◆ nMeasurements()

std::size_t MuonR4::nMeasurements ( const xAOD::MuonSegment & segment)

Returns the number of associated Uncalibrated measurements.

Parameters
segmentReference to the segment of interest

Definition at line 36 of file TrackingHelpers.cxx.

36 {
37 return acc_prdLinks.isAvailable(segment) ? acc_prdLinks(segment).size() : 0;
38 }

◆ operator<<()

std::ostream & MuonR4::operator<< ( std::ostream & ostr,
const MuonR4::MsTrackSeed & seed )

Definition at line 15 of file MsTrackSeed.cxx.

15 {
16 ostr<<"MS Track seed @"<<Amg::toString(seed.position())<<", sector: "<<seed.sector()<<std::endl;
17 using namespace Muon::MuonStationIndex;
18 for (const xAOD::MuonSegment* seg : seed.segments()) {
19 ostr<<" **** "<< printID(*seg)
20 <<", theta: "<<(seg->direction().theta() /Gaudi::Units::degree)
21 <<", phi: "<<(seg->direction().phi() /Gaudi::Units::degree)
22 <<", R: "<<Acts::fastHypot(seg->x(), seg->y())
23 <<", Z: "<<seg->z()<<" "<<(seg->position().theta() / Gaudi::Units::degree)
24 // <<", "<<SegmentFit::toString(SegmentFit::localSegmentPars(*seg))
25 <<", chi2: "<<(seg->chiSquared() / std::max(seg->numberDoF(), 1.f))
26 <<", nPrec: "<<seg->nPrecisionHits()
27 <<", nPhi: "<<seg->nPhiLayers()
28 <<", nTrigEta: "<<seg->nTrigEtaLayers()<<std::endl;
29 }
30 return ostr;
31 }
Scalar phi() const
phi method
Scalar theta() const
theta method
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
std::string printID(const xAOD::MuonSegment &seg)
Print the chamber ID of a segment, e.g.
MuonSegment_v1 MuonSegment
Reference the current persistent version:

◆ passesThrough()

bool MuonR4::passesThrough ( const SpacePointBucket::chamberLocation & loc,
double y0,
double tanBeta )
inline

Definition at line 25 of file EtaHoughTransformAlg.cxx.

25 {
26 double yCross = (y0 + loc.location().z() * tanBeta);
27 return (loc.minY() < yCross && yCross < loc. maxY());
28 }
#define z
double minY() const
Returns the minimum y covered by the chamber location.
const Amg::Vector3D & location() const
Returns the location.

◆ printID()

std::string MuonR4::printID ( const xAOD::MuonSegment & seg)

Print the chamber ID of a segment, e.g.

BMS1A12, meaning that the segment is in the first BMS eta station on the A-side in sector 12

Parameters
segReference to the segment from which the id should be printed

Definition at line 17 of file TrackingHelpers.cxx.

17 {
18 using namespace Muon::MuonStationIndex;
19 return std::format("{:}{:}{:}{:}", chName(seg.chamberIndex()),
20 std::abs(seg.etaIndex()),
21 seg.etaIndex() > 0 ? 'A' : 'C',
22 seg.sector());
23 }
::Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index.
int etaIndex() const
Returns the eta index, which corresponds to stationEta in the offline identifiers (and the ).
const std::string & chName(ChIndex index)
convert ChIndex into a string

◆ proximity()

double MuonR4::proximity ( const SpacePoint * dc,
double y0,
double tanBeta )
inline

Definition at line 30 of file EtaHoughTransformAlg.cxx.

30 {
32 return std::min(std::abs(HoughHelpers::Eta::houghParamMdtLeft(tanBeta, dc) - y0),
33 std::abs(HoughHelpers::Eta::houghParamMdtRight(tanBeta, dc) - y0));
34 }
35 return std::abs(HoughHelpers::Eta::houghParamStrip(tanBeta, dc) - y0);
36 }
double houghParamMdtRight(double tanBeta, const MuonR4::HoughHitType &dc)
right-side straight line parametrisation for drift circles
double houghParamStrip(double tanBeta, const MuonR4::HoughHitType &strip)
straight line parametrisation for strip detector measurements
double houghParamMdtLeft(double tanBeta, const MuonR4::HoughHitType &dc)
left-side straight line parametrisation for drift circles

◆ to_string()

std::string MuonR4::to_string ( const SectorProjector proj)

Definition at line 65 of file MsTrackSeeder.cxx.

65 {
66 using enum SectorProjector;
67 switch (proj) {
68 case leftOverlap:
69 return "overlap with left sector";
70 case center:
71 return "sector center";
72 case rightOverlap:
73 return "overlap with right sector";
74 default:
75 return "";
76 }
77 }
MsTrackSeeder::SectorProjector SectorProjector

◆ toTechIdx()

TechIdx_t MuonR4::toTechIdx ( const xAOD::UncalibMeasType aodType)
constexpr

Definition at line 32 of file xAODSegmentCnvAlg.cxx.

32 {
33 switch (aodType){
35 return TechIdx_t::MDT;
37 return TechIdx_t::RPC;
39 return TechIdx_t::TGC;
41 return TechIdx_t::MM;
43 return TechIdx_t::STGC;
44 default:
45 return TechIdx_t::TechnologyUnknown;
46 }
47 }

Variable Documentation

◆ minLayers

unsigned MuonR4::minLayers {4}
constexpr

Definition at line 58 of file NswSegmentFinderAlg.cxx.

58{4};