// Author: David Lawrence June 25, 2004 // // // MyProcessor.h // /// Example program for a Hall-D analyzer which uses DANA /// #ifndef _MYPROCESSOR_H_ #define _MYPROCESSOR_H_ #include #include #include #include #include #include #include #include #define MAX_HIT_MARKERS 50 class MyProcessor:public JEventProcessor { public: MyProcessor(); ~MyProcessor(); 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. jerror_t DrawDetectors(void); int eventNo; vector graphics; int adc_max; void SetADCMax(int max){adc_max = max;} void MoveCenterBoxes(float z); int GetShade(int ADC, bool transparent=false); int GetShade(float E, bool transparent=false); void GetXY(float x, float y, float z, float &X, float &Y); int GetDotColor(float &z, float &X, float &Y); void ClearEvent(void); int drew_detectors; vector left_boxes; vector center_boxes; vector right_boxes; vector dots; unsigned int marker_index; float xl1, yl1, xl2, yl2, xr1, yr1, xr2, yr2; float dXdz; float dYdz; float dXdx; float dYdy; float x_center[18]; // x-positions of center of sections in lab coord. float y_center[18]; // y-positions of center of sections in lab coord. float ADC_TO_GEV; float Z_SHOWER[MAX_HIT_MARKERS]; float Z_CENTER_BOXES; int shower_index; }; #endif // _MYPROCESSOR_H_