// $Id$ // // File: DEventProcessor_phys_tree.h // Created: Wed Sep 2 20:25:05 EDT 2009 // Creator: davidl (on Darwin harriet.jlab.org 9.6.0 i386) // #ifndef _DEventProcessor_phys_tree_ #define _DEventProcessor_phys_tree_ #include using namespace std; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "Event.h" #include "Particle.h" class DMCTrajectoryPoint; class DCoordinateSystem; class DEventProcessor_phys_tree:public JEventProcessor{ public: DEventProcessor_phys_tree(); ~DEventProcessor_phys_tree(); const char* className(void){return "DEventProcessor_trackres_tree";} class particle_set{ public: vector photons; vector neutrons; vector piplus; vector piminus; vector protons; vector Kplus; vector Kminus; }; Event *evt_recon; Event *evt_thrown; TTree *tree_recon; TTree *tree_thrwn; pthread_mutex_t mutex; 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. Particle MakeParticle(const DKinematicData *kd, double mass); Particle MakeParticle(const DChargedTrackHypothesis *locChargedTrackHypothesis, double mass); Particle MakeParticle(const DNeutralParticleHypothesis *locNeutralParticleHypothesis, double mass); bool IsFiducial(const DKinematicData *kd); void FillEvent(Event *evt, particle_set &pset, particle_set &pset_match); Particle FindBestMatch(const Particle &primary, vector &secondaries); double GetFOM(const Particle &a, const Particle &b) const; }; #endif // _DEventProcessor_trackres_tree_