13 |
#include "../../PamCutBase/PamCutBase.h" |
#include "../../PamCutBase/PamCutBase.h" |
14 |
|
|
15 |
/*! @brief The rigidity cut. |
/*! @brief The rigidity cut. |
16 |
* This cut discards all the events whose rigidity is less than the threshold. |
* 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: therefore rigidity can be positive or negative. |
* 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 { |
class TrkRigCut: public PamCut { |
22 |
|
|
24 |
/*! @brief Constructor. |
/*! @brief Constructor. |
25 |
* |
* |
26 |
* @param cutName The cut's name. |
* @param cutName The cut's name. |
27 |
* @param minRigidity The minimum rigidity p/Z (in GV) below which an event |
* @param minRigidity The threshold rigidity p/Z (in GV); can be positive or negative. |
28 |
* will be discarded. Can be positive or negative. |
* @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 minRigidity) : |
TrkRigCut(const char *cutName, float thrRigidity, bool discardBelow = true ) : |
32 |
PamCut(cutName), _minRigidity(minRigidity) { |
PamCut(cutName), _thrRigidity(thrRigidity), _discardBelow(discardBelow) { |
33 |
} |
} |
34 |
/*! @brief Destructor. */ |
/*! @brief Destructor. */ |
35 |
~TrkRigCut() { |
~TrkRigCut() { |
38 |
/*! @brief The rigidity check. |
/*! @brief The rigidity check. |
39 |
* |
* |
40 |
* @param event The event to analyze. |
* @param event The event to analyze. |
41 |
* @return #CUTOK if the rigidity is greater than the threshold |
* @return #CUTOK if the rigidity is greater (lower) than the threshold and discardBelow is true (false). |
42 |
* @return 0 otherwise. |
* @return 0 otherwise. |
43 |
*/ |
*/ |
44 |
int Check(PamLevel2 *event); |
int Check(PamLevel2 *event); |
45 |
|
|
46 |
private: |
private: |
47 |
|
|
48 |
float _minRigidity; |
float _thrRigidity; |
49 |
|
bool _discardBelow; |
50 |
|
|
51 |
}; |
}; |
52 |
#endif /* TRKRIGCUT_H_ */ |
#endif /* TRKRIGCUT_H_ */ |