From: kharlov Date: Mon, 18 Jun 2007 07:00:51 +0000 (+0000) Subject: Bug fix for attempt to use AliPHOSEmcRecPoint after its deletion X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=cd79ec76c7b78c38e985468025ec48169d1923ce;hp=cbc28ac7900dd4244096793957e903627cc3d725;p=u%2Fmrichter%2FAliRoot.git Bug fix for attempt to use AliPHOSEmcRecPoint after its deletion --- diff --git a/PHOS/AliPHOSClusterizerv1.cxx b/PHOS/AliPHOSClusterizerv1.cxx index 601e95ea067..db6a36033be 100644 --- a/PHOS/AliPHOSClusterizerv1.cxx +++ b/PHOS/AliPHOSClusterizerv1.cxx @@ -18,6 +18,9 @@ /* History of cvs commits: * * $Log$ + * Revision 1.107 2007/05/25 14:12:26 policheh + * Local to tracking CS transformation added for CPV rec. points + * * Revision 1.106 2007/05/24 13:01:22 policheh * Local to tracking CS transformation invoked for each EMC rec.point * @@ -638,18 +641,20 @@ void AliPHOSClusterizerv1::WriteRecPoints() //Evaluate position, dispersion and other RecPoint properties.. Int_t nEmc = emcRecPoints->GetEntriesFast(); for(index = 0; index < nEmc; index++){ - AliPHOSEmcRecPoint * rp = dynamic_cast( emcRecPoints->At(index) ); + AliPHOSEmcRecPoint * rp = + dynamic_cast( emcRecPoints->At(index) ); rp->Purify(fEmcMinE) ; if(rp->GetMultiplicity()==0){ emcRecPoints->RemoveAt(index) ; delete rp ; + continue; } -// No vertex is available now, calculate cirrections in PID - rp->EvalAll(fW0,digits) ; - TVector3 fakeVtx(0.,0.,0.) ; - rp->EvalAll(fW0,fakeVtx,digits) ; - rp->EvalLocal2TrackingCSTransform(); + // No vertex is available now, calculate corrections in PID + rp->EvalAll(fW0,digits) ; + TVector3 fakeVtx(0.,0.,0.) ; + rp->EvalAll(fW0,fakeVtx,digits) ; + rp->EvalLocal2TrackingCSTransform(); } emcRecPoints->Compress() ; // emcRecPoints->Sort() ; //Can not sort until position is calculated!