/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/TrkFitter/TrkFitter-00-01-11/TrkFitter/TrkSimpleRep.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: TrkSimpleRep.h,v 1.2 2006/03/28 01:03:35 zhangy Exp $
00004 //
00005 // Description:
00006 //      Base class for simple TrkReps: helix, line, circle.
00007 //
00008 // Environment:
00009 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00010 //
00011 // Author List:
00012 //      Steve Schaffner
00013 //
00014 //------------------------------------------------------------------------
00015 
00016 #ifndef TRKSIMPLEREP_HH
00017 #define TRKSIMPLEREP_HH
00018 
00019 #include "TrkBase/TrkRep.h"
00020 #include "TrkFitter/TrkHelixFitter.h"
00021 #include "CLHEP/Vector/ThreeVector.h"
00022 #include "CLHEP/Matrix/Vector.h"
00023 #include "CLHEP/Matrix/Matrix.h"
00024 #include "CLHEP/Matrix/SymMatrix.h"
00025 
00026 class TrkSimpTraj;
00027 using CLHEP::HepVector;
00028 using CLHEP::Hep3Vector;
00029 using CLHEP::HepMatrix;
00030 using CLHEP::HepSymMatrix;
00031 
00032 class TrkSimpleRep : public TrkRep {
00033 public:
00034   //******************************************
00035   // Constructors and such 
00036   //******************************************
00037   // 2 ctors, one for reps with hits, one for reps without hits
00038   TrkSimpleRep(const TrkHotList*, TrkRecoTrk*, PdtPid::PidType);
00039   TrkSimpleRep(TrkRecoTrk*, PdtPid::PidType, int nActive, int nSvt, int nDch,
00040                double chi2, double startFoundRange, double endFoundRange);
00041   // Copy ctor:
00042   TrkSimpleRep(const TrkSimpleRep& right, TrkRecoTrk* trk, PdtPid::PidType);
00043   virtual ~TrkSimpleRep();
00044 
00045   //******************************************
00046   // Global quantities:
00047   //******************************************
00048           int    nDof()                const;
00049           double chisq()               const;
00050           void   setChisq(double c);
00051   virtual int    charge()              const;
00052 
00053   //********************************************
00054   // Information about track at a given position
00055   //********************************************
00056   virtual Hep3Vector        momentum(double fltL=0.)      const;
00057   virtual double            pt(double fltL=0.)            const;
00058   virtual BesVectorErr      momentumErr(double fltL)      const;
00059 
00060 
00061   // Interface to vertexing algorithms (M.Bondioli 7/17/98)
00062   // covariance matrices of the track at fixed flight length 
00063   virtual HepMatrix         posmomCov(double fltL)            const;
00064   virtual void              getAllCovs(double fltL,
00065                                        HepSymMatrix& xxCov,
00066                                        HepSymMatrix& ppCov,
00067                                        HepMatrix& xpCov)      const;
00068   // accessors to 2nd derivative of chi2 wrt x and p.
00069   // x0 and p0 are filled with the pos and 3mom around which expansion 
00070   // takes place, whilst Weights are filled with the 2nd deriv of chi2.
00071   // so that:
00072   //  dx=x-x0   dp=p-p0
00073   //
00074   //  chi2(x,p)=0.5 dx^t*Wxx*dx + dx^t*Wxp*dp + 0.5 dp^t*Wpp*dp
00075   // where:
00076   //  pos and mom are 3-dim Vectors,
00077   //  xxWeight ppWeight and xpWeight are 3 by 3 matrices
00078   //
00079   virtual void              getAllWeights(double fltL,
00080                                           HepVector& pos,
00081                                           HepVector& mom,
00082                                           HepSymMatrix& xxWeight,
00083                                           HepSymMatrix& ppWeight,
00084                                           HepMatrix&    xpWeight)const;
00085     virtual void getAllWeights(const HepPoint3D& pt,
00086                                   HepVector& pos,
00087                                   HepVector& mom,
00088                                   HepSymMatrix& xxWeight,
00089                                   HepSymMatrix& ppWeight,
00090                                   HepMatrix&    xpWeight)  const;
00091                                  
00092   //******************************************
00093   // Fitting
00094   //******************************************
00095   virtual TrkErrCode fit();
00096   TrkHelixFitter& fitter()                                  {return _fitter;}
00097 
00098 protected:
00099   TrkSimpleRep& operator=(const TrkSimpleRep &right);
00100   virtual TrkSimpTraj& simpTraj() = 0;  
00101   virtual const TrkSimpTraj& simpTraj() const = 0;  
00102 
00103 private:
00104   TrkHelixFitter _fitter;
00105   double _chisq;
00106 
00107 };
00108 #endif
00109 
00110 
00111 

Generated on Tue Nov 29 23:13:44 2016 for BOSS_7.0.2 by  doxygen 1.4.7