// $Id$ // // File: JEventProcessor_timing.h // Created: Fri Nov 9 11:58:09 EST 2012 // Creator: wolin (on Linux stan.jlab.org 2.6.32-279.11.1.el6.x86_64 x86_64) // #ifndef _JEventProcessor_timing_ #define _JEventProcessor_timing_ #include #include "TTree.h" class JEventProcessor_timing:public jana::JEventProcessor{ public: JEventProcessor_timing(); ~JEventProcessor_timing(); const char* className(void){return "JEventProcessor_timing";} static const Int_t NMAX = 5000; static const Int_t NMAX_DC = 8000; static const Double_t TDC_v3BIN_SIZE = 0.1118; // Number of hits Int_t nST; Int_t nBCAL; Int_t nFCAL; Int_t nCDC; Int_t nFDCcathode; Int_t nFDCanode; Int_t nTOF; Int_t nTAGH; Int_t nTAGM; Int_t nPSC; Int_t nPS; Int_t nST_TDC; Int_t nBCAL_TDC; Int_t nTOF_TDC; Int_t nTAGH_TDC; Int_t nTAGM_TDC; Int_t nPSC_TDC; // ADC times Float_t st_adc_time[NMAX]; Float_t bcal_adc_time[NMAX]; Float_t fcal_adc_time[NMAX]; Float_t tof_adc_time[NMAX]; Float_t cdc_adc_time[NMAX_DC]; Float_t fdccathode_adc_time[NMAX_DC]; Float_t fdcanode_adc_time[NMAX_DC]; Float_t tagh_adc_time[NMAX_DC]; Float_t tagm_adc_time[NMAX_DC]; Float_t ps_adc_time[NMAX_DC]; Float_t psc_adc_time[NMAX_DC]; // TDC times Float_t st_tdc_time[NMAX]; Float_t bcal_tdc_time[NMAX]; Float_t tof_tdc_time[NMAX]; Float_t tagh_tdc_time[NMAX]; Float_t tagm_tdc_time[NMAX]; Float_t psc_tdc_time[NMAX]; // pulse integral Float_t st_adc_pulse_integral[NMAX]; Float_t bcal_adc_pulse_integral[NMAX]; Float_t tof_adc_pulse_integral[NMAX]; Float_t fcal_adc_pulse_integral[NMAX]; Float_t cdc_adc_pulse_integral[NMAX_DC]; Float_t fdccathode_adc_pulse_integral[NMAX_DC]; Float_t tagh_adc_pulse_integral[NMAX_DC]; Float_t tagm_adc_pulse_integral[NMAX_DC]; Float_t ps_adc_pulse_integral[NMAX_DC]; Float_t psc_adc_pulse_integral[NMAX_DC]; // pedestal Float_t st_adc_pedestal[NMAX]; Float_t bcal_adc_pedestal[NMAX]; Float_t tof_adc_pedestal[NMAX]; Float_t fcal_adc_pedestal[NMAX]; Float_t cdc_adc_pedestal[NMAX_DC]; Float_t fdccathode_adc_pedestal[NMAX_DC]; Float_t tagh_adc_pedestal[NMAX_DC]; Float_t tagm_adc_pedestal[NMAX_DC]; Float_t ps_adc_pedestal[NMAX_DC]; Float_t psc_adc_pedestal[NMAX_DC]; // nsamples_integral Int_t st_adc_nsamples_integral[NMAX]; Int_t bcal_adc_nsamples_integral[NMAX]; Int_t tof_adc_nsamples_integral[NMAX]; Int_t fcal_adc_nsamples_integral[NMAX]; Int_t tagh_adc_nsamples_integral[NMAX]; Int_t tagm_adc_nsamples_integral[NMAX]; Int_t ps_adc_nsamples_integral[NMAX]; Int_t psc_adc_nsamples_integral[NMAX]; // nsamples_pedestal Int_t st_adc_nsamples_pedestal[NMAX]; Int_t bcal_adc_nsamples_pedestal[NMAX]; Int_t tof_adc_nsamples_pedestal[NMAX]; Int_t fcal_adc_nsamples_pedestal[NMAX]; Int_t tagh_adc_nsamples_pedestal[NMAX]; Int_t tagm_adc_nsamples_pedestal[NMAX]; Int_t ps_adc_nsamples_pedestal[NMAX]; Int_t psc_adc_nsamples_pedestal[NMAX]; // ADC quality Int_t st_adc_QF[NMAX]; Int_t tof_adc_QF[NMAX]; Int_t bcal_adc_QF[NMAX]; Int_t fcal_adc_QF[NMAX]; Int_t cdc_adc_QF[NMAX_DC]; Int_t fdccathode_adc_QF[NMAX_DC]; Int_t tagh_adc_QF[NMAX]; Int_t tagm_adc_QF[NMAX]; Int_t ps_adc_QF[NMAX]; Int_t psc_adc_QF[NMAX]; // detector channel info Int_t fdccathode_channel[NMAX_DC]; Int_t fdcanode_channel[NMAX_DC]; // CDC channel info Int_t cdc_ring[NMAX_DC]; Int_t cdc_straw[NMAX_DC]; // BCAL channel info Int_t bcal_adc_end[NMAX]; Int_t bcal_adc_sector[NMAX]; Int_t bcal_adc_layer[NMAX]; Int_t bcal_adc_module[NMAX]; Int_t bcal_tdc_end[NMAX]; Int_t bcal_tdc_sector[NMAX]; Int_t bcal_tdc_layer[NMAX]; Int_t bcal_tdc_module[NMAX]; // ST channel info Int_t st_adc_channel[NMAX]; Int_t st_tdc_channel[NMAX]; // TOF channel info Int_t tof_adc_plane[NMAX]; Int_t tof_tdc_plane[NMAX]; Int_t tof_adc_bar[NMAX]; Int_t tof_tdc_bar[NMAX]; Int_t tof_adc_end[NMAX]; Int_t tof_tdc_end[NMAX]; // raw data info uint16_t waveform_tof_adc[NMAX][100]; // FCAL channel info Int_t fcal_channel[NMAX]; Int_t fcal_row[NMAX]; Int_t fcal_column[NMAX]; // TAGH channel info Int_t tagh_adc_counter_id[NMAX]; Int_t tagh_tdc_counter_id[NMAX]; // TAGM channel info Int_t tagm_adc_row[NMAX]; Int_t tagm_adc_column[NMAX]; Int_t tagm_tdc_row[NMAX]; Int_t tagm_tdc_column[NMAX]; // PS channel info Int_t ps_adc_arm[NMAX]; Int_t ps_adc_column[NMAX]; // PSC channel info Int_t psc_adc_id[NMAX]; Int_t psc_tdc_id[NMAX]; Int_t nf1TDC_TD; ULong64_t f1tdc_TD[NMAX]; Int_t nf1TDC_TS; ULong64_t f1tdc_TS[NMAX]; // DCODAROCEventInfo Int_t nDCODAEventInfo; ULong64_t eventInfoAvgTime; Int_t eventNum; // DCODAROCInfo Int_t nDCODAROCInfo; static const Int_t NROCINFO = 96; Int_t rocid[NROCINFO]; ULong64_t rocTime[NROCINFO]; // Flag of whether to get raw pulse data // (output will be very large) Bool_t getRawData; 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. // KM TTree *outtree; }; #endif // _JEventProcessor_timing_