#ifndef TBarrelECalElectronControlSample_h #define TBarrelECalElectronControlSample_h #include "TGraph.h" #include "TH1F.h" #include #include #include // Class to select electrons entering the DsECal, based on TPC3 information class IBarrelECalElectronControlSample : public IControlSampleBase { public: IBarrelECalElectronControlSample(); ~IBarrelECalElectronControlSample(); private: bool IsEventSelectedInternal(COMET::ICOMETEvent& event) ; void InitHistograms(); /// Get the direction of the last node in the object with /// respect to the Z axis, in degrees double GetBackAngleToZ(COMET::IHandle object); /// Get the azimuth of the last node in the object, in degrees double GetBackAzimuth(COMET::IHandle object); /// Get the momentum of the first node in the object double GetFrontMomentum(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 Barrel ECal modules. bool AtBarrelECalFrontFace(COMET::IHandle object); /// Whether the object passes the TPC pull cuts bool PassesPullCuts(COMET::IHandle object); /// Whether the object starts in the FGD FV bool StartsInFGD(COMET::IHandle object); /// Histogram of momenta of selected tracks TH1F* hMom; // 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 fMinPionPullReject; double fMaxPionPullReject; /// Reject tracks with momentum less than this double fMinMomentum; /// Reject tracks with momentum greater than this double fMaxMomentum; /// Reject tracks with a final angle to Z less than this double fTpcBackDirMinAngle; /// Reject tracks with a final azimuth greater than this double fTpcBackDirMaxAzimuth; /// Reject tracks with a final azimuth less than this double fTpcBackDirMinAzimuth; /// Whether the track has to start in FGD FV (0/1) int fMustStartInFGD; // Event-level cuts }; #endif