1 |
/* |
2 |
* TrkRigCut.h |
3 |
* |
4 |
* Created on: 13-mar-2009 |
5 |
* Author: Nicola Mori, S. Ricciarini |
6 |
*/ |
7 |
|
8 |
/*! @file TrkRigCut.h The TrkRigCut class definition file */ |
9 |
|
10 |
#ifndef TRKRIGCUT_H_ |
11 |
#define TRKRIGCUT_H_ |
12 |
|
13 |
#include "../../PamCutBase/PamCutBase.h" |
14 |
|
15 |
/*! @brief The rigidity cut. |
16 |
* This cut discards all the events whose rigidity is above or below a threshold value. |
17 |
* Here rigidity is defined as p/Z (GV) where Z is the particle charge (WITH SIGN) and p the momentum modulus: |
18 |
* therefore rigidity can be positive or negative. |
19 |
* |
20 |
*/ |
21 |
class TrkRigCut: public PamCut { |
22 |
|
23 |
public: |
24 |
/*! @brief Constructor. |
25 |
* |
26 |
* @param cutName The cut's name. |
27 |
* @param minRigidity The threshold rigidity p/Z (in GV); can be positive or negative. |
28 |
* @param discardBelow If true, events below the threshold rigidity will be discarded; |
29 |
* otherwise, events above the threshold will be discarded. |
30 |
*/ |
31 |
TrkRigCut(const char *cutName, float thrRigidity, bool discardBelow = true ) : |
32 |
PamCut(cutName), _thrRigidity(thrRigidity), _discardBelow(discardBelow) { |
33 |
} |
34 |
/*! @brief Destructor. */ |
35 |
~TrkRigCut() { |
36 |
} |
37 |
|
38 |
/*! @brief The rigidity check. |
39 |
* |
40 |
* @param event The event to analyze. |
41 |
* @return #CUTOK if the rigidity is greater (lower) than the threshold and discardBelow is true (false). |
42 |
* @return 0 otherwise. |
43 |
*/ |
44 |
int Check(PamLevel2 *event); |
45 |
|
46 |
private: |
47 |
|
48 |
float _thrRigidity; |
49 |
bool _discardBelow; |
50 |
|
51 |
}; |
52 |
#endif /* TRKRIGCUT_H_ */ |