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