Go to the documentation of this file.00001 #ifndef DTSegment_DTMeantimerPatternReco_h
00002 #define DTSegment_DTMeantimerPatternReco_h
00003
00017
00018 #include "RecoLocalMuon/DTSegment/src/DTRecSegment2DBaseAlgo.h"
00019
00020
00021 namespace edm {
00022 class ParameterSet;
00023 class EventSetup;
00024
00025 }
00026 class DTSegmentUpdator;
00027 class DTSegmentCleaner;
00028 class DTHitPairForFit;
00029 class DTSegmentCand;
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 DTMeantimerPatternReco : public DTRecSegment2DBaseAlgo {
00044
00045 public:
00046
00048 DTMeantimerPatternReco(const edm::ParameterSet& pset) ;
00049
00051 virtual ~DTMeantimerPatternReco() ;
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 protected:
00068
00069 private:
00070 friend class DTMeantimerPatternReco4D;
00071
00072 typedef std::pair<DTHitPairForFit*, DTEnums::DTCellSide> AssPoint;
00073
00074
00075 std::vector<DTHitPairForFit*> initHits(const DTSuperLayer* sl,
00076 const std::vector<DTRecHit1DPair>& hits);
00077
00078
00079 std::vector<DTSegmentCand*> buildSegments(const DTSuperLayer* sl,
00080 const std::vector<DTHitPairForFit*>& hits);
00081
00082
00083 void addHits(const DTSuperLayer* sl,
00084 std::vector<AssPoint>& assHits,
00085 const std::vector<DTHitPairForFit*>& hits,
00086 std::vector<DTSegmentCand*> &result,
00087 std::vector<AssPoint>& usedHits);
00088
00089
00090 bool fitWithT0(const std::vector<AssPoint> &assHits, double &chi2, double &t0_corr, const bool fitdebug);
00091
00092
00093 bool geometryFilter( const DTWireId first, const DTWireId second ) const;
00094
00095
00096 void rawFit(double &a, double &b, const std::vector< std::pair<double,double> > &hits);
00097
00098 bool checkDoubleCandidates(std::vector<DTSegmentCand*>& segs,
00099 DTSegmentCand* seg);
00100
00101 private:
00102
00103 std::string theAlgoName;
00104 unsigned int theMaxAllowedHits;
00105 double theAlphaMaxTheta;
00106 double theAlphaMaxPhi;
00107 double theMaxChi2;
00108 double theMaxT0;
00109 double theMinT0;
00110 bool debug;
00111 DTSegmentUpdator* theUpdator;
00112 DTSegmentCleaner* theCleaner;
00113
00114 unsigned int maxfound;
00115
00116 edm::ESHandle<DTGeometry> theDTGeometry;
00117 };
00118 #endif // DTSegment_DTMeantimerPatternReco_h