]>
Commit | Line | Data |
---|---|---|
1 | void DphiAnalysis() | |
2 | { | |
3 | gSystem->Load("libTree.so"); | |
4 | gSystem->Load("libPhysics.so"); | |
5 | gSystem->Load("libGeom.so"); | |
6 | gSystem->Load("libVMC.so"); | |
7 | gSystem->Load("libANALYSIS.so"); | |
8 | gSystem->Load("libSTEERBase.so"); | |
9 | gSystem->Load("libAOD.so"); | |
10 | gSystem->Load("libESD.so"); | |
11 | gSystem->Load("libANALYSISalice.so"); | |
12 | ||
13 | // | |
14 | if (gApplication) gApplication->InitializeGraphics(); | |
15 | // Create the chain | |
16 | // | |
17 | ||
18 | //TString path("/afs/cern.ch/user/m/morsch/public/"); | |
19 | TString path("./"); | |
20 | TChain* chain = new TChain("aodTree"); | |
21 | chain->Add(Form("%s/%s",path.Data(),"AliAOD.root")); | |
22 | ||
23 | /////////////////////////////////////////////////////////////////////////////////// | |
24 | // Create the analysis manager | |
25 | // | |
26 | // Input | |
27 | AliMultiEventInputHandler* inpHandler = new AliMultiEventInputHandler(2, 1); | |
28 | // Pool | |
29 | AliEventPoolOTF* pool = new AliEventPoolOTF("event pool", "AOD"); | |
30 | ||
31 | pool->SetTagDirectory(path.Data()); | |
32 | pool->SetMultiplicityBin(0, 100, 100); | |
33 | pool->Init(); | |
34 | ||
35 | AliAnalysisManager *mgr = new AliAnalysisManager("Jet Manager", "Jet Manager"); | |
36 | mgr->SetInputEventHandler (inpHandler); | |
37 | mgr->SetEventPool(pool); | |
38 | inpHandler->SetEventPool(pool); | |
39 | ||
40 | ||
41 | mgr->SetDebugLevel(10); | |
42 | /////////////////////////////////////////////////////////////////////////////////// | |
43 | gROOT->LoadMacro("AliAnalysisTaskPhiCorr.cxx++g"); | |
44 | AliAnalysisTaskPhiCorr *dphiana = new AliAnalysisTaskPhiCorr("Phi Correlation Analysis"); | |
45 | dphiana->SetDebugLevel(10); | |
46 | mgr->AddTask(dphiana); | |
47 | ||
48 | // | |
49 | // Create containers for input/output | |
50 | AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain",TChain::Class(), | |
51 | AliAnalysisManager::kInputContainer); | |
52 | ||
53 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("tree", TTree::Class(), | |
54 | AliAnalysisManager::kExchangeContainer, "default"); | |
55 | AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(), | |
56 | AliAnalysisManager::kOutputContainer, "histos.root"); | |
57 | ||
58 | ||
59 | mgr->ConnectInput (dphiana, 0, mgr->GetCommonInputContainer()); | |
60 | mgr->ConnectOutput (dphiana, 0, coutput1 ); | |
61 | mgr->ConnectOutput (dphiana, 1, coutput2 ); | |
62 | ||
63 | // | |
64 | // Run the analysis | |
65 | // | |
66 | mgr->InitAnalysis(); | |
67 | mgr->PrintStatus(); | |
68 | mgr->StartAnalysis("mix",chain, 1000); | |
69 | } |