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 }
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 
43 
45 
46  public:
47 
50 
52  virtual ~DTMeantimerPatternReco() ;
53 
54  /* Operations */
55 
58  reconstruct(const DTSuperLayer* sl,
59  const std::vector<DTRecHit1DPair>& hits);
60 
62  virtual std::string algoName() const { return theAlgoName; }
63 
66  virtual void setES(const edm::EventSetup& setup);
67 
68  protected:
69 
70  private:
71  DTLinearFit* theFitter; // the linear fitter
72 
74 
75  // typedef std::pair<DTHitPairForFit*, DTEnums::DTCellSide> AssPoint;
76 
77  // create the DTHitPairForFit from the pairs for easy use
78  std::vector<std::shared_ptr<DTHitPairForFit>> initHits(const DTSuperLayer* sl,
79  const std::vector<DTRecHit1DPair>& hits);
80 
81  // search for candidate, starting from pairs of hits in different layers
82  std::vector<DTSegmentCand*> buildSegments(const DTSuperLayer* sl,
83  const std::vector<std::shared_ptr<DTHitPairForFit>>& hits);
84 
85  // try adding more hits to a candidate
86  void addHits(DTSegmentCand* segCand,
87  const std::vector<std::shared_ptr<DTHitPairForFit>>& hits,
88  std::vector<DTSegmentCand*> &result);
89 
90  // fit a set of left/right hits, calculate t0 and chi^2
91  DTSegmentCand* fitWithT0(DTSegmentCand* seg, const bool fitdebug);
92 
93  // check if two hist can be considered in one segment (come from different layers, not too far away etc.)
94  bool geometryFilter( const DTWireId first, const DTWireId second ) const;
95 
96  bool checkDoubleCandidates(std::vector<DTSegmentCand*>& segs, DTSegmentCand* seg);
97 
98  void printPattern( std::vector<DTSegmentCand::AssPoint>& assHits, const DTHitPairForFit* hit);
99 
100 
101  private:
102 
104  unsigned int theMaxAllowedHits;
107  double theMaxChi2;
108  bool debug;
109  DTSegmentUpdator* theUpdator; // the updator and fitter
110  DTSegmentCleaner* theCleaner; // the cleaner
111 
112  unsigned int maxfound;
113 
115 };
116 #endif // DTSegment_DTMeantimerPatternReco_h
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
virtual std::string algoName() const
return the algo name
U second(std::pair< T, U > const &p)
HLT enums.
T first(std::pair< T, U > const &p)
edm::ESHandle< DTGeometry > theDTGeometry