// $Id$ // // File: DEventProcessor_trackeff_hists.h // Created: Wed Oct 10 13:30:37 EDT 2007 // Creator: davidl (on Darwin fwing-dhcp95.jlab.org 8.10.1 i386) // #ifndef _DEventProcessor_trackeff_hists_ #define _DEventProcessor_trackeff_hists_ #include #include using std::map; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "track.h" #include "dchit.h" class DEventProcessor_trackeff_hists:public JEventProcessor{ public: DEventProcessor_trackeff_hists(); ~DEventProcessor_trackeff_hists(); TTree *trkeff; track trk; track *trk_ptr; TTree *fdchits, *cdchits; dchit cdchit, fdchit; dchit *cdchit_ptr, *fdchit_ptr; typedef vector CDChitv; typedef vector FDChitv; private: jerror_t init(void); ///< Invoked via DEventProcessor virtual method jerror_t brun(JEventLoop *loop, int runnumber); jerror_t evnt(JEventLoop *loop, int eventnumber); ///< Invoked via DEventProcessor virtual method jerror_t erun(void); ///< Invoked via DEventProcessor virtual method jerror_t fini(void); ///< Invoked via DEventProcessor virtual method void GetCDCHits(const DKinematicData *p, CDChitv &inhits, CDChitv &outhits); void GetFDCHits(const DKinematicData *p, FDChitv &inhits, FDChitv &outhits); void GetFDCHitsFromTruth(int trackno, FDChitv &outhits); void GetCDCHitsFromTruth(int trackno, CDChitv &outhits); unsigned int FindMatch(CDChitv &thrownhits, vector &candidate_hits, CDChitv &matched_hits); unsigned int FindMatch(FDChitv &thrownhits, vector &candidate_hits, FDChitv &matched_hits); unsigned int GetNFDCWireHits(FDChitv &inhits); void FindFDCTrackNumbers(JEventLoop *loop); void FindCDCTrackNumbers(JEventLoop *loop); DMagneticFieldMap *bfield; DReferenceTrajectory *ref; double MAX_HIT_DIST_CDC; double MAX_HIT_DIST_FDC; map fdclink; map cdclink; map trklink; vector >fdcwires; pthread_mutex_t mutex; pthread_mutex_t rt_mutex; }; #endif // _DEventProcessor_trackeff_hists_