CMS 3D CMS Logo

DTCombinatorialExtendedPatternReco.h
Go to the documentation of this file.
1 #ifndef DTSegment_DTCombinatorialExtendedPatternReco_h
2 #define DTSegment_DTCombinatorialExtendedPatternReco_h
3 
13 /* Base Class Headers */
15 
16 /* Collaborating Class Declarations */
17 namespace edm {
18  class ParameterSet;
19  class EventSetup;
20  // class ESHandle;
21 } // namespace edm
22 class DTSegmentUpdator;
23 class DTSegmentCleaner;
24 class DTHitPairForFit;
25 class DTSegmentCand;
27 class MuonGeometryRecord;
28 
31 
32 /* C++ Headers */
33 #include <vector>
34 #include <deque>
35 #include <utility>
36 
41 
42 /* ====================================================================== */
43 
44 /* Class DTCombinatorialExtendedPatternReco Interface */
45 
47 public:
50 
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  // pass clusters to algo
68  void setClusters(const std::vector<DTSLRecCluster>& clusters);
69 
70 protected:
71 private:
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  // find all the hits compatible with the candidate
81  std::vector<DTSegmentCand::AssPoint> findCompatibleHits(const LocalPoint& pos,
82  const LocalVector& dir,
83  const std::vector<std::shared_ptr<DTHitPairForFit>>& hits);
84 
85  // build segments from hits collection
86  DTSegmentExtendedCand* buildBestSegment(std::vector<DTSegmentCand::AssPoint>& assHits, const DTSuperLayer* sl);
87 
88  bool checkDoubleCandidates(std::vector<DTSegmentCand*>& segs, DTSegmentCand* seg);
89 
92  void buildPointsCollection(std::vector<DTSegmentCand::AssPoint>& points,
93  std::deque<std::shared_ptr<DTHitPairForFit>>& pointsNoLR,
94  std::vector<DTSegmentCand*>& candidates,
95  const DTSuperLayer* sl);
96 
98  std::vector<DTSegmentExtendedCand*> extendCandidates(std::vector<DTSegmentCand*>& candidates, const DTSuperLayer* sl);
99 
100  bool closeSL(const DTSuperLayerId& id1, const DTSuperLayerId& id2);
101 
102 private:
104  unsigned int theMaxAllowedHits;
107  bool debug;
108  bool usePairs;
109  DTSegmentUpdator* theUpdator; // the updator and fitter
110  DTSegmentCleaner* theCleaner; // the cleaner
111 
114 
115 private:
116  std::vector<std::vector<int>> theTriedPattern;
117  std::vector<DTSLRecCluster> theClusters;
118 };
119 #endif // DTSegment_DTCombinatorialExtendedPatternReco_h
edm::OwnVector< DTSLRecSegment2D > reconstruct(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits) override
this function is called in the producer
void setClusters(const std::vector< DTSLRecCluster > &clusters)
std::vector< DTSegmentExtendedCand * > extendCandidates(std::vector< DTSegmentCand *> &candidates, const DTSuperLayer *sl)
std::vector< DTSegmentCand * > buildSegments(const DTSuperLayer *sl, const std::vector< std::shared_ptr< DTHitPairForFit >> &hits)
bool checkDoubleCandidates(std::vector< DTSegmentCand *> &segs, DTSegmentCand *seg)
DTCombinatorialExtendedPatternReco(const edm::ParameterSet &pset, edm::ConsumesCollector)
Constructor.
std::vector< std::shared_ptr< DTHitPairForFit > > initHits(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits)
std::vector< std::vector< int > > theTriedPattern
std::string algoName() const override
return the algo name
void setES(const edm::EventSetup &setup) override
edm::ESGetToken< DTGeometry, MuonGeometryRecord > theDTGeometryToken
bool closeSL(const DTSuperLayerId &id1, const DTSuperLayerId &id2)
void buildPointsCollection(std::vector< DTSegmentCand::AssPoint > &points, std::deque< std::shared_ptr< DTHitPairForFit >> &pointsNoLR, std::vector< DTSegmentCand *> &candidates, const DTSuperLayer *sl)
HLT enums.
DTSegmentExtendedCand * buildBestSegment(std::vector< DTSegmentCand::AssPoint > &assHits, const DTSuperLayer *sl)
std::vector< DTSegmentCand::AssPoint > findCompatibleHits(const LocalPoint &pos, const LocalVector &dir, const std::vector< std::shared_ptr< DTHitPairForFit >> &hits)