#include "AliEMCALCalibData.h"
class AliCDBStorage;
#include "AliCDBEntry.h"
-#include "AliEMCALUnfolding.h"
ClassImp(AliEMCALClusterizer)
+Bool_t AliEMCALClusterizer::fgkIsInputCalibrated = kFALSE;
+
+
//____________________________________________________________________________
AliEMCALClusterizer::AliEMCALClusterizer():
fDigitsArr(NULL),
Bool_t bCell = fGeom->GetCellIndex(absId, iSupMod, nModule, nIphi, nIeta) ;
if(!bCell) {
fGeom->PrintGeometry();
- Error("Calibrate()"," Wrong cell id number : %i", absId);
- assert(0);
+ AliError(Form("Wrong cell id number : %i", absId));
+ //assert(0); // GCB: This aborts reconstruction of raw simulations where simulation had more SM than default geometry,
+ //change to return 0, to avoid aborting good generations.
+ return 0;
}
fGeom->GetCellPhiEtaIndexInSModule(iSupMod,nModule,nIphi, nIeta,iphi,ieta);
}
//Check if time is too large or too small, indication of a noisy channel, remove in this case
if(time > fTimeMax || time < fTimeMin) return 0;
+
+ if (AliEMCALClusterizer::fgkIsInputCalibrated == kTRUE)
+ {
+ AliDebug(10, Form("Input already calibrated!"));
+ return amp;
+ }
fADCchannelECA = fCalibData->GetADCchannel (iSupMod,ieta,iphi);
fADCpedestalECA = fCalibData->GetADCpedestal(iSupMod,ieta,iphi);
+
return -fADCpedestalECA + amp * fADCchannelECA ;
}
- else //Return energy with default parameters if calibration is not available
+ else{ //Return energy with default parameters if calibration is not available
+
+ if (AliEMCALClusterizer::fgkIsInputCalibrated == kTRUE)
+ {
+ AliDebug(10, Form("Input already calibrated!"));
+ return amp;
+ }
+
return -fADCpedestalECA + amp * fADCchannelECA ;
+ }
}
fPar6[i] = recParam->GetPar6(i);
}//end of loop over parameters
- fClusterUnfolding=new AliEMCALUnfolding(fGeom,fECALocMaxCut,fSSPars,fPar5,fPar6);
+ InitClusterUnfolding();
for (i = 0; i < 8; i++) {
AliDebug(1,Form("unfolding shower shape parameters: fSSPars=%f \n",fSSPars[i]));
fTreeR->Branch("EMCALECARP", "TObjArray", &fRecPoints, bufsize, split);
}
+//___________________________________________________________________
+void AliEMCALClusterizer::SetInputCalibrated(Bool_t val)
+{
+ //
+ // input is calibrated - the case when we run already on ESD
+ //
+ AliEMCALClusterizer::fgkIsInputCalibrated = val;
+}
+