1 |
/* |
2 |
* TrkRigRangeCut.h |
3 |
* |
4 |
* Created on: 24-apr-2009 |
5 |
* Author: S. Ricciarini |
6 |
*/ |
7 |
|
8 |
/*! @file TrkRigRangeCut.h The TrkRigRangeCut class definition file */ |
9 |
|
10 |
#ifndef TRKRIGRANGECUT_H_ |
11 |
#define TRKRIGRANGECUT_H_ |
12 |
|
13 |
#include "../../PamCutBase/PamCutBase.h" |
14 |
|
15 |
/*! @brief The rigidity range cut. |
16 |
* This cut discards all the events whose rigidity is less than the minimum threshold or greater than the maximum threshold. |
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. |
18 |
*/ |
19 |
class TrkRigRangeCut: public PamCut { |
20 |
|
21 |
public: |
22 |
/*! @brief Constructor. |
23 |
* |
24 |
* @param cutName The cut's name. |
25 |
* @param minRigidity The minimum rigidity p/Z (in GV) below which an event |
26 |
* will be discarded. Can be positive or negative. |
27 |
* @param maxRigidity The maximum rigidity p/Z (in GV) above which an event |
28 |
* will be discarded. Can be positive or negative. |
29 |
*/ |
30 |
TrkRigRangeCut(const char *cutName, float minRigidity, float maxRigidity) : |
31 |
PamCut(cutName), _minRigidity(minRigidity), _maxRigidity(maxRigidity) { |
32 |
} |
33 |
/*! @brief Destructor. */ |
34 |
~TrkRigRangeCut() { |
35 |
} |
36 |
|
37 |
/*! @brief The rigidity check. |
38 |
* |
39 |
* @param event The event to analyze. |
40 |
* @return #CUTOK if the rigidity is outside the range |
41 |
* @return 0 otherwise. |
42 |
*/ |
43 |
int Check(PamLevel2 *event); |
44 |
|
45 |
private: |
46 |
|
47 |
float _minRigidity; |
48 |
float _maxRigidity; |
49 |
|
50 |
}; |
51 |
#endif /* TRKRIGRANGECUT_H_ */ |