// $Id$ // // File: JEventProcessor_EpEmStudies.h // Created: Wed Mar 11 07:59:00 AM EDT 2026 // Creator: staylor (on Linux ifarm2401.jlab.org 5.14.0-611.30.1.el9_7.x86_64 x86_64) // /// For more information on the syntax changes between JANA1 and JANA2, visit: https://jeffersonlab.github.io/JANA2/#/jana1to2/jana1-to-jana2 #ifndef _JEventProcessor_EpEmStudies_ #define _JEventProcessor_EpEmStudies_ #include #include // Required for accessing services #include #include #include #include #include #include #include #include #include #include #include class JEventProcessor_EpEmStudies:public JEventProcessor{ public: JEventProcessor_EpEmStudies(); ~JEventProcessor_EpEmStudies(); const char* className(void){return "JEventProcessor_EpEmStudies";} private: void Init() override; ///< Called once at program start. void BeginRun(const std::shared_ptr& event) override; ///< Called everytime a new run number is detected. void Process(const std::shared_ptr& event) override; ///< Called every event. void EndRun() override; ///< Called everytime run number changes, provided BeginRun has been called. void Finish() override; ///< Called after last event of last event source has been processed. void FillChargedParticleVectors(vector&tracks,map>&chargedParticles) const; void FillGammaParticleVector(double t0_rf, const DVector3 &vertex, vector&neutrals, vector&gammaParticles ) const; bool DoKinematicFit(double t0_rf,const DVector3 &vertex, const DBeamPhoton *beamphoton, map >&chargedParticles, vector&gammaParticles, DKinFitUtils_GlueX *dKinFitUtils, DKinFitter *dKinFitter, bool isMissing) const; void GetKF4vectors(DKinFitter *dKinFitter,DLorentzVector &beam_kf, DLorentzVector &missing_kf, map>&final_kf) const; static bool SortParticleProbability(const paira, const pairb){ return a.first>b.first; } void EpEmPipPimAnalysis(const DLorentzVector &beam_kf, map>&final_kf, double weight) const; void EpEmAnalysis(const DLorentzVector &beam_kf, map>&final_kf, double weight) const; void EpEm1GAnalysis(const DLorentzVector &beam_kf, map>&final_kf, double weight) const; std::shared_ptr lockService; //Used to access all the services, its value should be set inside Init() TH1F *KinFitCL,*hEpEmGMeasured,*hEpEmPipPimMeasured,*hEpEmPipPimKF; TH1F *hEpEmKF,*hEpEmGKF; DGeometry *dgeom; DVector3 m_FCALCenter; double CL_CUT=0.001; double MIN_PID_FOM=0.0; double PROTON_GAMMA_DT_CUT=4.0; //ns double BCAL_THRESHOLD=0.05; // GeV double FCAL_THRESHOLD=0.05; /// GeV double ECAL_THRESHOLD=0.05; /// GeV double FCAL_POS_CUT=4.0; // cm double FCAL_RADIAL_CUT=104.0; // cm double BCAL_Z_CUT=384.0; // cm double MIN_VERTEX_Z=45.; // cm double MAX_VERTEX_Z=85.; // cm double MAX_VERTEX_R=2.; // cm }; #endif // _JEventProcessor_EpEmStudies_