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 |
* - not more than 1 hit paddle on S11 S12 S21 S22; |
19 |
* - at least 1 hit paddle on S1 and S2; |
20 |
* - not more than 3 hit PMTs (only TDC hits with tdc<4095) outside track; |
21 |
* on S11 and S12; |
22 |
* - if there is a hit paddle, the PMTs (TDC hits) must be associated to the track; |
23 |
* - if no PMTs (TDC hits) are associated to the track, there must be no hit paddles. |
24 |
*/ |
25 |
class TofPatternCut: public PamCut { |
26 |
|
27 |
public: |
28 |
/*! @brief Constructor. */ |
29 |
TofPatternCut(const char *cutName) : |
30 |
PamCut(cutName), _standalone(false), _notrk(0) { |
31 |
} |
32 |
/*! @brief Destructor. */ |
33 |
~TofPatternCut() { |
34 |
} |
35 |
|
36 |
/*! @brief The ToF-pattern check. |
37 |
* |
38 |
* @param event The event to analyze. |
39 |
* @return #CUTOK if the event pattern matches the required characteristics. |
40 |
*/ |
41 |
int Check(PamLevel2 *event); |
42 |
|
43 |
/*! @brief Counts the number of hit PMTs (with tdc signal) outside track |
44 |
* |
45 |
* @param event The event to analyze. |
46 |
* @param plane Plane number (0-5 = S11-S32). |
47 |
*/ |
48 |
int GetNHitPMTsOutsideTrack(PamLevel2 *event, int plane); |
49 |
|
50 |
/*! @brief Set standalone ToF track. */ |
51 |
inline void SetStandalone(int yes) { |
52 |
if (yes) |
53 |
_standalone = true; |
54 |
else |
55 |
_standalone = false; |
56 |
} |
57 |
|
58 |
/*! @brief Set (physical) track number (0,1,...). Default is 0 (the first). */ |
59 |
inline void SetTrackNumber(int n) { |
60 |
_notrk = n; |
61 |
} |
62 |
|
63 |
|
64 |
private: |
65 |
|
66 |
bool _standalone; |
67 |
int _notrk; |
68 |
|
69 |
}; |
70 |
#endif /* TOFPATTERNCUT_H_ */ |