// Author: David Lawrence June 25, 2004 // // // DTrackLSFitter.h // /// Example program for a Hall-D analyzer which uses DANA /// #ifndef _DTRACKLSFITTER_H_ #define _DTRACKLSFITTER_H_ #include #include "HDGEOMETRY/DMagneticFieldMap.h" #include "FDC/DFDCSegment_factory.h" #include "CDC/DCDCTrackHit.h" #include "TRACKING/DMCThrown.h" #include #include #include #include #include #include "chisqMin.h" #include "MyTrajectory.h" #include "hitDetails.h" #include "hddm_fitter.h" class DTrackLSFitter:public JEventProcessor { public: DTrackLSFitter(); ~DTrackLSFitter(); jerror_t init(void); ///< Called once at program start. jerror_t brun(JEventLoop *eventLoop, int runnumber); ///< Called everytime a new run number is detected. jerror_t evnt(JEventLoop *eventLoop, int eventnumber); ///< Called every event. int eventNo; jerror_t erun(void); jerror_t fini(void); int debug_level; HepVector getParams(); double getChiSquared(); int getSizeFDC(); int getSizeCDC(); private: const DMagneticFieldMap *bfield; const DLorentzDeflections *lorentz_def; DFDCSegment_factory *segment_factory; ofstream *fdcDataFile; ofstream *cdcDataFile; ofstream *cdcRawDataFile; ofstream *trajFile; ofstream *signatureFile; ifstream *configFile; HepVector ppEnd; chisqMin *fitPtr; int size_fdc, size_cdc; vectorpseudopoints; vectortrackhits; vectorthrown; double xpInitial, zInitial, thetaInitial, phiInitial, ptinvInitial; void setFitterStartParams(); fitter_iostream_t* ios; void writeTrajectoryHddm(MyTrajectory &traj, int tag, fitter_Trajectorys_t *trajsHddm); void writeCDCDetailsHddm(vector *CDCDetailsPtr, fitter_Trajectorys_t *trajsHddm); }; #endif // _DTRACKLSFITTER_H_