X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TOF%2FAliTOFT0maker.cxx;h=f4e6d06cc5ba191c10a7b9230430a4f92b88bfe5;hb=a43541522befb311e2ad82ff25945f3195cd8b81;hp=6392975d5757018bb15041a05de46ce61b818d6f;hpb=bc4fdef610d7fcdde16e34309c4e5f73fa1a4680;p=u%2Fmrichter%2FAliRoot.git diff --git a/TOF/AliTOFT0maker.cxx b/TOF/AliTOFT0maker.cxx index 6392975d575..f4e6d06cc5b 100644 --- a/TOF/AliTOFT0maker.cxx +++ b/TOF/AliTOFT0maker.cxx @@ -81,6 +81,9 @@ AliTOFT0maker::AliTOFT0maker(): fCalculated[2] = 0; fCalculated[3] = 0; + fT0cur[0]=0.; + fT0cur[1]=0.; + if(AliPID::ParticleMass(0) == 0) new AliPID(); fPIDesd = new AliESDpid(); @@ -114,6 +117,9 @@ AliTOFT0maker::AliTOFT0maker(AliESDpid *externalPID, AliTOFcalib *tofCalib): fCalculated[2] = 0; fCalculated[3] = 0; + fT0cur[0]=0.; + fT0cur[1]=0.; + if(AliPID::ParticleMass(0) == 0) new AliPID(); if(!fPIDesd){ @@ -141,7 +147,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 +266,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 +275,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 +299,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; }