ATLAS Offline Software
Loading...
Searching...
No Matches
ICscSegmentFinder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ICscSegmentFinder_H
6#define ICscSegmentFinder_H
7
8#include "GaudiKernel/IAlgTool.h"
12
13namespace Muon {
14 class MuonSegment;
18} // namespace Muon
19
20namespace Trk {
21 class RIO_OnTrack;
22 class MeasurementBase;
23} // namespace Trk
24
26static const InterfaceID IID_ICscSegmentFinder("ICscSegmentFinder", 1, 0);
27
28class ICscSegmentFinder : virtual public IAlgTool {
29public: // Static methods
30 // Return the interface ID.
31 static const InterfaceID& interfaceID() { return IID_ICscSegmentFinder; }
32
33public: // Interface methods
34 // for 2d SegmentMaker
35 // virtual MuonSegmentCombinationCollection* find( const std::vector<Muon::CscPrepDataCollection>& pcols) =0;
36 // virtual MuonSegmentCombinationCollection* find( const Muon::CscPrepDataCollection& pcol) =0;
37 // virtual Muon::MuonSegmentCombination* find( const Muon::CscPrepDataCollection& pcol) =0;
38
39 // using Muon::IMuonSegmentMaker::find;
40 virtual std::unique_ptr<MuonSegmentCombinationCollection> find(const std::vector<const Muon::CscPrepDataCollection*>& pcols,
41 const EventContext& ctx) const = 0;
42
43 // for 4d SegmentMaker
44 virtual std::unique_ptr<MuonSegmentCombinationCollection> find(const MuonSegmentCombinationCollection& segcols,
45 const EventContext& ctx) const = 0;
46 /*
47
48 virtual std::vector<const Muon::MuonSegment*>* find( const Trk::TrackRoad& road,
49 const std::vector< std::vector< const Muon::MdtDriftCircleOnTrack* > >& mdts,
50 const std::vector< std::vector< const Muon::MuonClusterOnTrack* > >& clusters,
51 bool updatePhi=false, double momentum = 1e9 ) =0;
52
53 virtual std::vector<const Muon::MuonSegment*>* find( const Amg::Vector3D&, const Trk::GlobalDirection&,
54 const std::vector< const Muon::MdtDriftCircleOnTrack* > &,
55 const std::vector< const Muon::MuonClusterOnTrack* > & ,
56 bool updatePhi=false, double momentum = 1e9) =0;
57 */
58
59 struct Cluster {
60 // local representation of a CSC cluster in the AMDB reference system
61 // in this system the x-coordinate corresponds to the phi strips whereas the y coordinate corresponds to the eta strips
62 // the z coordinate is along the strip planes
63 // the methods locX returns the local strip coordinate for the given hit and the locY returns the position along the strip plane
64
65 Cluster() : cl(NULL), measPhi(0) {}
66 Cluster(const Amg::Vector3D& lp, const Muon::CscClusterOnTrack* c, bool measuresPhi) : lpos(lp), cl(c), measPhi(measuresPhi) {}
69 bool measPhi;
70 double locY() const {
71 if (measPhi)
72 return lpos.x();
73 else
74 return lpos.y();
75 }
76 double locX() const { return lpos.z(); }
77 };
78
79public:
80 /* typedef std::vector<Muon::CscClusterOnTrack*> TrkClusters; */
81 /* typedef std::vector<Muon::CscClusterOnTrack*> ChamberTrkClusters[4]; */
82 typedef std::vector<Cluster> TrkClusters;
83 typedef std::vector<Cluster> ChamberTrkClusters[4];
84
85 typedef std::vector<const Trk::RIO_OnTrack*> RioList;
87
89
90 class Segment {
91 public:
92 double s0;
93 double s1;
94 double d0;
95 double d1;
96 double d01;
97 double time;
98 double dtime;
99 double chsq;
100 double zshift;
102 int nclus;
103
106 bool operator<(const Segment& rhs) const { return chsq < rhs.chsq; }
107
108 double res[4];
109 double dres[4];
110
112 s0(-999.),
113 s1(-999.),
114 d0(-999.),
115 d1(-999.),
116 d01(-999.),
117 time(-9999.),
118 dtime(-9999.),
119 chsq(9999.),
120 zshift(0),
121 nunspoil(0),
122 nclus(0),
123 outlierid(-9) {
124 for (int i = 0; i < 4; ++i) {
125 res[i] = -9999.;
126 dres[i] = -9999.;
127 }
128 clus.resize(4);
129 }
130 };
131
132 typedef std::vector<Segment> Segments;
133
135 bool operator()(const Segment& seg1, const Segment& seg2) {
136 // sort by numbers of unspoil cluster
137 if (seg1.nunspoil > seg2.nunspoil)
138 return true;
139 else if (seg1.nunspoil < seg2.nunspoil)
140 return false;
141 // finally take the one with best chi2
142 return seg1.chsq < seg2.chsq;
143 }
144 };
145};
146#endif
DataVector< Muon::MuonSegmentCombination > MuonSegmentCombinationCollection
This typedef represents a collection of MuonSegmentCombination objects.
Derived DataVector<T>.
Definition DataVector.h:795
bool operator<(const Segment &rhs) const
virtual std::unique_ptr< MuonSegmentCombinationCollection > find(const std::vector< const Muon::CscPrepDataCollection * > &pcols, const EventContext &ctx) const =0
Muon::MuonSegmentCombination::SegmentVec SegmentVec
DataVector< const Trk::MeasurementBase > MbaseList
std::vector< Cluster > ChamberTrkClusters[4]
virtual std::unique_ptr< MuonSegmentCombinationCollection > find(const MuonSegmentCombinationCollection &segcols, const EventContext &ctx) const =0
std::vector< Segment > Segments
std::vector< const Trk::RIO_OnTrack * > RioList
static const InterfaceID & interfaceID()
std::vector< Cluster > TrkClusters
Class to represent the calibrated clusters created from CSC strips.
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Base class for Muon cluster RIO_OnTracks.
std::vector< std::unique_ptr< MuonSegment > > SegmentVec
This is the common class for 3D segments used in the muon spectrometer.
This class is the pure abstract base class for all fittable tracking measurements.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition RIO_OnTrack.h:70
Eigen::Matrix< double, 3, 1 > Vector3D
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Ensure that the ATLAS eigen extensions are properly loaded.
Cluster(const Amg::Vector3D &lp, const Muon::CscClusterOnTrack *c, bool measuresPhi)
const Muon::CscClusterOnTrack * cl
bool operator()(const Segment &seg1, const Segment &seg2)