Charged jets (pPb): Added debugging output
authorrhaake <ruediger.haake@cern.ch>
Thu, 18 Sep 2014 10:38:54 +0000 (12:38 +0200)
committerrhaake <ruediger.haake@cern.ch>
Thu, 18 Sep 2014 10:39:11 +0000 (12:39 +0200)
PWGJE/EMCALJetTasks/macros/AddTaskChargedJetsPA.C

index d351bf1..67395e7 100644 (file)
@@ -21,6 +21,7 @@ AliAnalysisTaskChargedJetsPA* AddTaskChargedJetsPA(
   Bool_t              isEMCalTrain            = kFALSE
 )
 {
+  cout << " ############ MACRO EXECUTION STARTED ############\n";
   // #### Detect the demanded trigger with its readable name
   TString triggerName(Form("Trigger_%i", trigger));
   if (trigger == AliVEvent::kAnyINT)
@@ -75,12 +76,15 @@ AliAnalysisTaskChargedJetsPA* AddTaskChargedJetsPA(
     gROOT->LoadMacro("$ALICE_ROOT/PWGJE/EMCALJetTasks/macros/AddTaskEmcalJet.C");
     AliEmcalJetTask* jetFinderTask = AddTaskEmcalJet(usedTracks,"",1,jetRadius,1,minJetTrackPt,0.300); // anti-kt
     AliEmcalJetTask* jetFinderTaskKT = AddTaskEmcalJet(usedTracks,"",0,ktJetRadius,1,minJetTrackPt,0.300); // kt
+    cout << " Jet finder tasks added: " <<  jetFinderTask << " + " <<  jetFinderTaskKT << endl;
 
     // #### Define external rho task
-    AliEmcalJetTask* jetFinderRho = AddTaskEmcalJet(usedTracks,"",1,0.4,1,0.150,0.300); // anti-kt
-    AliEmcalJetTask* jetFinderRhoKT = AddTaskEmcalJet(usedTracks,"",0,0.4,1,0.150,0.300); // kt
+    AliEmcalJetTask* jetFinderRho = AddTaskEmcalJet(usedTracks,"",1,0.4,1,minJetTrackPt,0.300); // anti-kt
+    AliEmcalJetTask* jetFinderRhoKT = AddTaskEmcalJet(usedTracks,"",0,0.4,1,minJetTrackPt,0.300); // kt
+    cout << " Jet finder tasks (used for bgrd) added: " <<  jetFinderRho << " + " <<  jetFinderRhoKT << endl;
     gROOT->LoadMacro("$ALICE_ROOT/PWGJE/EMCALJetTasks/macros/AddTaskRhoSparse.C");
     AliAnalysisTaskRhoSparse* rhotask = AddTaskRhoSparse(jetFinderRhoKT->GetName(), NULL, usedTracks, "", bgrdName.Data(), 0.4,"TPC", 0., 5., 0, 0,2,kFALSE,bgrdName.Data(),kTRUE);
+    cout << " Background task added: " <<  rhotask << endl;
   }
 
   // #### Define analysis task
@@ -99,6 +103,8 @@ AliAnalysisTaskChargedJetsPA* AddTaskChargedJetsPA(
   else
     task = new AliAnalysisTaskChargedJetsPA(Form("AnalysisPA_%s", "", triggerName.Data()), usedTracks, "","", doJetProfileAnalysis, doTrackcutAnalysis);
 
+  cout << " Main task created: " <<  task << endl;
+
 
   // #### Task preferences
   task->SetIsPA(isPA);
@@ -114,11 +120,16 @@ AliAnalysisTaskChargedJetsPA* AddTaskChargedJetsPA(
   task->SetCentralityType(centralityType);
   task->SetNumberOfCentralityBins(numberOfCentralityBins);
   task->SetDoJetAnalysis(doJetAnalysis);
+  cout << " Settings set." << endl;
 
   // #### Add analysis task
   manager->AddTask(task);
+  cout << " Task added to manager" << endl;
   manager->ConnectInput(task, 0, manager->GetCommonInputContainer());
+  cout << " Input connected, common input container: " << manager->GetCommonInputContainer() << endl;
   manager->ConnectOutput(task, 1, contHistos);
+  cout << " Output connected, contHistos: " << contHistos << endl;
+
   if(doJetProfileAnalysis)
   {
     manager->ConnectOutput(task, 2, contJetProfile);
@@ -135,5 +146,6 @@ AliAnalysisTaskChargedJetsPA* AddTaskChargedJetsPA(
   if(isEMCalTrain)
     RequestMemory(task,200*1024);
 
+  cout << " ############ MACRO EXECUTION SUCCESSFUL, will return " << task << " ############\n";
   return task;
 }