]>
Commit | Line | Data |
---|---|---|
470dd06b | 1 | void runCentralitySelection(const char *mode="local") |
2 | { | |
3 | // Load common libraries | |
4 | gSystem->Load("libCore.so"); | |
5 | gSystem->Load("libTree.so"); | |
6 | gSystem->Load("libGeom.so"); | |
7 | gSystem->Load("libVMC.so"); | |
8 | gSystem->Load("libPhysics.so"); | |
9 | gSystem->Load("libSTEERBase"); | |
10 | gSystem->Load("libESD"); | |
11 | gSystem->Load("libAOD"); | |
12 | gSystem->Load("libANALYSIS"); | |
13 | gSystem->Load("libANALYSISalice"); | |
14 | gSystem->Load("libCORRFW"); | |
15 | gSystem->Load("libPWG3base"); | |
16 | gSystem->Load("libPWG3muon"); | |
17 | // Use AliRoot includes to compile our task | |
18 | gROOT->ProcessLine(".include $ALICE_ROOT/include"); | |
19 | ||
20 | // filename | |
21 | TChain* chain = new TChain("esdTree"); | |
22 | chain->AddFile("/home/alberica/analysis/centrality/data/alice/sim/LHC10a12/104157/998/root_archive.zip#AliESDs.root"); | |
23 | ||
24 | // Create the analysis manager | |
25 | AliAnalysisManager *mgr = new AliAnalysisManager("AnalysisManager"); | |
26 | mgr->SetDebugLevel(10); | |
27 | ||
28 | // My task | |
29 | gROOT->LoadMacro("AliCentralitySelectionTask.cxx++g"); | |
30 | AliCentralitySelectionTask *task = new AliCentralitySelectionTask("CentralitySelection"); | |
31 | task->SetPercentileFile("test_AliCentralityBy1D.root"); | |
32 | task->SetCentralityMethod("V0"); | |
33 | mgr->AddTask(task); | |
34 | ||
35 | // My dummy task | |
36 | gROOT->LoadMacro("AliDummy.cxx++g"); | |
37 | AliDummy *dummytask = new AliDummy("Dummy"); | |
38 | mgr->AddTask(dummytask); | |
39 | ||
40 | ||
41 | ||
42 | AliMCEventHandler* mcHandler = new AliMCEventHandler(); | |
43 | mgr->SetMCtruthEventHandler(mcHandler); | |
44 | ||
45 | AliESDInputHandler* esdH = new AliESDInputHandler(); | |
46 | mgr->SetInputEventHandler(esdH); | |
47 | ||
48 | // Create containers for input/output | |
49 | mgr->ConnectInput (task,0, mgr->GetCommonInputContainer()); | |
50 | mgr->ConnectInput (dummytask,0, mgr->GetCommonInputContainer()); | |
51 | // mgr->ConnectOutput(task,0, mgr->GetCommonOutputContainer()); | |
52 | ||
53 | // Enable debug printouts | |
54 | mgr->SetDebugLevel(2); | |
55 | ||
56 | if(!mgr->InitAnalysis()) return; | |
57 | ||
58 | mgr->PrintStatus(); | |
59 | // Start analysis in grid. | |
60 | mgr->StartAnalysis(mode, chain); | |
61 | ||
62 | }; |