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 
37 
38 /* ====================================================================== */
39 
40 /* Class DTCombinatorialExtendedPatternReco Interface */
41 
43 
44  public:
45 
48 
51 
52  /* Operations */
53 
56  reconstruct(const DTSuperLayer* sl,
57  const std::vector<DTRecHit1DPair>& hits);
58 
60  virtual std::string algoName() const { return theAlgoName; }
61 
64  virtual void setES(const edm::EventSetup& setup);
65 
66  // pass clusters to algo
67  void setClusters(const std::vector<DTSLRecCluster>& clusters);
68 
69  protected:
70 
71  private:
72 
73  // create the DTHitPairForFit from the pairs for easy use
74  std::vector<std::shared_ptr<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<std::shared_ptr<DTHitPairForFit>>& hits);
80 
81  // find all the hits compatible with the candidate
82  std::vector<DTSegmentCand::AssPoint> findCompatibleHits(const LocalPoint& pos,
83  const LocalVector& dir,
84  const std::vector<std::shared_ptr<DTHitPairForFit>>& hits);
85 
86  // build segments from hits collection
87  DTSegmentExtendedCand* buildBestSegment(std::vector<DTSegmentCand::AssPoint>& assHits,
88  const DTSuperLayer* sl) ;
89 
90  bool checkDoubleCandidates(std::vector<DTSegmentCand*>& segs,
91  DTSegmentCand* seg);
92 
95  void buildPointsCollection(std::vector<DTSegmentCand::AssPoint>& points,
96  std::deque<std::shared_ptr<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< DTSegmentCand * > buildSegments(const DTSuperLayer *sl, const std::vector< std::shared_ptr< DTHitPairForFit >> &hits)
virtual edm::OwnVector< DTSLRecSegment2D > reconstruct(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits)
this function is called in the producer
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)
void buildPointsCollection(std::vector< DTSegmentCand::AssPoint > &points, std::deque< std::shared_ptr< DTHitPairForFit >> &pointsNoLR, std::vector< DTSegmentCand * > &candidates, const DTSuperLayer *sl)
std::vector< std::shared_ptr< DTHitPairForFit > > initHits(const DTSuperLayer *sl, const std::vector< DTRecHit1DPair > &hits)
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
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)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")