Update in the macro to test the ESD->AOD->AOD,VertexingHF filtering
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Nov 2011 21:48:34 +0000 (21:48 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Nov 2011 21:48:34 +0000 (21:48 +0000)
PWG3/vertexingHF/AliAnalysisTaskSEVertexingHFTest.C

index e585252..a0baeab 100644 (file)
@@ -11,10 +11,11 @@ void AliAnalysisTaskSEVertexingHFTest()
   Bool_t writeKineToAOD = kFALSE;\r
   TString mode="local"; // otherwise, "grid" \r
   Bool_t useParFiles=kFALSE;\r
+  Bool_t doCentrality=kTRUE;\r
 \r
   gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/macros/LoadLibraries.C");\r
   LoadLibraries(useParFiles);\r
-\r
+  gSystem->Load("libPWG3muon");\r
   TChain *chain = 0;\r
 \r
   if(mode=="local") {\r
@@ -91,26 +92,15 @@ void AliAnalysisTaskSEVertexingHFTest()
     if(writeKineToAOD) mgr->SetMCtruthEventHandler(mcHandler);\r
     AliAnalysisTaskMCParticleFilter *kinefilter = new AliAnalysisTaskMCParticleFilter("Particle Filter");\r
     if(writeKineToAOD) mgr->AddTask(kinefilter);  \r
-    // Barrel Tracks\r
-    AliAnalysisTaskESDfilter *filter = new AliAnalysisTaskESDfilter("Filter");\r
-    mgr->AddTask(filter);\r
-\r
-    AliESDtrackCuts* esdTrackCutsHF = new AliESDtrackCuts("AliESDtrackCuts", "Heavy flavour");\r
-    esdTrackCutsHF->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);\r
-    \r
-    AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter");\r
-    trackFilter->AddCuts(esdTrackCutsHF);\r
+    // Centrality\r
+    if(doCentrality){\r
+      gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");\r
+      AliCentralitySelectionTask *taskCentrality = AddTaskCentrality();\r
+    }\r
 \r
-    filter->SetTrackFilter(trackFilter);\r
+    gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskESDFilter.C");\r
+    AliAnalysisTaskESDfilter *filter = AddTaskESDFilter(writeKineToAOD);\r
    \r
-    // Pipelining\r
-    mgr->ConnectInput(filter,0,mgr->GetCommonInputContainer());\r
-    mgr->ConnectOutput(filter,0,mgr->GetCommonOutputContainer());\r
-    if(writeKineToAOD) {\r
-      mgr->ConnectInput(kinefilter,0,mgr->GetCommonInputContainer());\r
-      mgr->ConnectOutput(kinefilter,0,mgr->GetCommonOutputContainer());\r
-    }\r
\r
   }\r
 \r
   // Vertexing analysis task    \r