Float_t x0 = 1.31;
Float_t ecr = 8;
Float_t depth = 0;
+ Float_t arg = energy*1000/ ecr; //Multiply energy by 1000 to transform to MeV
switch ( iParticle )
{
case kPhoton:
- depth = x0 * (TMath::Log(energy*1000/ ecr) + 0.5); //Multiply energy by 1000 to transform to MeV
+ if (arg < 1)
+ depth = 0;
+ else
+ depth = x0 * (TMath::Log(arg) + 0.5);
break;
case kElectron:
- depth = x0 * (TMath::Log(energy*1000/ ecr) - 0.5); //Multiply energy by 1000 to transform to MeV
+ if (arg < 1)
+ depth = 0;
+ else
+ depth = x0 * (TMath::Log(arg) - 0.5);
break;
case kHadron:
}
else
{//electron
- depth = x0 * (TMath::Log(energy*1000 / ecr) - 0.5); //Multiply energy by 1000 to transform to MeV
+ if (arg < 1)
+ depth = 0;
+ else
+ depth = x0 * (TMath::Log(arg) - 0.5);
}
break;
default://photon
- depth = x0 * (TMath::Log(energy*1000 / ecr) + 0.5); //Multiply energy by 1000 to transform to MeV
+ if (arg < 1)
+ depth = 0;
+ else
+ depth = x0 * (TMath::Log(arg) + 0.5);
}
return depth;
Bool_t shared = kFALSE;
Float_t clEnergy = clu->E(); //Energy already recalibrated previously
+ if (clEnergy <= 0)
+ return;
GetMaxEnergyCell(geom, cells, clu, absId, iSupModMax, ieta, iphi,shared);
Double_t depth = GetDepth(clEnergy,fParticleType,iSupModMax) ;
Bool_t shared = kFALSE;
Float_t clEnergy = clu->E(); //Energy already recalibrated previously.
+ if (clEnergy <= 0)
+ return;
GetMaxEnergyCell(geom, cells, clu, absId, iSupModMax, ieta, iphi,shared);
Float_t depth = GetDepth(clEnergy,fParticleType,iSupMod) ;
void RecalculateClusterPositionFromTowerIndex (const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu);
void RecalculateClusterPositionFromTowerGlobal(const AliEMCALGeometry *geom, AliVCaloCells* cells, AliVCluster* clu);
- Float_t GetCellWeight(const Float_t eCell, const Float_t eCluster) const { return TMath::Max( 0., fW0 + TMath::Log( eCell / eCluster )) ; }
+ Float_t GetCellWeight(const Float_t eCell, const Float_t eCluster) const { if (eCell > 0 && eCluster > 0) return TMath::Max( 0., fW0 + TMath::Log( eCell / eCluster )) ;
+ else return 0. ; }
Float_t GetDepth(const Float_t eCluster, const Int_t iParticle, const Int_t iSM) const ;