#ifndef _DEventProcessor_L3_ #define _DEventProcessor_L3_ #include "TFile.h" #include "TROOT.h" #include "TTree.h" #include "TH1.h" #include "TH2.h" #include #include "DANA/DApplication.h" #include "TRACKING/DMagneticFieldStepper.h" #include "ANALYSIS/DMCThrownMatching.h" #include "ANALYSIS/DAnalysisUtilities.h" #include "ANALYSIS/DTreeInterface.h" using namespace jana; class DEventProcessor_L3:public jana::JEventProcessor{ public: DEventProcessor_L3(); ~DEventProcessor_L3(); const char* className(void){return "DEventProcessor_L3";} private: DApplication* dApplication; jerror_t init(void); ///< Called once at program start. jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected. jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t 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. bool getL1(jana::JEventLoop *eventLoop); jerror_t getMCTruth(jana::JEventLoop *eventLoop); jerror_t getTracks(jana::JEventLoop *eventLoop); jerror_t getTagger(jana::JEventLoop *eventLoop, bool L1_fired); double Calc_MatchFOM(const DVector3& locMomentum_Thrown, const DVector3& locMomentum_Detected); DMagneticFieldMap *bfield; DMagneticFieldStepper *stepper; DTrackFitter* fitter; DReferenceTrajectory* rt; static const int max_swim_steps = 10000; DReferenceTrajectory::swim_step_t *swim_steps; TH2F *hMicroDeltaTAll, *hHodoDeltaTAll; TH1F *hMicroTrueRFTag, *hMicroWrongRFTag; TH1F *hHodoTrueRFTag, *hHodoWrongRFTag, *hHodoTrueRFTagHigh, *hHodoWrongRFTagHigh; TH1F *hCombinedTrueRFTag, *hCombinedWrongRFTag; TH1F* hDeltaT; TH2F* hDeltaT_Egamma, *hDeltaT_Type; TH2F* hEgamma_Type; //TREE DTreeInterface* dTreeInterface; //thread_local: Each thread has its own object: no lock needed //important: manages it's own data internally: don't want to call new/delete every event! static thread_local DTreeFillData dTreeFillData; uint Nparticle_types; double unattenuate_to_center; // BCAL factor for L1 trigger }; #endif // _DEventProcessor_L3_