]> git.uio.no Git - u/mrichter/AliRoot.git/blame - JETAN/JetAnalysisManagerKine.C
Add cluster task for kine train
[u/mrichter/AliRoot.git] / JETAN / JetAnalysisManagerKine.C
CommitLineData
733d2497 1void JetAnalysisManagerKine()
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 gSystem->Load("libJETAN.so");
13
14 //
15 if (gApplication) gApplication->InitializeGraphics();
16 // Create the chain
17 //
18 gROOT->LoadMacro("CreateESDChain.C");
19 TChain* chain = new TChain("TE");
d322b18e 20 chain->Add("/Users/kleinb/alice/sim/PDC_08/LHC08v/280039/999/galice.root");
733d2497 21 ///////////////////////////////////////////////////////////////////////////////////
22 // Create the analysis manager
23 //
24 // Output
25 AliAODHandler* aodHandler = new AliAODHandler();
26 aodHandler->SetOutputFileName("aod.root");
27 // MC Truth
28 AliMCEventHandler* mcHandler = new AliMCEventHandler();
29 AliAnalysisManager *mgr = new AliAnalysisManager("Jet Manager", "Jet Manager");
30 mgr->SetOutputEventHandler (aodHandler);
31 mgr->SetMCtruthEventHandler(mcHandler);
32 mgr->SetDebugLevel(10);
33
34 AliAnalysisTaskKineFilter *kinefilter = new AliAnalysisTaskKineFilter("Kine Filter");
35 mgr->AddTask(kinefilter);
36
37
38 AliAnalysisTaskJets *jetana = new AliAnalysisTaskJets("JetAnalysis");
d322b18e 39 jetana->SetConfigFile("ConfigJetAnalysisMC.C");
733d2497 40 jetana->SetDebugLevel(10);
41 mgr->AddTask(jetana);
42
43 //
44 // Create containers for input/output
45 AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain",TChain::Class(),
46 AliAnalysisManager::kInputContainer);
47
48 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("tree", TTree::Class(),
49 AliAnalysisManager::kOutputContainer, "default");
50 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(),
51 AliAnalysisManager::kOutputContainer, "histos.root");
52
53 mgr->ConnectInput (kinefilter, 0, cinput1 );
54 mgr->ConnectOutput (kinefilter, 0, coutput1 );
55
56 mgr->ConnectInput (jetana, 0, cinput1 );
57 mgr->ConnectOutput (jetana, 0, coutput1 );
58 mgr->ConnectOutput (jetana, 1, coutput2 );
59
60
61 //
62 // Run the analysis
63 //
64 mgr->InitAnalysis();
65 mgr->PrintStatus();
66 mgr->StartAnalysis("local",chain);
67}