| 1 |
pam-fi |
1.1 |
/* |
| 2 |
|
|
* TofPatternCut.h |
| 3 |
|
|
* |
| 4 |
|
|
* Created on: 10-mar-2009 |
| 5 |
|
|
* Author: Elena Vannuccini |
| 6 |
|
|
*/ |
| 7 |
|
|
|
| 8 |
|
|
/*! @file TofPatternCut.h The ToFPatternCut class definition file */ |
| 9 |
|
|
|
| 10 |
|
|
#ifndef TOFPATTERNCUT_H_ |
| 11 |
|
|
#define TOFPATTERNCUT_H_ |
| 12 |
|
|
|
| 13 |
|
|
#include "../../PamCutBase/PamCutBase.h" |
| 14 |
|
|
|
| 15 |
|
|
/*! @brief The Tof-pattern cut. |
| 16 |
|
|
* |
| 17 |
|
|
* Requirements: |
| 18 |
pam-fi |
1.3 |
* - (1) no more than 1 hit paddle on S11 S12 S21 S22; |
| 19 |
|
|
* - (2) at least 1 hit paddle on S1 and S2; |
| 20 |
|
|
* - (3) less than 3 hit PMTs (only TDC hits with tdc<4095) outside track on S11 and S12; |
| 21 |
|
|
* - (4) if there is a hit paddle, it must be associated to the track. |
| 22 |
pam-fi |
1.1 |
*/ |
| 23 |
|
|
class TofPatternCut: public PamCut { |
| 24 |
|
|
|
| 25 |
|
|
public: |
| 26 |
pam-fi |
1.2 |
/*! @brief Constructor. |
| 27 |
|
|
* |
| 28 |
|
|
* @param cutName The cut's name. |
| 29 |
|
|
* @param standalone If true, the standalone track will be used; otherwise, track |
| 30 |
|
|
* from tracker will be used. |
| 31 |
|
|
* @param notrk The number of the physical track to use. |
| 32 |
|
|
*/ |
| 33 |
|
|
TofPatternCut(const char *cutName, bool standalone = false, int notrk = 0) : |
| 34 |
|
|
PamCut(cutName), _standalone(standalone), _notrk(notrk) { |
| 35 |
pam-fi |
1.1 |
} |
| 36 |
|
|
/*! @brief Destructor. */ |
| 37 |
|
|
~TofPatternCut() { |
| 38 |
|
|
} |
| 39 |
|
|
|
| 40 |
|
|
/*! @brief The ToF-pattern check. |
| 41 |
|
|
* |
| 42 |
|
|
* @param event The event to analyze. |
| 43 |
|
|
* @return #CUTOK if the event pattern matches the required characteristics. |
| 44 |
|
|
*/ |
| 45 |
|
|
int Check(PamLevel2 *event); |
| 46 |
|
|
|
| 47 |
|
|
/*! @brief Counts the number of hit PMTs (with tdc signal) outside track |
| 48 |
|
|
* |
| 49 |
|
|
* @param event The event to analyze. |
| 50 |
|
|
* @param plane Plane number (0-5 = S11-S32). |
| 51 |
|
|
*/ |
| 52 |
|
|
int GetNHitPMTsOutsideTrack(PamLevel2 *event, int plane); |
| 53 |
|
|
|
| 54 |
|
|
/*! @brief Set standalone ToF track. */ |
| 55 |
|
|
inline void SetStandalone(int yes) { |
| 56 |
|
|
if (yes) |
| 57 |
|
|
_standalone = true; |
| 58 |
|
|
else |
| 59 |
|
|
_standalone = false; |
| 60 |
|
|
} |
| 61 |
|
|
|
| 62 |
|
|
/*! @brief Set (physical) track number (0,1,...). Default is 0 (the first). */ |
| 63 |
|
|
inline void SetTrackNumber(int n) { |
| 64 |
|
|
_notrk = n; |
| 65 |
|
|
} |
| 66 |
|
|
|
| 67 |
|
|
|
| 68 |
|
|
private: |
| 69 |
|
|
|
| 70 |
|
|
bool _standalone; |
| 71 |
|
|
int _notrk; |
| 72 |
|
|
|
| 73 |
|
|
}; |
| 74 |
|
|
#endif /* TOFPATTERNCUT_H_ */ |