Fixed bug

This commit is contained in:
nemu
2014-10-23 11:50:28 +02:00
parent 0c6f3c614e
commit 29c8b81be4

View File

@ -45,7 +45,7 @@ void beamSpotWithCut(char* fname, Double_t cut)
for (j = k; j<nEventsTD; j++){
// cout << i << ", " << j << ", " << k << ", " << EventIDSample[i] << ", " << EventIDTD[j] << ", " << Samplex[i] << ", " << sqrt(TDx[j]*TDx[j]+TDy[j]*TDy[j]) << endl;
if (EventIDSample[i] == EventIDTD[j]){
if (sqrt(TDx[j]*TDx[j]+TDy[j]*TDy[j])<=cut) hBeamSpot->Fill(Samplex[j], Sampley[j]);
if (sqrt(TDx[j]*TDx[j]+TDy[j]*TDy[j])<=cut) hBeamSpot->Fill(Samplex[i], Sampley[i]);
k = j + 1;
break;
}