]>
Commit | Line | Data |
---|---|---|
e67279ba | 1 | // Steer TRD QA train for Reconstruction (Clusterizer, Tracking and PID). |
2 | // | |
3 | // Usage: | |
4 | // AddTrainPerformanceTRD.C(MC, friends, tasks) | |
5 | // tasks : "ALL" or one/more of the following: | |
6 | // "EFF" : TRD Tracking Efficiency | |
7 | // "EFFC" : TRD Tracking Efficiency Combined (barrel + stand alone) - only in case of simulations | |
8 | // "MULT" : TRD single track selection | |
9 | // "RES" : TRD tracking Resolution | |
10 | // "CLRES": clusters Resolution | |
11 | // "CAL" : TRD calibration | |
12 | // "ALGN" : TRD alignment | |
13 | // "PID" : TRD PID - pion efficiency | |
14 | // "PIDR" : TRD PID - reference data | |
15 | // "DET" : Basic TRD Detector checks | |
16 | // "NOFR" : Data set does not have AliESDfriends.root | |
17 | // "NOMC" : Data set does not have Monte Carlo Informations (real data), so all tasks which rely | |
18 | // on MC information are switched off | |
19 | // | |
20 | // In compiled mode : | |
21 | // Don't forget to load first the libraries | |
22 | // gSystem->Load("libMemStat.so") | |
23 | // gSystem->Load("libMemStatGui.so") | |
24 | // gSystem->Load("libANALYSIS.so") | |
25 | // gSystem->Load("libANALYSISalice.so") | |
26 | // gSystem->Load("libPWG1.so"); | |
27 | // | |
28 | // Authors: | |
29 | // Alex Bercuci (A.Bercuci@gsi.de) | |
30 | // Markus Fasel (m.Fasel@gsi.de) | |
31 | ||
32 | #if ! defined (__CINT__) || defined (__MAKECINT__) | |
33 | //#ifndef __CINT__ | |
34 | #include <Riostream.h> | |
35 | ||
36 | #include "TStopwatch.h" | |
37 | #include "TMemStat.h" | |
38 | #include "TMemStatViewerGUI.h" | |
39 | ||
40 | #include "TROOT.h" | |
41 | #include "TClass.h" | |
42 | #include "TSystem.h" | |
43 | #include "TError.h" | |
44 | #include "TChain.h" | |
45 | #include "TGrid.h" | |
46 | #include "TAlienCollection.h" | |
47 | #include "TGridCollection.h" | |
48 | #include "TGridResult.h" | |
49 | #include "TGeoGlobalMagField.h" | |
50 | ||
51 | #include "AliMagF.h" | |
52 | #include "AliTracker.h" | |
53 | #include "AliLog.h" | |
54 | #include "AliCDBManager.h" | |
55 | #include "AliGRPManager.h" | |
56 | #include "AliGeomManager.h" | |
57 | #include "AliAnalysisManager.h" | |
58 | #include "AliAnalysisDataContainer.h" | |
59 | #include "AliMCEventHandler.h" | |
60 | #include "AliESDInputHandler.h" | |
61 | ||
62 | #include "TRD/AliTRDtrackerV1.h" | |
63 | #include "TRD/AliTRDcalibDB.h" | |
64 | ||
65 | #include "PWG1/TRD/macros/AliTRDperformanceTrain.h" | |
66 | #include "PWG1/TRD/macros/AddTRDcheckESD.C" | |
67 | #include "PWG1/TRD/macros/AddTRDinfoGen.C" | |
68 | #include "PWG1/TRD/macros/AddTRDcheckDET.C" | |
69 | #include "PWG1/TRD/macros/AddTRDefficiency.C" | |
70 | #include "PWG1/TRD/macros/AddTRDresolution.C" | |
71 | #include "PWG1/TRD/macros/AddTRDcheckPID.C" | |
72 | #endif | |
73 | ||
74 | #include "../TRD/macros/AliTRDperformanceTrain.h" | |
75 | ||
d7f41d16 | 76 | Bool_t AddTrainPerformanceTRD(Char_t *trd="ALL") |
e67279ba | 77 | { |
78 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
79 | if(!mgr) { | |
80 | Error("AddTrainPerformanceTRD", "AliAnalysisManager not set!"); | |
81 | return kFALSE; | |
82 | } | |
83 | ||
84 | // TRD data containers | |
705f8b0a | 85 | AliAnalysisDataContainer *ci[kNOutSlots]; |
86 | AliAnalysisDataContainer *ce[2]; | |
e67279ba | 87 | |
88 | // initialize TRD settings | |
89 | AliTRDcalibDB *cal = AliTRDcalibDB::Instance(); | |
51d5dc77 | 90 | AliTRDtrackerV1::SetNTimeBins(cal->GetNumberOfTimeBinsDCS()); |
e67279ba | 91 | for(Int_t it=0; it<NTRDQATASKS; it++){ |
92 | if(gROOT->LoadMacro(Form("$ALICE_ROOT/PWG1/TRD/macros/Add%s.C+", TString(fgkTRDtaskClassName[it])(3,20).Data()))) { | |
93 | Error("AddTrainPerformanceTRD()", Form("Error loading %s task.", fgkTRDtaskClassName[it])); | |
94 | return kFALSE; | |
95 | } | |
96 | ||
97 | switch(it){ | |
98 | case kCheckESD: | |
99 | AddTRDcheckESD(mgr); break; | |
100 | case kInfoGen: | |
705f8b0a | 101 | AddTRDinfoGen(mgr, trd, NULL, ci); break; |
e67279ba | 102 | case kCheckDET: |
705f8b0a | 103 | // map slots |
104 | ce[1]=ci[kEventInfo]; | |
105 | ce[0]=ci[kTracksBarrel]; | |
106 | AddTRDcheckDET(mgr, trd, ce); | |
107 | // ce[0]=ci[kTracksSA]; | |
108 | // AddTRDcheckDET(mgr, trd, ce); | |
109 | // ce[0]=ci[kTracksKink]; | |
110 | // AddTRDcheckDET(mgr, trd, ce); | |
111 | break; | |
e67279ba | 112 | case kEfficiency: |
705f8b0a | 113 | // map slots |
114 | ce[0]=ci[kTracksBarrel]; | |
115 | AddTRDefficiency(mgr, trd, ce); | |
116 | // ce[0]=ci[kTracksSA]; | |
117 | // AddTRDefficiency(mgr, trd, ce); | |
118 | // ce[0]=ci[kTracksKink]; | |
119 | // AddTRDefficiency(mgr, trd, ce); | |
120 | break; | |
e67279ba | 121 | case kResolution: |
705f8b0a | 122 | // map slots |
123 | ce[0]=ci[kTracksBarrel]; | |
124 | AddTRDresolution(mgr, trd, ce); | |
4b03f8d5 | 125 | // ce[0]=ci[kTracksSA]; |
126 | // AddTRDresolution(mgr, trd, ce, "SA"); | |
705f8b0a | 127 | // ce[0]=ci[kTracksKink]; |
128 | // AddTRDresolution(mgr, trd, ce, "K"); | |
129 | break; | |
e67279ba | 130 | case kCheckPID: |
705f8b0a | 131 | // map slots |
132 | ce[1]=ci[kV0List]; | |
133 | ce[0]=ci[kTracksBarrel]; | |
134 | AddTRDcheckPID(mgr, trd, ce); break; | |
e67279ba | 135 | default: |
136 | Warning("AddTrainPerformanceTRD()", Form("No performance task registered at slot %d.", it)); | |
137 | } | |
138 | } | |
139 | return kTRUE; | |
140 | } | |
141 |