File indexing completed on 2023-03-17 11:19:19
0001 #ifndef DTSegment_DTMeantimerPatternReco_h
0002 #define DTSegment_DTMeantimerPatternReco_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "RecoLocalMuon/DTSegment/src/DTRecSegment2DBaseAlgo.h"
0017
0018
0019 namespace edm {
0020 class ParameterSet;
0021 class EventSetup;
0022
0023 }
0024 class DTSegmentUpdator;
0025 class DTSegmentCleaner;
0026 class DTHitPairForFit;
0027 class DTSegmentCand;
0028 class DTLinearFit;
0029 class MuonGeometryRecord;
0030
0031
0032 #include <vector>
0033 #include <deque>
0034 #include <utility>
0035
0036 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0037 #include "FWCore/Framework/interface/ESHandle.h"
0038 #include "FWCore/Utilities/interface/ESGetToken.h"
0039 #include "FWCore/Framework/interface/FrameworkfwdMostUsed.h"
0040 #include "RecoLocalMuon/DTSegment/src/DTSegmentCand.h"
0041
0042
0043
0044
0045
0046 class DTMeantimerPatternReco : public DTRecSegment2DBaseAlgo {
0047 public:
0048
0049 DTMeantimerPatternReco(const edm::ParameterSet& pset, edm::ConsumesCollector cc);
0050
0051
0052 ~DTMeantimerPatternReco() override;
0053
0054
0055
0056
0057 edm::OwnVector<DTSLRecSegment2D> reconstruct(const DTSuperLayer* sl,
0058 const std::vector<DTRecHit1DPair>& hits) override;
0059
0060
0061 std::string algoName() const override { return theAlgoName; }
0062
0063
0064
0065 void setES(const edm::EventSetup& setup) override;
0066
0067 protected:
0068 private:
0069 DTLinearFit* theFitter;
0070
0071 friend class DTMeantimerPatternReco4D;
0072
0073
0074
0075
0076 std::vector<std::shared_ptr<DTHitPairForFit>> initHits(const DTSuperLayer* sl,
0077 const std::vector<DTRecHit1DPair>& hits);
0078
0079
0080 std::vector<DTSegmentCand*> buildSegments(const DTSuperLayer* sl,
0081 const std::vector<std::shared_ptr<DTHitPairForFit>>& hits);
0082
0083
0084 void addHits(DTSegmentCand* segCand,
0085 const std::vector<std::shared_ptr<DTHitPairForFit>>& hits,
0086 std::vector<DTSegmentCand*>& result);
0087
0088
0089 DTSegmentCand* fitWithT0(DTSegmentCand* seg, const bool fitdebug);
0090
0091
0092 bool geometryFilter(const DTWireId first, const DTWireId second) const;
0093
0094 bool checkDoubleCandidates(std::vector<DTSegmentCand*>& segs, DTSegmentCand* seg);
0095
0096 void printPattern(std::vector<DTSegmentCand::AssPoint>& assHits, const DTHitPairForFit* hit);
0097
0098 private:
0099 std::string theAlgoName;
0100 unsigned int theMaxAllowedHits;
0101 double theAlphaMaxTheta;
0102 double theAlphaMaxPhi;
0103 double theMaxChi2;
0104 bool debug;
0105 DTSegmentUpdator* theUpdator;
0106 DTSegmentCleaner* theCleaner;
0107
0108 unsigned int maxfound;
0109
0110 edm::ESHandle<DTGeometry> theDTGeometry;
0111 const edm::ESGetToken<DTGeometry, MuonGeometryRecord> theDTGeometryToken;
0112 };
0113 #endif