--- PamCut/CollectionActions/Histo2DActions/TofDedxVsRigHistoAction/TofDedxVsRigHistoAction.cpp 2011/07/28 13:27:46 1.1 +++ PamCut/CollectionActions/Histo2DActions/TofDedxVsRigHistoAction/TofDedxVsRigHistoAction.cpp 2011/11/30 17:01:32 1.1.2.2 @@ -127,8 +127,8 @@ else badLayers++; } - if (badLayers != _nLayers) { - dEdx /= _nLayers - badLayers; + if (badLayers == 0) { + dEdx /= _nLayers; Fill(event->GetTrack(0)->GetTrkTrack()->GetRigidity(), dEdx); } else