X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALClusterizerv1.cxx;h=a654112c454dd6dad4abc5e66d4e39f2a470024f;hb=b85ea106fc895e812397f1f3bab3ce9d20798225;hp=e2bd30dde5b38c81d767391846f35b7676578ad4;hpb=ab6a174f4ae4849f7b9f4fc47bdf1b3c84c5dffd;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALClusterizerv1.cxx b/EMCAL/AliEMCALClusterizerv1.cxx index e2bd30dde5b..a654112c454 100644 --- a/EMCAL/AliEMCALClusterizerv1.cxx +++ b/EMCAL/AliEMCALClusterizerv1.cxx @@ -94,10 +94,59 @@ AliEMCALClusterizerv1::AliEMCALClusterizerv1() { // ctor with the indication of the file where header Tree and digits Tree are stored - InitParameters() ; Init() ; } +//____________________________________________________________________________ +AliEMCALClusterizerv1::AliEMCALClusterizerv1(AliEMCALGeometry* geometry) + : AliEMCALClusterizer(), + fGeom(geometry), + fDefaultInit(kFALSE), + fToUnfold(kFALSE), + fNumberOfECAClusters(0),fCalibData(0), + fADCchannelECA(0.),fADCpedestalECA(0.),fECAClusteringThreshold(0.),fECALocMaxCut(0.), + fECAW0(0.),fTimeCut(0.),fMinECut(0.) +{ + // ctor with the indication of the file where header Tree and digits Tree are stored + // use this contructor to avoid usage of Init() which uses runloader + // change needed by HLT - MP + + // Note for the future: the use on runloader should be avoided or optional at least + // another way is to make Init virtual and protected at least such that the deriving classes can overload + // Init() ; + // + + if (!fGeom) + { + AliFatal("Geometry not initialized."); + } + + if(!gMinuit) + gMinuit = new TMinuit(100) ; + +} + +//____________________________________________________________________________ +AliEMCALClusterizerv1::AliEMCALClusterizerv1(AliEMCALGeometry* geometry, AliEMCALCalibData * calib) +: AliEMCALClusterizer(), +fGeom(geometry), +fDefaultInit(kFALSE), +fToUnfold(kFALSE), +fNumberOfECAClusters(0),fCalibData(calib), +fADCchannelECA(0.),fADCpedestalECA(0.),fECAClusteringThreshold(0.),fECALocMaxCut(0.), +fECAW0(0.),fTimeCut(0.),fMinECut(0.) +{ + // ctor, geometry and calibration are initialized elsewhere. + + if (!fGeom) + AliFatal("Geometry not initialized."); + + if(!gMinuit) + gMinuit = new TMinuit(100) ; + +} + + //____________________________________________________________________________ AliEMCALClusterizerv1::~AliEMCALClusterizerv1() { @@ -298,7 +347,7 @@ void AliEMCALClusterizerv1::GetCalibrationParameters() //Check if calibration is stored in data base - if(!fCalibData && (AliCDBManager::Instance()->IsDefaultStorageSet())) + if(!fCalibData) { AliCDBEntry *entry = (AliCDBEntry*) AliCDBManager::Instance()->Get("EMCAL/Calib/Data"); @@ -316,7 +365,7 @@ void AliEMCALClusterizerv1::Init() // Make all memory allocations which can not be done in default constructor. // Attach the Clusterizer task to the list of EMCAL tasks - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); if (rl->GetAliRun() && rl->GetAliRun()->GetDetector("EMCAL")) fGeom = dynamic_cast(rl->GetAliRun()->GetDetector("EMCAL"))->GetGeometry(); else @@ -341,17 +390,16 @@ void AliEMCALClusterizerv1::InitParameters() const AliEMCALRecParam* recParam = AliEMCALReconstructor::GetRecParam(); if(!recParam) { AliFatal("Reconstruction parameters for EMCAL not set!"); - } - else { + } else { fECAClusteringThreshold = recParam->GetClusteringThreshold(); fECAW0 = recParam->GetW0(); fMinECut = recParam->GetMinECut(); fToUnfold = recParam->GetUnfold(); if(fToUnfold) AliWarning("Cluster Unfolding ON. Implementing only for eta=0 case!!!"); fECALocMaxCut = recParam->GetLocMaxCut(); - + AliDebug(1,Form("Reconstruction parameters: fECAClusteringThreshold=%.3f, fECAW=%.3f, fMinECut=%.3f, fToUnfold=%d, fECALocMaxCut=%.3f", - fECAClusteringThreshold,fECAW0,fMinECut,fToUnfold,fECALocMaxCut)); + fECAClusteringThreshold,fECAW0,fMinECut,fToUnfold,fECALocMaxCut)); } }