1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* TrkSigmaDeflCut.h |
3 |
|
|
* |
4 |
|
|
* Created on: 23-apr-2009 |
5 |
|
|
* Author: S. Ricciarini |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file TrkSigmaDeflCut.h The TrkSigmaDeflCut class definition file */ |
9 |
|
|
|
10 |
|
|
#ifndef TRKSIGMADEFLCUT_H_ |
11 |
|
|
#define TRKSIGMADEFLCUT_H_ |
12 |
|
|
|
13 |
|
|
#include "../../PamCutBase/PamCutBase.h" |
14 |
|
|
|
15 |
|
|
/*! @brief The cut on TRK sigma_deflection. |
16 |
|
|
* |
17 |
pam-fi |
1.2 |
* This cut discards an event if its sigma_deflection (defined as sqrt(coval[4][4]), in GV^-1) |
18 |
|
|
* multiplied by a constant parameter is not less than the minimum deflection for the bin which |
19 |
|
|
* contains the event deflection modulus (deflection of the first TRK track). |
20 |
pam-fi |
1.1 |
* |
21 |
|
|
*/ |
22 |
|
|
class TrkSigmaDeflCut: public PamCut { |
23 |
|
|
|
24 |
|
|
public: |
25 |
|
|
/*! @brief Constructor. |
26 |
|
|
* |
27 |
|
|
* @param cutName The cut's name. |
28 |
|
|
* @param binning A vector containing the histogram binning in rigidity. |
29 |
|
|
* Note that it must contain both the upper and lower limits, and |
30 |
|
|
* that the elements must be ordered (ie., lowest rigidity value in the first |
31 |
|
|
* element and so on). |
32 |
|
|
*/ |
33 |
pam-fi |
1.2 |
TrkSigmaDeflCut(const char *cutName, std::vector<float> binning, float sigmaDeflFactor = 1.) : |
34 |
|
|
PamCut(cutName), _binning(binning), _sigmaDeflFactor(sigmaDeflFactor) { |
35 |
pam-fi |
1.1 |
} |
36 |
|
|
|
37 |
|
|
/*! @brief Constructor. |
38 |
|
|
* |
39 |
|
|
* @param cutName The cut's name. |
40 |
|
|
* @param rigBinListFileName A text file containing the histogram binning. |
41 |
|
|
* Note that it must contain both the upper and lower limits, and |
42 |
|
|
* that the elements must be ordered (ie., lowest rigidity value in the first |
43 |
|
|
* element and so on). |
44 |
|
|
*/ |
45 |
pam-fi |
1.2 |
TrkSigmaDeflCut(const char *cutName, const char* rigBinListFileName, float deflFactor = 1.); |
46 |
pam-fi |
1.1 |
|
47 |
|
|
/*! @brief Destructor. */ |
48 |
|
|
~TrkSigmaDeflCut() { |
49 |
|
|
} |
50 |
|
|
|
51 |
|
|
/*! @brief The sigma_deflection check. |
52 |
|
|
* |
53 |
|
|
* The event is discarded if its deflection is less than the lower |
54 |
|
|
* histogram limit or higher than the upper limit. The event is also discarded if its sigma_deflection is not less than the minimum deflection for the bin which contains the event deflection modulus. |
55 |
|
|
* |
56 |
|
|
* @param event The event to analyze. |
57 |
|
|
* @return #CUTOK if the sigma_deflection condition is satisfied. |
58 |
|
|
* @return 0 otherwise. |
59 |
|
|
*/ |
60 |
|
|
int Check(PamLevel2 *event); |
61 |
|
|
|
62 |
|
|
private: |
63 |
|
|
|
64 |
|
|
std::vector<float> _binning; |
65 |
pam-fi |
1.2 |
float _sigmaDeflFactor; |
66 |
pam-fi |
1.1 |
|
67 |
|
|
}; |
68 |
|
|
|
69 |
|
|
#endif /* TRKSIGMADEFLCUT_H_ */ |