/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Reconstruction/MdcPatRec/TrkBase/TrkBase-00-01-12/TrkBase/TrkFitMaker.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // File and Version Information:
00003 //      $Id: TrkFitMaker.h,v 1.2 2007/11/13 07:27:23 codeman Exp $
00004 //
00005 // Description: Abstract base class for FitMaker classes.  FitMakers have 
00006 //   two functions, and only FitMakers are supposed to perform these 
00007 //   functions: 1) creating tracks and 2) changing the TrkRep + Fitter 
00008 //   combination for a track.  
00009 //   Derived classes may have data members -- e.g. cut values 
00010 //   to be set in created fitters.  
00011 //   Derived classes usually implement something like these functions:
00012 //   TrkRecoTrk* makeTrack(const TrkExchangePar& helix, const 
00013 //                      HepAList<TrkHitOnTrk>* hotList, double chi2=-999.);
00014 //   virtual void changeFit(TrkRecoTrk& theTrack) const = 0;
00015 //   
00016 //   But I've found too many exceptions to make these virtual functions.
00017 //   So what this class really does is give friendship access to TrkRecoTrks, 
00018 //   and permits derived classes to muck about to their hearts' content.
00019 //     
00020 // Environment:
00021 //      Software developed for the BaBar Detector at the SLAC B-Factory.
00022 //
00023 // Authors: Steve Schaffner
00024 //
00025 //------------------------------------------------------------------------
00026 #ifndef TRKFITMAKER_HH
00027 #define TRKFITMAKER_HH
00028 #include "MdcRecoUtil/PdtPid.h"
00029 #include "TrkBase/TrkRep.h"
00030 #include <utility>
00031 
00032 class TrkHitOnTrk;
00033 class TrkRep;
00034 class TrkRecoTrk;
00035 class TrkExchangePar;
00036 class TrkContext;
00037 class TrkIdManager;
00038 class BField;
00039 class TrkRepIter;
00040 class KalMiniTrkK;
00041 
00042 // Class interface //
00043 class TrkFitMaker {
00044 
00045 public:
00046   virtual ~TrkFitMaker();
00047 
00048   void changeDefault(TrkRecoTrk&, PdtPid::PidType) const;
00049 
00050 protected:
00051 
00052   // The following functions provide friendship access to TrkRecoTrk 
00053   //   (including to ctor).
00054   // gets current TrkReps from track:
00055   std::pair<TrkRepIter,TrkRepIter> uniqueReps(const TrkRecoTrk& t) const; // was currentReps
00056   void setRep(TrkRecoTrk&, TrkRep*) const;
00057   void repointHypo(TrkRecoTrk&, PdtPid::PidType hypo, PdtPid::PidType fit) const;
00058   void setFitNumber(TrkRecoTrk&, PdtPid::PidType, int) const;
00059   std::pair<TrkRepIter,TrkRepIter> allReps(const TrkRecoTrk& t) const; // was repPtrs
00060   TrkRep* getRep(TrkRecoTrk&, PdtPid::PidType) const;
00061   void addHypoTo(TrkRecoTrk&, TrkRep*, PdtPid::PidType hypo) const;
00062   TrkRecoTrk* createTrack(PdtPid::PidType, const TrkContext&, double t0) const;
00063   TrkRecoTrk* createTrack(PdtPid::PidType, long idnum, double t0) const;
00064 // the following functions try to cover the fact that the
00065 // persistence model is completely incompatible with the tracking design.
00066 // They allow direct manipulation of what should be private or constructor-supplied
00067 // arguments.
00068   void setIdManager(TrkRecoTrk&, TrkIdManager*) const;
00069   void setBField(TrkRecoTrk&, const BField*) const;
00070 // allow persistence to call these functions
00071   friend class KalMiniTrkK;
00072   friend class KalMiniRX;
00073   friend class KalFit;
00074 };
00075 
00076 #endif

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