Go to the documentation of this file.00001 #ifndef DTSegment_DTCombinatorialExtendedPatternReco_h
00002 #define DTSegment_DTCombinatorialExtendedPatternReco_h
00003
00015
00016 #include "RecoLocalMuon/DTSegment/src/DTRecSegment2DBaseAlgo.h"
00017
00018
00019 namespace edm {
00020 class ParameterSet;
00021 class EventSetup;
00022
00023 }
00024 class DTSegmentUpdator;
00025 class DTSegmentCleaner;
00026 class DTHitPairForFit;
00027 class DTSegmentCand;
00028 class DTSegmentExtendedCand;
00029 #include "DataFormats/DTRecHit/interface/DTSLRecCluster.h"
00030
00031
00032 #include <vector>
00033 #include <deque>
00034 #include <utility>
00035
00036 #include "Geometry/DTGeometry/interface/DTGeometry.h"
00037 #include "FWCore/Framework/interface/ESHandle.h"
00038
00039
00040
00041
00042
00043 class DTCombinatorialExtendedPatternReco : private DTRecSegment2DBaseAlgo {
00044
00045 public:
00046
00048 DTCombinatorialExtendedPatternReco(const edm::ParameterSet& pset) ;
00049
00051 virtual ~DTCombinatorialExtendedPatternReco() ;
00052
00053
00054
00056 virtual edm::OwnVector<DTSLRecSegment2D>
00057 reconstruct(const DTSuperLayer* sl,
00058 const std::vector<DTRecHit1DPair>& hits);
00059
00061 virtual std::string algoName() const { return theAlgoName; }
00062
00065 virtual void setES(const edm::EventSetup& setup);
00066
00067
00068 void setClusters(std::vector<DTSLRecCluster> clusters);
00069
00070 protected:
00071
00072 private:
00073 typedef std::pair<DTHitPairForFit*, DTEnums::DTCellSide> AssPoint;
00074
00075
00076 std::vector<DTHitPairForFit*> initHits(const DTSuperLayer* sl,
00077 const std::vector<DTRecHit1DPair>& hits);
00078
00079
00080 std::vector<DTSegmentCand*> buildSegments(const DTSuperLayer* sl,
00081 const std::vector<DTHitPairForFit*>& hits);
00082
00083
00084 std::vector<AssPoint> findCompatibleHits(const LocalPoint& pos,
00085 const LocalVector& dir,
00086 const std::vector<DTHitPairForFit*>& hits);
00087
00088
00089 DTSegmentExtendedCand* buildBestSegment(std::vector<AssPoint>& assHits,
00090 const DTSuperLayer* sl) ;
00091
00092 bool checkDoubleCandidates(std::vector<DTSegmentCand*>& segs,
00093 DTSegmentCand* seg);
00094
00097 void buildPointsCollection(std::vector<AssPoint>& points,
00098 std::deque<DTHitPairForFit* >& pointsNoLR,
00099 std::vector<DTSegmentCand*>& candidates,
00100 const DTSuperLayer* sl);
00101
00103 std::vector<DTSegmentExtendedCand*> extendCandidates(std::vector<DTSegmentCand*>& candidates,
00104 const DTSuperLayer* sl);
00105
00106 bool closeSL(const DTSuperLayerId& id1, const DTSuperLayerId& id2);
00107
00108 private:
00109
00110 std::string theAlgoName;
00111 unsigned int theMaxAllowedHits;
00112 double theAlphaMaxTheta;
00113 double theAlphaMaxPhi;
00114 bool debug;
00115 bool usePairs;
00116 DTSegmentUpdator* theUpdator;
00117 DTSegmentCleaner* theCleaner;
00118
00119 edm::ESHandle<DTGeometry> theDTGeometry;
00120
00121 private:
00122
00123 std::vector<std::vector<int> > theTriedPattern;
00124 std::vector<DTSLRecCluster> theClusters;
00125 };
00126 #endif // DTSegment_DTCombinatorialExtendedPatternReco_h