// $Id$ // // File: DDetectorMatches_factory.h // Created: Tue Aug 9 14:29:24 EST 2011 // Creator: pmatt (on Linux ifarml6 2.6.18-128.el5 x86_64) // #ifndef _DDetectorMatches_factory_ #define _DDetectorMatches_factory_ #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace jana; class DDetectorMatches_factory : public jana::JFactory { public: DDetectorMatches_factory(){}; ~DDetectorMatches_factory(){}; //called by DDetectorMatches tag=Combo factory DDetectorMatches* Create_DDetectorMatches(jana::JEventLoop* locEventLoop, vector& locTrackTimeBasedVector); private: jerror_t init(void); ///< Called once at program start. jerror_t brun(jana::JEventLoop *locEventLoop, int runnumber); ///< Called everytime a new run number is detected. jerror_t evnt(jana::JEventLoop *locEventLoop, 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. //matching tracks to hits/showers routines void MatchToTOF(const DParticleID* locParticleID, const DTrackTimeBased* locTrackTimeBased, const vector& locTOFPoints, DDetectorMatches* locDetectorMatches) const; void MatchToBCAL(const DParticleID* locParticleID, const DTrackTimeBased* locTrackTimeBased, const vector& locBCALShowers, DDetectorMatches* locDetectorMatches) const; void MatchToFCAL(const DParticleID* locParticleID, const DTrackTimeBased* locTrackTimeBased, const vector& locFCALShowers, DDetectorMatches* locDetectorMatches) const; void MatchToSC(const DParticleID* locParticleID, const DTrackTimeBased* locTrackTimeBased, const vector& locSCHits, DDetectorMatches* locDetectorMatches) const; //matching showers to tracks routines void MatchToTrack(const DParticleID* locParticleID, const DBCALShower* locBCALShower, const vector& locTrackTimeBasedVector, DDetectorMatches* locDetectorMatches) const; void MatchToTrack(const DParticleID* locParticleID, const DFCALShower* locFCALShower, const vector& locTrackTimeBasedVector, DDetectorMatches* locDetectorMatches) const; }; #endif // _DDetectorMatches_factory_