CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/RecoLocalMuon/DTSegment/src/DTSegmentUpdator.h

Go to the documentation of this file.
00001 #ifndef DTSegment_DTSegmentUpdator_h
00002 #define DTSegment_DTSegmentUpdator_h
00003 
00018 /* C++ Headers */
00019 #include <vector>
00020 
00021 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
00022 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00023 
00024 #include "FWCore/Framework/interface/ESHandle.h"
00025 
00026 #include "Geometry/DTGeometry/interface/DTGeometry.h"
00027 
00028 /* ====================================================================== */
00029 
00030 /* Collaborating Class Declarations */
00031 class DTSegmentCand;
00032 class DTRecSegment2D;
00033 class DTRecSegment4D;
00034 class DTLinearFit;
00035 class DTRecHitBaseAlgo;
00036 
00037 namespace edm{class EventSetup; class ParameterSet;}
00038 
00039 /* Class DTSegmentUpdator Interface */
00040 class DTSegmentUpdator{
00041 
00042   public:
00043 
00045     DTSegmentUpdator(const edm::ParameterSet& config) ;
00046 
00048     ~DTSegmentUpdator() ;
00049 
00050     /* Operations */ 
00051 
00054     bool fit(DTSegmentCand* seg) const;
00055 
00059     void fit(DTRecSegment2D* seg) const;
00060 
00065     void fit(DTRecSegment4D* seg) const;
00066 
00068     void update(DTRecSegment4D* seg, const bool calcT0 = false) const;
00069 
00071     void update(DTRecSegment2D* seg) const;
00072 
00073     void calculateT0corr(DTRecSegment2D* seg) const;
00074     void calculateT0corr(DTRecSegment4D* seg) const;
00075 
00077     void setES(const edm::EventSetup& setup);
00078 
00079   protected:
00080 
00081   private:
00082     DTLinearFit* theFitter; // the linear fitter
00083     DTRecHitBaseAlgo* theAlgo; // the algo for hit reconstruction
00084     edm::ESHandle<DTGeometry> theGeom; // the geometry
00085 
00086     void updateHits(DTRecSegment2D* seg,
00087                     GlobalPoint &gpos,
00088                     GlobalVector &gdir,
00089                     const int step=2) const;
00090 
00092     void fit(const std::vector<float>& x,
00093              const std::vector<float>& y, 
00094              const std::vector<float>& sigy,
00095              LocalPoint& pos,
00096              LocalVector& dir,
00097              AlgebraicSymMatrix& covMat,
00098              double& chi2) const;
00099 
00100     void Fit4Var(const std::vector<float>& xfit,
00101                  const std::vector<float>& yfit,
00102                  const std::vector<int>& lfit,
00103                  const std::vector<double>& tfit,
00104                  const int nptfit,
00105                  float& cminf, double& vminf,
00106                  double& chi2fit) const;
00107 
00108     bool vdrift_4parfit;
00109     double T0_hit_resolution;
00110     bool debug;
00111 
00112 };
00113 
00114 #endif // DTSegment_DTSegmentUpdator_h