Adding the possibility not to follow particle mothers during StepManager (default...
[u/mrichter/AliRoot.git] / JETAN / JetAnalysisManagerNeutralsLoc.C
CommitLineData
5b312f44 1void JetAnalysisManagerLoc()
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("libfastjet.so");
13 gSystem->Load("libsiscone.so");
14 gSystem->Load("libSISConePlugin.so");
15 gSystem->Load("libJETAN.so");
16
17
18 if (gApplication) gApplication->InitializeGraphics();
19 //
20 // Create the chain
21 //
22 gROOT->LoadMacro("CreateESDChain.C");
23 TChain* chain = new TChain("esdTree");
24 chain->Add("~/alice/data/highpt/kPythia6Jets125_150/030/AliESDs.root");
25
26 ///////////////////////////////////////////////////////////////////////////////////
27 // Create the analysis manager
28 //
29 // Input
30 AliESDInputHandler* inpHandler = new AliESDInputHandler();
31 // Output
32 AliAODHandler* aodHandler = new AliAODHandler();
33 aodHandler->SetOutputFileName("aod.root");
34 // MC Truth
35 AliMCEventHandler* mcHandler = new AliMCEventHandler();
36
37
38 AliAnalysisManager *mgr = new AliAnalysisManager("Jet Manager", "Jet Manager");
39 mgr->SetInputEventHandler (inpHandler);
40 mgr->SetOutputEventHandler (aodHandler);
41 mgr->SetMCtruthEventHandler(mcHandler);
42 mgr->SetDebugLevel(10);
43 ///////////////////////////////////////////////////////////////////////////////////
44
45
46 //
47 // Set of cuts
48 //
49 // standard
50 AliESDtrackCuts* esdTrackCutsL = new AliESDtrackCuts("AliESDtrackCuts", "Loose");
51 esdTrackCutsL->SetMinNClustersTPC(50);
52 esdTrackCutsL->SetMaxChi2PerClusterTPC(3.5);
53 esdTrackCutsL->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);
54 esdTrackCutsL->SetRequireTPCRefit(kTRUE);
d3fae473 55 esdTrackCutsL->SetMaxNsigmaToVertex(3);
5b312f44 56 esdTrackCutsL->SetRequireSigmaToVertex(kTRUE);
d3fae473 57 esdTrackCutsL->SetAcceptKinkDaughters(kFALSE);
5b312f44 58 //
59 // hard
60 AliESDtrackCuts* esdTrackCutsH = new AliESDtrackCuts("AliESDtrackCuts", "Hard");
61 esdTrackCutsH->SetMinNClustersTPC(100);
62 esdTrackCutsH->SetMaxChi2PerClusterTPC(2.0);
63 esdTrackCutsH->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);
64 esdTrackCutsH->SetRequireTPCRefit(kTRUE);
d3fae473 65 esdTrackCutsH->SetMaxNsigmaToVertex(2);
5b312f44 66 esdTrackCutsH->SetRequireSigmaToVertex(kTRUE);
d3fae473 67 esdTrackCutsH->SetAcceptKinkDaughters(kFALSE);
5b312f44 68 //
69 AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter");
70 trackFilter->AddCuts(esdTrackCutsL);
71 trackFilter->AddCuts(esdTrackCutsH);
72 //
73 AliAnalysisTaskESDfilter *esdfilter = new AliAnalysisTaskESDfilter("ESD Filter");
74 esdfilter->SetTrackFilter(trackFilter);
75 esdfilter->SetDebugLevel(10);
76 mgr->AddTask(esdfilter);
77
78 //
79 // Jet analysis
80 //
81 // AliAnalysisTaskJets *jetana = new AliAnalysisTaskJetsV2("JetAnalysis"); // Charged only
82 AliAnalysisTaskJets *jetana = new AliAnalysisTaskJets("JetAnalysis",chain); // Charged + neutral
83 jetana->SetDebugLevel(10);
84
85 AliAnalysisTaskJets *jetanaMC = new AliAnalysisTaskJets("JetAnalysisMC");
86 jetanaMC->SetDebugLevel(10);
87 jetanaMC->SetConfigFile("ConfigJetAnalysisMC.C");
88 jetanaMC->SetNonStdBranch("jetsMC");
89 mgr->AddTask(jetanaMC);
90 mgr->AddTask(jetana);
91
92 //
93 // Create containers for input/output
94 AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain",TChain::Class(),
95 AliAnalysisManager::kInputContainer);
96
97 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("tree", TTree::Class(),
98 AliAnalysisManager::kOutputContainer, "default");
99 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("histos", TList::Class(),
100 AliAnalysisManager::kOutputContainer, "histos.root");
101
102 AliAnalysisDataContainer *coutputMC2 = mgr->CreateContainer("histosMC", TList::Class(),
103 AliAnalysisManager::kOutputContainer, "histosMC.root");
104
105 mgr->ConnectInput (esdfilter, 0, cinput1 );
106 mgr->ConnectOutput (esdfilter, 0, coutput1 );
107
108 mgr->ConnectInput (jetana, 0, cinput1 );
109 mgr->ConnectOutput (jetana, 0, coutput1 );
110 mgr->ConnectOutput (jetana, 1, coutput2 );
111
112 mgr->ConnectInput (jetanaMC, 0, cinput1 );
113 mgr->ConnectOutput (jetanaMC, 0, coutput1 );
114 mgr->ConnectOutput (jetanaMC, 1, coutputMC2 );
115
116
117 //
118 // Run the analysis
119 //
120 mgr->InitAnalysis();
121 mgr->PrintStatus();
122 mgr->StartAnalysis("local",chain);
123}