12 |
#include "TofNucleiZCut.h" |
#include "TofNucleiZCut.h" |
13 |
|
|
14 |
const float TofNucleiZCut::_sigmaZdefault[] = { 0.12, 0.15, 0.20, 0.25, 0.32, 0.40, 0.45, 0.50 }; // the charge-width in a layer for Z=1..8 |
const float TofNucleiZCut::_sigmaZdefault[] = { 0.12, 0.15, 0.20, 0.25, 0.32, 0.40, 0.45, 0.50 }; // the charge-width in a layer for Z=1..8 |
15 |
const unsigned int TofNucleiZCut::_maskArray[] = { TOFNUCLEIZ_S11, TOFNUCLEIZ_S12, TOFNUCLEIZ_S21, TOFNUCLEIZ_S22, |
const unsigned int TofNucleiZCut::_maskArray[] = { S11, S12, S21, S22, S31, S32 }; //The layer - mask code association |
|
TOFNUCLEIZ_S31, TOFNUCLEIZ_S32 }; //The layer - mask code association |
|
16 |
|
|
17 |
|
|
18 |
TofNucleiZCut::TofNucleiZCut(const char *cutName, unsigned int Z, float lowerLimit, float upperLimit, unsigned int minLayers, |
TofNucleiZCut::TofNucleiZCut(const char *cutName, unsigned int Z, float lowerLimit, float upperLimit, |
19 |
unsigned int layersMask) : |
unsigned int minLayers, unsigned int layersMask) : |
20 |
PamCut(cutName), _Z(Z), _mean(8, 6), _sigma(8, 6), _lowerLimit(lowerLimit), _upperLimit(upperLimit), _minLayers( |
PamCut(cutName), _Z(Z), _mean(8, 6), _sigma(8, 6), _lowerLimit(lowerLimit), _upperLimit(upperLimit), _minLayers( |
21 |
minLayers), _layersMask(layersMask), _tofNuclei(NULL) { |
minLayers), _layersMask(layersMask), _tofNuclei(NULL) { |
22 |
|
|
23 |
//TODO Put calibration parameters on a file; load only those parameters needed for the current Z. |
//TODO Put calibration parameters on a file; load only those parameters needed for the current Z. |
24 |
|
|
25 |
// Hard-coded calibrations |
// Hard-coded calibrations |
26 |
// H |
// H |
27 |
_mean[0][0] = 0.987; // S11 peak |
_mean[0][0] = 0.987; // S11 peak |
28 |
_sigma[0][0] = 0.11; // S11 sigma |
_sigma[0][0] = 0.11; // S11 sigma |
29 |
_mean[0][1] = 0.988; // S12 peak |
_mean[0][1] = 0.988; // S12 peak |
30 |
_sigma[0][1] = 0.12; // S12 sigma |
_sigma[0][1] = 0.12; // S12 sigma |
31 |
_mean[0][2] = 0.961; // S21 peak |
_mean[0][2] = 0.961; // S21 peak |
32 |
_sigma[0][2] = 0.083;// S21 sigma |
_sigma[0][2] = 0.083;// S21 sigma |
33 |
_mean[0][3] = 0.966; // S22 peak |
_mean[0][3] = 0.966; // S22 peak |
34 |
_sigma[0][3] = 0.10; // S22 sigma |
_sigma[0][3] = 0.10; // S22 sigma |
35 |
_mean[0][4] = 0.981; // S31 peak |
_mean[0][4] = 0.981; // S31 peak |
36 |
_sigma[0][4] = 0.092;// S31 sigma |
_sigma[0][4] = 0.092;// S31 sigma |
37 |
_mean[0][5] = 0.979; // S32 peak |
_mean[0][5] = 0.979; // S32 peak |
38 |
_sigma[0][5] = 0.095;// S32 sigma |
_sigma[0][5] = 0.095;// S32 sigma |
39 |
|
|
40 |
// He |
// He |
41 |
_mean[1][0] = 1.96; // S11 peak |
_mean[1][0] = 1.96; // S11 peak |
42 |
_sigma[1][0] = 0.12;// S11 sigma |
_sigma[1][0] = 0.12;// S11 sigma |
43 |
_mean[1][1] = 1.95; // S12 peak |
_mean[1][1] = 1.95; // S12 peak |
44 |
_sigma[1][1] = 0.14;// S12 sigma |
_sigma[1][1] = 0.14;// S12 sigma |
45 |
_mean[1][2] = 1.95; // S21 peak |
_mean[1][2] = 1.95; // S21 peak |
46 |
_sigma[1][2] = 0.13;// S21 sigma |
_sigma[1][2] = 0.13;// S21 sigma |
47 |
_mean[1][3] = 1.96; // S22 peak |
_mean[1][3] = 1.96; // S22 peak |
48 |
_sigma[1][3] = 0.14;// S22 sigma |
_sigma[1][3] = 0.14;// S22 sigma |
49 |
_mean[1][4] = 1.99; // S31 peak |
_mean[1][4] = 1.99; // S31 peak |
50 |
_sigma[1][4] = 0.14;// S31 sigma |
_sigma[1][4] = 0.14;// S31 sigma |
51 |
_mean[1][5] = 2.00; // S32 peak |
_mean[1][5] = 2.00; // S32 peak |
52 |
_sigma[1][5] = 0.15;// S32 sigma |
_sigma[1][5] = 0.15;// S32 sigma |
53 |
|
|
54 |
// Heavier nuclei are not calibrated yet; using default values |
// Heavier nuclei are not calibrated yet; using default values |
55 |
for (unsigned int z = 3; z < 9; z++) { |
for (unsigned int z = 3; z < 9; z++) { |
56 |
for (int i = 0; i < 6; i++) { |
for (int i = 0; i < 6; i++) { |
57 |
_mean[z - 1][i] = z; |
_mean[z - 1][i] = z; |
58 |
_sigma[z - 1][i] = _sigmaZdefault[z - 1]; |
_sigma[z - 1][i] = _sigmaZdefault[z - 1]; |
|
} |
|
59 |
} |
} |
60 |
|
} |
61 |
|
|
62 |
#ifdef DEBUGPAMCUT |
#ifdef DEBUGPAMCUT |
63 |
|
|
64 |
TString hId; |
TString hId; |
65 |
TString hTitle; |
TString hTitle; |
66 |
|
|
67 |
for (UInt_t j = 0; j < 12; j++) { |
for (UInt_t j = 0; j < 12; j++) { |
68 |
hId.Form("h_tof_z_vs_beta_%i", j); |
hId.Form("h_tof_z_vs_beta_%i", j); |
69 |
hTitle.Form("TOF Z vs beta (%i)", j); |
hTitle.Form("TOF Z vs beta (%i)", j); |
70 |
h_tof_z_beta[j] = new TH2F(hId.Data(), hTitle.Data(), 50, 0, 1, 50, 0, 10); |
h_tof_z_beta[j] = new TH2F(hId.Data(), hTitle.Data(), 50, 0, 1, 50, 0, 10); |
71 |
} |
} |
72 |
|
|
73 |
#endif |
#endif |
74 |
|
|
75 |
} |
} |
76 |
|
|
77 |
int TofNucleiZCut::Check(PamLevel2 *event) { |
int TofNucleiZCut::Check(PamLevel2 *event) { |
78 |
|
|