1 |
pam-fi |
1.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 less than the 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 TrkRigCut: 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 |
|
|
*/ |
28 |
|
|
TrkRigCut(const char *cutName, float minRigidity) : |
29 |
|
|
PamCut(cutName), _minRigidity(minRigidity) { |
30 |
|
|
} |
31 |
|
|
/*! @brief Destructor. */ |
32 |
|
|
~TrkRigCut() { |
33 |
|
|
} |
34 |
|
|
|
35 |
|
|
/*! @brief The rigidity check. |
36 |
|
|
* |
37 |
|
|
* @param event The event to analyze. |
38 |
|
|
* @return #CUTOK if the rigidity is greater than the threshold |
39 |
|
|
* @return 0 otherwise. |
40 |
|
|
*/ |
41 |
|
|
int Check(PamLevel2 *event); |
42 |
|
|
|
43 |
|
|
private: |
44 |
|
|
|
45 |
|
|
float _minRigidity; |
46 |
|
|
|
47 |
|
|
}; |
48 |
|
|
#endif /* TRKRIGCUT_H_ */ |