TENDER becomes Tender
[u/mrichter/AliRoot.git] / PWGPP / PilotTrain / runPilot.C
CommitLineData
e89c5e8d 1void runPilot() {
f97ea980 2 TStopwatch timer;
3 timer.Start();
b6a315e0 4 gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT -I$ALICE_ROOT/TRD");
f97ea980 5 gSystem->Load("libANALYSIS.so");
6 gSystem->Load("libANALYSISalice.so");
af472fff 7 gSystem->Load("libTender.so");
b6a315e0 8 gSystem->Load("libCORRFW.so");
f97ea980 9 gSystem->Load("libPWG0base.so");
10 gSystem->Load("libPWG0dep.so");
11 gSystem->Load("libPWG0selectors.so");
2bfe5463 12 gSystem->Load("libPWGPP.so");
f97ea980 13 gSystem->Load("libPWG2.so");
40a0a69c 14 gSystem->Load("libPWGmuon.so");
15 gSystem->Load("libPWGmuondep.so");
f97ea980 16 gSystem->Load("libPWG2forward.so");
b6a315e0 17 gSystem->Load("libPWG4PartCorrBase.so");
18 gSystem->Load("libPWG4PartCorrDep.so");
d1e6851d 19
20
d1e6851d 21
2efff183 22 Bool_t doQAsym = 1; // (data)
23 Bool_t doVZERO = 1; // (data)
24 Bool_t doVertex = 1; // (data)
25 Bool_t doSPD = 1; // (data/RP)
26 Bool_t doFMD = 1; // (data)
27 Bool_t doTPC = 1; // AliPerformanceTask (data/MCtruth)
28 Bool_t doEventStat = 1; // (data)
29 Bool_t doSDD = 1; // (data/RP)
30 Bool_t doTRD = 1; // TRD
31 Bool_t doITS = 1; // ITS
32 Bool_t doCALO = 1; // Calorimeter
33 Bool_t doMUONTrig = 1; // MUON trigger
b6a315e0 34 Bool_t doMUONEff = 0; // MUON efficiency NEEDS geometry
2efff183 35 Bool_t doV0 = 0; // V0 recosntruction performance NEEDS MCtruth
b6a315e0 36
37 //
38 //
39 // Tasks that need MC information
40 //
41
42
43
f97ea980 44 //____________________________________________//
45 // Make the analysis manager
46 AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");
b6a315e0 47 mgr->SetDebugLevel(10);
f97ea980 48
59835ad9 49
4829e1b2 50 AliInputEventHandler* esdH = new AliESDInputHandlerRP();
59835ad9 51 esdH->SetActiveBranches("ESDfriend");
f97ea980 52 mgr->SetInputEventHandler(esdH);
53
54 // Chain
b6a315e0 55 // TGrid::Connect("alien://");
f97ea980 56
3cd4b27c 57 TChain* chain = new TChain("esdTree");
b6a315e0 58 //chain->AddFile("alien:///alice/data/2009/LHC09d/000104321/ESDs/pass1/09000104321018.10/AliESDs.root");
59 //chain->AddFile("alien:///alice/data/2009/LHC09d/000104321/ESDs/pass1/09000104321018.20/AliESDs.root");
2bfe5463 60 chain->AddFile("/home/morsch/AliRoot/trunk/PWGPP/PilotTrain/data/AliESDs.root");
b6a315e0 61
62
f97ea980 63 //
b6a315e0 64 // Wagons running on data
f97ea980 65 //
66 //
f97ea980 67 //
68 // VZERO QA (C. Cheshkov)
69 //
d1e6851d 70 if (doVZERO) {
71 gROOT->LoadMacro("AddTaskVZEROQA.C");
72 AliAnalysisTaskSE* task2 = AddTaskVZEROQA(0);
59835ad9 73// task2->SelectCollisionCandidates();
d1e6851d 74 }
75
f97ea980 76 //
77 // Vertexing (A. Dainese)
78 //
d1e6851d 79 if (doVertex) {
2bfe5463 80 gROOT->LoadMacro("$(ALICE_ROOT)/PWGPP/macros/AddTaskVertexESD.C");
d1e6851d 81 AliAnalysisTaskVertexESD* task3 = AddTaskVertexESD();
82 task3->SelectCollisionCandidates();
83 }
b6a315e0 84
85 //
86 // ITS
87 //
88 if (doITS) {
2bfe5463 89 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/macros/AddTaskPerformanceITS.C");
b6a315e0 90 AliAnalysisTaskITSTrackingCheck *itsQA = AddTaskPerformanceITS(kFALSE);
91 }
d1e6851d 92
f97ea980 93 //
94 // SPD (A. Mastroserio)
95 //
d1e6851d 96 if (doSPD) {
d1e6851d 97 gROOT->LoadMacro("AddTaskSPDQA.C");
98 AliAnalysisTaskSE* task4 = AddTaskSPDQA();
d1e6851d 99 }
100
101 //
102 // SDD (F. Prino)
103 //
104 if (doSDD) {
d1e6851d 105 gROOT->LoadMacro("AddSDDPoints.C");
e89c5e8d 106 AliAnalysisTaskSE* task5 = AddSDDPoints();
d1e6851d 107 task5->SelectCollisionCandidates();
108 }
109
f97ea980 110 //
111 // FMD (Hans Hjersing Dalsgaard)
112 //
d1e6851d 113 if (doFMD) {
114 gROOT->LoadMacro("AddTaskFMD.C");
115 AliAnalysisTaskSE* task6 = AddTaskFMD();
116 task6->SelectCollisionCandidates();
117 }
b6a315e0 118
119 // TPC QA (E. Sicking)
120 //
121 if (doQAsym) {
122 gROOT->LoadMacro("AddTaskQAsym.C");
123 AliAnalysisTaskSE* task1 = AddTaskQAsym();
124 task1->SelectCollisionCandidates();
125 }
f97ea980 126 //
127 // TPC (Jacek Otwinowski)
128 //
d1e6851d 129 if (doTPC) {
b6a315e0 130 //
131 // Optionally MC information can be used by setting the 1st argument to true
2bfe5463 132 gROOT->LoadMacro("$(ALICE_ROOT)/PWGPP/TPC/macros/AddTaskPerformanceTPCQA.C");
d1e6851d 133 AliPerformanceTask *tpcQA = AddTaskPerformanceTPCQA(kFALSE, kTRUE);
134 }
b6a315e0 135
136 //
137 // TRD (Alex Bercuci, M. Fasel)
138 //
139 if(doTRD) {
2bfe5463 140 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/macros/AddTrainPerformanceTRD.C");
705f8b0a 141 AddTrainPerformanceTRD("ALL");
b6a315e0 142 }
705f8b0a 143
d1e6851d 144 //
f97ea980 145 // Event Statistics (Jan Fiete)
146 //
d1e6851d 147 if (doEventStat) {
4829e1b2 148 gROOT->LoadMacro("AddTaskPhysicsSelection.C");
149 AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection();
150 AliPhysicsSelection* physSel = physSelTask->GetPhysicsSelection();
151 physSel->AddBackgroundIdentification(new AliBackgroundSelection());
d1e6851d 152 }
153
b6a315e0 154 if(doCALO) {
155 gROOT->LoadMacro("$ALICE_ROOT/PWG4/macros/QA/AddTaskCalorimeterQA.C");
156 AliAnalysisTaskParticleCorrelation *taskCaloQA = AddTaskCalorimeterQA("ESD", kTRUE, kFALSE);
2efff183 157 taskCaloQA->SetDebugLevel(0);
b6a315e0 158 }
159
160 if(doMUONTrig) {
2bfe5463 161 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/macros/AddTaskMTRchamberEfficiency.C");
b6a315e0 162 AliAnalysisTaskTrigChEff *taskMuonTrig = AddTaskMTRchamberEfficiency();
163 }
164
165 if(doMUONEff) {
166 gROOT->LoadMacro("$ALICE_ROOT/PWG3/muondep/AddTaskMUONTrackingEfficiency.C");
167 AliAnalysisTaskMuonTrackingEff *taskMuonTrackEff = AddTaskMUONTrackingEfficiency();
168 }
169
170 if (doV0) {
2bfe5463 171 gROOT->LoadMacro("$ALICE_ROOT/PWGPP/macros/AddTaskV0QA.C");
b6a315e0 172 AliAnalysisTaskV0QA *taskv0QA = AddTaskV0QA(kFALSE);
173 }
174
175
176 //
177 // Wagons that need MC
178 //
f97ea980 179
180
181 // Init
182 if (!mgr->InitAnalysis())
183 mgr->PrintStatus();
b6a315e0 184 mgr->PrintStatus();
f97ea980 185 // Run on dataset
803ca16a 186 mgr->StartAnalysis("local", chain);
f97ea980 187 timer.Stop();
188 timer.Print();
189}
190