17 |
const float TofDedxHCut::_S32_SA_params[] = { 1.6, 1.2, -0.15, -2., 0.8, 1.6, 1.2, -0.2, 0., 0.8 }; |
const float TofDedxHCut::_S32_SA_params[] = { 1.6, 1.2, -0.15, -2., 0.8, 1.6, 1.2, -0.2, 0., 0.8 }; |
18 |
|
|
19 |
TofDedxHCut::TofDedxHCut(const char *cutName, unsigned int layer, bool standAlone) : |
TofDedxHCut::TofDedxHCut(const char *cutName, unsigned int layer, bool standAlone) : |
20 |
PamCut(cutName), _layer(layer), _standAlone(standAlone), _p(NULL) { |
PamCut(cutName), _layer(layer), _standAlone(standAlone), _p(NULL) { |
21 |
|
|
22 |
switch (_layer) { |
switch (_layer) { |
23 |
case S11: |
case S11: |
71 |
if ((auxLayer & 0x1) == 1) { |
if ((auxLayer & 0x1) == 1) { |
72 |
dEdx += event->GetToFLevel2()->GetdEdx(trkSeqNo, currLayer, 100); |
dEdx += event->GetToFLevel2()->GetdEdx(trkSeqNo, currLayer, 100); |
73 |
nLayers++; |
nLayers++; |
74 |
|
// Patch to exclude S115b |
75 |
|
if (currLayer == 0) { |
76 |
|
ToFTrkVar *tofTrk = event->GetToFLevel2()->GetToFTrkVar(trkSeqNo); |
77 |
|
bool has8 = false, has9 = false; |
78 |
|
float dedx9 = 0.; |
79 |
|
for (Int_t ib = 0; ib < tofTrk->npmtadc; ib++) { |
80 |
|
if (tofTrk->pmtadc[ib] == 8) { |
81 |
|
has8 = true; |
82 |
|
} |
83 |
|
if (tofTrk->pmtadc[ib] == 9) { |
84 |
|
has9 = true; |
85 |
|
dedx9 = tofTrk->dedx[ib]; |
86 |
|
} |
87 |
|
} |
88 |
|
|
89 |
|
if (has9) { |
90 |
|
dEdx -= (dedx9 / ((int) has8 + 1)); |
91 |
|
dEdx *= 2.; |
92 |
|
} |
93 |
|
} |
94 |
|
//End of patch |
95 |
} |
} |
96 |
currLayer++; |
currLayer++; |
97 |
auxLayer >>= 1; |
auxLayer >>= 1; |
99 |
|
|
100 |
dEdx /= nLayers; |
dEdx /= nLayers; |
101 |
|
|
102 |
if (dEdx < 1 / (_p[0] * beta + _p[1]) + _p[2] + _p[3]*beta) |
if (dEdx < _p[0] / (_p[1] * beta + _p[2]) + _p[3] + _p[4] * beta) |
103 |
return 0; |
return 0; |
104 |
|
|
105 |
if (dEdx > 1 / (_p[4] * beta + _p[5]) + _p[6] + _p[7]*beta) |
if (dEdx > _p[5] / (_p[6] * beta + _p[7]) + _p[8] + _p[9] * beta) |
106 |
return 0; |
return 0; |
107 |
|
|
108 |
return CUTOK; |
return CUTOK; |