ATLAS Offline Software
DCMathSegmentMaker.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef DCMATHSEGMENTMAKER_H
6 #define DCMATHSEGMENTMAKER_H
7 
8 #include <list>
9 #include <set>
10 
33 #include "TrkSurfaces/Surface.h"
35 namespace Trk {
36  class RIO_OnTrack;
37  class PlaneSurface;
38 } // namespace Trk
39 
40 namespace TrkDriftCircleMath {
41  class MdtMultiChamberGeometry;
42  class Segment;
43 } // namespace TrkDriftCircleMath
44 
45 namespace MuonGM {
46  class MuonDetectorManager;
47 }
48 
49 namespace Muon {
50  class MdtPrepData;
51 }
52 
53 namespace Muon {
54 
55  class MdtDriftCircleOnTrack;
56 
68  bool operator()(const MuonClusterOnTrack* cl1, const MuonClusterOnTrack* cl2) { return cl1->identify() < cl2->identify(); }
69  };
70 
83  bool operator()(const std::pair<double, std::unique_ptr<const Trk::MeasurementBase>>& hit1,
84  const std::pair<double, std::unique_ptr<const Trk::MeasurementBase>>& hit2) {
85  return hit1.first < hit2.first;
86  }
87  };
88 
96  class DCMathSegmentMaker : public extends<AthAlgTool, IMuonSegmentMaker> {
97  public:
98  // pair of eta-phi hits in the same gasgap
99  using EtaPhiHitsPair = std::pair<std::vector<const MuonClusterOnTrack*>, std::vector<const MuonClusterOnTrack*> >;
100  // map to sort hit per gasgap
101  using IdHitMap = std::map<Identifier, EtaPhiHitsPair>;
102  using ChIdHitMap = std::map<Identifier, IdHitMap>;
103 
104 
105  struct HitInXZ {
106  HitInXZ(Identifier i, bool isM, bool measP, double lx, double lz, double lxmin, double lxmax, double phmin, double phmax) :
107  id(i), isMdt(isM), measPhi(measP), x(lx), z(lz), xmin(lxmin), xmax(lxmax), phimin(phmin), phimax(phmax) {}
109  bool isMdt{false};
110  bool measPhi{false};
111  double x{0.};
112  double z{0.};
113  double xmin{0.};
114  double xmax{0.};
115  double phimin{0.};
116  double phimax{0.};
117  };
118 
119  struct Cluster2D {
121  Cluster2D(const Identifier elId, const Identifier ggId, const Amg::Vector2D& lp, double err, const MuonClusterOnTrack* ecl,
122  const MuonClusterOnTrack* pcl) :
123  detElId(elId), gasGapId(ggId), locPos(lp), error(err), etaHit(ecl), phiHit(pcl) {
124  if (ecl || pcl) { surface().localToGlobal(locPos, Amg::Vector3D::UnitZ(), globalPos); }
125  if (pcl) phiHits.push_back(pcl);
126  }
128  Cluster2D(const Identifier elId, const Identifier ggId, const Amg::Vector2D& lp, double err, const MuonClusterOnTrack* ecl,
129  const std::vector<const MuonClusterOnTrack*>& phs) :
130  detElId(elId), gasGapId(ggId), locPos(lp), error(err), etaHit(ecl), phiHits(phs) {
131  // if phiHits to empty point phiHit to first hit in PhiHits
132  phiHit = phiHits.empty() ? 0 : phiHits.front();
133  if (ecl || phiHit) { surface().localToGlobal(locPos, Amg::Vector3D::UnitZ(), globalPos); }
134  }
138  double error; // assume same error for eta and phi
139  const MuonClusterOnTrack* etaHit{nullptr};
140  const MuonClusterOnTrack* phiHit{nullptr};
141  std::vector<const MuonClusterOnTrack*> phiHits;
142  const Trk::Surface& surface() const {
143  if (etaHit)
144  return etaHit->associatedSurface();
145  else
146  return phiHit->associatedSurface();
147  }
149  if (etaHit)
150  return etaHit->identify();
151  else
152  return phiHit->identify();
153  }
155  bool is2D() const { return etaHit && phiHit; }
156  bool corrupt() const { return (!etaHit && !phiHit) || error < 0.01; }
157  };
158  using ClusterVec = std::vector<Cluster2D>;
159  using ClusterVecPair = std::pair<ClusterVec, ClusterVec>;
160 
161  struct TubeEnds {
162  TubeEnds() = default;
163  double lxmin{0};
164  double lxmax{0};
165  double phimin{0};
166  double phimax{0};
167  };
168 
169  struct segmentCreationInfo { // miscellaneous objects needed for segment creation
171  Amg::Transform3D amdbToGlobal, double pmin, double pmax) :
172  clusters(spVecs.first, spVecs.second),
173  geom(multiGeo),
174  globalTrans(gToStation),
175  amdbTrans(amdbToGlobal),
176  phimin(pmin),
177  phimax(pmax) {}
180  Amg::Transform3D globalTrans{Amg::Transform3D::Identity()};
181  Amg::Transform3D amdbTrans{Amg::Transform3D::Identity()};
182  double phimin{0.};
183  double phimax{0.};
184  };
185 
186  public:
187  DCMathSegmentMaker(const std::string&, const std::string&, const IInterface*);
188 
189  virtual ~DCMathSegmentMaker() = default;
190 
191  virtual StatusCode initialize();
192 
203  void find(const std::vector<const Trk::RIO_OnTrack*>& rios, Trk::SegmentCollection* segColl = nullptr) const;
204 
213  void find(const std::vector<const Trk::RIO_OnTrack*>& rios1, const std::vector<const Trk::RIO_OnTrack*>& rios2) const;
214 
228  void find(const std::vector<const MdtDriftCircleOnTrack*>& mdts, const std::vector<const MuonClusterOnTrack*>& clusters,
229  Trk::SegmentCollection* segColl = nullptr) const;
230 
241  void find(const Amg::Vector3D& gpos, const Amg::Vector3D& gdir, const std::vector<const MdtDriftCircleOnTrack*>& mdts,
242  const std::vector<const MuonClusterOnTrack*>& clusters, bool hasPhiMeasurements = false,
243  Trk::SegmentCollection* segColl = nullptr, double momentum = 1e9, double sinAngleCut = 0) const;
244 
259  void find(const Trk::TrackRoad& road, const std::vector<std::vector<const MdtDriftCircleOnTrack*> >& mdts,
260  const std::vector<std::vector<const MuonClusterOnTrack*> >& clusters, Trk::SegmentCollection* segColl,
261  bool hasPhiMeasurements = false, double momentum = 1e9) const;
262 
263  private:
265  bool errorScalingRegion(const Identifier& id) const;
266 
268  double errorScaleFactor(const Identifier& id, double curvature, bool hasPhiMeasurements) const;
269 
270  std::vector<Identifier> calculateHoles(const EventContext& ctx, Identifier chid, const Amg::Vector3D& gpos, const Amg::Vector3D& gdir, bool hasMeasuredCoordinate,
271  std::set<Identifier>& deltaVec, std::set<Identifier>& outoftimeVec,
272  const std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec) const;
273 
274  TrkDriftCircleMath::DCVec createDCVec(const std::vector<const MdtDriftCircleOnTrack*>& mdts, double errorScale,
275  std::set<Identifier>& chamberSet, double& phimin, double& phimax,
276  TrkDriftCircleMath::DCStatistics& dcStatistics, const Amg::Transform3D& gToStation,
277  const Amg::Transform3D& amdbToGlobal) const;
278  ClusterVecPair create1DClusters(const std::vector<const MuonClusterOnTrack*>& clusters) const;
279  ClusterVecPair create2DClusters(const std::vector<const MuonClusterOnTrack*>& clusters) const;
280 
281  ClusterVecPair createSpacePoints(const ChIdHitMap& chIdHitMap) const;
282  ClusterVecPair createSpacePoints(const IdHitMap& gasGapHitMap) const;
283  Cluster2D createSpacePoint(const Identifier& gasGapId, const MuonClusterOnTrack* etaHit, const MuonClusterOnTrack* phiHit) const;
284  Cluster2D createRpcSpacePoint(const Identifier& gasGapId, const MuonClusterOnTrack* etaHit,
285  const std::vector<const MuonClusterOnTrack*>& phiHits) const;
286  Cluster2D createTgcSpacePoint(const Identifier& gasGapId, const MuonClusterOnTrack* etaHit, const MuonClusterOnTrack* phiHit) const;
287  TrkDriftCircleMath::CLVec createClusterVec(const Identifier& chid, ClusterVec& spVec, const Amg::Transform3D& gToStation) const;
288 
291  const TrkDriftCircleMath::ChamberGeometry* multiGeo, const Amg::Transform3D& gToStation, const Amg::Transform3D& amdbToGlobal,
292  std::set<Identifier>& deltaVec, std::set<Identifier>& outoftimeVec,
293  std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec) const;
294  std::pair<std::pair<int, int>, bool> associateClustersToSegment(
295  const TrkDriftCircleMath::Segment& segment, const Identifier& chid, const Amg::Transform3D& gToStation, ClusterVecPair& spVecs,
296  double phimin, double phimax, std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec) const;
297 
299  std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec) ;
300 
301  static double distanceToSegment(const TrkDriftCircleMath::Segment& segment, const Amg::Vector3D& hitPos,
302  const Amg::Transform3D& gToStation) ;
303  static std::pair<double, double> residualAndPullWithSegment(const TrkDriftCircleMath::Segment& segment, const Cluster2D& spacePoint,
304  const Amg::Transform3D& gToStation) ;
305 
307 
308  const MdtDriftCircleOnTrack* findFirstRotInChamberWithMostHits(const std::vector<const MdtDriftCircleOnTrack*>& mdts) const;
309 
310  bool updateSegmentPhi(const Amg::Vector3D& gpos, const Amg::Vector3D& gdir, Amg::Vector2D& segLocPos,
311  Trk::LocalDirection& segLocDir, Trk::PlaneSurface& surf, const std::vector<const Trk::MeasurementBase*>& rots,
312  double phimin, double phimax) const;
313 
315  bool checkBoundsInXZ(double xline, double zline, double dXdZ, const std::vector<HitInXZ>& hits) const;
316 
318  TubeEnds localTubeEnds(const MdtDriftCircleOnTrack& mdt, const Amg::Transform3D& gToSegment,
319  const Amg::Transform3D& segmentToG) const;
320 
322  static void updatePhiRanges(double phiminNew, double phimaxNew, double& phiminRef, double& phimaxRef) ;
323 
325  bool checkPhiConsistency(double phi, double phimin, double phimax) const;
326 
328  Amg::Vector3D updateDirection(double linephi, const Trk::PlaneSurface& surf, const Amg::Vector3D& roaddir,
329  bool isCurvedSegment) const;
330 
331  std::unique_ptr<MuonSegment> createSegment(const EventContext& ctx, TrkDriftCircleMath::Segment& segment, const Identifier& chid, const Amg::Vector3D& roadpos,
332  const Amg::Vector3D& roaddir2, const std::vector<const MdtDriftCircleOnTrack*>& mdts,
333  bool hasPhiMeasurements, segmentCreationInfo& sInfo) const;
334 
335  const MdtPrepData* findMdt(const EventContext& ctx, const Identifier& id) const;
336 
339  this,
340  "DetectorManagerKey",
341  "MuonDetectorManager",
342  "Key of input MuonDetectorManager condition data",
343  };
344 
346  this,
347  "MuonIdHelperSvc",
348  "Muon::MuonIdHelperSvc/MuonIdHelperSvc",
349  };
351  this,
352  "edmHelper",
353  "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
354  "Handle to the service providing the IMuonEDMHelperSvc interface",
355  }; //<! edm helper tool
356 
357  ToolHandle<IMdtDriftCircleOnTrackCreator> m_mdtCreator{
358  this,
359  "MdtCreator",
360  "Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator",
361  }; //<! mdt rio ontrack creator
362  ToolHandle<IMdtDriftCircleOnTrackCreator> m_mdtCreatorT0{
363  this,
364  "MdtCreatorT0",
365  "Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator",
366  }; //<! mdt rio ontrack creator
367  ToolHandle<IMuonClusterOnTrackCreator> m_clusterCreator{
368  this,
369  "MuonClusterCreator",
370  "Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator",
371  }; //<! cluster rio ontrack creator
372  ToolHandle<IMuonCompetingClustersOnTrackCreator> m_compClusterCreator{
373  this,
374  "MuonCompetingClustersCreator",
375  "Muon::TriggerChamberClusterOnTrackCreator/TriggerChamberClusterOnTrackCreator",
376  }; //<! competing clusters rio ontrack creator
377  PublicToolHandle<MuonEDMPrinterTool> m_printer{
378  this,
379  "EDMPrinter",
380  "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
381  }; //<! printer helper tool
382  ToolHandle<IMdtSegmentFinder> m_segmentFinder{
383  this,
384  "MdtSegmentFinder",
385  "Muon::MdtMathSegmentFinder/MdtMathSegmentFinder",
386  }; //<! segment finder tool
387  ToolHandle<IMuonSegmentFittingTool> m_segmentFitter{
388  this,
389  "SegmentFitter",
390  "Muon::MuonSegmentFittingTool/MuonSegmentFittingTool",
391  }; //<! segment fitting tool
392  ToolHandle<IMuonSegmentSelectionTool> m_segmentSelectionTool{
393  this,
394  "SegmentSelector",
395  "Muon::MuonSegmentSelectionTool/MuonSegmentSelectionTool",
396  }; //<! segment selection tool
397  ToolHandle<IDCSLFitProvider> m_dcslFitProvider{
398  this,
399  "DCFitProvider",
400  "",
401  };
402 
403  Gaudi::Property<double> m_sinAngleCut{this, "SinAngleCut", 0.2}; //<! cut on the angle between the segment and the prediction
404  Gaudi::Property<bool> m_doGeometry{this, "DoGeometry", true}; //<! use chamber geometry in segment finding
405  Gaudi::Property<bool> m_curvedErrorScaling{this, "CurvedErrorScaling", true}; //<! rescale errors for low momenta
406  Gaudi::Property<bool> m_doSpacePoints{this, "UseTriggerSpacePoints", true}; //<! use cluster space points for association
407  Gaudi::Property<bool> m_createCompetingROTsEta{this, "CreateCompetingROTsEta", true}; //<! create competing ROTs for the clusters
408  Gaudi::Property<bool> m_createCompetingROTsPhi{this, "CreateCompetingROTsPhi", true}; //<! create competing ROTs for the clusters
409  Gaudi::Property<bool> m_refitParameters{this, "RefitSegment", false}; //<! refit segment if there are sufficient phi hits and update the segment parameters
410  Gaudi::Property<bool> m_addUnassociatedPhiHits{this, "AddUnassociatedPhiHits", false}; //<! if there are phi hits without associated eta hit add them to segment
411  Gaudi::Property<bool> m_strictRoadDirectionConsistencyCheck{this, "StrictRoadDirectionConsistencyCheck", true}; //<! check if direction of road is consistent with IP (default: true),
412  // should be off for cosmics
413  Gaudi::Property<double> m_maxAssociateClusterDistance{this, "MaxAssociateClusterDistance", 3000.}; //<! maximum distance for clusters to be associated to segment (default: 3000
414  //(mm))
415  Gaudi::Property<bool> m_allMdtHoles{this, "AllMdtHoles", false}; //<! add all mdt holes without bound checks / flag to decide whether to apply bound checks during the hole search
416  Gaudi::Property<bool> m_removeDeltas{this, "RemoveDeltasFromSegmentQuality", true}; //<! do not add delta electrons to MuonSegmentQuality::holes
417  Gaudi::Property<bool> m_reject1DTgcSpacePoints{this,"Reject1DTgcSpacePoints", true }; //<! remove 1D tgc space points / reject TGC eta hits that are not associated with a phi hit in the same gas gap
418  Gaudi::Property<bool> m_usePreciseError{this, "UsePreciseError", false};
419  Gaudi::Property<bool> m_outputFittedT0{this, "OutputFittedT0", false};
420  Gaudi::Property<double> m_preciseErrorScale{this, "PreciseErrorScale", 2.};
421  Gaudi::Property<bool> m_doTimeOutChecks{this, "UseTimeOutGard", false};
422 
423  Gaudi::Property<bool> m_recoverBadRpcCabling{this, "RecoverBadRpcCabling", false};
424  Gaudi::Property<bool> m_updatePhiUsingPhiHits{this, "UpdatePhiUsingPhiHits", false};
425  Gaudi::Property<bool> m_assumePointingPhi{this, "AssumePointingPhi", false };
426  Gaudi::Property<bool> m_redo2DFit{this, "Redo2DFit", true};
427 
428 
429  SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_mdtKey{this, "MdtPrepDataContainer", "MDT_DriftCircles"};
430 
431  SG::ReadCondHandleKey<Muon::MuonIntersectGeoData> m_chamberGeoKey{this, "ChamberGeoKey", "MuonStationIntersects", "Pointer to hole search service"};
432 
433 
434  };
435 
436 } // namespace Muon
437 #endif
Trk::TrackRoad
Encapsulates the information required by the find() method of the muon segment makers.
Definition: TrackRoad.h:21
Muon::DCMathSegmentMaker::m_reject1DTgcSpacePoints
Gaudi::Property< bool > m_reject1DTgcSpacePoints
Definition: DCMathSegmentMaker.h:417
Muon::DCMathSegmentMaker::Cluster2D::surface
const Trk::Surface & surface() const
Definition: DCMathSegmentMaker.h:142
Muon::DCMathSegmentMaker::residualAndPullWithSegment
static std::pair< double, double > residualAndPullWithSegment(const TrkDriftCircleMath::Segment &segment, const Cluster2D &spacePoint, const Amg::Transform3D &gToStation)
Definition: DCMathSegmentMaker.cxx:1670
Muon::DCMathSegmentMaker::errorScaleFactor
double errorScaleFactor(const Identifier &id, double curvature, bool hasPhiMeasurements) const
calculate error scaling factor
Definition: DCMathSegmentMaker.cxx:646
Muon::DCMathSegmentMaker::m_addUnassociatedPhiHits
Gaudi::Property< bool > m_addUnassociatedPhiHits
Definition: DCMathSegmentMaker.h:410
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
Trk::PrepRawDataType::MdtPrepData
@ MdtPrepData
Muon::DCMathSegmentMaker::m_createCompetingROTsEta
Gaudi::Property< bool > m_createCompetingROTsEta
Definition: DCMathSegmentMaker.h:407
Muon::DCMathSegmentMaker::HitInXZ::z
double z
Definition: DCMathSegmentMaker.h:112
Muon::DCMathSegmentMaker::ClusterVec
std::vector< Cluster2D > ClusterVec
Definition: DCMathSegmentMaker.h:158
Muon::DCMathSegmentMaker::associateClustersToSegment
std::pair< std::pair< int, int >, bool > associateClustersToSegment(const TrkDriftCircleMath::Segment &segment, const Identifier &chid, const Amg::Transform3D &gToStation, ClusterVecPair &spVecs, double phimin, double phimax, std::vector< std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> > &rioDistVec) const
Definition: DCMathSegmentMaker.cxx:1287
Muon::DCMathSegmentMaker::DCMathSegmentMaker
DCMathSegmentMaker(const std::string &, const std::string &, const IInterface *)
Definition: DCMathSegmentMaker.cxx:62
Muon::DCMathSegmentMaker::ClusterVecPair
std::pair< ClusterVec, ClusterVec > ClusterVecPair
Definition: DCMathSegmentMaker.h:159
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
Muon::DCMathSegmentMaker::Cluster2D::phiHit
const MuonClusterOnTrack * phiHit
Definition: DCMathSegmentMaker.h:140
Muon::DCMathSegmentMaker::HitInXZ::x
double x
Definition: DCMathSegmentMaker.h:111
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
IMdtSegmentFinder.h
Muon::DCMathSegmentMaker::segmentCreationInfo::phimax
double phimax
Definition: DCMathSegmentMaker.h:183
Surface.h
Muon::DCMathSegmentMaker::Cluster2D::Cluster2D
Cluster2D(const Identifier elId, const Identifier ggId, const Amg::Vector2D &lp, double err, const MuonClusterOnTrack *ecl, const MuonClusterOnTrack *pcl)
constructor taking a single phi hit
Definition: DCMathSegmentMaker.h:121
MuonEDMPrinterTool.h
Muon::DCMathSegmentMaker::Cluster2D::gasGapId
Identifier gasGapId
Definition: DCMathSegmentMaker.h:136
Muon::DCMathSegmentMaker::m_segmentSelectionTool
ToolHandle< IMuonSegmentSelectionTool > m_segmentSelectionTool
Definition: DCMathSegmentMaker.h:392
Trk::TrackState::Segment
@ Segment
Definition: TrackStateDefs.h:37
Muon::DCMathSegmentMaker::create1DClusters
ClusterVecPair create1DClusters(const std::vector< const MuonClusterOnTrack * > &clusters) const
Definition: DCMathSegmentMaker.cxx:697
Muon::DCMathSegmentMaker::Cluster2D::locPos
Amg::Vector2D locPos
Definition: DCMathSegmentMaker.h:137
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
TrkDriftCircleMath::ChamberGeometry
Definition: ChamberGeometry.h:17
Muon::DCMathSegmentMaker::find
void find(const std::vector< const Trk::RIO_OnTrack * > &rios, Trk::SegmentCollection *segColl=nullptr) const
find segments starting from a list of RIO_OnTrack objects, implementation of IMuonSegmentMaker interf...
Definition: DCMathSegmentMaker.cxx:591
Muon::SortByDistanceToSegment
Function object to sort pairs containing a double and a pointer to a MuonClusterOnTrack.
Definition: DCMathSegmentMaker.h:82
TrkDriftCircleMath::CLVec
std::vector< Cluster > CLVec
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Cluster.h:70
Muon::DCMathSegmentMaker::m_removeDeltas
Gaudi::Property< bool > m_removeDeltas
Definition: DCMathSegmentMaker.h:416
Muon::DCMathSegmentMaker::createDCVec
TrkDriftCircleMath::DCVec createDCVec(const std::vector< const MdtDriftCircleOnTrack * > &mdts, double errorScale, std::set< Identifier > &chamberSet, double &phimin, double &phimax, TrkDriftCircleMath::DCStatistics &dcStatistics, const Amg::Transform3D &gToStation, const Amg::Transform3D &amdbToGlobal) const
Definition: DCMathSegmentMaker.cxx:1023
Muon::DCMathSegmentMaker::m_printer
PublicToolHandle< MuonEDMPrinterTool > m_printer
Definition: DCMathSegmentMaker.h:377
TrkDriftCircleMath
Function object to check whether two Segments are sub/super sets or different.
Definition: IMdtSegmentFinder.h:13
Muon::DCMathSegmentMaker::m_segmentFinder
ToolHandle< IMdtSegmentFinder > m_segmentFinder
Definition: DCMathSegmentMaker.h:382
Muon::DCMathSegmentMaker::Cluster2D::error
double error
Definition: DCMathSegmentMaker.h:138
Muon::DCMathSegmentMaker::ChIdHitMap
std::map< Identifier, IdHitMap > ChIdHitMap
Definition: DCMathSegmentMaker.h:102
IMuonCompetingClustersOnTrackCreator.h
DriftCircle.h
Muon::DCMathSegmentMaker::Cluster2D::identify
Identifier identify() const
Definition: DCMathSegmentMaker.h:148
DCSLFitter.h
Muon::DCMathSegmentMaker::updateSegmentPhi
bool updateSegmentPhi(const Amg::Vector3D &gpos, const Amg::Vector3D &gdir, Amg::Vector2D &segLocPos, Trk::LocalDirection &segLocDir, Trk::PlaneSurface &surf, const std::vector< const Trk::MeasurementBase * > &rots, double phimin, double phimax) const
Definition: DCMathSegmentMaker.cxx:1849
Muon::DCMathSegmentMaker::Cluster2D::phiHits
std::vector< const MuonClusterOnTrack * > phiHits
Definition: DCMathSegmentMaker.h:141
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
Muon::DCMathSegmentMaker::TubeEnds::lxmax
double lxmax
Definition: DCMathSegmentMaker.h:164
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::DCMathSegmentMaker::updatePhiRanges
static void updatePhiRanges(double phiminNew, double phimaxNew, double &phiminRef, double &phimaxRef)
update phi ranges
Definition: DCMathSegmentMaker.cxx:2079
Muon::DCMathSegmentMaker::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
pointers to IdHelpers
Definition: DCMathSegmentMaker.h:338
Muon::DCMathSegmentMaker::createSpacePoints
ClusterVecPair createSpacePoints(const ChIdHitMap &chIdHitMap) const
Definition: DCMathSegmentMaker.cxx:744
Muon::DCMathSegmentMaker::checkBoundsInXZ
bool checkBoundsInXZ(double xline, double zline, double dXdZ, const std::vector< HitInXZ > &hits) const
check whether all hits are in bounds in the XZ plane
Definition: DCMathSegmentMaker.cxx:1825
TrkDriftCircleMath::Segment
Definition: Tracking/TrkUtilityPackages/TrkDriftCircleMath/TrkDriftCircleMath/Segment.h:18
TrkDriftCircleMath::DCVec
std::vector< DriftCircle > DCVec
Definition: DriftCircle.h:117
Muon::DCMathSegmentMaker::m_curvedErrorScaling
Gaudi::Property< bool > m_curvedErrorScaling
Definition: DCMathSegmentMaker.h:405
Muon::DCMathSegmentMaker::HitInXZ::xmax
double xmax
Definition: DCMathSegmentMaker.h:114
Muon::DCMathSegmentMaker::m_mdtCreator
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtCreator
Definition: DCMathSegmentMaker.h:357
Muon::DCMathSegmentMaker::segmentCreationInfo::globalTrans
Amg::Transform3D globalTrans
Definition: DCMathSegmentMaker.h:180
Muon::DCMathSegmentMaker::HitInXZ::phimax
double phimax
Definition: DCMathSegmentMaker.h:116
Muon::DCMathSegmentMaker::Cluster2D::detElId
Identifier detElId
Definition: DCMathSegmentMaker.h:135
IMuonSegmentFittingTool.h
MuonIntersectGeoData.h
GeoPrimitives.h
Muon::DCMathSegmentMaker::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: DCMathSegmentMaker.h:345
Muon::DCMathSegmentMaker::m_compClusterCreator
ToolHandle< IMuonCompetingClustersOnTrackCreator > m_compClusterCreator
Definition: DCMathSegmentMaker.h:372
Muon::DCMathSegmentMaker::createROTVec
static DataVector< const Trk::MeasurementBase > createROTVec(std::vector< std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> > &rioDistVec)
Definition: DCMathSegmentMaker.cxx:1658
Muon::DCMathSegmentMaker::Cluster2D::etaHit
const MuonClusterOnTrack * etaHit
Definition: DCMathSegmentMaker.h:139
Muon::DCMathSegmentMaker::createClusterVec
TrkDriftCircleMath::CLVec createClusterVec(const Identifier &chid, ClusterVec &spVec, const Amg::Transform3D &gToStation) const
Definition: DCMathSegmentMaker.cxx:981
Muon::DCMathSegmentMaker::m_usePreciseError
Gaudi::Property< bool > m_usePreciseError
Definition: DCMathSegmentMaker.h:418
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
Muon::DCMathSegmentMaker::TubeEnds::phimin
double phimin
Definition: DCMathSegmentMaker.h:165
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
Muon::DCMathSegmentMaker::associateMDTsToSegment
void associateMDTsToSegment(const Amg::Vector3D &gdir, TrkDriftCircleMath::Segment &segment, const TrkDriftCircleMath::ChamberGeometry *multiGeo, const Amg::Transform3D &gToStation, const Amg::Transform3D &amdbToGlobal, std::set< Identifier > &deltaVec, std::set< Identifier > &outoftimeVec, std::vector< std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> > &rioDistVec) const
Definition: DCMathSegmentMaker.cxx:1152
lumiFormat.i
int i
Definition: lumiFormat.py:85
Muon::DCMathSegmentMaker::errorScalingRegion
bool errorScalingRegion(const Identifier &id) const
apply error scaling for low mometum tracks
Definition: DCMathSegmentMaker.cxx:679
Muon::DCMathSegmentMaker::m_segmentFitter
ToolHandle< IMuonSegmentFittingTool > m_segmentFitter
Definition: DCMathSegmentMaker.h:387
IMuonSegmentSelectionTool.h
Muon::DCMathSegmentMaker::Cluster2D::Cluster2D
Cluster2D(const Identifier elId, const Identifier ggId, const Amg::Vector2D &lp, double err, const MuonClusterOnTrack *ecl, const std::vector< const MuonClusterOnTrack * > &phs)
constructor taking a vector of phi hits
Definition: DCMathSegmentMaker.h:128
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Muon::DCMathSegmentMaker::Cluster2D
Definition: DCMathSegmentMaker.h:119
Muon::DCMathSegmentMaker::segmentCreationInfo::phimin
double phimin
Definition: DCMathSegmentMaker.h:182
TrkDriftCircleMath::MdtChamberGeometry
Definition: MdtChamberGeometry.h:18
Muon::DCMathSegmentMaker::m_edmHelperSvc
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
Definition: DCMathSegmentMaker.h:350
Muon::SortClustersById
Function object to sort MuonClusterOnTrack pointers by Identier.
Definition: DCMathSegmentMaker.h:67
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
IMuonClusterOnTrackCreator.h
AthAlgTool.h
Muon::DCMathSegmentMaker::m_chamberGeoKey
SG::ReadCondHandleKey< Muon::MuonIntersectGeoData > m_chamberGeoKey
Definition: DCMathSegmentMaker.h:431
Muon::DCMathSegmentMaker::HitInXZ::HitInXZ
HitInXZ(Identifier i, bool isM, bool measP, double lx, double lz, double lxmin, double lxmax, double phmin, double phmax)
Definition: DCMathSegmentMaker.h:106
Muon::DCMathSegmentMaker::Cluster2D::corrupt
bool corrupt() const
Definition: DCMathSegmentMaker.h:156
Muon::DCMathSegmentMaker::TubeEnds::phimax
double phimax
Definition: DCMathSegmentMaker.h:166
Muon::DCMathSegmentMaker::TubeEnds::lxmin
double lxmin
Definition: DCMathSegmentMaker.h:163
DCSLHitSelector.h
Muon::DCMathSegmentMaker::createSpacePoint
Cluster2D createSpacePoint(const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const MuonClusterOnTrack *phiHit) const
Definition: DCMathSegmentMaker.cxx:847
Muon::DCMathSegmentMaker::Cluster2D::is2D
bool is2D() const
Definition: DCMathSegmentMaker.h:155
Muon::DCMathSegmentMaker::~DCMathSegmentMaker
virtual ~DCMathSegmentMaker()=default
Muon::DCMathSegmentMaker::segmentCreationInfo::clusters
ClusterVecPair clusters
Definition: DCMathSegmentMaker.h:178
Muon::DCMathSegmentMaker::m_refitParameters
Gaudi::Property< bool > m_refitParameters
Definition: DCMathSegmentMaker.h:409
Muon::DCMathSegmentMaker::m_allMdtHoles
Gaudi::Property< bool > m_allMdtHoles
Definition: DCMathSegmentMaker.h:415
Muon::DCMathSegmentMaker::createSegment
std::unique_ptr< MuonSegment > createSegment(const EventContext &ctx, TrkDriftCircleMath::Segment &segment, const Identifier &chid, const Amg::Vector3D &roadpos, const Amg::Vector3D &roaddir2, const std::vector< const MdtDriftCircleOnTrack * > &mdts, bool hasPhiMeasurements, segmentCreationInfo &sInfo) const
Definition: DCMathSegmentMaker.cxx:229
Muon::DCMathSegmentMaker::initialize
virtual StatusCode initialize()
Definition: DCMathSegmentMaker.cxx:65
Muon::DCMathSegmentMaker::m_createCompetingROTsPhi
Gaudi::Property< bool > m_createCompetingROTsPhi
Definition: DCMathSegmentMaker.h:408
Muon::DCMathSegmentMaker::m_recoverBadRpcCabling
Gaudi::Property< bool > m_recoverBadRpcCabling
Definition: DCMathSegmentMaker.h:423
MdtChamberGeometry.h
Muon::DCMathSegmentMaker::TubeEnds::TubeEnds
TubeEnds()=default
DataVector< Trk::Segment >
Trk::LocalDirection
represents the three-dimensional global direction with respect to a planar surface frame.
Definition: LocalDirection.h:81
Muon::DCMathSegmentMaker::IdHitMap
std::map< Identifier, EtaPhiHitsPair > IdHitMap
Definition: DCMathSegmentMaker.h:101
Muon::DCMathSegmentMaker::localTubeEnds
TubeEnds localTubeEnds(const MdtDriftCircleOnTrack &mdt, const Amg::Transform3D &gToSegment, const Amg::Transform3D &segmentToG) const
calculate positions of tube ends
Definition: DCMathSegmentMaker.cxx:2049
IMuonEDMHelperSvc.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Muon::DCMathSegmentMaker::HitInXZ::xmin
double xmin
Definition: DCMathSegmentMaker.h:113
Muon::DCMathSegmentMaker::HitInXZ::isMdt
bool isMdt
Definition: DCMathSegmentMaker.h:109
Muon::DCMathSegmentMaker::calculateHoles
std::vector< Identifier > calculateHoles(const EventContext &ctx, Identifier chid, const Amg::Vector3D &gpos, const Amg::Vector3D &gdir, bool hasMeasuredCoordinate, std::set< Identifier > &deltaVec, std::set< Identifier > &outoftimeVec, const std::vector< std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> > &rioDistVec) const
Definition: DCMathSegmentMaker.cxx:1692
Muon::DCMathSegmentMaker::m_mdtKey
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_mdtKey
Definition: DCMathSegmentMaker.h:429
Muon::DCMathSegmentMaker::create2DClusters
ClusterVecPair create2DClusters(const std::vector< const MuonClusterOnTrack * > &clusters) const
Definition: DCMathSegmentMaker.cxx:723
IMdtDriftCircleOnTrackCreator.h
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition: MdtDriftCircleOnTrack.h:37
Muon::DCMathSegmentMaker::findFirstRotInChamberWithMostHits
const MdtDriftCircleOnTrack * findFirstRotInChamberWithMostHits(const std::vector< const MdtDriftCircleOnTrack * > &mdts) const
Definition: DCMathSegmentMaker.cxx:1795
Muon::DCMathSegmentMaker::HitInXZ::phimin
double phimin
Definition: DCMathSegmentMaker.h:115
Muon::DCMathSegmentMaker::HitInXZ::measPhi
bool measPhi
Definition: DCMathSegmentMaker.h:110
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:33
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::DCMathSegmentMaker::m_strictRoadDirectionConsistencyCheck
Gaudi::Property< bool > m_strictRoadDirectionConsistencyCheck
Definition: DCMathSegmentMaker.h:411
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
Muon::DCMathSegmentMaker::m_dcslFitProvider
ToolHandle< IDCSLFitProvider > m_dcslFitProvider
Definition: DCMathSegmentMaker.h:397
Muon::DCMathSegmentMaker::m_doSpacePoints
Gaudi::Property< bool > m_doSpacePoints
Definition: DCMathSegmentMaker.h:406
Muon::SortByDistanceToSegment::operator()
bool operator()(const std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> &hit1, const std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> &hit2)
Definition: DCMathSegmentMaker.h:83
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager >
Muon::DCMathSegmentMaker::createTgcSpacePoint
Cluster2D createTgcSpacePoint(const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const MuonClusterOnTrack *phiHit) const
Definition: DCMathSegmentMaker.cxx:879
Muon::SortClustersById::operator()
bool operator()(const MuonClusterOnTrack *cl1, const MuonClusterOnTrack *cl2)
Definition: DCMathSegmentMaker.h:68
Muon::DCMathSegmentMaker::m_doTimeOutChecks
Gaudi::Property< bool > m_doTimeOutChecks
Definition: DCMathSegmentMaker.h:421
Muon::DCMathSegmentMaker::m_maxAssociateClusterDistance
Gaudi::Property< double > m_maxAssociateClusterDistance
Definition: DCMathSegmentMaker.h:413
DCStatistics.h
Muon::DCMathSegmentMaker::m_sinAngleCut
Gaudi::Property< double > m_sinAngleCut
Definition: DCMathSegmentMaker.h:403
Muon::DCMathSegmentMaker::m_redo2DFit
Gaudi::Property< bool > m_redo2DFit
Definition: DCMathSegmentMaker.h:426
Muon::DCMathSegmentMaker::m_doGeometry
Gaudi::Property< bool > m_doGeometry
Definition: DCMathSegmentMaker.h:404
Trk::PlaneSurface
Definition: PlaneSurface.h:64
Muon::DCMathSegmentMaker::segmentCreationInfo::geom
const TrkDriftCircleMath::ChamberGeometry * geom
Definition: DCMathSegmentMaker.h:179
Muon::DCMathSegmentMaker::findMdt
const MdtPrepData * findMdt(const EventContext &ctx, const Identifier &id) const
Definition: DCMathSegmentMaker.cxx:1776
Muon::DCMathSegmentMaker::m_assumePointingPhi
Gaudi::Property< bool > m_assumePointingPhi
Definition: DCMathSegmentMaker.h:425
DeMoScan.first
bool first
Definition: DeMoScan.py:536
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
Muon::DCMathSegmentMaker::m_updatePhiUsingPhiHits
Gaudi::Property< bool > m_updatePhiUsingPhiHits
Definition: DCMathSegmentMaker.h:424
Muon::DCMathSegmentMaker::m_clusterCreator
ToolHandle< IMuonClusterOnTrackCreator > m_clusterCreator
Definition: DCMathSegmentMaker.h:367
MuonSegment.h
Muon::DCMathSegmentMaker::EtaPhiHitsPair
std::pair< std::vector< const MuonClusterOnTrack * >, std::vector< const MuonClusterOnTrack * > > EtaPhiHitsPair
Definition: DCMathSegmentMaker.h:99
Muon::DCMathSegmentMaker::distanceToSegment
static double distanceToSegment(const TrkDriftCircleMath::Segment &segment, const Amg::Vector3D &hitPos, const Amg::Transform3D &gToStation)
Definition: DCMathSegmentMaker.cxx:1635
Muon::DCMathSegmentMaker::createRpcSpacePoint
Cluster2D createRpcSpacePoint(const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const std::vector< const MuonClusterOnTrack * > &phiHits) const
Definition: DCMathSegmentMaker.cxx:920
Muon::DCMathSegmentMaker
Definition: DCMathSegmentMaker.h:96
Muon::DCMathSegmentMaker::updateDirection
Amg::Vector3D updateDirection(double linephi, const Trk::PlaneSurface &surf, const Amg::Vector3D &roaddir, bool isCurvedSegment) const
update the global direction, keeping the phi of the input road direction but using the local angle YZ
Definition: DCMathSegmentMaker.cxx:2127
Muon::DCMathSegmentMaker::segmentCreationInfo::amdbTrans
Amg::Transform3D amdbTrans
Definition: DCMathSegmentMaker.h:181
MuonClusterOnTrack.h
Trk::RIO_OnTrack::associatedSurface
virtual const Surface & associatedSurface() const override=0
returns the surface for the local to global transformation
Muon::DCMathSegmentMaker::Cluster2D::globalPos
Amg::Vector3D globalPos
Definition: DCMathSegmentMaker.h:154
Muon::DCMathSegmentMaker::m_outputFittedT0
Gaudi::Property< bool > m_outputFittedT0
Definition: DCMathSegmentMaker.h:419
IDCSLFitProvider.h
Muon::DCMathSegmentMaker::HitInXZ::id
Identifier id
Definition: DCMathSegmentMaker.h:108
Muon::DCMathSegmentMaker::HitInXZ
Definition: DCMathSegmentMaker.h:105
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Muon::DCMathSegmentMaker::m_mdtCreatorT0
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtCreatorT0
Definition: DCMathSegmentMaker.h:362
Cluster.h
error
Definition: IImpactPoint3dEstimator.h:70
Muon::DCMathSegmentMaker::TubeEnds
Definition: DCMathSegmentMaker.h:161
ITrackFitter.h
Trk::Surface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
IMuonIdHelperSvc.h
Muon::DCMathSegmentMaker::createChamberGeometry
TrkDriftCircleMath::MdtChamberGeometry createChamberGeometry(const Identifier &chid, const Amg::Transform3D &gToStation) const
Definition: DCMathSegmentMaker.cxx:1076
Muon::DCMathSegmentMaker::checkPhiConsistency
bool checkPhiConsistency(double phi, double phimin, double phimax) const
check whether phi is consistent with segment phi
Definition: DCMathSegmentMaker.cxx:2101
IMuonSegmentMaker.h
Muon::DCMathSegmentMaker::m_preciseErrorScale
Gaudi::Property< double > m_preciseErrorScale
Definition: DCMathSegmentMaker.h:420
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition: MuonClusterOnTrack.h:34
Muon::DCMathSegmentMaker::segmentCreationInfo
Definition: DCMathSegmentMaker.h:169
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
Muon::DCMathSegmentMaker::segmentCreationInfo::segmentCreationInfo
segmentCreationInfo(ClusterVecPair &spVecs, const TrkDriftCircleMath::ChamberGeometry *multiGeo, Amg::Transform3D gToStation, Amg::Transform3D amdbToGlobal, double pmin, double pmax)
Definition: DCMathSegmentMaker.h:170
ServiceHandle< Muon::IMuonIdHelperSvc >
TrkDriftCircleMath::DCStatistics
This class offers no functionality, but to define a standard device for the maker to transfer to the ...
Definition: DCStatistics.h:19
Identifier
Definition: IdentifierFieldParser.cxx:14