#ifndef TECalPairProducedElectronControlSample_h #define TECalPairProducedElectronControlSample_h #include "TGraph.h" #include "TH1F.h" #include #include #include // Class to select pair produced (in an FGD) electrons and positrons entering an ECal, based on TPC information class IECalPairProducedElectronControlSample : public IControlSampleBase { public: IECalPairProducedElectronControlSample(); ~IECalPairProducedElectronControlSample(); private: bool IsEventSelectedInternal(COMET::ICOMETEvent& event) ; /// 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); /// get the start position of a track TLorentzVector GetFrontPosition(COMET::IHandle object); /// Which FGD does the track start in (returns 0 if it doesn't start in an FGD FV) int FGDStartPoint(TLorentzVector FrontPosition); // Track-level cuts /// Reject tracks with fewer than this number of hits int fMinTpcHits; /// Reject tracks with electron pull outside this region double fMinElePullAccept; double fMaxElePullAccept; /// Reject tracks with muon pull in this region double fMinMuonPullReject; double fMaxMuonPullReject; /// Reject tracks with pion pull in this region double fMinProtonPullReject; double fMaxProtonPullReject; // Event-level cuts }; #endif