Correct version of AliTRDrecoParam
[u/mrichter/AliRoot.git] / JETAN / JetAnalysisManagerLoc.C
CommitLineData
c89067f5 1void JetAnalysisManagerLoc()
2{
99b06af5 3 gSystem->Load("libTree.so");
891311ac 4 gSystem->Load("libPhysics.so");
99b06af5 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");
891311ac 11 gSystem->Load("libANALYSISalice.so");
99b06af5 12 gSystem->Load("libJETAN.so");
891311ac 13
c89067f5 14 //
15 if (gApplication) gApplication->InitializeGraphics();
16 // Create the chain
17 //
99b06af5 18 gROOT->LoadMacro("CreateESDChain.C");
c89067f5 19 TChain* chain = new TChain("esdTree");
891311ac 20 chain->Add("/afs/cern.ch/user/k/kleinb/public/tutorial/local/data/AliESDs.root");
99b06af5 21
22 ///////////////////////////////////////////////////////////////////////////////////
887fc299 23 // Create the analysis manager
c89067f5 24 //
99b06af5 25 // Input
26 AliESDInputHandler* inpHandler = new AliESDInputHandler();
27 // Output
28 AliAODHandler* aodHandler = new AliAODHandler();
887fc299 29 aodHandler->SetOutputFileName("aod.root");
99b06af5 30 // MC Truth
887fc299 31 AliMCEventHandler* mcHandler = new AliMCEventHandler();
99b06af5 32
a0255da7 33
99b06af5 34 AliAnalysisManager *mgr = new AliAnalysisManager("Jet Manager", "Jet Manager");
35 mgr->SetInputEventHandler (inpHandler);
36 mgr->SetOutputEventHandler (aodHandler);
37 mgr->SetMCtruthEventHandler(mcHandler);
891311ac 38 mgr->SetDebugLevel(10);
99b06af5 39 ///////////////////////////////////////////////////////////////////////////////////
40
41
887fc299 42 //
99b06af5 43 // Set of cuts
44 //
45 // standard
46 AliESDtrackCuts* esdTrackCutsL = new AliESDtrackCuts("AliESDtrackCuts", "Loose");
47 esdTrackCutsL->SetMinNClustersTPC(50);
48 esdTrackCutsL->SetMaxChi2PerClusterTPC(3.5);
49 esdTrackCutsL->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);
50 esdTrackCutsL->SetRequireTPCRefit(kTRUE);
51 esdTrackCutsL->SetMinNsigmaToVertex(3);
52 esdTrackCutsL->SetRequireSigmaToVertex(kTRUE);
53 esdTrackCutsL->SetAcceptKingDaughters(kFALSE);
54 //
55 // hard
56 AliESDtrackCuts* esdTrackCutsH = new AliESDtrackCuts("AliESDtrackCuts", "Hard");
57 esdTrackCutsH->SetMinNClustersTPC(100);
58 esdTrackCutsH->SetMaxChi2PerClusterTPC(2.0);
59 esdTrackCutsH->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);
60 esdTrackCutsH->SetRequireTPCRefit(kTRUE);
61 esdTrackCutsH->SetMinNsigmaToVertex(2);
62 esdTrackCutsH->SetRequireSigmaToVertex(kTRUE);
63 esdTrackCutsH->SetAcceptKingDaughters(kFALSE);
64 //
65 AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter");
66 trackFilter->AddCuts(esdTrackCutsL);
67 trackFilter->AddCuts(esdTrackCutsH);
68 //
69 AliAnalysisTaskESDfilter *esdfilter = new AliAnalysisTaskESDfilter("ESD Filter");
70 esdfilter->SetTrackFilter(trackFilter);
71 esdfilter->SetDebugLevel(10);
72 mgr->AddTask(esdfilter);
73
c89067f5 74 AliAnalysisTaskJets *jetana = new AliAnalysisTaskJets("JetAnalysis");
75 jetana->SetDebugLevel(10);
76 mgr->AddTask(jetana);
a0255da7 77
c89067f5 78 //
79 // Create containers for input/output
80 AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain",TChain::Class(),
81 AliAnalysisManager::kInputContainer);
82
83 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("tree", TTree::Class(),
99b06af5 84 AliAnalysisManager::kOutputContainer, "default");
85 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(),
887fc299 86 AliAnalysisManager::kOutputContainer, "histos.root");
87
99b06af5 88 mgr->ConnectInput (esdfilter, 0, cinput1 );
89 mgr->ConnectOutput (esdfilter, 0, coutput1 );
90
91 mgr->ConnectInput (jetana, 0, cinput1 );
92 mgr->ConnectOutput (jetana, 0, coutput1 );
93 mgr->ConnectOutput (jetana, 1, coutput2 );
94
95
c89067f5 96 //
97 // Run the analysis
98 //
99 mgr->InitAnalysis();
100 mgr->PrintStatus();
101 mgr->StartAnalysis("local",chain);
102}