X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TOF%2FAliTOFT0maker.cxx;fp=TOF%2FAliTOFT0maker.cxx;h=57c98966cf8896f107f829d7bd212e92cf1e9029;hb=721ed687be7ba6d2646af905c00bbee4a2a2fc24;hp=6392975d5757018bb15041a05de46ce61b818d6f;hpb=9cd19c639d16b075ac3bac9d0e10eb51edc1d9d5;p=u%2Fmrichter%2FAliRoot.git diff --git a/TOF/AliTOFT0maker.cxx b/TOF/AliTOFT0maker.cxx index 6392975d575..57c98966cf8 100644 --- a/TOF/AliTOFT0maker.cxx +++ b/TOF/AliTOFT0maker.cxx @@ -141,7 +141,6 @@ Double_t* AliTOFT0maker::ComputeT0TOF(AliESDEvent *esd,Double_t t0time,Double_t // // Remake TOF PID probabilities // - Double_t t0tof[6]; if(fKmask) ApplyMask(esd); @@ -261,6 +260,8 @@ Double_t* AliTOFT0maker::ComputeT0TOF(AliESDEvent *esd,Double_t t0time,Double_t } // T0 pt bin + Float_t *t0values = new Float_t[fNmomBins]; + Float_t *t0resolution = new Float_t[fNmomBins]; if(fCalculated[7] < 100){ for(Int_t i=0;iDefineT0("all",fPIDesd->GetTOFResponse().GetMinMom(i),fPIDesd->GetTOFResponse().GetMaxMom(i)); @@ -268,7 +269,6 @@ Double_t* AliTOFT0maker::ComputeT0TOF(AliESDEvent *esd,Double_t t0time,Double_t t0tof[1] = t0maker->GetResult(1); t0tof[2] = t0maker->GetResult(2); t0tof[3] = t0maker->GetResult(3); - Float_t t0bin =-1000*t0tof[0]; // best t0 Float_t t0binRes =1000*t0tof[1]; // sigma best t0 @@ -293,16 +293,23 @@ Double_t* AliTOFT0maker::ComputeT0TOF(AliESDEvent *esd,Double_t t0time,Double_t t0binRes= t0sigma; } } - fPIDesd->GetTOFResponse().SetT0bin(i,t0bin); - fPIDesd->GetTOFResponse().SetT0binRes(i,t0binRes); + t0values[i] = t0bin; + t0resolution[i] = t0binRes; } } else{ for(Int_t i=0;iGetTOFResponse().SetT0bin(i,lT0Current); - fPIDesd->GetTOFResponse().SetT0binRes(i,fT0sigma); + t0values[i] = lT0Current; + t0resolution[i] = fT0sigma; } } + for(Int_t i=0;iGetTOFResponse().SetT0bin(i,t0values[i]); + fPIDesd->GetTOFResponse().SetT0binRes(i,t0resolution[i]); + } + + delete[] t0values; + delete[] t0resolution; return fCalculated; }