fd51dc1c2b926af9604395bd2197265aaa4e95e7
[u/mrichter/AliRoot.git] / PWGHF / hfe / macros / test / runGridAODPbPb.C
1 Bool_t SetupPar(const char *parfile);
2
3 void runGridAODPbPb()
4 {
5    // Load common libraries
6   gSystem->Load("libCore");
7    gSystem->Load("libTree");
8    gSystem->Load("libGeom");
9    gSystem->Load("libVMC");
10    gSystem->Load("libPhysics");
11    gSystem->Load("libMinuit");
12    gSystem->Load("libGui");
13    gSystem->Load("libXMLParser");
14    //gSystem->Load("libSTEER");
15    gSystem->Load("libSTEERBase");
16    gSystem->Load("libESD");
17    gSystem->Load("libCDB");
18    gSystem->Load("libAOD");
19    gSystem->Load("libANALYSIS");
20    gSystem->Load("libANALYSISalice");
21
22    //lib necessary for dielectron
23    gSystem->Load("libCORRFW");
24
25    gSystem->Load("libTender"); 
26    gSystem->Load("libProof");
27    gSystem->Load("libRAWDatabase");
28    gSystem->Load("libSTEER");
29    gSystem->Load("libTOFbase");
30
31    gSystem->Load("libTRDbase");
32    gSystem->Load("libVZERObase");
33    gSystem->Load("libPWGHFhfe");
34    //gSystem->Load("libTenderSupplies");
35
36    // Load common libraries
37
38
39    // Use AliRoot includes to compile our task
40    gROOT->ProcessLine(".include $ALICE_ROOT/include");
41    gROOT->ProcessLine(".include $ALICE_ROOT/PWGHF/");
42    gROOT->ProcessLine(".include $ALICE_ROOT/PWGHF/hfe");
43    gROOT->ProcessLine(".include $ALICE_ROOT/PWG/FLOW");
44    gROOT->ProcessLine(".include $ALICE_ROOT/PWG/FLOW/Base");
45    gROOT->ProcessLine(".include $ALICE_ROOT/PWG/FLOW/Tasks");
46
47    // Create and configure the alien handler plugin
48    gROOT->LoadMacro("CreateAlienHandlerAODPbPb.C");
49    AliAnalysisGrid *alienHandler = CreateAlienHandlerAODPbPb();  
50    if (!alienHandler) return;
51
52    // Create the analysis manager
53    AliAnalysisManager *mgr = new AliAnalysisManager("tpctofv2");
54
55    // Connect plug-in to the analysis manager
56    mgr->SetGridHandler(alienHandler);
57 /*
58    AliESDInputHandler* esdH = new AliESDInputHandler();
59    esdH->SetReadFriends(kFALSE);
60    mgr->SetInputEventHandler(esdH);
61 */
62    // Read AODs
63    aodH = new AliAODInputHandler();
64    mgr->SetInputEventHandler(aodH);
65
66    // // Read MC info  // not for real data
67    // mcHandler = new AliMCEventHandler();
68    // mcHandler->SetReadTR(kFALSE);
69    // mgr->SetMCtruthEventHandler(mcHandler);
70
71    //AOD Output Hanlder for Filter:
72    /*
73           AliAODHandler* aodHandler   = new AliAODHandler();
74           mgr->SetOutputEventHandler(aodHandler);
75           aodHandler->SetOutputFileName("AliAODs.root");
76         */
77
78    // gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
79    // AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection();
80
81
82    //===== ADD PID RESPONSE: ===
83    gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
84    //AliAnalysisTaskPIDResponse* aodPIDresponse = AddTaskPIDResponse();
85    AddTaskPIDResponse();
86
87    //===== ADD VZERO event plane: ===
88    gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskVZEROEPSelection.C");
89    AddTaskVZEROEPSelection();
90
91    //===== ADD TPC event plane: ===
92    gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/AddTaskEventPlaneTPC.C");
93    AddTaskEventPlaneTPC(kTRUE,0.,kFALSE);
94
95    //===== ADD TASK::
96    gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/AddTaskHFEFlowTPCTOFEPSP.C");
97    AddTaskHFEFlowTPCTOFEPSP(131073,16,kFALSE,kFALSE,110,60,80,4,2,100,200,30.,50., 1,2,80,kTRUE,kTRUE,0,-2.0,5.0);
98
99    //===== ADD TASK::
100    //gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/AddTaskHFEreducedEvent.C");
101    //AddTaskHFEreducedEvent();
102
103    //===== ADD TASK::
104    //gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/AddTaskHFEnpePbPb.C");
105    //AddTaskHFEnpePbPb();
106
107
108    // Enable debug printouts
109    mgr->SetDebugLevel(10);
110
111    if (!mgr->InitAnalysis())
112           return;
113
114    mgr->PrintStatus();
115    // Start analysis in grid.
116    mgr->StartAnalysis("grid");
117 };