--- PamCut/TofCuts/TofDedxS1Cut/TofDedxS1Cut.cpp 2011/09/05 13:41:04 1.2 +++ PamCut/TofCuts/TofDedxS1Cut/TofDedxS1Cut.cpp 2012/01/03 08:57:21 1.3 @@ -13,18 +13,18 @@ int TofDedxS1Cut::Check(PamLevel2 *event) { - int trkSeqNo = 0; + int idx = 0; for (int i = 0; i < event->GetToFLevel2()->ntrk(); i++) { if (event->GetToFLevel2()->GetToFTrkVar(i)->trkseqno == event->GetTrack(0)->GetTrkTrack()->GetSeqNo()) - trkSeqNo = i; + idx = i; } float dEdx = 0; int nLayers = 0; - float dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 0, 100); + float dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 0, 100); // Patch to exclude S115b - ToFTrkVar *tofTrk = event->GetToFLevel2()->GetToFTrkVar(trkSeqNo); + ToFTrkVar *tofTrk = event->GetToFLevel2()->GetToFTrkVar(idx); bool has8 = false, has9 = false; float dedx9 = 0.; for (Int_t ib = 0; ib < tofTrk->npmtadc; ib++) { @@ -47,7 +47,7 @@ dEdx += dEdxLayer; nLayers++; } - dEdxLayer = event->GetToFLevel2()->GetdEdx(trkSeqNo, 1, 100); + dEdxLayer = event->GetToFLevel2()->GetdEdx(idx, 1, 100); if (dEdxLayer > 0. && dEdxLayer < 4090) { dEdx += dEdxLayer; nLayers++;