| 1 | /* | 
| 2 | * TofBetaRangeCut.h | 
| 3 | * | 
| 4 | *  Created on: 10-apr-2009 | 
| 5 | *      Author: Nicola Mori, S. Ricciarini | 
| 6 | */ | 
| 7 |  | 
| 8 | /*! @file TofBetaRangeCut.h The TofBetaRangeCut class definition file */ | 
| 9 |  | 
| 10 | #ifndef TOFBETARANGECUT_H_ | 
| 11 | #define TOFBETARANGECUT_H_ | 
| 12 |  | 
| 13 | #include "../../PamCutBase/PamCutBase.h" | 
| 14 |  | 
| 15 | /*! @brief The TofBetaRange cut. | 
| 16 | * This cut selects a range of beta values. Note that beta can be either positive (downward going particle) or negative (upward going particle). | 
| 17 | */ | 
| 18 |  | 
| 19 | class TofBetaRangeCut: public PamCut { | 
| 20 |  | 
| 21 | public: | 
| 22 | /*! @brief Constructor | 
| 23 | * @param cutName The cut's name. | 
| 24 | * @param trkAlg Tracking algorythm to be used () | 
| 25 | * @param trkId ID of the (physical) track along which beta should be evaluated (default 0, that is the first track) | 
| 26 | * @param resMax See documentation for ToFLevel2::CalcBeta. Default: 10. (equivalent to beta[12]) | 
| 27 | * @param qualCut See documentation for ToFLevel2::CalcBeta. Default: 10. (equivalent to beta[12]) | 
| 28 | * @param chi2Cut See documentation for ToFLevel2::CalcBeta. Default: 20. (equivalent to beta[12]) | 
| 29 | * @param minBeta the minimum beta value (with sign) | 
| 30 | * @param maxBeta the maximum beta value (with sign) | 
| 31 | * | 
| 32 | * In order to evaluate the beta of a particle by using the tracker information, the trkAlg should be indicated (e.g."STD"). | 
| 33 | * For meaningfull analysis, this cut should follow a  TrkPhSinCut (single track), and the indicated trkAlg should be | 
| 34 | * consistently the same one. | 
| 35 | * If the standalone ToF information is instead required, trkId should be set equal to -1. In this case trkAlg is ignored. | 
| 36 | * | 
| 37 | */ | 
| 38 |  | 
| 39 |  | 
| 40 | /*   TofBetaRangeCut(const char *cutName, ToFTrkVar *trackTof = NULL, float resMax = 10., float qualCut = 10., float chi2Cut = */ | 
| 41 | /*       20., float minBeta = -100., float maxBeta = 100.) : */ | 
| 42 | /*     PamCut(cutName), _trackTof(trackTof), _resMax(resMax), _qualCut(qualCut), _chi2Cut(chi2Cut), _minBeta(minBeta), */ | 
| 43 | /*         _maxBeta(maxBeta) {       */ | 
| 44 | /*   } */ | 
| 45 | TofBetaRangeCut(const char *cutName, const char *trkAlg, int trkId=0, float resMax = 10., float qualCut = 10., float chi2Cut = | 
| 46 | 20., float minBeta = -100., float maxBeta = 100.) : | 
| 47 | PamCut(cutName), _trkAlg(trkAlg), _trkId(trkId), _resMax(resMax), _qualCut(qualCut), _chi2Cut(chi2Cut), _minBeta(minBeta), | 
| 48 | _maxBeta(maxBeta) { | 
| 49 |  | 
| 50 | //      cout << "TofBetaRangeCut("<<cutName<<","<<_trkAlg<<","<<_trkId<<","<<_resMax<<","<<_qualCut<<","<<_chi2Cut<<","<<_minBeta<<","<<_maxBeta<<")"<<endl; | 
| 51 | beta = 0; | 
| 52 |  | 
| 53 | } | 
| 54 |  | 
| 55 | /*! @brief Destructor. */ | 
| 56 | ~TofBetaRangeCut() { | 
| 57 | } | 
| 58 |  | 
| 59 | /*! @brief The TofBetaRange check. | 
| 60 | * | 
| 61 | * @param event The event to analyze. | 
| 62 | * @return #CUTOK if particle beta is inside the specified range (minBeta < beta < maxBeta) | 
| 63 | * @return 0 otherwise | 
| 64 | */ | 
| 65 | int Check(PamLevel2 *event); | 
| 66 |  | 
| 67 | float beta; | 
| 68 |  | 
| 69 | private: | 
| 70 |  | 
| 71 | const char *_trkAlg;///<Tracking algorythm | 
| 72 | int _trkId; | 
| 73 | float _resMax, _qualCut, _chi2Cut; | 
| 74 |  | 
| 75 | float _minBeta, _maxBeta; | 
| 76 |  | 
| 77 | }; | 
| 78 |  | 
| 79 | #endif /* TOFBETARANGECUT_H_ */ |