fRecoUtils->IsGoodCluster(clus,fGeom,caloCell,bc))
{
- if (fDebug > 0)
- printf("AliAnalysisTaskEMCALClusterize::AcceptEventEMCAL() - Accept : E %2.2f > %2.2f, nCells %d > %d \n",
- clus->E(), fEMCALEnergyCut, clus->GetNCells(), fEMCALNcellsCut);
+ AliDebug(1, Form("Accept : E %2.2f > %2.2f, nCells %d > %d",
+ clus->E(), fEMCALEnergyCut, clus->GetNCells(), fEMCALNcellsCut));
return kTRUE;
}
}// loop
- if (fDebug > 0)
- printf("AliAnalysisTaskEMCALClusterize::AcceptEventEMCAL() - Reject \n");
+ AliDebug(1,"Reject");
return kFALSE;
Int_t runnumber = InputEvent()->GetRunNumber() ;
TString pass = GetPass();
- printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Get AODB parameters from EMCAL in %s for run %d, and <%s> \n",fOADBFilePath.Data(),runnumber,pass.Data());
+ AliInfo(Form("Get AODB parameters from EMCAL in %s for run %d, and <%s>",fOADBFilePath.Data(),runnumber,pass.Data()));
Int_t nSM = fGeom->GetNumberOfSuperModules();
if(arrayBC)
{
fRecoUtils->SwitchOnDistToBadChannelRecalculation();
- printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Remove EMCAL bad cells \n");
+ AliInfo("Remove EMCAL bad cells");
for (Int_t i=0; i<nSM; ++i)
{
fRecoUtils->SetEMCALChannelStatusMap(i,hbm);
} // loop
- } else printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Do NOT remove EMCAL bad channels\n"); // run array
+ } else AliInfo("Do NOT remove EMCAL bad channels"); // run array
} // Remove bad
// Energy Recalibration
if(recalib)
{
- printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Recalibrate EMCAL \n");
+ AliInfo("Recalibrate EMCAL");
for (Int_t i=0; i<nSM; ++i)
{
TH2F *h = fRecoUtils->GetEMCALChannelRecalibrationFactors(i);
fRecoUtils->SetEMCALChannelRecalibrationFactors(i,h);
} // SM loop
- }else printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Do NOT recalibrate EMCAL, no params object array \n"); // array ok
- }else printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Do NOT recalibrate EMCAL, no params for pass\n"); // array pass ok
- }else printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Do NOT recalibrate EMCAL, no params for run\n"); // run number array ok
+ } else AliInfo("Do NOT recalibrate EMCAL, no params object array"); // array ok
+ } else AliInfo("Do NOT recalibrate EMCAL, no params for pass"); // array pass ok
+ } else AliInfo("Do NOT recalibrate EMCAL, no params for run"); // run number array ok
} // Recalibration on
if(htd)
{
- printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Recalibrate (Temperature) EMCAL \n");
+ AliInfo("Recalibrate (Temperature) EMCAL");
for (Int_t ism=0; ism<nSM; ++ism)
{
} // columns
} // rows
} // SM loop
- }else printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Do NOT recalibrate EMCAL with T variations, no params TH1 \n");
+ } else AliInfo("Do NOT recalibrate EMCAL with T variations, no params TH1");
} // Run by Run T calibration
// Time Recalibration
if(trecalpass)
{
- printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Time Recalibrate EMCAL \n");
+ AliInfo("Time Recalibrate EMCAL");
for (Int_t ibc = 0; ibc < 4; ++ibc)
{
TH1F *h = fRecoUtils->GetEMCALChannelTimeRecalibrationFactors(ibc);
fRecoUtils->SetEMCALChannelTimeRecalibrationFactors(ibc,h);
} // bunch crossing loop
- }else printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Do NOT recalibrate time EMCAL, no params for pass\n"); // array pass ok
- }else printf("AliAnalysisTaskEMCALClusterize::SetOADBParameters() - Do NOT recalibrate time EMCAL, no params for run\n"); // run number array ok
+ } else AliInfo("Do NOT recalibrate time EMCAL, no params for pass"); // array pass ok
+ } else AliInfo("Do NOT recalibrate time EMCAL, no params for run"); // run number array ok
} // Time recalibration on
return kTRUE;
fRun = fEvent->GetRunNumber();
- if(DebugLevel() > 1 )
- printf("AliAnalysisTaksEMCALClusterize::AccessOCDB() - Begin");
+ AliDebug(1,"Begin");
AliCDBManager *cdb = AliCDBManager::Instance();
if (fOCDBpath.Length())
{
cdb->SetDefaultStorage(fOCDBpath.Data());
- printf("AliAnalysisTaksEMCALClusterize::AccessOCDB() - Default storage %s",fOCDBpath.Data());
+ AliInfo(Form("Default storage %s",fOCDBpath.Data()));
}
cdb->SetRun(fEvent->GetRunNumber());
//Check if input event are embedded events
//If so, take output event
- if (aodIH && aodIH->GetMergeEvents())
+ if (aodIH && aodIH->GetMergeEvents())
{
fEvent = AODEvent();
- if(!aodIH->GetMergeEMCALCells())
+ if(!aodIH->GetMergeEMCALCells())
AliFatal("Events merged but not EMCAL cells, check analysis settings!");
- if(DebugLevel() > 1)
- {
- printf("AliAnalysisTaksEMCALClusterize::UserExec() - Use embedded events\n");
-
- printf("\t InputEvent N Clusters %d, N Cells %d\n",InputEvent()->GetNumberOfCaloClusters(),
- InputEvent()->GetEMCALCells()->GetNumberOfCells());
-
- printf("\t MergedEvent N Clusters %d, N Cells %d\n",aodIH->GetEventToMerge()->GetNumberOfCaloClusters(),
- aodIH->GetEventToMerge()->GetEMCALCells()->GetNumberOfCells());
-
- for (Int_t icl=0; icl < aodIH->GetEventToMerge()->GetNumberOfCaloClusters(); icl++)
- {
- AliAODCaloCluster *sigCluster = aodIH->GetEventToMerge()->GetCaloCluster(icl);
- if(sigCluster->IsEMCAL()) printf("\t \t Signal cluster: i %d, E %f\n",icl,sigCluster->E());
- }
-
- printf("\t OutputEvent N Clusters %d, N Cells %d\n", AODEvent()->GetNumberOfCaloClusters(),
- AODEvent()->GetEMCALCells()->GetNumberOfCells());
- }
+ AliDebug(1,"Use embedded events");
+
+ AliDebug(1,Form("\t InputEvent N Clusters %d, N Cells %d",
+ InputEvent()->GetNumberOfCaloClusters(),InputEvent()->GetEMCALCells()->GetNumberOfCells()));
+
+ AliDebug(1,Form("\t MergedEvent N Clusters %d, N Cells %d",
+ aodIH->GetEventToMerge()->GetNumberOfCaloClusters(), aodIH->GetEventToMerge()->GetEMCALCells()->GetNumberOfCells()));
+
+// if(DebugLevel() > 1)
+// {
+// for (Int_t icl=0; icl < aodIH->GetEventToMerge()->GetNumberOfCaloClusters(); icl++)
+// {
+// AliAODCaloCluster *sigCluster = aodIH->GetEventToMerge()->GetCaloCluster(icl);
+// if(sigCluster->IsEMCAL()) AliInfo(Form("\t \t Signal cluster: i %d, E %f",icl,sigCluster->E()));
+// }
+// }
+
+ AliDebug(1,Form("\t OutputEvent N Clusters %d, N Cells %d",
+ AODEvent()->GetNumberOfCaloClusters(), AODEvent()->GetEMCALCells()->GetNumberOfCells()));
}
else if(fInputFromFilter)
{
if (!fEvent)
{
- Error("UserExec","Event not available");
+ AliError("Event not available");
return ;
}
// Create array and put it in the input event, if output AOD not selected, only once
InputEvent()->AddObject(fOutputAODBranch);
fOutputAODBranchSet = kTRUE;
- printf("AliAnalysisTaskEMCALClusterize::UserExec() - Add AOD branch <%s> to input event\n",fOutputAODBranchName.Data());
+ AliInfo(Form("Add AOD branch <%s> to input event",fOutputAODBranchName.Data()));
}
}
if( !accept )
{
- if( DebugLevel() > 2 )
- printf("AliAnalysisTaksEMCALClusterize::ClusterizeCells() - Remove channel absId %d, index %d of %d, amp %f, time %f\n",
- id,icell, cells->GetNumberOfCells(), amp, time*1.e9);
+ AliDebug(2,Form("Remove channel absId %d, index %d of %d, amp %f, time %f",
+ id,icell, cells->GetNumberOfCells(), amp, time*1.e9));
continue;
}
if(!fCaloClusterArr)
{
- printf("AliAnalysisTaksEMCALClusterize::UserExec() - No array with CaloClusters, input RecPoints entries %d\n",fClusterArr->GetEntriesFast());
+ AliWarning(Form("No array with CaloClusters, input RecPoints entries %d",fClusterArr->GetEntriesFast()));
return;
}
- if( DebugLevel() > 0 )
- {
- printf("AliAnalysisTaksEMCALClusterize::ClusterizeCells() - N clusters: before recluster %d, after recluster %d\n",nClustersOrg, fCaloClusterArr->GetEntriesFast());
-
- if(fCaloClusterArr->GetEntriesFast() != fClusterArr->GetEntriesFast())
- {
- printf("\t Some RecRoints not transformed into CaloClusters (clusterizer %d, unfold %d): Input entries %d - Output entries %d - %d (not fast)\n",
- fRecParam->GetClusterizerFlag(),fRecParam->GetUnfold(),
- fClusterArr->GetEntriesFast(), fCaloClusterArr->GetEntriesFast(), fCaloClusterArr->GetEntries());
- }
- }
+ AliDebug(1,Form("N clusters: before recluster %d, after recluster %d, recpoints %d",
+ nClustersOrg, fCaloClusterArr->GetEntriesFast(),fClusterArr->GetEntriesFast()));
+
+// if(fCaloClusterArr->GetEntriesFast() != fClusterArr->GetEntriesFast())
+// {
+// AliInfo("\t Some RecRoints not transformed into CaloClusters (clusterizer %d, unfold %d): Input entries %d - Output entries %d - %d (not fast)\n",
+// fRecParam->GetClusterizerFlag(),fRecParam->GetUnfold(),
+// fClusterArr->GetEntriesFast(), fCaloClusterArr->GetEntriesFast(), fCaloClusterArr->GetEntries());
+// }
+
}
//_____________________________________________________
fCaloClusterArr->Add( new AliAODCaloCluster(*aodCluster) );
}//AOD
else
- Warning("UserExec()"," - Wrong CaloCluster type?");
+ AliWarning("Wrong CaloCluster type?");
nClustersOrg++;
}
newCluster->SetID(i);
- // Correct cluster energy non linearity
+ // Correct cluster energy non linearity
newCluster->SetE(fRecoUtils->CorrectClusterEnergyLinearity(newCluster));
//Add matched track
if(trackIndex >= 0)
{
newCluster->AddTrackMatched(fEvent->GetTrack(trackIndex));
- if(DebugLevel() > 1)
- printf("AliAnalysisTaksEMCALClusterize::UserExec() - Matched Track index %d to new cluster %d \n",trackIndex,i);
+ AliDebug(2,Form("Matched Track index %d to new cluster %d",trackIndex,i));
}
Float_t dR = 999., dZ = 999.;
newCluster->SetTrackDistance(dR,dZ);
}
- else
+ else
{// Assign previously assigned matched track in reco, very very rough
Int_t absId0 = newCluster->GetCellsAbsId()[0]; // Assign match of first cell in cluster
newCluster->SetTrackDistance(fCellMatchdPhi[absId0],fCellMatchdEta[absId0]);
new((*fOutputAODBranch)[i]) AliAODCaloCluster(*newCluster);
- if(DebugLevel() > 1 )
- printf("AliAnalysisTaksEMCALClusterize::UserExec() - New cluster %d of %d, energy %f, mc label %d \n",newCluster->GetID(), kNumberOfCaloClusters, newCluster->E(), newCluster->GetLabel());
+ AliDebug(2,Form("New cluster %d of %d, energy %f, mc label %d",
+ newCluster->GetID(), kNumberOfCaloClusters, newCluster->E(), newCluster->GetLabel()));
} // cluster loop
if (!AliAnalysisManager::GetAnalysisManager()->GetTree())
{
- AliError("AliAnalysisTaskEMCALClusterize::GetPass() - Pointer to tree = 0, returning null\n");
+ AliError("AliAnalysisTaskEMCALClusterize::GetPass() - Pointer to tree = 0, returning null");
return TString("");
}
if (!AliAnalysisManager::GetAnalysisManager()->GetTree()->GetCurrentFile())
{
- AliError("AliAnalysisTaskEMCALClusterize::GetPass() - Null pointer input file, returning null\n");
+ AliError("AliAnalysisTaskEMCALClusterize::GetPass() - Null pointer input file, returning null");
return TString("");
}
else if (pass.Contains("LHC11c") && pass.Contains("spc_calo") ) return TString("spc_calo");
else if (pass.Contains("calo") || pass.Contains("high_lumi"))
{
- printf("AliAnalysisTaskEMCALClusterize::GetPass() - Path contains <calo> or <high-lumi>, set as <pass1>\n");
+ printf("AliAnalysisTaskEMCALClusterize::GetPass() - Path contains <calo> or <high-lumi>, set as <pass1>");
return TString("pass1");
}
// No condition fullfilled, give a default value
- printf("AliAnalysisTaskEMCALClusterize::GetPass() - Pass number string not found \n");
+ AliInfo("Pass number string not found");
return TString("");
}
{
//Init analysis with configuration macro if available
+ if(fDebug >=0) (AliAnalysisManager::GetAnalysisManager())->AddClassDebug(this->ClassName(),fDebug);
+
fOADBSet = kFALSE;
if(fOADBFilePath == "") fOADBFilePath = "$ALICE_ROOT/OADB/EMCAL" ;
if(gROOT->LoadMacro(fConfigName) >=0)
{
- printf("AliAnalysisTaksEMCALClusterize::Init() - Configure analysis with %s\n",fConfigName.Data());
+ AliInfo(Form("Configure analysis with %s",fConfigName.Data()));
AliAnalysisTaskEMCALClusterize *clus = (AliAnalysisTaskEMCALClusterize*)gInterpreter->ProcessLine("ConfigEMCALClusterize()");
fGeomName = clus->fGeomName;
fLoadGeomMatrices = clus->fLoadGeomMatrices;
if (runnumber < 140000) fGeomName = "EMCAL_FIRSTYEARV1";
else if(runnumber < 171000) fGeomName = "EMCAL_COMPLETEV1";
else fGeomName = "EMCAL_COMPLETE12SMV1";
- printf("AliAnalysisTaskEMCALClusterize::InitGeometry() - Set EMCAL geometry name to <%s> for run %d\n",
- fGeomName.Data(),runnumber);
+ AliInfo(Form("Set EMCAL geometry name to <%s> for run %d",fGeomName.Data(),runnumber));
}
fGeom = AliEMCALGeometry::GetInstance(fGeomName);
runnumber < 171000) fImportGeometryFilePath = "$ALICE_ROOT/OADB/EMCAL/geometry_2011.root";
else fImportGeometryFilePath = "$ALICE_ROOT/OADB/EMCAL/geometry_2012.root"; // 2012-2013
}
- printf("AliAnalysisTaskEMCALClusterize::InitGeometry() - Import %s\n",fImportGeometryFilePath.Data());
+
+ AliInfo(Form("Import %s",fImportGeometryFilePath.Data()));
TGeoManager::Import(fImportGeometryFilePath) ;
}
- if(fDebug > 0)
- {
- printf("AliAnalysisTaskEMCALClusterize::InitGeometry(run=%d)",runnumber);
- if (!gGeoManager) printf(" - Careful!, gGeoManager not loaded, load misalign matrices");
- printf("\n");
- }
+ AliDebug(1,Form("Init for run=%d",runnumber));
+ if (!gGeoManager) AliDebug(1,"Careful!, gGeoManager not loaded, load misalign matrices");
} // geometry pointer did not exist before
if(fLoadGeomMatrices)
{
- printf("AliAnalysisTaskEMCALClusterize::InitGeometry() - Load user defined EMCAL geometry matrices\n");
+ AliInfo("Load user defined EMCAL geometry matrices");
// OADB if available
AliOADBContainer emcGeoMat("AliEMCALgeo");
emcGeoMat.InitFromFile(Form("%s/EMCALlocal2master.root",fOADBFilePath.Data()),"AliEMCALgeo");
TObjArray *matEMCAL=(TObjArray*)emcGeoMat.GetObject(runnumber,"EmcalMatrices");
-
for(Int_t mod=0; mod < (fGeom->GetEMCGeometry())->GetNumberOfSuperModules(); mod++)
{
if (!fGeomMatrix[mod]) // Get it from OADB
{
- if(fDebug > 1 )
- printf("AliAnalysisTaskEMCALClusterize::InitGeometry() - EMCAL matrices SM %d, %p\n",
- mod,((TGeoHMatrix*) matEMCAL->At(mod)));
+ AliDebug(2,Form("EMCAL matrices SM %d, %p",mod,((TGeoHMatrix*) matEMCAL->At(mod))));
//((TGeoHMatrix*) matEMCAL->At(mod))->Print();
fGeomMatrix[mod] = (TGeoHMatrix*) matEMCAL->At(mod) ;
}//Load matrices
else if(!gGeoManager)
{
- printf("AliAnalysisTaksEMCALClusterize::InitGeometry() - Get geo matrices from data");
+ AliInfo("AliAnalysisTaksEMCALClusterize::InitGeometry() - Get geo matrices from data");
//Still not implemented in AOD, just a workaround to be able to work at least with ESDs
if(!strcmp(fEvent->GetName(),"AliAODEvent"))
{
- if(DebugLevel() > 1)
- Warning("UserExec","Use ideal geometry, values geometry matrix not kept in AODs.");
+ AliWarning("Use ideal geometry, values geometry matrix not kept in AODs");
}//AOD
else
{
if(!esd)
{
- Error("InitGeometry"," - This event does not contain ESDs?");
+ AliError("This event does not contain ESDs?");
if(fFillAODFile) AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(kFALSE);
return;
}
if( ncellsSM3 >= ncellcut)
{
- printf("AliAnalysisTaksEMCALClusterize::IsLEDEvent() - reject event %d with ncells in SM3 %d\n",(Int_t)Entry(),ncellsSM3);
+ AliInfo(Form("Reject event %d with ncells in SM3 %d",(Int_t)Entry(),ncellsSM3));
if(fFillAODFile) AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()->SetFillAOD(kFALSE);;
return kTRUE;
}
{
if (recPoint->GetEnergiesList()[c] < fSelectCellMinE || ratios[ncellsTrue] < fSelectCellMinFrac)
{
- if(DebugLevel() > 1)
- {
- printf("AliAnalysisTaksEMCALClusterize::RecPoints2Clusters() - Too small energy in cell of cluster: cluster cell %f, digit %f\n",
- recPoint->GetEnergiesList()[c],digit->GetAmplitude());
- }
-
+
+ AliDebug(2,Form("Too small energy in cell of cluster: cluster cell %f, digit %f",
+ recPoint->GetEnergiesList()[c],digit->GetAmplitude()));
continue;
} // if cuts
if (ncellsTrue < 1)
{
- if (DebugLevel() > 1)
- printf("AliAnalysisTaskEMCALClusterize::RecPoints2Clusters() - Skipping cluster with no cells avobe threshold E = %f, ncells %d\n",
- recPoint->GetEnergy(), ncells);
+ AliDebug(2,Form("Skipping cluster with no cells avobe threshold E = %f, ncells %d",
+ recPoint->GetEnergy(), ncells));
continue;
}
if(clusterE < fRecParam->GetClusteringThreshold())
{
- if (DebugLevel()>1)
- printf("AliAnalysisTaskEMCALClusterize::RecPoints2Clusters() - Remove cluster with energy below seed threshold %f\n",clusterE);
+ AliDebug(2,Form("Remove cluster with energy below seed threshold %f",clusterE));
continue;
}
{
// In case some cells rejected, in unfolding case, recalculate
// shower shape parameters and position
- if(DebugLevel() > 1)
- printf("AliAnalysisTaskEMCALClusterize::RecPoints2Clusters() - Cells removed from cluster (ncells %d, ncellsTrue %d), recalculate Shower Shape\n",ncells,ncellsTrue);
+ AliDebug(2,Form("Cells removed from cluster (ncells %d, ncellsTrue %d), recalculate Shower Shape",ncells,ncellsTrue));
AliVCaloCells* cells = 0x0;
if (aodIH && aodIH->GetMergeEvents()) cells = AODEvent() ->GetEMCALCells();
if(fOutputAODBranchName.Length()==0)
{
fOutputAODBranchName = "newEMCALClustersArray";
- printf("Cluster branch name not set, set it to newEMCALClustersArray \n");
+ printf("Cluster branch name not set, set it to newEMCALClustersArray");
}
fOutputAODBranch->SetName(fOutputAODBranchName);
//-------
// Step 1
-
//Remove the contents of AOD branch output list set in the previous event
fOutputAODBranch->Clear("C");
if (!fEvent)
{
- if(DebugLevel() > 0 ) printf("AliAnalysisTaksEMCALClusterize::UserExec() - Skip Event %d", (Int_t) Entry());
+ AliDebug(1,Form("Skip Event %d", (Int_t) Entry()));
return ;
}
FillCaloClusterInEvent();
-}
+}
+