1 |
pam-fi |
1.1 |
/* |
2 |
|
|
* TrkDedxHCut.h |
3 |
|
|
* |
4 |
|
|
* Created on: 26-mar-2009 |
5 |
|
|
* Author: Nico De Simone, S. Ricciarini |
6 |
|
|
*/ |
7 |
|
|
|
8 |
|
|
/*! @file TrkDedxHCut.h The TrkDedxHCut class definition file */ |
9 |
|
|
|
10 |
|
|
#ifndef TRKDEDXHCUT_H_ |
11 |
|
|
#define TRKDEDXHCUT_H_ |
12 |
|
|
|
13 |
|
|
#include "../../PamCutBase/PamCutBase.h" |
14 |
|
|
|
15 |
|
|
#include <TH2F.h> |
16 |
|
|
|
17 |
|
|
/*! @brief The dE/dX cut to select H and anti-H. |
18 |
|
|
* This cut discards all the events whose rigidity modulus and dE/dX (both given by TRK) are outside a pre-defined band (by Nico De Simone). |
19 |
|
|
* 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. |
20 |
|
|
* CUT DEPENDENCIES: TrkPhysSin for object trkTrack |
21 |
|
|
*/ |
22 |
|
|
class TrkDedxHCut: public PamCut { |
23 |
|
|
|
24 |
|
|
public: |
25 |
|
|
|
26 |
|
|
/*! @brief Constructor. |
27 |
|
|
* |
28 |
|
|
* @param cutName The cut's name. |
29 |
|
|
*/ |
30 |
|
|
TrkDedxHCut(const char *cutName) : |
31 |
|
|
PamCut(cutName) { |
32 |
|
|
|
33 |
|
|
#ifdef DEBUGPAMCUT |
34 |
|
|
|
35 |
|
|
TString hId; |
36 |
|
|
TString hTitle; |
37 |
|
|
|
38 |
|
|
for (UInt_t j = 0; j < 2; j++) { |
39 |
|
|
hId.Form("h_trk_he_dedx_vs_rigmod_%i", j); |
40 |
|
|
hTitle.Form("TRK HE dE/dX vs |rig| (%i)", j); |
41 |
|
|
h_trk_he_dedx_rigmod[j] = new TH2F(hId.Data(), hTitle.Data(), 50, 0, 20, 50, 0, 10); |
42 |
|
|
} |
43 |
|
|
for (UInt_t j = 0; j < 2; j++) { |
44 |
|
|
hId.Form("h_trk_le_dedx_vs_rigmod_%i", j); |
45 |
|
|
hTitle.Form("TRK LE dE/dX vs |rig| (%i)", j); |
46 |
|
|
h_trk_le_dedx_rigmod[j] = new TH2F(hId.Data(), hTitle.Data(), 60, 0, 3, 50, 0, 10); |
47 |
|
|
} |
48 |
|
|
|
49 |
|
|
#endif |
50 |
|
|
|
51 |
|
|
} |
52 |
|
|
|
53 |
|
|
/*! @brief Destructor. */ |
54 |
|
|
~TrkDedxHCut() { |
55 |
|
|
|
56 |
|
|
#ifdef DEBUGPAMCUT |
57 |
|
|
|
58 |
|
|
for (UInt_t j = 0; j < 2; j++) { |
59 |
|
|
h_trk_he_dedx_rigmod[j]->Write(); |
60 |
|
|
h_trk_le_dedx_rigmod[j]->Write(); |
61 |
|
|
} |
62 |
|
|
|
63 |
|
|
#endif |
64 |
|
|
|
65 |
|
|
} |
66 |
|
|
|
67 |
|
|
/*! @brief The rigidity check. |
68 |
|
|
* |
69 |
|
|
* @param event The event to analyze. |
70 |
|
|
* @return #CUTOK if the (rigidity modulus , dE/dX) point is inside the pre-defined band. |
71 |
|
|
* @return 0 otherwise. |
72 |
|
|
*/ |
73 |
|
|
int Check(PamLevel2 *event); |
74 |
|
|
|
75 |
|
|
private: |
76 |
|
|
|
77 |
|
|
#ifdef DEBUGPAMCUT |
78 |
|
|
|
79 |
|
|
TH2F* h_trk_he_dedx_rigmod[2]; |
80 |
|
|
TH2F* h_trk_le_dedx_rigmod[2]; |
81 |
|
|
|
82 |
|
|
#endif |
83 |
|
|
|
84 |
|
|
// lower cut line |
85 |
|
|
static const int _nLow = 23; |
86 |
|
|
static const Double_t _xLow[]; |
87 |
|
|
static const Double_t _yLow[]; |
88 |
|
|
|
89 |
|
|
// higher cut line |
90 |
|
|
static const int _nHigh = 21; |
91 |
|
|
static const Double_t _xHigh[]; |
92 |
|
|
static const Double_t _yHigh[]; |
93 |
|
|
|
94 |
|
|
}; |
95 |
|
|
#endif |