| 1 | /* | 
| 2 | * CaloNotIntCut.h | 
| 3 | * | 
| 4 | *  Created on: 17-mar-2009 | 
| 5 | *      Author: Nicola Mori | 
| 6 | */ | 
| 7 |  | 
| 8 | /*! @file CaloNotIntCut.h The CaloNotIntCut class definition file */ | 
| 9 |  | 
| 10 | #ifndef CALONOTINTCUT_H_ | 
| 11 | #define CALONOTINTCUT_H_ | 
| 12 |  | 
| 13 | #include "../../PamCutBase/PamCutBase.h" | 
| 14 | #include "../../CaloAxis2.h" | 
| 15 |  | 
| 16 | /*! @brief The non-interacting track cut. | 
| 17 | * This check discards all the events who interacts in the calorimeter. It is possible to choose the track to use for | 
| 18 | * the check. To improve computation speed, Check does NOT compute the track for the event; the track information | 
| 19 | * is supposed to lie in some external object, whose address has to be passed to the constructor. The user is then | 
| 20 | * demanded to fill this external object with the proper track information for the current event before calling Check | 
| 21 | * or ApplyCut. | 
| 22 | * Currently, the checks with the calorimeter L2 track and with CaloAxis track are implemented. | 
| 23 | * | 
| 24 | * CUT DEPENDENCIES: CaloTrackCut for the existence of the track (it can also provide the CaloAxis objects). | 
| 25 | */ | 
| 26 |  | 
| 27 | class CaloNotIntCut: public PamCut { | 
| 28 |  | 
| 29 | public: | 
| 30 | /*! @brief Constructor for calorimeter L2 track. | 
| 31 | * Use this constructor if you want to use the L2 calorimeter track to perform the | 
| 32 | * non-interaction check. | 
| 33 | * | 
| 34 | * @param cutName The name of the cut. | 
| 35 | * @param pamTrack Pointer to the Pamela track object. | 
| 36 | * @param qRatioMin The minimum threshold for the ratio between track charge and total charge in CALO. | 
| 37 | */ | 
| 38 | CaloNotIntCut(const char *cutName, PamTrack *pamTrack, float qRatioMin=0.8) : | 
| 39 | PamCut(cutName), _pamTrack(pamTrack), _xCaloAxis(NULL), _yCaloAxis(NULL), _qRatioMin(qRatioMin) { | 
| 40 | } | 
| 41 |  | 
| 42 | /*! @brief Constructor for calorimeter track. | 
| 43 | * Use this constructor if you want to use the CaloAxis track to perform the | 
| 44 | * non-interaction check. | 
| 45 | * | 
| 46 | * @param cutName The name of the cut. | 
| 47 | * @param xCaloAxis The pointer to the CaloAxis object for X axis | 
| 48 | * @param yCaloAxis The pointer to the CaloAxis object for Y axis | 
| 49 | * @param qRatioMin The minimum threshold for the ratio between track charge and total charge in CALO. | 
| 50 | * @return | 
| 51 | */ | 
| 52 | CaloNotIntCut(const char *cutName, CaloAxis *xCaloAxis, CaloAxis *yCaloAxis, float qRatioMin=0.8) : | 
| 53 | PamCut(cutName), _pamTrack(NULL), _xCaloAxis(xCaloAxis), _yCaloAxis(yCaloAxis), _qRatioMin(qRatioMin) { | 
| 54 | } | 
| 55 |  | 
| 56 | //TODO: aggiungere il costruttore per il TOF. | 
| 57 |  | 
| 58 | /*! @brief Destructor. */ | 
| 59 | ~CaloNotIntCut() { | 
| 60 | } | 
| 61 |  | 
| 62 | /*! @brief The non-interacting track check. | 
| 63 | * | 
| 64 | * @param event The event to analyze. | 
| 65 | * @return #CUTOK if the ratio between the charge released along the Calo track | 
| 66 | *                and the total released charge is greater than qRatioMin. | 
| 67 | * @return 0 otherwise. | 
| 68 | */ | 
| 69 | int Check(PamLevel2 *event); | 
| 70 |  | 
| 71 | private: | 
| 72 |  | 
| 73 | PamTrack *_pamTrack; | 
| 74 | CaloAxis *_xCaloAxis, *_yCaloAxis; | 
| 75 | float _qRatioMin; | 
| 76 |  | 
| 77 | }; | 
| 78 | #endif /* CALONOTINTCUT_H_ */ |