CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 }
22 class DTSegmentUpdator;
23 class DTSegmentCleaner;
24 class DTHitPairForFit;
25 class DTSegmentCand;
28 
29 /* C++ Headers */
30 #include <vector>
31 #include <deque>
32 #include <utility>
33 
36 
37 /* ====================================================================== */
38 
39 /* Class DTCombinatorialExtendedPatternReco Interface */
40 
42 
43  public:
44 
47 
50 
51  /* Operations */
52 
55  reconstruct(const DTSuperLayer* sl,
56  const std::vector<DTRecHit1DPair>& hits);
57 
59  virtual std::string algoName() const { return theAlgoName; }
60 
63  virtual void setES(const edm::EventSetup& setup);
64 
65  // pass clusters to algo
66  void setClusters(const std::vector<DTSLRecCluster>& clusters);
67 
68  protected:
69 
70  private:
71  typedef std::pair<DTHitPairForFit*, DTEnums::DTCellSide> AssPoint;
72 
73  // create the DTHitPairForFit from the pairs for easy use
74  std::vector<DTHitPairForFit*> initHits(const DTSuperLayer* sl,
75  const std::vector<DTRecHit1DPair>& hits);
76 
77  // search for candidate, starting from pairs of hits in different layers
78  std::vector<DTSegmentCand*> buildSegments(const DTSuperLayer* sl,
79  const std::vector<DTHitPairForFit*>& hits);
80 
81  // find all the hits compatible with the candidate
82  std::vector<AssPoint> findCompatibleHits(const LocalPoint& pos,
83  const LocalVector& dir,
84  const std::vector<DTHitPairForFit*>& hits);
85 
86  // build segments from hits collection
87  DTSegmentExtendedCand* buildBestSegment(std::vector<AssPoint>& assHits,
88  const DTSuperLayer* sl) ;
89 
90  bool checkDoubleCandidates(std::vector<DTSegmentCand*>& segs,
91  DTSegmentCand* seg);
92 
95  void buildPointsCollection(std::vector<AssPoint>& points,
96  std::deque<DTHitPairForFit* >& pointsNoLR,
97  std::vector<DTSegmentCand*>& candidates,
98  const DTSuperLayer* sl);
99 
101  std::vector<DTSegmentExtendedCand*> extendCandidates(std::vector<DTSegmentCand*>& candidates,
102  const DTSuperLayer* sl);
103 
104  bool closeSL(const DTSuperLayerId& id1, const DTSuperLayerId& id2);
105 
106  private:
107 
109  unsigned int theMaxAllowedHits;
112  bool debug;
113  bool usePairs;
114  DTSegmentUpdator* theUpdator; // the updator and fitter
115  DTSegmentCleaner* theCleaner; // the cleaner
116 
118 
119  private:
120 
121  std::vector<std::vector<int> > theTriedPattern;
122  std::vector<DTSLRecCluster> theClusters;
123 };
124 #endif // DTSegment_DTCombinatorialExtendedPatternReco_h
void setClusters(const std::vector< DTSLRecCluster > &clusters)
std::vector< DTHitPairForFit * > initHits(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits)
std::vector< AssPoint > findCompatibleHits(const LocalPoint &pos, const LocalVector &dir, const std::vector< DTHitPairForFit * > &hits)
std::vector< DTSegmentCand * > buildSegments(const DTSuperLayer *sl, const std::vector< DTHitPairForFit * > &hits)
virtual edm::OwnVector< DTSLRecSegment2D > reconstruct(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits)
this function is called in the producer
std::pair< DTHitPairForFit *, DTEnums::DTCellSide > AssPoint
virtual std::string algoName() const
return the algo name
DTCombinatorialExtendedPatternReco(const edm::ParameterSet &pset)
Constructor.
bool checkDoubleCandidates(std::vector< DTSegmentCand * > &segs, DTSegmentCand *seg)
virtual void setES(const edm::EventSetup &setup)
DTSegmentExtendedCand * buildBestSegment(std::vector< AssPoint > &assHits, const DTSuperLayer *sl)
void buildPointsCollection(std::vector< AssPoint > &points, std::deque< DTHitPairForFit * > &pointsNoLR, std::vector< DTSegmentCand * > &candidates, const DTSuperLayer *sl)
std::vector< std::vector< int > > theTriedPattern
std::vector< DTSegmentExtendedCand * > extendCandidates(std::vector< DTSegmentCand * > &candidates, const DTSuperLayer *sl)
bool closeSL(const DTSuperLayerId &id1, const DTSuperLayerId &id2)
dbl *** dir
Definition: mlp_gen.cc:35
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")