// $Id$ // // File: DTrackCandidate_factory_CDCCOSMIC.h // Created: Sat Jun 28 16:50:07 EDT 2014 // Creator: davidl (on Darwin harriet.local 13.2.0 i386) // #ifndef _DTrackCandidate_factory_CDCCOSMIC_ #define _DTrackCandidate_factory_CDCCOSMIC_ #include #include #include #include #include #include class DTrackCandidate_factory_CDCCOSMIC:public jana::JFactory{ public: DTrackCandidate_factory_CDCCOSMIC():rt(NULL),bfield(NULL),residual_vs_ring(NULL){}; ~DTrackCandidate_factory_CDCCOSMIC(){}; const char* Tag(void){return "CDCCOSMIC";} private: jerror_t init(void); ///< Called once at program start. jerror_t brun(jana::JEventLoop *eventLoop, int runnumber); ///< Called everytime a new run number is detected. jerror_t evnt(jana::JEventLoop *eventLoop, int eventnumber); ///< Called every event. jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called. jerror_t fini(void); ///< Called after last event of last event source has been processed. double CDCDriftDistance(double t); double CDCDriftVariance(double t); unsigned int Locate(vector&xx,double x); DReferenceTrajectory *rt; DMagneticFieldMapNoField *bfield; DTrackFinder *finder; //TMinuit *ptMinuit; vector hits; vector cdc_drift_table; double cdc_drift_table_min, cdc_drift_table_max; // Resolution parameters double CDC_RES_PAR1,CDC_RES_PAR2; TH2D *residual_vs_ring; TH1D *h_chisq; TH1D *h_Ndof; TH1D *h_chisq_per_Ndof; void CalcChisq(DTrackCandidate *can, vector &axial_hits, vector &stereo_hits); }; #endif // _DTrackCandidate_factory_CDCCOSMIC_