Support for processing delta AOD files via the plugin (A.Dainese)
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / RunAnalysisAODVertexingHF.C
CommitLineData
32bb35a1 1void RunAnalysisAODVertexingHF()\r
2{\r
3 //\r
4 // Test macro for AliAnalysisTaskSE's for heavy-flavour candidates\r
5 // It has the structure of a Analysis Train:\r
6 // - in this macro, change things related to running mode\r
7 // and input preparation \r
8 // - add your task using a AddTaskXXX macro \r
9 //\r
10 // A.Dainese, andrea.dainese@lnl.infn.it\r
11 // "grid" mode added by R.Bala, bala@to.infn.it\r
12 //\r
13\r
14 TString analysisMode = "local"; // "local" or "grid"\r
15 TString inputMode = "list"; // "list" or "xml"\r
16\r
17\r
18 Bool_t useParFiles=kFALSE;\r
19\r
20\r
21 gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/LoadLibraries.C");\r
22 gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/MakeAODInputChain.C");\r
23 LoadLibraries(useParFiles);\r
24\r
25 if(analysisMode=="grid") TGrid::Connect("alien:",0,0,"t");\r
26\r
27\r
28\r
29\r
30 //-------------------------------------------------------------------\r
31 // Prepare input chain\r
32 TChain *chainAOD = 0;\r
33 \r
34 if(inputMode=="list") {\r
35 // Local files\r
36 chainAOD = MakeAODInputChain();// with this it reads ./AliAOD.root and ./AliAOD.VertexingHF.root\r
37 //chainAOD = MakeAODInputChain("alien:///alice/cern.ch/user/r/rbala/analysis/out_lhcw/290001/",2,2);\r
38 } else if(inputMode=="xml") {\r
39 // xml\r
40 chainAOD = MakeAODInputChain("collection_aod.xml","collection_aodHF.xml");\r
41 }\r
42\r
43 // Create the analysis manager\r
44 AliAnalysisManager *mgr = new AliAnalysisManager("My Manager","My Manager");\r
45 mgr->SetDebugLevel(10);\r
46 \r
47\r
48 // Input\r
49 AliAODInputHandler *inputHandler = new AliAODInputHandler();\r
50 mgr->SetInputEventHandler(inputHandler);\r
51 //-------------------------------------------------------------------\r
52\r
53 \r
54 //-------------------------------------------------------------------\r
55 // Analysis tasks \r
56 //\r
57 gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/AddTaskCompareHF.C");\r
58 AliAnalysisTaskSECompareHF *cmpTask = AddTaskCompareHF();\r
a9f684f8 59\r
60 gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/AddTaskSelectHF.C");\r
61 AliAnalysisTaskSESelectHF *seleTask = AddTaskSelectHF();\r
62\r
63 gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/AddTaskBkgLikeSign.C");\r
64 AliAnalysisTaskSEBkgLikeSignJPSI *lsTask = AddTaskBkgLikeSign();\r
65\r
32bb35a1 66 //gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/AddTaskBtoJPSItoEle.C");\r
67 //AliAnalysisTaskSEBtoJPSItoEle *jpsiTask = AddTaskBtoJPSItoEle();\r
a9f684f8 68\r
69 //gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/AddTaskCF.C");\r
70 //AliCFHeavyFlavourTask *cfTask = AddTaskCF();\r
71\r
32bb35a1 72 //gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/AddTaskCFMultiVar.C");\r
73 //AliCFHeavyFlavourTaskMultiVar *cfmvTask = AddTaskCFMultiVar();\r
74\r
a9f684f8 75 gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/AddTaskCFMultiVarMultiStep.C");\r
76 AliCFHeavyFlavourTaskMultiVarMultiStep *cfmvmsTask = AddTaskCFMultiVarMultiStep();\r
77\r
32bb35a1 78\r
79 //-------------------------------------------------------------------\r
80\r
81 //\r
82 // Run the analysis\r
83 // \r
84 printf("CHAIN HAS %d ENTRIES\n",(Int_t)chainAOD->GetEntries());\r
85 if(mgr->InitAnalysis()) {\r
86 mgr->PrintStatus();\r
87 mgr->StartAnalysis("local",chainAOD);\r
88 }\r
89\r
90 return;\r
91}\r