CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/RecoHI/HiMuonAlgos/interface/HICMuonUpdator.h

Go to the documentation of this file.
00001 #ifndef _TRACKER_HICMUUPDATOR_H_
00002 #define _TRACKER_HICMUUPDATOR_H_
00003 #include "TrackingTools/DetLayers/interface/DetLayer.h"
00004 #include "TrackingTools/PatternTools/interface/Trajectory.h"
00005 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00006 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
00007 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
00008 
00009 #include "RecoHI/HiMuonAlgos/interface/HICConst.h"
00010 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
00011 #include <vector>
00012 
00013 class HICMuonUpdator{
00014 
00015 public:
00016   HICMuonUpdator(double&la1,double&la2, const MagneticField * mf, const cms::HICConst* hh){theHICConst=hh; zvert=hh->zvert;
00017                                         thePhiWin=la1; theZWin=la2; field = mf;};
00018   virtual ~HICMuonUpdator(){}
00019   TrajectoryStateOnSurface update(const Trajectory& mt,
00020                                   const TrajectoryStateOnSurface&, 
00021                                   const TrajectoryMeasurement&, 
00022                                   const DetLayer*, 
00023                                   double&, double&) const;
00024       
00025 
00026   TrajectoryStateOnSurface updateBarrel(std::vector<double>& rhit, std::vector<double>& zhit, 
00027                                         std::vector<double>& dphihit, std::vector<double>& drhit, 
00028                                         std::vector<double>& ehitstrip, std::vector<double>& dehitphi,
00029                                         const TransientTrackingRecHit::ConstRecHitPointer& pRecHit, const TransientTrackingRecHit::ConstRecHitPointer& nRecHit, 
00030                                         const TrajectoryStateOnSurface& nTsos, double&, double&, int&) const;
00031                                                  
00032   TrajectoryStateOnSurface updateEndcap(std::vector<double>& rhit, std::vector<double>& zhit, 
00033                                         std::vector<double>& dphihit, std::vector<double>& drhit, 
00034                                         std::vector<double>& ehitstrip, std::vector<double>& dehitphi,
00035                                         const TransientTrackingRecHit::ConstRecHitPointer& pRecHit, const TransientTrackingRecHit::ConstRecHitPointer& nRecHit, 
00036                                         const TrajectoryStateOnSurface& nTsos, double&, double&, int& ) const;
00037 
00038 private:
00039 
00040   double findPhiInVertex(const FreeTrajectoryState& fts, const double& rc, const GeomDetEnumerators::Location) const;
00041 
00042   bool linefit1(const std::vector <double>& x, const std::vector <double>& y, const std::vector <double>& err,
00043                 double& a, double& chi ) const;
00044   bool linefit2(const std::vector <double>& x, const std::vector <double>& y, const std::vector <double>& err,
00045                 double& a, double& b, double& chi ) const;
00046   double                zvert;
00047   double                thePhiWin;
00048   double                theZWin;
00049   const MagneticField * field;          
00050   const cms::HICConst*  theHICConst;
00051 };
00052 
00053 #endif