#ifndef _DEventProcessor_bcal_tree_ #define _DEventProcessor_bcal_tree_ #include using namespace jana; #include #include #include #include #include #include "units.h" class DEventProcessor_bcal_tree:public JEventProcessor{ public: DEventProcessor_bcal_tree(){}; ~DEventProcessor_bcal_tree(){}; const char* className(void){return "DEventProcessor_bcal_tree";} static const int MAX_BCALPOINTS=40; 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. TTree *BCAL_shower_info; //each member below corresponds to a branch on the tree float m_E_thrown; float m_phi_thrown; float m_theta_thrown; float m_z_entry_thrown; float m_vertex_z_thrown; int m_nShowers; bool m_match; float m_matched_z_entry; float m_matched_E_raw; float m_matched_E; float m_matched_sig_E; float m_matched_t0; float m_matched_sig_t; float m_matched_x; float m_matched_y; float m_matched_z; float m_matched_phi; float m_matched_sig_phi; float m_matched_theta; float m_matched_sig_theta; int m_matched_nCells; //this is true if there is exactly one truth shower, which is a primary particle. these are events in which a single photon is reconstructible. bool m_no_conversions; //a different method of determining if there are no conversions. If there is exactly one DBCALIncidentParticle and it corresponds to a photon bool m_no_conversions_incident_particle; int m_nPoints; float m_E_truthcell[MAX_BCALPOINTS]; float m_t_truthcell[MAX_BCALPOINTS]; float m_z_truthcell[MAX_BCALPOINTS]; float m_E_point[MAX_BCALPOINTS]; float m_t_point[MAX_BCALPOINTS]; float m_z_point[MAX_BCALPOINTS]; float m_E_hit_up[MAX_BCALPOINTS]; float m_E_hit_down[MAX_BCALPOINTS]; }; #endif // _DEventProcessor_bcal_tree_