CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/RecoLocalMuon/DTSegment/src/DTSegmentUpdator.h

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