CMS 3D CMS Logo

DTMeantimerPatternReco.h
Go to the documentation of this file.
1 #ifndef DTSegment_DTMeantimerPatternReco_h
2 #define DTSegment_DTMeantimerPatternReco_h
3 
15 /* Base Class Headers */
17 
18 /* Collaborating Class Declarations */
19 namespace edm {
20  class ParameterSet;
21  class EventSetup;
22  // class ESHandle;
23 } // namespace edm
24 class DTSegmentUpdator;
25 class DTSegmentCleaner;
26 class DTHitPairForFit;
27 class DTSegmentCand;
28 class DTLinearFit;
29 
30 /* C++ Headers */
31 #include <vector>
32 #include <deque>
33 #include <utility>
34 
38 
39 /* ====================================================================== */
40 
41 /* Class DTMeantimerPatternReco Interface */
42 
44 public:
47 
49  ~DTMeantimerPatternReco() override;
50 
51  /* Operations */
52 
54  edm::OwnVector<DTSLRecSegment2D> reconstruct(const DTSuperLayer* sl,
55  const std::vector<DTRecHit1DPair>& hits) override;
56 
58  std::string algoName() const override { return theAlgoName; }
59 
62  void setES(const edm::EventSetup& setup) override;
63 
64 protected:
65 private:
66  DTLinearFit* theFitter; // the linear fitter
67 
69 
70  // typedef std::pair<DTHitPairForFit*, DTEnums::DTCellSide> AssPoint;
71 
72  // create the DTHitPairForFit from the pairs for easy use
73  std::vector<std::shared_ptr<DTHitPairForFit>> initHits(const DTSuperLayer* sl,
74  const std::vector<DTRecHit1DPair>& hits);
75 
76  // search for candidate, starting from pairs of hits in different layers
77  std::vector<DTSegmentCand*> buildSegments(const DTSuperLayer* sl,
78  const std::vector<std::shared_ptr<DTHitPairForFit>>& hits);
79 
80  // try adding more hits to a candidate
81  void addHits(DTSegmentCand* segCand,
82  const std::vector<std::shared_ptr<DTHitPairForFit>>& hits,
83  std::vector<DTSegmentCand*>& result);
84 
85  // fit a set of left/right hits, calculate t0 and chi^2
86  DTSegmentCand* fitWithT0(DTSegmentCand* seg, const bool fitdebug);
87 
88  // check if two hist can be considered in one segment (come from different layers, not too far away etc.)
89  bool geometryFilter(const DTWireId first, const DTWireId second) const;
90 
91  bool checkDoubleCandidates(std::vector<DTSegmentCand*>& segs, DTSegmentCand* seg);
92 
93  void printPattern(std::vector<DTSegmentCand::AssPoint>& assHits, const DTHitPairForFit* hit);
94 
95 private:
97  unsigned int theMaxAllowedHits;
100  double theMaxChi2;
101  bool debug;
102  DTSegmentUpdator* theUpdator; // the updator and fitter
103  DTSegmentCleaner* theCleaner; // the cleaner
104 
105  unsigned int maxfound;
106 
108 };
109 #endif // DTSegment_DTMeantimerPatternReco_h
U second(std::pair< T, U > const &p)
std::string algoName() const override
return the algo name
HLT enums.
T first(std::pair< T, U > const &p)
edm::ESHandle< DTGeometry > theDTGeometry