93 |
badLayers = 0; |
badLayers = 0; |
94 |
if ((_layers & S11) == S11) { |
if ((_layers & S11) == S11) { |
95 |
dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 0, 100); |
dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 0, 100); |
96 |
|
// Patch to exclude S115b |
97 |
|
ToFTrkVar *tofTrk = event->GetToFLevel2()->GetToFTrkVar(idx); |
98 |
|
bool has8 = false, has9 = false; |
99 |
|
float dedx9 = 0.; |
100 |
|
for (Int_t ib = 0; ib < tofTrk->npmtadc; ib++) { |
101 |
|
if (tofTrk->pmtadc[ib] == 8) { |
102 |
|
has8 = true; |
103 |
|
} |
104 |
|
if (tofTrk->pmtadc[ib] == 9) { |
105 |
|
has9 = true; |
106 |
|
dedx9 = tofTrk->dedx[ib]; |
107 |
|
} |
108 |
|
} |
109 |
|
|
110 |
|
if (has9) { |
111 |
|
dEdxLayer -= (dedx9 / ((int) has8 + 1)); |
112 |
|
dEdxLayer *= 2.; |
113 |
|
} |
114 |
|
//End of patch |
115 |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
if (dEdxLayer > 0. && dEdxLayer < 4090) |
116 |
dEdx += dEdxLayer; |
dEdx += dEdxLayer; |
117 |
else |
else |
153 |
badLayers++; |
badLayers++; |
154 |
} |
} |
155 |
if (badLayers == 0) { |
if (badLayers == 0) { |
156 |
dEdx /= _nLayers - badLayers; |
dEdx /= _nLayers; |
157 |
Fill(event->GetToFLevel2()->GetToFTrkVar(idx)->beta[12], dEdx); |
Fill(event->GetToFLevel2()->GetToFTrkVar(idx)->beta[12], dEdx); |
158 |
} |
} |
159 |
else |
else |