ATLAS Offline Software
IMuonPatternCalibration.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONSEGMENTMAKETOOLINTERFACES_MUON_IMUONPATTERNCALIBRATION_H
6 #define MUONSEGMENTMAKETOOLINTERFACES_MUON_IMUONPATTERNCALIBRATION_H
7 
8 #include <vector>
9 
10 #include "GaudiKernel/IAlgTool.h"
11 #include "Identifier/Identifier.h"
17 //
18 
19 namespace Muon {
20  class MuonClusterOnTrack;
21  class MdtDriftCircleOnTrack;
22 
24  class IMuonPatternCalibration : virtual public IAlgTool {
25  public:
26  using ClusterVec = std::vector<const MuonClusterOnTrack*>;
27  using MdtVec = std::vector<const MdtDriftCircleOnTrack*>;
28  using MdtVecVec = std::vector<MdtVec>;
29 
30  struct ROTRegion {
31  int regionId{0};
34 
35  const ClusterVec& clusters() const {return m_clusters;}
36  const MdtVecVec& mdts() const {return m_mdts;}
37 
38  void push_back(std::unique_ptr<const MuonClusterOnTrack> cl){
39  // cppcheck-suppress danglingLifetime
40  m_clusters.push_back(cl.get());
41  m_garbage.push_back(std::move(cl));
42  }
43  void push_back(MdtVec&& vec) {
44  std::transform(vec.begin(), vec.end(),std::back_inserter(m_garbage),
45  [](const MdtDriftCircleOnTrack* mdt) {return std::unique_ptr<const Trk::MeasurementBase>{mdt};
46  });
47  m_mdts.push_back(std::move(vec));
48  }
49  private:
50  ClusterVec m_clusters{};
51  MdtVecVec m_mdts{};
52  std::vector<std::unique_ptr<const Trk::MeasurementBase>> m_garbage{};
53  };
54 
55  using ROTsPerRegion = std::vector<ROTRegion>;
56 
58  static const InterfaceID& interfaceID() {
59  static const InterfaceID IID_IMuonPatternCalibration("Muon::IMuonPatternCalibration", 1, 0);
60  return IID_IMuonPatternCalibration;
61  }
62 
63  virtual StatusCode calibrate(const EventContext& ctx, const MuonPatternCombination& pat, ROTsPerRegion& hitsPerRegion) const = 0;
64  virtual int getRegionId(const Identifier& id) const = 0;
65  virtual bool checkForPhiMeasurements(const MuonPatternCombination& pat) const = 0;
66 
67  virtual ~IMuonPatternCalibration() = default;
68  };
69 
70 } // namespace Muon
71 
72 #endif
Muon::IMuonPatternCalibration::checkForPhiMeasurements
virtual bool checkForPhiMeasurements(const MuonPatternCombination &pat) const =0
Muon::IMuonPatternCalibration::MdtVec
std::vector< const MdtDriftCircleOnTrack * > MdtVec
Definition: IMuonPatternCalibration.h:27
Muon::IMuonPatternCalibration::ROTRegion::clusters
const ClusterVec & clusters() const
Definition: IMuonPatternCalibration.h:35
Muon::IMuonPatternCalibration::MdtVecVec
std::vector< MdtVec > MdtVecVec
Definition: IMuonPatternCalibration.h:28
Muon::IMuonPatternCalibration::~IMuonPatternCalibration
virtual ~IMuonPatternCalibration()=default
Muon::IMuonPatternCalibration::ROTRegion::m_clusters
ClusterVec m_clusters
Definition: IMuonPatternCalibration.h:50
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
MuonPrepDataContainer.h
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::IMuonPatternCalibration::ROTRegion
Definition: IMuonPatternCalibration.h:30
Muon::IMuonPatternCalibration::interfaceID
static const InterfaceID & interfaceID()
access to tool interface
Definition: IMuonPatternCalibration.h:58
Muon::IMuonPatternCalibration::ROTRegion::regionPos
Amg::Vector3D regionPos
Definition: IMuonPatternCalibration.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IMuonClusterOnTrackCreator.h
Muon::IMuonPatternCalibration::ROTRegion::regionId
int regionId
Definition: IMuonPatternCalibration.h:31
MuonPatternCombination.h
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
Muon::IMuonPatternCalibration::calibrate
virtual StatusCode calibrate(const EventContext &ctx, const MuonPatternCombination &pat, ROTsPerRegion &hitsPerRegion) const =0
MuonPatternCombinationCollection.h
Muon::IMuonPatternCalibration::ROTRegion::push_back
void push_back(std::unique_ptr< const MuonClusterOnTrack > cl)
Definition: IMuonPatternCalibration.h:38
Muon::IMuonPatternCalibration::ROTsPerRegion
std::vector< ROTRegion > ROTsPerRegion
Definition: IMuonPatternCalibration.h:55
dso-stats.pat
pat
Definition: dso-stats.py:39
Muon::IMuonPatternCalibration::ClusterVec
std::vector< const MuonClusterOnTrack * > ClusterVec
Definition: IMuonPatternCalibration.h:26
Muon::IMuonPatternCalibration::ROTRegion::m_garbage
std::vector< std::unique_ptr< const Trk::MeasurementBase > > m_garbage
Definition: IMuonPatternCalibration.h:52
IMdtDriftCircleOnTrackCreator.h
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition: MdtDriftCircleOnTrack.h:37
Muon::IMuonPatternCalibration::getRegionId
virtual int getRegionId(const Identifier &id) const =0
Muon::IMuonPatternCalibration::ROTRegion::mdts
const MdtVecVec & mdts() const
Definition: IMuonPatternCalibration.h:36
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::IMuonPatternCalibration::ROTRegion::push_back
void push_back(MdtVec &&vec)
Definition: IMuonPatternCalibration.h:43
Muon::IMuonPatternCalibration
The IMuonCalibration is a pure virtual interface for tools to calibrate PRD hits
Definition: IMuonPatternCalibration.h:24
Muon::MuonPatternCombination
The MuonPatternCombination class provides the means to store the output of the initial global pattern...
Definition: MuonPatternCombination.h:29
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
Muon::IMuonPatternCalibration::ROTRegion::regionDir
Amg::Vector3D regionDir
Definition: IMuonPatternCalibration.h:33
Muon::IMuonPatternCalibration::ROTRegion::m_mdts
MdtVecVec m_mdts
Definition: IMuonPatternCalibration.h:51
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Identifier
Definition: IdentifierFieldParser.cxx:14