ATLAS Offline Software
Namespaces | Classes | Typedefs | Functions | Variables
MuonR4 Namespace Reference

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

Namespaces

 HoughHelpers
 
 SegmentFit
 

Classes

class  BucketDumperAlg
 
class  CalibratedSpacePoint
 The calibrated Space point is created during the calibration process. More...
 
class  CombinatorialNSWSeedFinderAlg
 
class  EtaHoughTransformAlg
 Algorithm to handle the eta hough transform. 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  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  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  SdoMultiTruthMaker
 The SdoMuliTruthMaker translates the HepMCParticle links associated with the SDO into a PRD_MultiTruthCollection. More...
 
class  Segment
 Placeholder for what will later be the muon segment EDM representation. More...
 
class  SegmentActsRefitAlg
 
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  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  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  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. More...
 
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
More...
 
using PrdCont_t = xAOD::UncalibratedMeasurementContainer
 Abrivation to call an uncalibrated measurement container. More...
 
using PrdLink_t = ElementLink< PrdCont_t >
 Abrivation to call the link to an element inside an uncalibrated measurement container. More...
 
using PrdLinkVec_t = std::vector< PrdLink_t >
 Abrivation of a collection of Prd links. More...
 
using SegPars_t = xAOD::MeasVector< Acts::toUnderlying(ParamDefs::nPars)>
 Abrivation of the decorated local segment parameters. More...
 
using TechIdx_t = Muon::MuonStationIndex::TechnologyIndex
 
using PrimitiveVec = MuonValR4::IPatternVisualizationTool::PrimitiveVec
 
using CovIdx = SpacePoint::CovIdx
 
using SearchTree_t = MsTrackSeeder::SearchTree_t
 
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]. More...
 
double houghTanAlpha (const Amg::Vector3D &v)
 : Returns the hough tanAlpha [x] / [z] More...
 
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. More...
 
std::vector< const xAOD::UncalibratedMeasurement * > collectMeasurements (const Segment &seg, bool skipOutlier=true)
 Helper function to extract the measurements from the segment. More...
 
std::vector< const xAOD::UncalibratedMeasurement * > collectMeasurements (const xAOD::MuonSegment &segment, bool skipOutlier=true)
 Helper function to extract the measurements from the segment. More...
 
const xAOD::MuonSimHitgetTruthMatchedHit (const xAOD::UncalibratedMeasurement &prdHit)
 Returns the MuonSimHit, if there's any, matched to the uncalibrated muon measurement. More...
 
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits (const xAOD::MuonSegment &segment)
 : Returns all sim hits matched to a xAOD::MuonSegment More...
 
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. More...
 
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. More...
 
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits (const Segment &seg)
 Returns all sim hits that are matched to the reconstructed segment. More...
 
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits (const SegmentSeed &seed)
 Returns all sim hits that are matched to the segmentSeed. More...
 
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits (const SpacePointBucket &bucket)
 Returns all sim hits that are matched to the spacePoint bucket. More...
 
const xAOD::TruthParticlegetTruthMatchedParticle (const xAOD::MuonSegment &segment)
 Returns the particle truth-matched to the segment. More...
 
const xAOD::MuonSegmentgetMatchedTruthSegment (const xAOD::MuonSegment &segment)
 Returns the truth-matched segment. More...
 
std::vector< const xAOD::MuonSegment * > getTruthSegments (const xAOD::TruthParticle &truthMuon)
 Returns the segments associated to the truth muon. More...
 
constexpr TechIdx_t toTechIdx (const xAOD::UncalibMeasType aodType)
 
constexpr double sign (const double x)
 Returns the sign of a number. More...
 
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. More...
 

Variables

constexpr unsigned int 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 = typedef Acts::HoughTransformUtils::PeakFinders::IslandsAroundMax<HoughHitType>

Definition at line 30 of file MuonHoughDefs.h.

◆ ActsPeakFinderForMuonCfg

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

Definition at line 32 of file MuonHoughDefs.h.

◆ CalibSpacePointPtr

Definition at line 41 of file SpacePointCalibrator.cxx.

◆ CalibSpacePointVec

Definition at line 40 of file SpacePointCalibrator.cxx.

◆ Cov_t

◆ CovIdx

SpacePointMakerAlg

Definition at line 131 of file SpacePointMakerAlg.cxx.

◆ EtaHoughMaxContainer

Definition at line 14 of file MuonPatternContainer.h.

◆ HitVec

Definition at line 12 of file SpacePointPerLayerSplitter.cxx.

◆ HoughEventData

Definition at line 71 of file HoughEventData.h.

◆ HoughHitType

Definition at line 24 of file MuonHoughDefs.h.

◆ HoughPlane

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

Definition at line 26 of file MuonHoughDefs.h.

◆ LinkHandle_t

Definition at line 21 of file MeasurementMarkerAlg.cxx.

◆ MarkerHandle_t

Definition at line 20 of file MeasurementMarkerAlg.cxx.

◆ MsTrackSeedContainer

using MuonR4::MsTrackSeedContainer = typedef std::vector<MsTrackSeed>

Definition at line 61 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

Abrivation of a collection of Prd links.

Definition at line 26 of file xAODSegmentCnvAlg.cxx.

◆ PrimitiveVec

Definition at line 24 of file SegmentFittingAlg.cxx.

◆ SearchTree_t

Definition at line 9 of file MsTrackSeeder.cxx.

◆ 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

Definition at line 15 of file MeasurementMarkerAlg.cxx.

◆ SegmentContainer

Definition at line 16 of file MuonPatternContainer.h.

◆ SegmentSeedContainer

Definition at line 15 of file MuonPatternContainer.h.

◆ SegPars

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

Definition at line 15 of file SegmentFitParDecorAlg.cxx.

◆ SegPars_t

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

Abrivation of the decorated local segment parameters.

Definition at line 28 of file xAODSegmentCnvAlg.cxx.

◆ SpacePointContainer

Abrivation of the space point container type.

Definition at line 56 of file MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePointContainer.h.

◆ State

Definition at line 42 of file SpacePointCalibrator.cxx.

◆ TechIdx_t

Definition at line 30 of file xAODSegmentCnvAlg.cxx.

◆ WriteDecorKey_t

Definition at line 23 of file MeasurementMarkerAlg.cxx.

Function Documentation

◆ chamberCoverage()

constexpr 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() [1/2]

std::vector< const xAOD::UncalibratedMeasurement * > MuonR4::collectMeasurements ( const Segment seg,
bool  skipOutlier = true 
)

Helper function to extract the measurements from the segment.

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

remove all the garbage

remove all the garbage

Definition at line 25 of file TrackingHelpers.cxx.

26  {
27  std::vector<const xAOD::UncalibratedMeasurement*> out{};
28  out.reserve(seg.measurements().size()*2);
29  for (const auto& meas : seg.measurements()){
31  if (skipOutlier && meas->fitState() != CalibratedSpacePoint::State::Valid) {
32  continue;
33  }
34  // Remove the external constraints
35  const SpacePoint* sp = meas->spacePoint();
36  if (!sp) {
37  continue;
38  }
39  out.emplace_back(sp->primaryMeasurement());
40  if (sp->secondaryMeasurement()) {
41  out.emplace_back(sp->secondaryMeasurement());
42  }
43  }
44  return out;
45  }

◆ collectMeasurements() [2/2]

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

Helper function to extract the measurements from the segment.

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

Definition at line 46 of file TrackingHelpers.cxx.

47  {
48  static const SG::ConstAccessor<PrdLinkVec_t> acc_prdLinks{"prdLinks"};
49  static const SG::ConstAccessor<std::vector<char>> acc_prdState{"prdState"};
50  std::vector<const xAOD::UncalibratedMeasurement*> out{};
51  const PrdLinkVec_t& links{acc_prdLinks(segment)};
52  out.reserve(links.size());
53  for (std::size_t l = 0 ; l < links.size(); ++l) {
54  const PrdLink_t& link{links[l]};
55  if (!skipOutlier ||
56  acc_prdState(segment)[l] == Acts::toUnderlying(CalibratedSpacePoint::State::Valid)) {
57  out.push_back(*link);
58 
59  }
60  }
61  return out;
62  }

◆ 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 14 of file TrackingHelpers.cxx.

14  {
16  static const SG::ConstAccessor<SegLink_t> acc{"parentSegment"};
17  if (acc.isAvailable(seg)){
18  const SegLink_t& link{acc(seg)};
19  if (link.isValid()){
20  return *link;
21  }
22  }
23  return nullptr;
24  }

◆ getMatchedTruthSegment()

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

Returns the truth-matched segment.

Definition at line 118 of file MuonSimHitHelpers.cxx.

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

◆ 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 92 of file MuonSimHitHelpers.cxx.

92  {
93  std::vector<const CalibratedSpacePoint*> calibSps{};
94  calibSps.reserve(segment.measurements().size());
95  std::ranges::transform(segment.measurements(), std::back_inserter(calibSps), [](const auto& meas){return meas.get();});
96  return getMatchingSimHits(calibSps);
97  }

◆ 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 104 of file MuonSimHitHelpers.cxx.

104  {
105  return getMatchingSimHits(seed.getHitsInMax());
106  }

◆ 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 98 of file MuonSimHitHelpers.cxx.

98  {
99  std::vector<const SpacePoint*> spacePoints{};
100  spacePoints.reserve(bucket.size());
101  std::ranges::transform(bucket, std::back_inserter(spacePoints), [](const SpacePointBucket::value_type& sp){return sp.get();});
103  }

◆ 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 76 of file MuonSimHitHelpers.cxx.

76  {
77  std::unordered_set<const xAOD::MuonSimHit*> hits{};
78  for (const CalibratedSpacePoint* meas : measurements) {
79  const SpacePoint* sp = meas->spacePoint();
80  if (!sp) continue;
81  const xAOD::MuonSimHit* primHit{getTruthMatchedHit(*sp->primaryMeasurement())};
82  const xAOD::MuonSimHit* secHit{sp->dimension() == 2 ? getTruthMatchedHit(*sp->secondaryMeasurement()) : nullptr};
83  if(primHit){
84  hits.insert(primHit);
85  }
86  if (secHit && secHit != primHit) {
87  hits.insert(secHit);
88  }
89  }
90  return hits;
91  }

◆ 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 61 of file MuonSimHitHelpers.cxx.

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

◆ 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  const xAOD::MuonSimHit* hit = getTruthMatchedHit(**link);
53  if (hit){
54  hits.insert(hit);
55  }
56  }
57  }
58  return hits;
59  }

◆ 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 107 of file MuonSimHitHelpers.cxx.

107  {
109  static const SG::ConstAccessor<TruthLink_t> acc{"truthParticleLink"};
110  if (acc.isAvailable(segment)){
111  const TruthLink_t& link {acc(segment)};
112  if (link.isValid()) {
113  return *link;
114  }
115  }
116  return nullptr;
117  }

◆ getTruthSegments()

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

Returns the segments associated to the truth muon.

Definition at line 128 of file MuonSimHitHelpers.cxx.

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

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

◆ operator<<()

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

Definition at line 10 of file MsTrackSeed.cxx.

10  {
11  ostr<<"Seed @"<<Amg::toString(seed.position())<<std::endl;
12  for (const xAOD::MuonSegment* seg : seed.segments()) {
13  ostr<<" **** "<<detailedSegment(*seg)->msSector()->identString()<<" "
14  <<Amg::toString(seg->position())<<" + "<<Amg::toString(seg->direction())
15  <<", chi2: "<<(seg->chiSquared() / seg->numberDoF())
16  <<", nPrec: "<<seg->nPrecisionHits()<<", nPhi: "<<seg->nPhiLayers()
17  <<", nTrigEta: "<<seg->nTrigEtaLayers()<<std::endl;
18  }
19  return ostr;
20  }

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

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

◆ sign()

constexpr double MuonR4::sign ( const double  x)
constexpr

Returns the sign of a number.

Definition at line 11 of file MatrixUtils.h.

11  {
12  return x > 0. ? 1. : x < 0. ? -1. : 0.;
13  }

◆ toTechIdx()

constexpr 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

constexpr unsigned int MuonR4::minLayers {4}
constexpr

Definition at line 57 of file CombinatorialNSWSeedFinderAlg.cxx.

TGC
@ TGC
Definition: RegSelEnums.h:33
xAOD::MuonSimHit_v1
Definition: MuonSimHit_v1.h:18
STGC
@ STGC
Definition: RegSelEnums.h:39
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
MuonR4::PrdLink_t
ElementLink< PrdCont_t > PrdLink_t
Abrivation to call the link to an element inside an uncalibrated measurement container.
Definition: xAODSegmentCnvAlg.cxx:24
CaloClusterMLCalib::epsilon
constexpr float epsilon
Definition: CaloClusterMLGaussianMixture.h:16
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
MM
@ MM
Definition: RegSelEnums.h:38
xAOD::MuonSegment_v1
Class describing a MuonSegment.
Definition: MuonSegment_v1.h:33
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:157
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
x
#define x
MuonGMR4::SpectrometerSector::identString
std::string identString() const
Returns a string encoding the chamber index & the sector of the MS sector.
Definition: SpectrometerSector.cxx:66
SpacePoint
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SpacePoint.h:7
xAOD::UncalibMeasType::TgcStripType
@ TgcStripType
MuonR4::detailedSegment
const Segment * detailedSegment(const xAOD::MuonSegment &seg)
Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.
Definition: TrackingHelpers.cxx:14
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
MuonR4::HoughHelpers::Eta::houghParamMdtRight
double houghParamMdtRight(double tanBeta, const MuonR4::HoughHitType &dc)
right-side straight line parametrisation for drift circles
Definition: HoughHelperFunctions.cxx:15
DMTest::links
links
Definition: CLinks_v1.cxx:22
MuonR4::PrdLinkVec_t
std::vector< PrdLink_t > PrdLinkVec_t
Abrivation of a collection of Prd links.
Definition: xAODSegmentCnvAlg.cxx:26
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
MuonR4::SegLink_t
ElementLink< MuonR4::SegmentContainer > SegLink_t
Abrivation of the link to the reco segment container
Definition: xAODSegmentCnvAlg.cxx:19
F600IntegrationConfig.spacePoints
spacePoints
Definition: F600IntegrationConfig.py:122
MuonR4::Segment::msSector
const MuonGMR4::SpectrometerSector * msSector() const
Returns the associated MS sector.
Definition: MuonSpectrometer/MuonPhaseII/Event/MuonPatternEvent/MuonPatternEvent/Segment.h:39
RPC
@ RPC
Definition: RegSelEnums.h:32
python.TruthMuonD3PDObject.truthMuon
truthMuon
Definition: TruthMuonD3PDObject.py:51
python.PyAthena.v
v
Definition: PyAthena.py:154
MuonR4::getTruthMatchedHit
const xAOD::MuonSimHit * getTruthMatchedHit(const xAOD::UncalibratedMeasurement &prdHit)
Returns the MuonSimHit, if there's any, matched to the uncalibrated muon measurement.
Definition: MuonSimHitHelpers.cxx:27
MuonR4::HoughHelpers::Eta::houghParamStrip
double houghParamStrip(double tanBeta, const MuonR4::HoughHitType &strip)
straight line parametrisation for strip detector measurements
Definition: HoughHelperFunctions.cxx:19
MuonR4::HoughHelpers::Eta::houghParamMdtLeft
double houghParamMdtLeft(double tanBeta, const MuonR4::HoughHitType &dc)
left-side straight line parametrisation for drift circles
Definition: HoughHelperFunctions.cxx:11
xAOD::UncalibMeasType::RpcStripType
@ RpcStripType
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
MuonR4::getMatchingSimHits
std::unordered_set< const xAOD::MuonSimHit * > getMatchingSimHits(const xAOD::MuonSegment &segment)
: Returns all sim hits matched to a xAOD::MuonSegment
Definition: MuonSimHitHelpers.cxx:38
MDT
@ MDT
Definition: RegSelEnums.h:31