1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* TofBetaRangeCut.h |
3 |
|
|
* |
4 |
|
|
* Created on: 10-apr-2009 |
5 |
|
|
* Author: Nicola Mori, S. Ricciarini |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file TofBetaRangeCut.h The TofBetaRangeCut class definition file */ |
9 |
|
|
|
10 |
|
|
#ifndef TOFBETARANGECUT_H_ |
11 |
|
|
#define TOFBETARANGECUT_H_ |
12 |
|
|
|
13 |
|
|
#include "../../PamCutBase/PamCutBase.h" |
14 |
|
|
|
15 |
|
|
/*! @brief The TofBetaRange cut. |
16 |
|
|
* This cut selects a range of beta values. Note that beta can be either positive (downward going particle) or negative (upward going particle). |
17 |
|
|
*/ |
18 |
|
|
|
19 |
|
|
class TofBetaRangeCut: public PamCut { |
20 |
|
|
|
21 |
|
|
public: |
22 |
pam-fi |
1.3 |
/*! @brief Constructor |
23 |
|
|
* @param cutName The cut's name. |
24 |
|
|
* @param trkAlg Tracking algorythm to be used () |
25 |
|
|
* @param trkId ID of the (physical) track along which beta should be evaluated (default 0, that is the first track) |
26 |
pam-fi |
1.2 |
* @param resMax See documentation for ToFLevel2::CalcBeta. Default: 10. (equivalent to beta[12]) |
27 |
pam-fi |
1.3 |
* @param qualCut See documentation for ToFLevel2::CalcBeta. Default: 10. (equivalent to beta[12]) |
28 |
pam-fi |
1.2 |
* @param chi2Cut See documentation for ToFLevel2::CalcBeta. Default: 20. (equivalent to beta[12]) |
29 |
|
|
* @param minBeta the minimum beta value (with sign) |
30 |
|
|
* @param maxBeta the maximum beta value (with sign) |
31 |
pam-fi |
1.3 |
* |
32 |
|
|
* In order to evaluate the beta of a particle by using the tracker information, the trkAlg should be indicated (e.g."STD"). |
33 |
|
|
* For meaningfull analysis, this cut should follow a TrkPhSinCut (single track), and the indicated trkAlg should be |
34 |
|
|
* consistently the same one. |
35 |
|
|
* If the standalone ToF information is instead required, trkId should be set equal to -1. In this case trkAlg is ignored. |
36 |
|
|
* |
37 |
pam-fi |
1.2 |
*/ |
38 |
pam-fi |
1.3 |
|
39 |
|
|
|
40 |
|
|
/* TofBetaRangeCut(const char *cutName, ToFTrkVar *trackTof = NULL, float resMax = 10., float qualCut = 10., float chi2Cut = */ |
41 |
|
|
/* 20., float minBeta = -100., float maxBeta = 100.) : */ |
42 |
|
|
/* PamCut(cutName), _trackTof(trackTof), _resMax(resMax), _qualCut(qualCut), _chi2Cut(chi2Cut), _minBeta(minBeta), */ |
43 |
|
|
/* _maxBeta(maxBeta) { */ |
44 |
|
|
/* } */ |
45 |
|
|
TofBetaRangeCut(const char *cutName, const char *trkAlg, int trkId=0, float resMax = 10., float qualCut = 10., float chi2Cut = |
46 |
pam-fi |
1.2 |
20., float minBeta = -100., float maxBeta = 100.) : |
47 |
pam-fi |
1.3 |
PamCut(cutName), _trkAlg(trkAlg), _trkId(trkId), _resMax(resMax), _qualCut(qualCut), _chi2Cut(chi2Cut), _minBeta(minBeta), |
48 |
|
|
_maxBeta(maxBeta) { |
49 |
|
|
|
50 |
|
|
// cout << "TofBetaRangeCut("<<cutName<<","<<_trkAlg<<","<<_trkId<<","<<_resMax<<","<<_qualCut<<","<<_chi2Cut<<","<<_minBeta<<","<<_maxBeta<<")"<<endl; |
51 |
|
|
beta = 0; |
52 |
|
|
|
53 |
pam-fi |
1.1 |
} |
54 |
pam-fi |
1.3 |
|
55 |
pam-fi |
1.1 |
/*! @brief Destructor. */ |
56 |
|
|
~TofBetaRangeCut() { |
57 |
|
|
} |
58 |
|
|
|
59 |
|
|
/*! @brief The TofBetaRange check. |
60 |
|
|
* |
61 |
|
|
* @param event The event to analyze. |
62 |
|
|
* @return #CUTOK if particle beta is inside the specified range (minBeta < beta < maxBeta) |
63 |
|
|
* @return 0 otherwise |
64 |
|
|
*/ |
65 |
|
|
int Check(PamLevel2 *event); |
66 |
|
|
|
67 |
pam-fi |
1.3 |
float beta; |
68 |
|
|
|
69 |
pam-fi |
1.1 |
private: |
70 |
|
|
|
71 |
pam-fi |
1.3 |
const char *_trkAlg;///<Tracking algorythm |
72 |
|
|
int _trkId; |
73 |
pam-fi |
1.1 |
float _resMax, _qualCut, _chi2Cut; |
74 |
|
|
|
75 |
|
|
float _minBeta, _maxBeta; |
76 |
|
|
|
77 |
|
|
}; |
78 |
|
|
|
79 |
|
|
#endif /* TOFBETARANGECUT_H_ */ |