--- PamCut/TrkCuts/TrkRigCut/TrkRigCut.h 2009/05/27 13:30:08 1.1.1.1 +++ PamCut/TrkCuts/TrkRigCut/TrkRigCut.h 2011/11/30 17:04:53 1.1.1.1.2.1 @@ -13,8 +13,10 @@ #include "../../PamCutBase/PamCutBase.h" /*! @brief The rigidity cut. - * This cut discards all the events whose rigidity is less than the threshold. - * Here rigidity is defined as p/Z (GV) where Z is the particle charge (WITH SIGN) and p the momentum modulus: therefore rigidity can be positive or negative. + * This cut discards all the events whose rigidity is above or below a threshold value. + * Here rigidity is defined as p/Z (GV) where Z is the particle charge (WITH SIGN) and p the momentum modulus: + * therefore rigidity can be positive or negative. + * */ class TrkRigCut: public PamCut { @@ -22,11 +24,12 @@ /*! @brief Constructor. * * @param cutName The cut's name. - * @param minRigidity The minimum rigidity p/Z (in GV) below which an event - * will be discarded. Can be positive or negative. + * @param minRigidity The threshold rigidity p/Z (in GV); can be positive or negative. + * @param discardBelow If true, events below the threshold rigidity will be discarded; + * otherwise, events above the threshold will be discarded. */ - TrkRigCut(const char *cutName, float minRigidity) : - PamCut(cutName), _minRigidity(minRigidity) { + TrkRigCut(const char *cutName, float thrRigidity, bool discardBelow = true ) : + PamCut(cutName), _thrRigidity(thrRigidity), _discardBelow(discardBelow) { } /*! @brief Destructor. */ ~TrkRigCut() { @@ -35,14 +38,15 @@ /*! @brief The rigidity check. * * @param event The event to analyze. - * @return #CUTOK if the rigidity is greater than the threshold + * @return #CUTOK if the rigidity is greater (lower) than the threshold and discardBelow is true (false). * @return 0 otherwise. */ int Check(PamLevel2 *event); private: - float _minRigidity; + float _thrRigidity; + bool _discardBelow; }; #endif /* TRKRIGCUT_H_ */