#ifndef _DEventProcessor_bcal_mc_timewalk_ #define _DEventProcessor_bcal_mc_timewalk_ #include using namespace jana; #include #include #include #include #include "units.h" using namespace std; class DEventProcessor_bcal_mc_timewalk:public JEventProcessor{ public: DEventProcessor_bcal_mc_timewalk(){} ~DEventProcessor_bcal_mc_timewalk(){} const char* className(void){return "DEventProcessor_bcal_mc_timewalk";} private: 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 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. //this is a duplicate of the class defined in DBCALUnifiedHit_factory class readout_channel { public: readout_channel(int cellId, DBCALGeometry::End end) : cellId(cellId), end(end) {} int cellId; DBCALGeometry::End end; bool operator<(const readout_channel &c) const { if (cellIdc.cellId) return false; if (end==DBCALGeometry::kUpstream && c.end==DBCALGeometry::kDownstream) return true; return false; } }; TH1D *signal[4][2]; TTree *bcal_timewalk_tree; //each member below corresponds to a branch on the tree float m_E; float m_first_signal_time; float m_last_signal_time; float m_t_tdc; float m_t_adc; int m_module; int m_sector; int m_layer; int m_end; }; #endif // _DEventProcessor_bcal_mc_timewalk_