1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* EvRateS11Cut.h |
3 |
|
|
* |
4 |
|
|
* Created on: 21-mag-2009 |
5 |
|
|
* Author: Nicola Mori |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file EvRateS11Cut.h The EvRateS11Cut class declaration file. */ |
9 |
|
|
|
10 |
|
|
#ifndef EVRATES11CUT_H_ |
11 |
|
|
#define EVRATES11CUT_H_ |
12 |
|
|
|
13 |
|
|
#include "../../PamCutBase/PamCutBase.h" |
14 |
|
|
|
15 |
|
|
/*! @brief Cut on event rate on S11 |
16 |
|
|
* |
17 |
|
|
* This cut discards those events recorded when the event rate on S11 was |
18 |
|
|
* outside a certain range. |
19 |
|
|
*/ |
20 |
|
|
class EvRateS11Cut: public PamCut { |
21 |
|
|
|
22 |
|
|
public: |
23 |
|
|
/*! @brief Constructor. |
24 |
|
|
* |
25 |
|
|
* Default values for the rates are chosen to reject none of the events. |
26 |
|
|
* |
27 |
|
|
* @param cutName The cut's name. |
28 |
|
|
* @param maxRate The maximum rate. |
29 |
|
|
* @param minRate The minimum rate. |
30 |
|
|
*/ |
31 |
|
|
EvRateS11Cut(const char *cutName, float maxRate = 1e06, float minRate = 0.) : |
32 |
|
|
PamCut(cutName), _maxRate(maxRate), _minRate(minRate) { |
33 |
|
|
} |
34 |
|
|
/*! @brief Destructor. */ |
35 |
|
|
~EvRateS11Cut() { |
36 |
|
|
} |
37 |
|
|
|
38 |
|
|
/*! @brief The event rate check. |
39 |
|
|
* |
40 |
|
|
* @param event The event to analyze. |
41 |
|
|
* @return #CUTOK if event rate on S11 is between minRate and maxRate. |
42 |
|
|
* @return 0 otherwise |
43 |
|
|
*/ |
44 |
|
|
int Check(PamLevel2 *event); |
45 |
|
|
|
46 |
|
|
private: |
47 |
|
|
float _maxRate, _minRate; |
48 |
|
|
|
49 |
|
|
}; |
50 |
|
|
#endif /* EVRATES11CUT_H_ */ |
51 |
pam-fi |
1.2 |
|