fix settings
[u/mrichter/AliRoot.git] / PWGJE / macros / AddTaskPWG4HighPtTrackQA.C
CommitLineData
e49861e4 1void AddTaskPWG4HighPtTrackQA(TString year = "2010", TString prodType = "LHC10h",Bool_t isPbPb = kTRUE, Int_t iAODanalysis = 0, Bool_t bReduced = kTRUE, Int_t filterBit = 272)
7ef03cd9 2{
3
e49861e4 4 if(iAODanalysis==0) { //run on ESDs
5 if(year.Contains("2010")) {
6 if(bReduced)
7 AddTaskPWG4HighPtTrackQAAllReduced(prodType.Data(),isPbPb,iAODanalysis);
8 else
9 AddTaskPWG4HighPtTrackQAAll(prodType.Data(),isPbPb,iAODanalysis);
10 }
11 else if(year.Contains("2011")) {
12 if(bReduced)
13 AddTaskPWG4HighPtTrackQAAllReduced2011(prodType.Data(),isPbPb,iAODanalysis);
14 else
15 AddTaskPWG4HighPtTrackQAAll2011(prodType.Data(),isPbPb,iAODanalysis);
16 }
7ef03cd9 17 }
e49861e4 18 else if(iAODanalysis==1) {
e3d92bb5 19 AddTaskPWG4HighPtTrackQAAOD(prodType.Data(),isPbPb,iAODanalysis,filterBit);
7ef03cd9 20 }
21
22}
23
5c77d274 24void AddTaskPWG4HighPtTrackQAAll(char *prodType = "LHC10h",Bool_t isPbPb=kTRUE, Int_t iAODanalysis = 0)
25{
c3ff0a6e 26
5c77d274 27 int cent = 10;
28
7ef03cd9 29 AliPWG4HighPtTrackQA *taskTrackQA00cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0);
30 AliPWG4HighPtTrackQA *taskTrackQA01cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,1);
31 // AliPWG4HighPtTrackQA *taskTrackQA02cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,2);
32 // AliPWG4HighPtTrackQA *taskTrackQA10cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,1,0);
33 // AliPWG4HighPtTrackQA *taskTrackQA11cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,1,1);
34 // AliPWG4HighPtTrackQA *taskTrackQA20cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,2,0);
35 // AliPWG4HighPtTrackQA *taskTrackQA21cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,2,1);
36 // AliPWG4HighPtTrackQA *taskTrackQA40cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,4,0);
37 // AliPWG4HighPtTrackQA *taskTrackQA41cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,4,1);
38 // AliPWG4HighPtTrackQA *taskTrackQA50cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,5,0);
39 // AliPWG4HighPtTrackQA *taskTrackQA60cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,6,0);
40 AliPWG4HighPtTrackQA *taskTrackQA70cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0);
41 AliPWG4HighPtTrackQA *taskTrackQA71cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1);
42 AliPWG4HighPtTrackQA *taskTrackQA72cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2);
dbf52bac 43
5c77d274 44 if(isPbPb) {
45 for(cent=0; cent<4; cent++) {
7ef03cd9 46 AliPWG4HighPtTrackQA *taskTrackQA00 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0);
47 AliPWG4HighPtTrackQA *taskTrackQA01 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,1);
48 // AliPWG4HighPtTrackQA *taskTrackQA02 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,2);
49 // AliPWG4HighPtTrackQA *taskTrackQA10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,1,0);
50 // AliPWG4HighPtTrackQA *taskTrackQA11 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,1,1);
51 // AliPWG4HighPtTrackQA *taskTrackQA20 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,2,0);
52 // AliPWG4HighPtTrackQA *taskTrackQA21 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,2,1);
53 // AliPWG4HighPtTrackQA *taskTrackQA40 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,4,0);
54 // AliPWG4HighPtTrackQA *taskTrackQA41 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,4,1);
55 // AliPWG4HighPtTrackQA *taskTrackQA50 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,5,0);
56 // AliPWG4HighPtTrackQA *taskTrackQA60 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,6,0);
57 AliPWG4HighPtTrackQA *taskTrackQA70 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0);
58 AliPWG4HighPtTrackQA *taskTrackQA71 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1);
59 AliPWG4HighPtTrackQA *taskTrackQA72 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2);
5c77d274 60 }
61 }
62
63}
64
a5e0d236 65void AddTaskPWG4HighPtTrackQAAll2011(char *prodType = "LHC10h",Bool_t isPbPb=kTRUE, Int_t iAODanalysis = 0)
66{
67
68 Int_t cent = 10;
69 UInt_t iPhysicsSelectionFlag = AliVEvent::kMB;
70 UInt_t iPhysicsSelectionFlagCentral = AliVEvent::kCentral;
71 UInt_t iPhysicsSelectionFlagSemiCentral = AliVEvent::kSemiCentral;
72
73
7ef03cd9 74 AliPWG4HighPtTrackQA *taskTrackQA00cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlag);
75 AliPWG4HighPtTrackQA *taskTrackQA01cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,1,iPhysicsSelectionFlag);
76 AliPWG4HighPtTrackQA *taskTrackQA70cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0,iPhysicsSelectionFlag);
77 AliPWG4HighPtTrackQA *taskTrackQA71cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1,iPhysicsSelectionFlag);
78 AliPWG4HighPtTrackQA *taskTrackQA72cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2,iPhysicsSelectionFlag);
e49861e4 79
80 AliPWG4HighPtTrackQA *taskTrackQA05cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,5,iPhysicsSelectionFlag);
81 AliPWG4HighPtTrackQA *taskTrackQA74cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,4,iPhysicsSelectionFlag);
82 AliPWG4HighPtTrackQA *taskTrackQA75cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,5,iPhysicsSelectionFlag);
a5e0d236 83
84 if(isPbPb) {
85 for(cent=0; cent<4; cent++) {
7ef03cd9 86 AliPWG4HighPtTrackQA *taskTrackQA00 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlag);
87 AliPWG4HighPtTrackQA *taskTrackQA01 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,1,iPhysicsSelectionFlag);
88 AliPWG4HighPtTrackQA *taskTrackQA70 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0,iPhysicsSelectionFlag);
89 AliPWG4HighPtTrackQA *taskTrackQA71 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1,iPhysicsSelectionFlag);
90 AliPWG4HighPtTrackQA *taskTrackQA72 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2,iPhysicsSelectionFlag);
e49861e4 91 AliPWG4HighPtTrackQA *taskTrackQA05 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,5,iPhysicsSelectionFlag);
92 AliPWG4HighPtTrackQA *taskTrackQA74 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,4,iPhysicsSelectionFlag);
93 AliPWG4HighPtTrackQA *taskTrackQA75 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,5,iPhysicsSelectionFlag);
a5e0d236 94
95 if(cent==0) {
7ef03cd9 96 AliPWG4HighPtTrackQA *taskTrackQA00 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlagCentral);
97 AliPWG4HighPtTrackQA *taskTrackQA01 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,1,iPhysicsSelectionFlagCentral);
98 AliPWG4HighPtTrackQA *taskTrackQA70 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0,iPhysicsSelectionFlagCentral);
99 AliPWG4HighPtTrackQA *taskTrackQA71 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1,iPhysicsSelectionFlagCentral);
100 AliPWG4HighPtTrackQA *taskTrackQA72 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2,iPhysicsSelectionFlagCentral);
e49861e4 101 AliPWG4HighPtTrackQA *taskTrackQA05 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,5,iPhysicsSelectionFlagCentral);
102 AliPWG4HighPtTrackQA *taskTrackQA74 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,4,iPhysicsSelectionFlagCentral);
103 AliPWG4HighPtTrackQA *taskTrackQA75 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,5,iPhysicsSelectionFlagCentral);
a5e0d236 104 }
105 else {
7ef03cd9 106 AliPWG4HighPtTrackQA *taskTrackQA00 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlagSemiCentral);
107 AliPWG4HighPtTrackQA *taskTrackQA01 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,1,iPhysicsSelectionFlagSemiCentral);
108 AliPWG4HighPtTrackQA *taskTrackQA70 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0,iPhysicsSelectionFlagSemiCentral);
109 AliPWG4HighPtTrackQA *taskTrackQA71 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1,iPhysicsSelectionFlagSemiCentral);
110 AliPWG4HighPtTrackQA *taskTrackQA72 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2,iPhysicsSelectionFlagSemiCentral);
e49861e4 111 AliPWG4HighPtTrackQA *taskTrackQA05 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,5,iPhysicsSelectionFlagSemiCentral);
112 AliPWG4HighPtTrackQA *taskTrackQA74 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,4,iPhysicsSelectionFlagSemiCentral);
113 AliPWG4HighPtTrackQA *taskTrackQA75 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,5,iPhysicsSelectionFlagSemiCentral);
a5e0d236 114 }
115
116 }
117 }
118
119}
120
eb1739b7 121void AddTaskPWG4HighPtTrackQAAllReduced(char *prodType = "LHC10h",Bool_t isPbPb=kTRUE, Int_t iAODanalysis = 0)
b1041e3b 122{
123
124 int cent = 10;
125
126 if(isPbPb) {
127 for(cent=0; cent<4; cent++) {
7ef03cd9 128 AliPWG4HighPtTrackQA *taskTrackQA00 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0);
129 AliPWG4HighPtTrackQA *taskTrackQA01 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,1);
130 AliPWG4HighPtTrackQA *taskTrackQA70 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0);
131 AliPWG4HighPtTrackQA *taskTrackQA71 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1);
132 AliPWG4HighPtTrackQA *taskTrackQA72 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2);
b1041e3b 133 }
134 }
135
136}
137
a5e0d236 138void AddTaskPWG4HighPtTrackQAAllReduced2011(char *prodType = "LHC10h",Bool_t isPbPb=kTRUE, Int_t iAODanalysis = 0)
139{
140
141 int cent = 10;
142
143 UInt_t iPhysicsSelectionFlagCentral = AliVEvent::kCentral;
144 UInt_t iPhysicsSelectionFlagSemiCentral = AliVEvent::kSemiCentral;
145
7ef03cd9 146 AliPWG4HighPtTrackQA *taskTrackQA00C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlagCentral);
147 AliPWG4HighPtTrackQA *taskTrackQA01C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,1,iPhysicsSelectionFlagCentral);
148 AliPWG4HighPtTrackQA *taskTrackQA21C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,2,1,iPhysicsSelectionFlagCentral);
149 AliPWG4HighPtTrackQA *taskTrackQA70C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0,iPhysicsSelectionFlagCentral);
150 AliPWG4HighPtTrackQA *taskTrackQA71C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1,iPhysicsSelectionFlagCentral);
151 AliPWG4HighPtTrackQA *taskTrackQA72C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2,iPhysicsSelectionFlagCentral);
e49861e4 152 AliPWG4HighPtTrackQA *taskTrackQA05C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,5,iPhysicsSelectionFlagCentral);
153 AliPWG4HighPtTrackQA *taskTrackQA74C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,4,iPhysicsSelectionFlagCentral);
154 AliPWG4HighPtTrackQA *taskTrackQA75C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,5,iPhysicsSelectionFlagCentral);
006b2a30 155
7ef03cd9 156 AliPWG4HighPtTrackQA *taskTrackQA00SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlagSemiCentral);
157 AliPWG4HighPtTrackQA *taskTrackQA01SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,1,iPhysicsSelectionFlagSemiCentral);
158 AliPWG4HighPtTrackQA *taskTrackQA21SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,2,1,iPhysicsSelectionFlagSemiCentral);
159 AliPWG4HighPtTrackQA *taskTrackQA70SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0,iPhysicsSelectionFlagSemiCentral);
160 AliPWG4HighPtTrackQA *taskTrackQA71SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1,iPhysicsSelectionFlagSemiCentral);
161 AliPWG4HighPtTrackQA *taskTrackQA72SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2,iPhysicsSelectionFlagSemiCentral);
e49861e4 162 AliPWG4HighPtTrackQA *taskTrackQA05SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,5,iPhysicsSelectionFlagSemiCentral);
163 AliPWG4HighPtTrackQA *taskTrackQA74SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,4,iPhysicsSelectionFlagSemiCentral);
164 AliPWG4HighPtTrackQA *taskTrackQA75SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,5,iPhysicsSelectionFlagSemiCentral);
a5e0d236 165
166}
167
a5e0d236 168void AddTaskPWG4HighPtTrackQAAOD(char *prodType = "LHC10h",Bool_t isPbPb=kTRUE, Int_t iAODanalysis = 1, Int_t filterBit = 272)
b64acfb6 169{
170 UInt_t iPhysicsSelectionFlagMB = AliVEvent::kMB;
171 UInt_t iPhysicsSelectionFlagCentral = AliVEvent::kCentral;
172 UInt_t iPhysicsSelectionFlagSemiCentral = AliVEvent::kSemiCentral;
173
174 Int_t cent = 10;
175
176 TString strRunPeriod = TString(prodType);
177
178 if(isPbPb) {
179 for(cent=0; cent<4; cent++) {
180 AliPWG4HighPtTrackQA *taskTrackQAMB = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlagMB);
181 taskTrackQAMB->SetFilterMask(filterBit);
182 }
183
184 cent = 10;
185
186 if(strRunPeriod.Contains("LHC11h")) {
187 AliPWG4HighPtTrackQA *taskTrackQAC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlagCentral);
188 taskTrackQAC->SetFilterMask(filterBit);
189
190 AliPWG4HighPtTrackQA *taskTrackQASC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlagSemiCentral);
191 taskTrackQASC->SetFilterMask(filterBit);
192 }
193 }
194 else {
195 cent = 10;
196 AliPWG4HighPtTrackQA *taskTrackQAMB = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlagMB);
197 taskTrackQAMB->SetFilterMask(filterBit);
198 }
c3ff0a6e 199}
200
7ef03cd9 201AliPWG4HighPtTrackQA* ConfigureTaskPWG4HighPtTrackQA(char *prodType = "LHC10e14",Bool_t isPbPb=kTRUE,Int_t iAODanalysis = 0, Int_t centClass = 0, Int_t trackType = 0, Int_t cuts = 0, UInt_t iPhysicsSelectionFlag = AliVEvent::kMB)
5c77d274 202{
203 /*
204 trackType: 0 = global
205 1 = TPC stand alone
206 2 = TPC stand alone constrained to SPD vertex
aa3ba8d2 207 4 = TPC stand alone constrained to SPD vertex with QA track selection on global tracks
dbf52bac 208 5 = Hybrid tracks: constrained TPConly for which no tight ITS is available
209 6 = Hybrid tracks: constrained loose global for which no tight ITS is available
5a0bd31f 210 cuts: 0 (global) = standard ITSTPC2010 a la RAA analysis
211 1 (global) = ITSrefit, no SPD requirements -> standard for jet analysis
212 2 (global) = ITSrefit + no hits in SPD
213 3 (global) = standard ITS tight cuts with nCrossed rows cut for hybrid tracks
5c77d274 214 0 (TPC) = standard TPC + NClusters>70
215 1 (TPC) = standard TPC + NClusters>0 --> to study new TPC QA recommendations
dbf52bac 216 0 (hybrid 5) = constrained TPConly for which no tight ITS is available
217 0 (hybrid 6) = constrained loose global for which no tight ITS is available
5c77d274 218 */
219
380cff49 220 //Load common track cut class
5c4489e2 221 gROOT->LoadMacro("$ALICE_ROOT/PWGJE/macros/CreateTrackCutsPWGJE.C");
380cff49 222
5c77d274 223 // Creates HighPtTrackQA analysis task and adds it to the analysis manager.
224
225 // A. Get the pointer to the existing analysis manager via the static access method.
226 //==============================================================================
227 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
228 if (!mgr) {
229 Error("AddTaskPWG4HighPtQMC", "No analysis manager to connect to.");
230 return NULL;
231 }
232
233 // B. Check the analysis type using the event handlers connected to the analysis
234 // manager. The availability of MC handler can also be checked here.
235 //==============================================================================
236 if (!mgr->GetInputEventHandler()) {
237 ::Error("AddPWG4TaskHighPtTrackQA", "This task requires an input event handler");
238 return NULL;
239 }
240
241 // C. Create the task, add it to manager.
242 //===========================================================================
243
244 //CREATE THE CUTS -----------------------------------------------
245 //Use AliESDtrackCuts
246 AliESDtrackCuts *trackCuts = new AliESDtrackCuts("AliESDtrackCuts","Standard Cuts");
b43ea0be 247 AliESDtrackCuts *trackCutsReject = 0x0;
dbf52bac 248 AliESDtrackCuts *trackCutsTPConly = new AliESDtrackCuts("AliESDtrackCutsTPConly","TPC only Cuts");
249
5c77d274 250 //Standard Cuts
251 //Set track cuts for global tracks
252 if(trackType==0 && cuts==0) {
380cff49 253 // tight global tracks - RAA analysis
5c4489e2 254 trackCuts = CreateTrackCutsPWGJE(1000);
5c77d274 255 }
256 if(trackType==0 && cuts==1) {
380cff49 257 //Cuts global tracks with ITSrefit requirement and SPDrequirement for jet analysis
5c4489e2 258 trackCuts = CreateTrackCutsPWGJE(10001006);
5c77d274 259 }
e49861e4 260 if(trackType==0 && cuts==5) {
261 //Cuts global tracks with ITSrefit requirement and SPDrequirement for jet analysis + NCrossedRowsCut>120 recommended in 2011
262 trackCuts = CreateTrackCutsPWGJE(10001007);
263 }
264
5c77d274 265 if(trackType==0 && cuts==2) {
5a0bd31f 266 //Cuts global tracks with ITSrefit requirement but without SPD
5c4489e2 267 trackCuts = CreateTrackCutsPWGJE(10011006);
380cff49 268 }
269 if(trackType==7 && cuts==0) {
270 // tight global tracks
5c4489e2 271 trackCuts = CreateTrackCutsPWGJE(10041006);
272 trackCutsReject = CreateTrackCutsPWGJE(1006);
b43ea0be 273 trackCutsReject->SetEtaRange(-0.9,0.9);
274 trackCutsReject->SetPtRange(0.15, 1e10);
5c77d274 275 }
e49861e4 276 if(trackType==7 && cuts==4) {
277 // tight global tracks + NCrossedRowsCut>120 recommended in 2011
278 trackCuts = CreateTrackCutsPWGJE(10041007);
279 trackCutsReject = CreateTrackCutsPWGJE(1007);
280 trackCutsReject->SetEtaRange(-0.9,0.9);
281 trackCutsReject->SetPtRange(0.15, 1e10);
282 }
380cff49 283 if(trackType==7 && cuts==1) {
dbf52bac 284 // tight global tracks
5c4489e2 285 trackCuts = CreateTrackCutsPWGJE(10011006);
b43ea0be 286 }
e49861e4 287 if(trackType==7 && cuts==5) {
288 // tight global tracks + NCrossedRowsCut>120 recommended in 2011
289 trackCuts = CreateTrackCutsPWGJE(10011007);
290 }
b43ea0be 291 if(trackType==7 && cuts==2) {
292 // no requirements on SPD and ITSrefit failed
5c4489e2 293 trackCuts = CreateTrackCutsPWGJE(10041006); //no ITSrefit requirement filter 256
294 trackCutsReject = CreateTrackCutsPWGJE(10001006); //ITSrefit requirement filter 16
b43ea0be 295 trackCutsReject->SetEtaRange(-0.9,0.9);
296 trackCutsReject->SetPtRange(0.15, 1e10);
dbf52bac 297 }
e49861e4 298 if(trackType==7 && cuts==6) {
299 // no requirements on SPD and ITSrefit failed
300 trackCuts = CreateTrackCutsPWGJE(10041007); //no ITSrefit requirement filter 256
301 trackCutsReject = CreateTrackCutsPWGJE(10001007); //ITSrefit requirement filter 16
302 trackCutsReject->SetEtaRange(-0.9,0.9);
303 trackCutsReject->SetPtRange(0.15, 1e10);
304 }
dbf52bac 305
5c77d274 306 if(trackType==1 && cuts==0) {
307 //Set track cuts for TPConly tracks
5c4489e2 308 trackCuts = CreateTrackCutsPWGJE(2001);
5c77d274 309 }
310 if(trackType==1 && cuts==1) {
311 //Set track cuts for TPConly tracks
5c4489e2 312 trackCuts = CreateTrackCutsPWGJE(10032001);
5c77d274 313 }
314
315 if(trackType==2 && cuts==0) {
316 // Set track cuts for TPConly constrained tracks
5c4489e2 317 trackCuts = CreateTrackCutsPWGJE(2001);
5c77d274 318 }
319 if(trackType==2 && cuts==1) {
320 //Set track cuts for TPConly constrained tracks
5c4489e2 321 trackCuts = CreateTrackCutsPWGJE(10032001);
5c77d274 322 }
aa3ba8d2 323
324 if(trackType==4 && cuts==0) {
325 // Set track cuts for TPConly constrained tracks
5c4489e2 326 trackCuts = CreateTrackCutsPWGJE(2001);
aa3ba8d2 327 }
328 if(trackType==4 && cuts==1) {
329 // Set track cuts for TPConly constrained tracks
5c4489e2 330 trackCuts = CreateTrackCutsPWGJE(10032001);
aa3ba8d2 331 }
dbf52bac 332 if(trackType==5 || trackType==6) {
333 // tight global tracks
5c4489e2 334 trackCuts = CreateTrackCutsPWGJE(1003);
380cff49 335
5c4489e2 336 trackCutsReject = CreateTrackCutsPWGJE(10021003);
380cff49 337
5c4489e2 338 trackCutsTPConly = CreateTrackCutsPWGJE(2002);
380cff49 339
b43ea0be 340 trackCutsReject->SetEtaRange(-0.9,0.9);
341 trackCutsReject->SetPtRange(0.15, 1e10);
380cff49 342
343 trackCutsTPConly->SetEtaRange(-0.9,0.9);
344 trackCutsTPConly->SetPtRange(0.15, 1e10);
345
dbf52bac 346 }
aa3ba8d2 347
5c77d274 348 trackCuts->SetEtaRange(-0.9,0.9);
349 trackCuts->SetPtRange(0.15, 1e10);
350
351
352
353 //Create the task
a5e0d236 354 AliPWG4HighPtTrackQA *taskPWG4TrackQA = new AliPWG4HighPtTrackQA(Form("AliPWG4HighPtTrackQACent%dTrack%dCuts%dPSF%d",centClass,trackType,cuts,iPhysicsSelectionFlag));
5c77d274 355 taskPWG4TrackQA->SetTrackType(trackType);
dbf52bac 356 taskPWG4TrackQA->SetCuts(trackCuts);
05a4d396 357 taskPWG4TrackQA->SetCutsITSLoose(trackCutsReject);
dbf52bac 358 taskPWG4TrackQA->SetCutsTPConly(trackCutsTPConly);
5c77d274 359
360 taskPWG4TrackQA->SetPtMax(100.);
361
362 if(iAODanalysis)
363 taskPWG4TrackQA->SetDataType(AliPWG4HighPtTrackQA::kAOD);
364 else
365 taskPWG4TrackQA->SetDataType(AliPWG4HighPtTrackQA::kESD);
366
367 if(isPbPb) {
368 taskPWG4TrackQA->SetIsPbPb(kTRUE);
369 taskPWG4TrackQA->SetCentralityClass(centClass);
370 }
aa3ba8d2 371 // taskPWG4TrackQA->SetSigmaConstrainedMax(5.);
5c77d274 372
a5e0d236 373 taskPWG4TrackQA->SelectCollisionCandidates(iPhysicsSelectionFlag);
5c77d274 374
375
376 // E. Create ONLY the output containers for the data produced by the task.
377 // Get and connect other common input/output containers via the manager as below
378 //==============================================================================
5c77d274 379 TString outputfile = AliAnalysisManager::GetCommonFileName();
a5e0d236 380 if(iPhysicsSelectionFlag == AliVEvent::kMB)
381 outputfile += Form(":PWG4_HighPtTrackQACent%dTrackType%dCuts%d",centClass,trackType,cuts);
382 else if(iPhysicsSelectionFlag == AliVEvent::kCentral)
383 outputfile += Form(":PWG4_HighPtTrackQACent%dTrackType%dCuts%dkCentral",centClass,trackType,cuts);
384 else if(iPhysicsSelectionFlag == AliVEvent::kSemiCentral)
385 outputfile += Form(":PWG4_HighPtTrackQACent%dTrackType%dCuts%dkSemiCentral",centClass,trackType,cuts);
386
387 AliAnalysisDataContainer *cout_histQAtrack = 0x0;
388 if(iPhysicsSelectionFlag == AliVEvent::kMB)
389 cout_histQAtrack = mgr->CreateContainer(Form("qa_histsQAtrackCent%dType%dcuts%d",centClass,trackType,cuts), TList::Class(), AliAnalysisManager::kOutputContainer,outputfile);
390 else if(iPhysicsSelectionFlag == AliVEvent::kCentral)
391 cout_histQAtrack = mgr->CreateContainer(Form("qa_histsQAtrackCent%dType%dcuts%dkCentral",centClass,trackType,cuts), TList::Class(), AliAnalysisManager::kOutputContainer,outputfile);
392 else if(iPhysicsSelectionFlag == AliVEvent::kSemiCentral)
393 cout_histQAtrack = mgr->CreateContainer(Form("qa_histsQAtrackCent%dType%dcuts%dkSemiCentral",centClass,trackType,cuts), TList::Class(), AliAnalysisManager::kOutputContainer,outputfile);
5c77d274 394
395 mgr->AddTask(taskPWG4TrackQA);
396 mgr->ConnectInput(taskPWG4TrackQA,0,mgr->GetCommonInputContainer());
397 mgr->ConnectOutput(taskPWG4TrackQA,1,cout_histQAtrack);
398
399 // Return task pointer at the end
400 return taskPWG4TrackQA;
401}