// $Id$ // // File: DCustomAction_dEdxCut.h // Created: Tue Jul 12 08:35:30 EDT 2016 // Creator: mpatsyuk (on Linux ifarm1101 2.6.32-431.el6.x86_64 x86_64) // #ifndef _DCustomAction_dEdxCut_ #define _DCustomAction_dEdxCut_ #include #include #include "TF1.h" #include "JANA/JEventLoop.h" #include "JANA/JApplication.h" #include "ANALYSIS/DAnalysisAction.h" #include "ANALYSIS/DReaction.h" #include "ANALYSIS/DParticleCombo.h" #include "ANALYSIS/DAnalysisUtilities.h" using namespace std; using namespace jana; class DCustomAction_dEdxCut : public DAnalysisAction { public: //user can call any of these three constructors DCustomAction_dEdxCut(const DReaction* locReaction, bool locMaxRejectionFlag = false, string locActionUniqueString = "") : DAnalysisAction(locReaction, "Custom_dEdxCut", false, locActionUniqueString), dMaxRejectionFlag(locMaxRejectionFlag) {} void Initialize(JEventLoop* locEventLoop); bool Cut_dEdx(const DChargedTrackHypothesis* locChargedTrackHypothesis) const; bool Cut_dEdx(Particle_t locPID, double locP, double locdEdx, bool locHasNoTimeInfoFlag) const; private: bool Perform_Action(JEventLoop* locEventLoop, const DParticleCombo* locParticleCombo = NULL); bool dMaxRejectionFlag; //Store any histograms as member variables here TF1* dFunc_dEdxCut_SelectHeavy; TF1* dFunc_dEdxCut_SelectLight; }; #endif // _DCustomAction_dEdxCut_