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 class MuonGeometryRecord;
30 
31 /* C++ Headers */
32 #include <vector>
33 #include <deque>
34 #include <utility>
35 
41 
42 /* ====================================================================== */
43 
44 /* Class DTMeantimerPatternReco Interface */
45 
47 public:
50 
52  ~DTMeantimerPatternReco() override;
53 
54  /* Operations */
55 
58  const std::vector<DTRecHit1DPair>& hits) override;
59 
61  std::string algoName() const override { return theAlgoName; }
62 
65  void setES(const edm::EventSetup& setup) override;
66 
67 protected:
68 private:
69  DTLinearFit* theFitter; // the linear fitter
70 
72 
73  // typedef std::pair<DTHitPairForFit*, DTEnums::DTCellSide> AssPoint;
74 
75  // create the DTHitPairForFit from the pairs for easy use
76  std::vector<std::shared_ptr<DTHitPairForFit>> initHits(const DTSuperLayer* sl,
77  const std::vector<DTRecHit1DPair>& hits);
78 
79  // search for candidate, starting from pairs of hits in different layers
80  std::vector<DTSegmentCand*> buildSegments(const DTSuperLayer* sl,
81  const std::vector<std::shared_ptr<DTHitPairForFit>>& hits);
82 
83  // try adding more hits to a candidate
84  void addHits(DTSegmentCand* segCand,
85  const std::vector<std::shared_ptr<DTHitPairForFit>>& hits,
86  std::vector<DTSegmentCand*>& result);
87 
88  // fit a set of left/right hits, calculate t0 and chi^2
89  DTSegmentCand* fitWithT0(DTSegmentCand* seg, const bool fitdebug);
90 
91  // check if two hist can be considered in one segment (come from different layers, not too far away etc.)
92  bool geometryFilter(const DTWireId first, const DTWireId second) const;
93 
94  bool checkDoubleCandidates(std::vector<DTSegmentCand*>& segs, DTSegmentCand* seg);
95 
96  void printPattern(std::vector<DTSegmentCand::AssPoint>& assHits, const DTHitPairForFit* hit);
97 
98 private:
100  unsigned int theMaxAllowedHits;
103  double theMaxChi2;
104  bool debug;
105  DTSegmentUpdator* theUpdator; // the updator and fitter
106  DTSegmentCleaner* theCleaner; // the cleaner
107 
108  unsigned int maxfound;
109 
112 };
113 #endif // DTSegment_DTMeantimerPatternReco_h
std::vector< std::shared_ptr< DTHitPairForFit > > initHits(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits)
edm::OwnVector< DTSLRecSegment2D > reconstruct(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits) override
this function is called in the producer
void setES(const edm::EventSetup &setup) override
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > theDTGeometryToken
void addHits(DTSegmentCand *segCand, const std::vector< std::shared_ptr< DTHitPairForFit >> &hits, std::vector< DTSegmentCand *> &result)
U second(std::pair< T, U > const &p)
DTSegmentCand * fitWithT0(DTSegmentCand *seg, const bool fitdebug)
std::vector< DTSegmentCand * > buildSegments(const DTSuperLayer *sl, const std::vector< std::shared_ptr< DTHitPairForFit >> &hits)
bool checkDoubleCandidates(std::vector< DTSegmentCand *> &segs, DTSegmentCand *seg)
std::string algoName() const override
return the algo name
~DTMeantimerPatternReco() override
Destructor.
void printPattern(std::vector< DTSegmentCand::AssPoint > &assHits, const DTHitPairForFit *hit)
DTMeantimerPatternReco(const edm::ParameterSet &pset, edm::ConsumesCollector cc)
Constructor.
bool geometryFilter(const DTWireId first, const DTWireId second) const
HLT enums.
edm::ESHandle< DTGeometry > theDTGeometry