void AliEMCALTowerRecPoint::EvalDispersion(Float_t logWeight,TClonesArray * digits)
{
// Calculates the dispersion of the shower at the origine of the RecPoint
+ printf("**************** EVAL Dispersion *****************") ;
Float_t d = 0. ;
Float_t wtot = 0. ;
Float_t cyl_radius = emcalgeom->GetIPDistance()+emcalgeom->GetAirGap() ;
Float_t x = cyl_radius * TMath::Cos(fPhi * kDeg2Rad ) ;
- Float_t y = cyl_radius * TMath::Cos(fPhi * kDeg2Rad ) ;
+ Float_t y = cyl_radius * TMath::Sin(fPhi * kDeg2Rad ) ;
Float_t z = cyl_radius * TMath::Tan(fTheta * kDeg2Rad ) ;
// Calculates the dispersion in coordinates
Float_t w = TMath::Max(0.,logWeight+TMath::Log(fEnergyList[iDigit]/fAmp ) ) ;
d += w*((xi-x)*(xi-x) + (yi-y)*(yi-y)+ (zi-z)*(zi-z) ) ;
wtot+=w ;
+ printf("xi=%f, x=%f\n yi=%f, y=%f\n zi=%f, z=%f\n phi=%f phii=%f theta=%f thetaii=%f\n\n",xi,x,yi,y,zi,z, fPhi, phii, fTheta, thetai) ;
}
if ( wtot > 0 )