return ;
AliEMCALGeometry * emcalgeo = AliEMCALGeometry::GetInstance(emcalGeoName) ;
- if(!emcalgeo)
- AliFatal("AliEMCALGeometry was not constructed\n") ;
+ if(emcalgeo){
Double32_t * cellsAmpFraction = GetCellsAmplitudeFraction();
Int_t iSupMod = -1;
iIphi, iIeta,iphi,ieta);
Double_t energy = emcCells->GetCellAmplitude(GetCellAbsId(i)) ;
- AliDebug(2,Form("Recalibrate: cell %f, calib %f, fraction %f\n",energy,calibData->GetADCchannel(iSupMod,ieta,iphi),cellsAmpFraction[i]));
+ //AliDebug(2,Form("Recalibrate: cell %f, calib %f, fraction %f\n",energy,calibData->GetADCchannel(iSupMod,ieta,iphi),cellsAmpFraction[i]));
+ if(cellsAmpFraction[i]< 1e-4) cellsAmpFraction[i] = 1; //Unfolding off, took all the cell energy
cellsAmpFraction[i]*=energy*calibData->GetADCchannel(iSupMod,ieta,iphi);
}
SetCellsAmplitudeFraction(cellsAmpFraction);
fRecalibrated=kTRUE;
+
+ }
+ else AliFatal("AliEMCALGeometry was not constructed\n") ;
+
}
//____________________________________________________________________________
void AliEMCALAodCluster::EvalAll(Float_t logWeight, TString geoname){
Int_t nstat = 0;
Float_t wtot = 0. ;
- Int_t idMax = -1;
Int_t iSupMod = -1;
Int_t iTower = -1;
Int_t iIphi = -1;
Double_t zmean = 0.;
AliEMCALGeometry * emcalgeo = AliEMCALGeometry::GetInstance(emcalGeoName) ;
- if(!emcalgeo)
- AliFatal("AliEMCALGeometry was not constructed\n") ;
+ if(emcalgeo){
- Double_t dist = 0;
+ Double_t dist = TmaxInCm(E(),0);
for(Int_t iDigit=0; iDigit < GetNCells(); iDigit++) {
- if(iDigit==0) {
- //Check if this maximum at 0 is true!!
- idMax = GetCellAbsId(iDigit);
- dist = TmaxInCm(Double_t(GetCellAmplitudeFraction(iDigit)),0);
- }
-
+
//Get from the absid the supermodule, tower and eta/phi numbers
emcalgeo->GetCellIndex(GetCellAbsId(iDigit),iSupMod,iTower,iIphi,iIeta);
- emcalgeo->RelPosCellInSModule(GetCellAbsId(iDigit),idMax, dist, xyzi[0], xyzi[1], xyzi[2]);
+ emcalgeo->RelPosCellInSModule(GetCellAbsId(iDigit), dist, xyzi[0], xyzi[1], xyzi[2]);
emcalgeo->GetCellPhiEtaIndexInSModule(iSupMod,iTower,iIphi,iIeta, iphi,ieta);
Double_t ei = GetCellAmplitudeFraction(iDigit) ;
TVector3 gpos ;
emcalgeo->GetGlobal(clXYZ, gpos, iSupMod);
- SetPosition(0, gpos[0]) ;
- SetPosition(1, gpos[1]) ;
- SetPosition(2, gpos[2]) ;
+ SetPositionAt(gpos[0],0) ;
+ SetPositionAt(gpos[1],1) ;
+ SetPositionAt(gpos[2],2) ;
//Calculate dispersion
for(Int_t iDigit=0; iDigit < GetNCells(); iDigit++) {
SetDispersion(TMath::Sqrt(d)) ;
else
SetDispersion(0) ;
+ }
+ else {
+ AliFatal("AliEMCALGeometry was not constructed\n") ;
+ }
+
}