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 #include <string>
11 #include <vector>
12 
15 #include "GaudiKernel/ServiceHandle.h"
16 #include "GaudiKernel/ToolHandle.h"
39 #include "TrkSurfaces/Surface.h"
41 namespace Trk {
42  class RIO_OnTrack;
43  class PlaneSurface;
44 } // namespace Trk
45 
46 namespace TrkDriftCircleMath {
47  class MdtMultiChamberGeometry;
48  class Segment;
49 } // namespace TrkDriftCircleMath
50 
51 namespace MuonGM {
52  class MuonDetectorManager;
53 }
54 
55 namespace Muon {
56  class MdtPrepData;
57 }
58 
59 namespace Muon {
60 
61  class MdtDriftCircleOnTrack;
62 
74  bool operator()(const MuonClusterOnTrack* cl1, const MuonClusterOnTrack* cl2) { return cl1->identify() < cl2->identify(); }
75  };
76 
89  bool operator()(const std::pair<double, std::unique_ptr<const Trk::MeasurementBase>>& hit1,
90  const std::pair<double, std::unique_ptr<const Trk::MeasurementBase>>& hit2) {
91  return hit1.first < hit2.first;
92  }
93  };
94 
102  class DCMathSegmentMaker : virtual public IMuonSegmentMaker, public AthAlgTool {
103  public:
104  // pair of eta-phi hits in the same gasgap
105  using EtaPhiHitsPair = std::pair<std::vector<const MuonClusterOnTrack*>, std::vector<const MuonClusterOnTrack*> >;
106  // map to sort hit per gasgap
107  using IdHitMap = std::map<Identifier, EtaPhiHitsPair>;
108  using ChIdHitMap = std::map<Identifier, IdHitMap>;
109 
110 
111  struct HitInXZ {
112  HitInXZ(Identifier i, bool isM, bool measP, double lx, double lz, double lxmin, double lxmax, double phmin, double phmax) :
113  id(i), isMdt(isM), measPhi(measP), x(lx), z(lz), xmin(lxmin), xmax(lxmax), phimin(phmin), phimax(phmax) {}
115  bool isMdt;
116  bool measPhi;
117  double x;
118  double z;
119  double xmin;
120  double xmax;
121  double phimin;
122  double phimax;
123  };
124 
125  struct Cluster2D {
127  Cluster2D(const Identifier elId, const Identifier ggId, const Amg::Vector2D& lp, double err, const MuonClusterOnTrack* ecl,
128  const MuonClusterOnTrack* pcl) :
129  detElId(elId), gasGapId(ggId), locPos(lp), error(err), etaHit(ecl), phiHit(pcl) {
130  if (ecl || pcl) { surface().localToGlobal(locPos, Amg::Vector3D::UnitZ(), globalPos); }
131  if (pcl) phiHits.push_back(pcl);
132  }
134  Cluster2D(const Identifier elId, const Identifier ggId, const Amg::Vector2D& lp, double err, const MuonClusterOnTrack* ecl,
135  const std::vector<const MuonClusterOnTrack*>& phs) :
136  detElId(elId), gasGapId(ggId), locPos(lp), error(err), etaHit(ecl), phiHits(phs) {
137  // if phiHits to empty point phiHit to first hit in PhiHits
138  phiHit = phiHits.empty() ? 0 : phiHits.front();
139  if (ecl || phiHit) { surface().localToGlobal(locPos, Amg::Vector3D::UnitZ(), globalPos); }
140  }
144  double error; // assume same error for eta and phi
147  std::vector<const MuonClusterOnTrack*> phiHits;
148  const Trk::Surface& surface() const {
149  if (etaHit)
150  return etaHit->associatedSurface();
151  else
152  return phiHit->associatedSurface();
153  }
155  if (etaHit)
156  return etaHit->identify();
157  else
158  return phiHit->identify();
159  }
161  bool is2D() const { return etaHit && phiHit; }
162  bool corrupt() const { return (!etaHit && !phiHit) || error < 0.01; }
163  };
164  using ClusterVec = std::vector<Cluster2D>;
165  using ClusterVecPair = std::pair<ClusterVec, ClusterVec>;
166 
167  struct TubeEnds {
168  TubeEnds() = default;
169  double lxmin{0};
170  double lxmax{0};
171  double phimin{0};
172  double phimax{0};
173  };
174 
175  struct segmentCreationInfo { // miscellaneous objects needed for segment creation
177  Amg::Transform3D amdbToGlobal, double pmin, double pmax) :
178  clusters(spVecs.first, spVecs.second),
179  geom(multiGeo),
180  globalTrans(gToStation),
181  amdbTrans(amdbToGlobal),
182  phimin(pmin),
183  phimax(pmax) {}
186  Amg::Transform3D globalTrans{Amg::Transform3D::Identity()};
187  Amg::Transform3D amdbTrans{Amg::Transform3D::Identity()};
188  double phimin{0.};
189  double phimax{0.};
190  };
191 
192  public:
193  DCMathSegmentMaker(const std::string&, const std::string&, const IInterface*);
194 
195  virtual ~DCMathSegmentMaker() = default;
196 
197  virtual StatusCode initialize();
198 
209  void find(const std::vector<const Trk::RIO_OnTrack*>& rios, Trk::SegmentCollection* segColl = nullptr) const;
210 
219  void find(const std::vector<const Trk::RIO_OnTrack*>& rios1, const std::vector<const Trk::RIO_OnTrack*>& rios2) const;
220 
234  void find(const std::vector<const MdtDriftCircleOnTrack*>& mdts, const std::vector<const MuonClusterOnTrack*>& clusters,
235  Trk::SegmentCollection* segColl = nullptr) const;
236 
247  void find(const Amg::Vector3D& gpos, const Amg::Vector3D& gdir, const std::vector<const MdtDriftCircleOnTrack*>& mdts,
248  const std::vector<const MuonClusterOnTrack*>& clusters, bool hasPhiMeasurements = false,
249  Trk::SegmentCollection* segColl = nullptr, double momentum = 1e9, double sinAngleCut = 0) const;
250 
265  void find(const Trk::TrackRoad& road, const std::vector<std::vector<const MdtDriftCircleOnTrack*> >& mdts,
266  const std::vector<std::vector<const MuonClusterOnTrack*> >& clusters, Trk::SegmentCollection* segColl,
267  bool hasPhiMeasurements = false, double momentum = 1e9) const;
268 
269  private:
271  bool errorScalingRegion(const Identifier& id) const;
272 
274  double errorScaleFactor(const Identifier& id, double curvature, bool hasPhiMeasurements) const;
275 
276  std::vector<Identifier> calculateHoles(const EventContext& ctx, Identifier chid, const Amg::Vector3D& gpos, const Amg::Vector3D& gdir, bool hasMeasuredCoordinate,
277  std::set<Identifier>& deltaVec, std::set<Identifier>& outoftimeVec,
278  const std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec) const;
279 
280  TrkDriftCircleMath::DCVec createDCVec(const std::vector<const MdtDriftCircleOnTrack*>& mdts, double errorScale,
281  std::set<Identifier>& chamberSet, double& phimin, double& phimax,
282  TrkDriftCircleMath::DCStatistics& dcStatistics, const Amg::Transform3D& gToStation,
283  const Amg::Transform3D& amdbToGlobal) const;
284  ClusterVecPair create1DClusters(const std::vector<const MuonClusterOnTrack*>& clusters) const;
285  ClusterVecPair create2DClusters(const std::vector<const MuonClusterOnTrack*>& clusters) const;
286 
287  ClusterVecPair createSpacePoints(const ChIdHitMap& chIdHitMap) const;
288  ClusterVecPair createSpacePoints(const IdHitMap& gasGapHitMap) const;
289  Cluster2D createSpacePoint(const Identifier& gasGapId, const MuonClusterOnTrack* etaHit, const MuonClusterOnTrack* phiHit) const;
290  Cluster2D createRpcSpacePoint(const Identifier& gasGapId, const MuonClusterOnTrack* etaHit,
291  const std::vector<const MuonClusterOnTrack*>& phiHits) const;
292  Cluster2D createTgcSpacePoint(const Identifier& gasGapId, const MuonClusterOnTrack* etaHit, const MuonClusterOnTrack* phiHit) const;
293  TrkDriftCircleMath::CLVec createClusterVec(const Identifier& chid, ClusterVec& spVec, const Amg::Transform3D& gToStation) const;
294 
297  const TrkDriftCircleMath::ChamberGeometry* multiGeo, const Amg::Transform3D& gToStation, const Amg::Transform3D& amdbToGlobal,
298  std::set<Identifier>& deltaVec, std::set<Identifier>& outoftimeVec,
299  std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec) const;
300  std::pair<std::pair<int, int>, bool> associateClustersToSegment(
301  const TrkDriftCircleMath::Segment& segment, const Identifier& chid, const Amg::Transform3D& gToStation, ClusterVecPair& spVecs,
302  double phimin, double phimax, std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec) const;
303 
305  std::vector<std::pair<double, std::unique_ptr<const Trk::MeasurementBase>> >& rioDistVec) ;
306 
307  static double distanceToSegment(const TrkDriftCircleMath::Segment& segment, const Amg::Vector3D& hitPos,
308  const Amg::Transform3D& gToStation) ;
309  static std::pair<double, double> residualAndPullWithSegment(const TrkDriftCircleMath::Segment& segment, const Cluster2D& spacePoint,
310  const Amg::Transform3D& gToStation) ;
311 
313 
314  const MdtDriftCircleOnTrack* findFirstRotInChamberWithMostHits(const std::vector<const MdtDriftCircleOnTrack*>& mdts) const;
315 
316  bool updateSegmentPhi(const Amg::Vector3D& gpos, const Amg::Vector3D& gdir, Amg::Vector2D& segLocPos,
317  Trk::LocalDirection& segLocDir, Trk::PlaneSurface& surf, const std::vector<const Trk::MeasurementBase*>& rots,
318  double phimin, double phimax) const;
319 
321  bool checkBoundsInXZ(double xline, double zline, double dXdZ, const std::vector<HitInXZ>& hits) const;
322 
324  TubeEnds localTubeEnds(const MdtDriftCircleOnTrack& mdt, const Amg::Transform3D& gToSegment,
325  const Amg::Transform3D& segmentToG) const;
326 
328  static void updatePhiRanges(double phiminNew, double phimaxNew, double& phiminRef, double& phimaxRef) ;
329 
331  bool checkPhiConsistency(double phi, double phimin, double phimax) const;
332 
334  Amg::Vector3D updateDirection(double linephi, const Trk::PlaneSurface& surf, const Amg::Vector3D& roaddir,
335  bool isCurvedSegment) const;
336 
337  std::unique_ptr<MuonSegment> createSegment(const EventContext& ctx, TrkDriftCircleMath::Segment& segment, const Identifier& chid, const Amg::Vector3D& roadpos,
338  const Amg::Vector3D& roaddir2, const std::vector<const MdtDriftCircleOnTrack*>& mdts,
339  bool hasPhiMeasurements, segmentCreationInfo& sInfo) const;
340 
341  const MdtPrepData* findMdt(const EventContext& ctx, const Identifier& id) const;
342 
345  this,
346  "DetectorManagerKey",
347  "MuonDetectorManager",
348  "Key of input MuonDetectorManager condition data",
349  };
350 
352  this,
353  "MuonIdHelperSvc",
354  "Muon::MuonIdHelperSvc/MuonIdHelperSvc",
355  };
357  this,
358  "edmHelper",
359  "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
360  "Handle to the service providing the IMuonEDMHelperSvc interface",
361  }; //<! edm helper tool
362 
363  ToolHandle<IMdtDriftCircleOnTrackCreator> m_mdtCreator{
364  this,
365  "MdtCreator",
366  "Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator",
367  }; //<! mdt rio ontrack creator
368  ToolHandle<IMdtDriftCircleOnTrackCreator> m_mdtCreatorT0{
369  this,
370  "MdtCreatorT0",
371  "Muon::MdtDriftCircleOnTrackCreator/MdtDriftCircleOnTrackCreator",
372  }; //<! mdt rio ontrack creator
373  ToolHandle<IMuonClusterOnTrackCreator> m_clusterCreator{
374  this,
375  "MuonClusterCreator",
376  "Muon::MuonClusterOnTrackCreator/MuonClusterOnTrackCreator",
377  }; //<! cluster rio ontrack creator
378  ToolHandle<IMuonCompetingClustersOnTrackCreator> m_compClusterCreator{
379  this,
380  "MuonCompetingClustersCreator",
381  "Muon::TriggerChamberClusterOnTrackCreator/TriggerChamberClusterOnTrackCreator",
382  }; //<! competing clusters rio ontrack creator
383  PublicToolHandle<MuonEDMPrinterTool> m_printer{
384  this,
385  "EDMPrinter",
386  "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
387  }; //<! printer helper tool
388  ToolHandle<IMdtSegmentFinder> m_segmentFinder{
389  this,
390  "MdtSegmentFinder",
391  "Muon::MdtMathSegmentFinder/MdtMathSegmentFinder",
392  }; //<! segment finder tool
393  ToolHandle<IMuonSegmentFittingTool> m_segmentFitter{
394  this,
395  "SegmentFitter",
396  "Muon::MuonSegmentFittingTool/MuonSegmentFittingTool",
397  }; //<! segment fitting tool
398  ToolHandle<IMuonSegmentSelectionTool> m_segmentSelectionTool{
399  this,
400  "SegmentSelector",
401  "Muon::MuonSegmentSelectionTool/MuonSegmentSelectionTool",
402  }; //<! segment selection tool
403  ToolHandle<IDCSLFitProvider> m_dcslFitProvider{
404  this,
405  "DCFitProvider",
406  "",
407  };
408 
409  Gaudi::Property<double> m_sinAngleCut{this, "SinAngleCut", 0.2}; //<! cut on the angle between the segment and the prediction
410  Gaudi::Property<bool> m_doGeometry{this, "DoGeometry", true}; //<! use chamber geometry in segment finding
411  Gaudi::Property<bool> m_curvedErrorScaling{this, "CurvedErrorScaling", true}; //<! rescale errors for low momenta
412  Gaudi::Property<bool> m_doSpacePoints{this, "UseTriggerSpacePoints", true}; //<! use cluster space points for association
413  Gaudi::Property<bool> m_createCompetingROTsEta{this, "CreateCompetingROTsEta", true}; //<! create competing ROTs for the clusters
414  Gaudi::Property<bool> m_createCompetingROTsPhi{this, "CreateCompetingROTsPhi", true}; //<! create competing ROTs for the clusters
415  Gaudi::Property<bool> m_refitParameters{this, "RefitSegment", false}; //<! refit segment if there are sufficient phi hits and update the segment parameters
416  Gaudi::Property<bool> m_addUnassociatedPhiHits{this, "AddUnassociatedPhiHits", false}; //<! if there are phi hits without associated eta hit add them to segment
417  Gaudi::Property<bool> m_strictRoadDirectionConsistencyCheck{this, "StrictRoadDirectionConsistencyCheck", true}; //<! check if direction of road is consistent with IP (default: true),
418  // should be off for cosmics
419  Gaudi::Property<double> m_maxAssociateClusterDistance{this, "MaxAssociateClusterDistance", 3000.}; //<! maximum distance for clusters to be associated to segment (default: 3000
420  //(mm))
421  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
422  Gaudi::Property<bool> m_removeDeltas{this, "RemoveDeltasFromSegmentQuality", true}; //<! do not add delta electrons to MuonSegmentQuality::holes
423  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
424  Gaudi::Property<bool> m_usePreciseError{this, "UsePreciseError", false};
425  Gaudi::Property<bool> m_outputFittedT0{this, "OutputFittedT0", false};
426  Gaudi::Property<double> m_preciseErrorScale{this, "PreciseErrorScale", 2.};
427  Gaudi::Property<bool> m_doTimeOutChecks{this, "UseTimeOutGard", false};
428 
429  Gaudi::Property<bool> m_recoverBadRpcCabling{this, "RecoverBadRpcCabling", false};
430  Gaudi::Property<bool> m_updatePhiUsingPhiHits{this, "UpdatePhiUsingPhiHits", false};
431  Gaudi::Property<bool> m_assumePointingPhi{this, "AssumePointingPhi", false };
432  Gaudi::Property<bool> m_redo2DFit{this, "Redo2DFit", true};
433 
434 
435 
436 
437  SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_rpcKey{this, "RpcPrepDataContainer", "RPC_Measurements"};
438  SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_tgcKey{this, "TgcPrepDataContainer", "TGC_Measurements"};
439  SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_mdtKey{this, "MdtPrepDataContainer", "MDT_DriftCircles"};
440 
441  SG::ReadCondHandleKey<Muon::MuonIntersectGeoData> m_chamberGeoKey{this, "ChamberGeoKey", "MuonStationIntersects", "Pointer to hole search service"};
442 
443 
444  };
445 
446 } // namespace Muon
447 #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:423
Muon::DCMathSegmentMaker::Cluster2D::surface
const Trk::Surface & surface() const
Definition: DCMathSegmentMaker.h:148
Muon::DCMathSegmentMaker::residualAndPullWithSegment
static std::pair< double, double > residualAndPullWithSegment(const TrkDriftCircleMath::Segment &segment, const Cluster2D &spacePoint, const Amg::Transform3D &gToStation)
Definition: DCMathSegmentMaker.cxx:1675
Muon::DCMathSegmentMaker::errorScaleFactor
double errorScaleFactor(const Identifier &id, double curvature, bool hasPhiMeasurements) const
calculate error scaling factor
Definition: DCMathSegmentMaker.cxx:651
Muon::DCMathSegmentMaker::m_addUnassociatedPhiHits
Gaudi::Property< bool > m_addUnassociatedPhiHits
Definition: DCMathSegmentMaker.h:416
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:413
Muon::DCMathSegmentMaker::HitInXZ::z
double z
Definition: DCMathSegmentMaker.h:118
Muon::DCMathSegmentMaker::ClusterVec
std::vector< Cluster2D > ClusterVec
Definition: DCMathSegmentMaker.h:164
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:1292
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:165
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
Muon::DCMathSegmentMaker::Cluster2D::phiHit
const MuonClusterOnTrack * phiHit
Definition: DCMathSegmentMaker.h:146
Muon::DCMathSegmentMaker::HitInXZ::x
double x
Definition: DCMathSegmentMaker.h:117
IMdtSegmentFinder.h
Muon::DCMathSegmentMaker::segmentCreationInfo::phimax
double phimax
Definition: DCMathSegmentMaker.h:189
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
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:127
MuonEDMPrinterTool.h
Muon::DCMathSegmentMaker::Cluster2D::gasGapId
Identifier gasGapId
Definition: DCMathSegmentMaker.h:142
Muon::DCMathSegmentMaker::m_segmentSelectionTool
ToolHandle< IMuonSegmentSelectionTool > m_segmentSelectionTool
Definition: DCMathSegmentMaker.h:398
Trk::TrackState::Segment
@ Segment
Definition: TrackStateDefs.h:37
Muon::DCMathSegmentMaker::create1DClusters
ClusterVecPair create1DClusters(const std::vector< const MuonClusterOnTrack * > &clusters) const
Definition: DCMathSegmentMaker.cxx:702
Muon::DCMathSegmentMaker::Cluster2D::locPos
Amg::Vector2D locPos
Definition: DCMathSegmentMaker.h:143
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:596
Muon::SortByDistanceToSegment
Function object to sort pairs containing a double and a pointer to a MuonClusterOnTrack.
Definition: DCMathSegmentMaker.h:88
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:422
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:1028
Muon::DCMathSegmentMaker::m_printer
PublicToolHandle< MuonEDMPrinterTool > m_printer
Definition: DCMathSegmentMaker.h:383
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:388
Muon::DCMathSegmentMaker::Cluster2D::error
double error
Definition: DCMathSegmentMaker.h:144
Muon::DCMathSegmentMaker::ChIdHitMap
std::map< Identifier, IdHitMap > ChIdHitMap
Definition: DCMathSegmentMaker.h:108
IMuonCompetingClustersOnTrackCreator.h
DriftCircle.h
Muon::DCMathSegmentMaker::Cluster2D::identify
Identifier identify() const
Definition: DCMathSegmentMaker.h:154
DCSLFitter.h
RpcPrepDataContainer.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:1854
Muon::DCMathSegmentMaker::Cluster2D::phiHits
std::vector< const MuonClusterOnTrack * > phiHits
Definition: DCMathSegmentMaker.h:147
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:170
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
Muon::DCMathSegmentMaker::updatePhiRanges
static void updatePhiRanges(double phiminNew, double phimaxNew, double &phiminRef, double &phimaxRef)
update phi ranges
Definition: DCMathSegmentMaker.cxx:2084
Muon::DCMathSegmentMaker::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
pointers to IdHelpers
Definition: DCMathSegmentMaker.h:344
Muon::DCMathSegmentMaker::createSpacePoints
ClusterVecPair createSpacePoints(const ChIdHitMap &chIdHitMap) const
Definition: DCMathSegmentMaker.cxx:749
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:1830
TrkDriftCircleMath::Segment
Definition: 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:411
Muon::DCMathSegmentMaker::HitInXZ::xmax
double xmax
Definition: DCMathSegmentMaker.h:120
Muon::DCMathSegmentMaker::m_mdtCreator
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtCreator
Definition: DCMathSegmentMaker.h:363
Muon::DCMathSegmentMaker::segmentCreationInfo::globalTrans
Amg::Transform3D globalTrans
Definition: DCMathSegmentMaker.h:186
Muon::DCMathSegmentMaker::HitInXZ::phimax
double phimax
Definition: DCMathSegmentMaker.h:122
Muon::IMuonSegmentMaker
The IMuonSegmentFinder is a pure virtual interface for tools to find segments in the muon spectromete...
Definition: IMuonSegmentMaker.h:69
Muon::DCMathSegmentMaker::Cluster2D::detElId
Identifier detElId
Definition: DCMathSegmentMaker.h:141
IMuonSegmentFittingTool.h
MuonIntersectGeoData.h
GeoPrimitives.h
Muon::DCMathSegmentMaker::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: DCMathSegmentMaker.h:351
Muon::DCMathSegmentMaker::m_compClusterCreator
ToolHandle< IMuonCompetingClustersOnTrackCreator > m_compClusterCreator
Definition: DCMathSegmentMaker.h:378
Muon::DCMathSegmentMaker::createROTVec
static DataVector< const Trk::MeasurementBase > createROTVec(std::vector< std::pair< double, std::unique_ptr< const Trk::MeasurementBase >> > &rioDistVec)
Definition: DCMathSegmentMaker.cxx:1663
Muon::DCMathSegmentMaker::Cluster2D::etaHit
const MuonClusterOnTrack * etaHit
Definition: DCMathSegmentMaker.h:145
Muon::DCMathSegmentMaker::createClusterVec
TrkDriftCircleMath::CLVec createClusterVec(const Identifier &chid, ClusterVec &spVec, const Amg::Transform3D &gToStation) const
Definition: DCMathSegmentMaker.cxx:986
Muon::DCMathSegmentMaker::m_usePreciseError
Gaudi::Property< bool > m_usePreciseError
Definition: DCMathSegmentMaker.h:424
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
Muon::DCMathSegmentMaker::TubeEnds::phimin
double phimin
Definition: DCMathSegmentMaker.h:171
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:193
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:1157
lumiFormat.i
int i
Definition: lumiFormat.py:92
Muon::DCMathSegmentMaker::errorScalingRegion
bool errorScalingRegion(const Identifier &id) const
apply error scaling for low mometum tracks
Definition: DCMathSegmentMaker.cxx:684
Muon::DCMathSegmentMaker::m_segmentFitter
ToolHandle< IMuonSegmentFittingTool > m_segmentFitter
Definition: DCMathSegmentMaker.h:393
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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:134
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
Muon::DCMathSegmentMaker::Cluster2D
Definition: DCMathSegmentMaker.h:125
Muon::DCMathSegmentMaker::segmentCreationInfo::phimin
double phimin
Definition: DCMathSegmentMaker.h:188
TrkDriftCircleMath::MdtChamberGeometry
Definition: MdtChamberGeometry.h:18
Muon::DCMathSegmentMaker::m_edmHelperSvc
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
Definition: DCMathSegmentMaker.h:356
Muon::SortClustersById
Function object to sort MuonClusterOnTrack pointers by Identier.
Definition: DCMathSegmentMaker.h:73
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
IMuonClusterOnTrackCreator.h
AthAlgTool.h
Muon::DCMathSegmentMaker::m_rpcKey
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_rpcKey
Definition: DCMathSegmentMaker.h:437
Muon::DCMathSegmentMaker::m_chamberGeoKey
SG::ReadCondHandleKey< Muon::MuonIntersectGeoData > m_chamberGeoKey
Definition: DCMathSegmentMaker.h:441
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:112
Muon::DCMathSegmentMaker::Cluster2D::corrupt
bool corrupt() const
Definition: DCMathSegmentMaker.h:162
Muon::DCMathSegmentMaker::TubeEnds::phimax
double phimax
Definition: DCMathSegmentMaker.h:172
Muon::DCMathSegmentMaker::TubeEnds::lxmin
double lxmin
Definition: DCMathSegmentMaker.h:169
DCSLHitSelector.h
Muon::DCMathSegmentMaker::createSpacePoint
Cluster2D createSpacePoint(const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const MuonClusterOnTrack *phiHit) const
Definition: DCMathSegmentMaker.cxx:852
Muon::DCMathSegmentMaker::Cluster2D::is2D
bool is2D() const
Definition: DCMathSegmentMaker.h:161
Muon::DCMathSegmentMaker::~DCMathSegmentMaker
virtual ~DCMathSegmentMaker()=default
Muon::DCMathSegmentMaker::segmentCreationInfo::clusters
ClusterVecPair clusters
Definition: DCMathSegmentMaker.h:184
Muon::DCMathSegmentMaker::m_refitParameters
Gaudi::Property< bool > m_refitParameters
Definition: DCMathSegmentMaker.h:415
Muon::DCMathSegmentMaker::m_allMdtHoles
Gaudi::Property< bool > m_allMdtHoles
Definition: DCMathSegmentMaker.h:421
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:234
Muon::DCMathSegmentMaker::initialize
virtual StatusCode initialize()
Definition: DCMathSegmentMaker.cxx:67
Muon::DCMathSegmentMaker::m_createCompetingROTsPhi
Gaudi::Property< bool > m_createCompetingROTsPhi
Definition: DCMathSegmentMaker.h:414
Muon::DCMathSegmentMaker::m_recoverBadRpcCabling
Gaudi::Property< bool > m_recoverBadRpcCabling
Definition: DCMathSegmentMaker.h:429
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:107
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:2054
EventPrimitives.h
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:119
Muon::DCMathSegmentMaker::HitInXZ::isMdt
bool isMdt
Definition: DCMathSegmentMaker.h:115
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:1697
Muon::DCMathSegmentMaker::m_mdtKey
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_mdtKey
Definition: DCMathSegmentMaker.h:439
Muon::DCMathSegmentMaker::create2DClusters
ClusterVecPair create2DClusters(const std::vector< const MuonClusterOnTrack * > &clusters) const
Definition: DCMathSegmentMaker.cxx:728
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:1800
Muon::DCMathSegmentMaker::HitInXZ::phimin
double phimin
Definition: DCMathSegmentMaker.h:121
Muon::DCMathSegmentMaker::HitInXZ::measPhi
bool measPhi
Definition: DCMathSegmentMaker.h:116
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:37
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::DCMathSegmentMaker::m_strictRoadDirectionConsistencyCheck
Gaudi::Property< bool > m_strictRoadDirectionConsistencyCheck
Definition: DCMathSegmentMaker.h:417
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
Muon::DCMathSegmentMaker::m_dcslFitProvider
ToolHandle< IDCSLFitProvider > m_dcslFitProvider
Definition: DCMathSegmentMaker.h:403
Muon::DCMathSegmentMaker::m_doSpacePoints
Gaudi::Property< bool > m_doSpacePoints
Definition: DCMathSegmentMaker.h:412
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:89
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager >
Muon::DCMathSegmentMaker::createTgcSpacePoint
Cluster2D createTgcSpacePoint(const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const MuonClusterOnTrack *phiHit) const
Definition: DCMathSegmentMaker.cxx:884
Muon::SortClustersById::operator()
bool operator()(const MuonClusterOnTrack *cl1, const MuonClusterOnTrack *cl2)
Definition: DCMathSegmentMaker.h:74
Muon::DCMathSegmentMaker::m_doTimeOutChecks
Gaudi::Property< bool > m_doTimeOutChecks
Definition: DCMathSegmentMaker.h:427
Muon::DCMathSegmentMaker::m_maxAssociateClusterDistance
Gaudi::Property< double > m_maxAssociateClusterDistance
Definition: DCMathSegmentMaker.h:419
DCStatistics.h
Muon::DCMathSegmentMaker::m_sinAngleCut
Gaudi::Property< double > m_sinAngleCut
Definition: DCMathSegmentMaker.h:409
Muon::DCMathSegmentMaker::m_redo2DFit
Gaudi::Property< bool > m_redo2DFit
Definition: DCMathSegmentMaker.h:432
Muon::DCMathSegmentMaker::m_doGeometry
Gaudi::Property< bool > m_doGeometry
Definition: DCMathSegmentMaker.h:410
Trk::PlaneSurface
Definition: PlaneSurface.h:64
Muon::DCMathSegmentMaker::segmentCreationInfo::geom
const TrkDriftCircleMath::ChamberGeometry * geom
Definition: DCMathSegmentMaker.h:185
Muon::DCMathSegmentMaker::findMdt
const MdtPrepData * findMdt(const EventContext &ctx, const Identifier &id) const
Definition: DCMathSegmentMaker.cxx:1781
Muon::DCMathSegmentMaker::m_assumePointingPhi
Gaudi::Property< bool > m_assumePointingPhi
Definition: DCMathSegmentMaker.h:431
DeMoScan.first
bool first
Definition: DeMoScan.py:534
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
Trk::RIO_OnTrack::identify
virtual Identifier identify() const final
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:155
Muon::DCMathSegmentMaker::m_updatePhiUsingPhiHits
Gaudi::Property< bool > m_updatePhiUsingPhiHits
Definition: DCMathSegmentMaker.h:430
Muon::DCMathSegmentMaker::m_clusterCreator
ToolHandle< IMuonClusterOnTrackCreator > m_clusterCreator
Definition: DCMathSegmentMaker.h:373
MuonSegment.h
Muon::DCMathSegmentMaker::EtaPhiHitsPair
std::pair< std::vector< const MuonClusterOnTrack * >, std::vector< const MuonClusterOnTrack * > > EtaPhiHitsPair
Definition: DCMathSegmentMaker.h:105
Muon::DCMathSegmentMaker::distanceToSegment
static double distanceToSegment(const TrkDriftCircleMath::Segment &segment, const Amg::Vector3D &hitPos, const Amg::Transform3D &gToStation)
Definition: DCMathSegmentMaker.cxx:1640
Muon::DCMathSegmentMaker::createRpcSpacePoint
Cluster2D createRpcSpacePoint(const Identifier &gasGapId, const MuonClusterOnTrack *etaHit, const std::vector< const MuonClusterOnTrack * > &phiHits) const
Definition: DCMathSegmentMaker.cxx:925
Muon::DCMathSegmentMaker
Definition: DCMathSegmentMaker.h:102
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:2132
Muon::DCMathSegmentMaker::segmentCreationInfo::amdbTrans
Amg::Transform3D amdbTrans
Definition: DCMathSegmentMaker.h:187
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:160
Muon::DCMathSegmentMaker::m_outputFittedT0
Gaudi::Property< bool > m_outputFittedT0
Definition: DCMathSegmentMaker.h:425
Muon::DCMathSegmentMaker::m_tgcKey
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_tgcKey
Definition: DCMathSegmentMaker.h:438
IDCSLFitProvider.h
AthAlgTool
Definition: AthAlgTool.h:26
Muon::DCMathSegmentMaker::HitInXZ::id
Identifier id
Definition: DCMathSegmentMaker.h:114
Muon::DCMathSegmentMaker::HitInXZ
Definition: DCMathSegmentMaker.h:111
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
Muon::DCMathSegmentMaker::m_mdtCreatorT0
ToolHandle< IMdtDriftCircleOnTrackCreator > m_mdtCreatorT0
Definition: DCMathSegmentMaker.h:368
Cluster.h
error
Definition: IImpactPoint3dEstimator.h:70
Muon::DCMathSegmentMaker::TubeEnds
Definition: DCMathSegmentMaker.h:167
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:1081
Muon::DCMathSegmentMaker::checkPhiConsistency
bool checkPhiConsistency(double phi, double phimin, double phimax) const
check whether phi is consistent with segment phi
Definition: DCMathSegmentMaker.cxx:2106
IMuonSegmentMaker.h
Muon::DCMathSegmentMaker::m_preciseErrorScale
Gaudi::Property< double > m_preciseErrorScale
Definition: DCMathSegmentMaker.h:426
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition: MuonClusterOnTrack.h:34
Muon::DCMathSegmentMaker::segmentCreationInfo
Definition: DCMathSegmentMaker.h:175
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:176
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