#ifndef TECalPionControlSample_h #define TECalPionControlSample_h #include "TGraph.h" #include "TH1F.h" #include #include #include // Class to select pions entering an ECal, based on TPC information class IECalPionControlSample : public IControlSampleBase { public: IECalPionControlSample(); ~IECalPionControlSample(); private: bool IsEventSelectedInternal(COMET::ICOMETEvent& event) ; /// Get the momentum of the first node in the object double GetFrontMomentum(COMET::IHandle object); /// get the reconstructed charge of the object double GetCharge(COMET::IHandle object); /// Whether the position of the last node in the object matches the /// defined definition of being near the inner face of the ECal modules. bool AtECalFrontFace(COMET::IHandle object); /// Whether the object passes the TPC pull cuts bool PassesPullCuts(COMET::IHandle object); /// which bunch is the track in int WhichBunch(COMET::IHandle object, int eventID); /// Which FGD does the track start in (returns 0 if it doesn't start in an FGD FV) int FGDStartPoint(COMET::IHandle object); // Track-level cuts /// Reject tracks with fewer than this number of hits int fMinTpcHits; /// Reject tracks with muon pull outside this region double fMinMuonPullAccept; double fMaxMuonPullAccept; /// Reject tracks with pion pull in this region double fMinProtonPullReject; double fMaxProtonPullReject; /// Reject tracks with momentum less than this double fMinMomentum; /// Reject tracks with momentum greater than this double fMaxMomentum; // Event-level cuts }; #endif