]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/DphiAnalysis.C
Root6-enabled test
[u/mrichter/AliRoot.git] / ANALYSIS / DphiAnalysis.C
CommitLineData
bd0e8153 1void 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");
bd0e8153 12
13 //
14 if (gApplication) gApplication->InitializeGraphics();
15 // Create the chain
16 //
976f2793 17
18 //TString path("/afs/cern.ch/user/m/morsch/public/");
19 TString path("./");
bd0e8153 20 TChain* chain = new TChain("aodTree");
976f2793 21 chain->Add(Form("%s/%s",path.Data(),"AliAOD.root"));
bd0e8153 22
23 ///////////////////////////////////////////////////////////////////////////////////
24 // Create the analysis manager
25 //
26 // Input
976f2793 27 AliMultiEventInputHandler* inpHandler = new AliMultiEventInputHandler(2, 1);
bd0e8153 28 // Pool
4b89d2c6 29 AliEventPoolOTF* pool = new AliEventPoolOTF("event pool", "AOD");
976f2793 30
31 pool->SetTagDirectory(path.Data());
32 pool->SetMultiplicityBin(0, 100, 100);
bd0e8153 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 ///////////////////////////////////////////////////////////////////////////////////
976f2793 43 gROOT->LoadMacro("AliAnalysisTaskPhiCorr.cxx++g");
bd0e8153 44 AliAnalysisTaskPhiCorr *dphiana = new AliAnalysisTaskPhiCorr("Phi Correlation Analysis");
45 dphiana->SetDebugLevel(10);
46 mgr->AddTask(dphiana);
47
48 //
49 // Create containers for input/output
976f2793 50 AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain",TChain::Class(),
51 AliAnalysisManager::kInputContainer);
bd0e8153 52
976f2793 53 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("tree", TTree::Class(),
54 AliAnalysisManager::kExchangeContainer, "default");
bd0e8153 55 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(),
56 AliAnalysisManager::kOutputContainer, "histos.root");
57
58
976f2793 59 mgr->ConnectInput (dphiana, 0, mgr->GetCommonInputContainer());
60 mgr->ConnectOutput (dphiana, 0, coutput1 );
bd0e8153 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}