]>
Commit | Line | Data |
---|---|---|
04236e67 | 1 | /************************************************************************** |
2 | * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | // ************************************************************* | |
19 | // Checks the quality assurance | |
20 | // by comparing with reference data | |
21 | // contained in a DB | |
22 | // ------------------------------------------------------------- | |
8c823e5a | 23 | // W. Ferrarese + P. Cerello Feb 2008 |
04236e67 | 24 | // INFN Torino |
25 | ||
26 | // --- ROOT system --- | |
e23412ab | 27 | #include <TH2.h> |
04236e67 | 28 | #include <TTree.h> |
04236e67 | 29 | // --- Standard library --- |
30 | ||
31 | // --- AliRoot header files --- | |
32 | #include "AliITSQADataMakerRec.h" | |
8c823e5a | 33 | #include "AliITSQASPDDataMakerRec.h" |
34 | #include "AliITSQASDDDataMakerRec.h" | |
35 | #include "AliITSQASSDDataMakerRec.h" | |
04236e67 | 36 | #include "AliLog.h" |
4e25ac79 | 37 | #include "AliQAv1.h" |
04236e67 | 38 | #include "AliQAChecker.h" |
c71529b0 | 39 | #include "AliITSQAChecker.h" |
04236e67 | 40 | #include "AliRawReader.h" |
a90a332e | 41 | #include "AliESDEvent.h" |
42 | #include "AliESDtrack.h" | |
43 | #include "AliESDVertex.h" | |
44 | #include "AliMultiplicity.h" | |
04236e67 | 45 | |
46 | ClassImp(AliITSQADataMakerRec) | |
47 | ||
48 | //____________________________________________________________________________ | |
8c823e5a | 49 | AliITSQADataMakerRec::AliITSQADataMakerRec(Bool_t kMode, Short_t subDet, Short_t ldc) : |
4e25ac79 | 50 | AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kITS), "ITS Quality Assurance Data Maker"), |
1aa7c4f5 | 51 | fkOnline(kMode), |
e41192d7 | 52 | fHLTMode(0), |
8c823e5a | 53 | fSubDetector(subDet), |
1aa7c4f5 | 54 | fLDC(ldc), |
8c823e5a | 55 | fSPDDataMaker(NULL), |
56 | fSDDDataMaker(NULL), | |
57 | fSSDDataMaker(NULL) | |
1aa7c4f5 | 58 | { |
1aa7c4f5 | 59 | //ctor used to discriminate OnLine-Offline analysis |
8c823e5a | 60 | if(fSubDetector < 0 || fSubDetector > 3) { |
61 | AliError("Error: fSubDetector number out of range; return\n"); | |
62 | } | |
63 | ||
64 | // Initialization for RAW data | |
65 | if(fSubDetector == 0 || fSubDetector == 1) { | |
5379c4a3 | 66 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Create SPD DataMakerRec\n"); |
8c823e5a | 67 | fSPDDataMaker = new AliITSQASPDDataMakerRec(this,fkOnline); |
68 | } | |
69 | if(fSubDetector == 0 || fSubDetector == 2) { | |
5379c4a3 | 70 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Create SDD DataMakerRec\n"); |
8c823e5a | 71 | fSDDDataMaker = new AliITSQASDDDataMakerRec(this,fkOnline); |
e41192d7 | 72 | if(fkOnline){SetHLTMode(fSDDDataMaker->GetHLTMode()); } |
8c823e5a | 73 | } |
74 | if(fSubDetector == 0 || fSubDetector == 3) { | |
5379c4a3 | 75 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Create SSD DataMakerRec\n"); |
8c823e5a | 76 | fSSDDataMaker = new AliITSQASSDDataMakerRec(this,fkOnline); |
77 | } | |
1aa7c4f5 | 78 | } |
79 | ||
04236e67 | 80 | //____________________________________________________________________________ |
8c823e5a | 81 | AliITSQADataMakerRec::~AliITSQADataMakerRec(){ |
82 | // destructor | |
83 | if(fSPDDataMaker)delete fSPDDataMaker; | |
84 | if(fSDDDataMaker)delete fSDDDataMaker; | |
85 | if(fSSDDataMaker)delete fSSDDataMaker; | |
04236e67 | 86 | } |
87 | ||
88 | //____________________________________________________________________________ | |
89 | AliITSQADataMakerRec::AliITSQADataMakerRec(const AliITSQADataMakerRec& qadm) : | |
8c823e5a | 90 | AliQADataMakerRec(), |
9db10425 | 91 | fkOnline(qadm.fkOnline), |
e41192d7 | 92 | fHLTMode(qadm.fHLTMode), |
8c823e5a | 93 | fSubDetector(qadm.fSubDetector), |
9db10425 | 94 | fLDC(qadm.fLDC), |
8c823e5a | 95 | fSPDDataMaker(NULL), |
96 | fSDDDataMaker(NULL), | |
97 | fSSDDataMaker(NULL) | |
04236e67 | 98 | { |
99 | //copy ctor | |
100 | SetName((const char*)qadm.GetName()) ; | |
8c823e5a | 101 | SetTitle((const char*)qadm.GetTitle()); |
04236e67 | 102 | } |
103 | ||
104 | //__________________________________________________________________ | |
105 | AliITSQADataMakerRec& AliITSQADataMakerRec::operator = (const AliITSQADataMakerRec& qac ) | |
106 | { | |
107 | // Equal operator. | |
108 | this->~AliITSQADataMakerRec(); | |
109 | new(this) AliITSQADataMakerRec(qac); | |
110 | return *this; | |
111 | } | |
112 | ||
113 | //____________________________________________________________________________ | |
8c823e5a | 114 | void AliITSQADataMakerRec::StartOfDetectorCycle() |
04236e67 | 115 | { |
116 | //Detector specific actions at start of cycle | |
5379c4a3 | 117 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of ITS Cycle\n"); |
8c823e5a | 118 | if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->StartOfDetectorCycle(); |
119 | if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->StartOfDetectorCycle(); | |
120 | if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->StartOfDetectorCycle(); | |
04236e67 | 121 | } |
122 | ||
123 | //____________________________________________________________________________ | |
4e25ac79 | 124 | void AliITSQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray** list) |
04236e67 | 125 | { |
126 | // launch the QA checking | |
57acd2d2 | 127 | |
128 | for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { | |
129 | SetEventSpecie(specie) ; | |
5379c4a3 | 130 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list[specie])\n"); |
57acd2d2 | 131 | if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list[specie]); |
132 | if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list[specie]); | |
133 | if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list[specie]); | |
04236e67 | 134 | |
8bb2fdfd | 135 | |
136 | AliQAChecker *qac = AliQAChecker::Instance(); | |
137 | AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0); | |
138 | Int_t subdet=GetSubDet(); | |
139 | qacb->SetSubDet(subdet); | |
614c7e17 | 140 | |
8bb2fdfd | 141 | if(subdet== 0 ){ |
142 | qacb->SetTaskOffset(fSPDDataMaker->GetOffset(task), fSDDDataMaker->GetOffset(task), fSSDDataMaker->GetOffset(task)); //Setting the offset for the QAChecker list | |
614c7e17 | 143 | } |
8bb2fdfd | 144 | else |
145 | if(subdet!=0){ | |
146 | Int_t offset=GetDetTaskOffset(subdet, task); | |
147 | qacb->SetDetTaskOffset(subdet,offset); | |
148 | } | |
614c7e17 | 149 | |
4e25ac79 | 150 | qac->Run( AliQAv1::kITS , task, list); |
8bb2fdfd | 151 | |
152 | } | |
04236e67 | 153 | } |
154 | ||
155 | //____________________________________________________________________________ | |
8c823e5a | 156 | void AliITSQADataMakerRec::EndOfDetectorCycle(const char * /*fgDataName*/) |
04236e67 | 157 | { |
8c823e5a | 158 | //eventually used for different AliQAChecker::Instance()->Run |
04236e67 | 159 | } |
160 | ||
161 | //____________________________________________________________________________ | |
162 | void AliITSQADataMakerRec::InitRaws() | |
1aa7c4f5 | 163 | { |
8c823e5a | 164 | // Initialization for RAW data |
165 | if(fSubDetector == 0 || fSubDetector == 1) { | |
5379c4a3 | 166 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitRaws\n"); |
8c823e5a | 167 | fSPDDataMaker->InitRaws(); |
1aa7c4f5 | 168 | } |
8c823e5a | 169 | if(fSubDetector == 0 || fSubDetector == 2) { |
5379c4a3 | 170 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SDD InitRaws\n"); |
8c823e5a | 171 | fSDDDataMaker->InitRaws(); |
04236e67 | 172 | } |
8c823e5a | 173 | if(fSubDetector == 0 || fSubDetector == 3) { |
5379c4a3 | 174 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SSD InitRaws\n"); |
8c823e5a | 175 | fSSDDataMaker->InitRaws(); |
04236e67 | 176 | } |
1aa7c4f5 | 177 | } |
178 | ||
04236e67 | 179 | //____________________________________________________________________________ |
180 | void AliITSQADataMakerRec::MakeRaws(AliRawReader* rawReader) | |
181 | { | |
8c823e5a | 182 | // Fill QA for RAW |
183 | if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeRaws(rawReader); | |
184 | if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeRaws(rawReader); | |
185 | if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRaws(rawReader); | |
1aa7c4f5 | 186 | } |
04236e67 | 187 | |
188 | //____________________________________________________________________________ | |
44ed7a66 | 189 | void AliITSQADataMakerRec::InitDigits() |
190 | { | |
191 | // Initialization for DIGITS | |
192 | if(fSubDetector == 0 || fSubDetector == 1) { | |
193 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitDigitss\n"); | |
194 | fSPDDataMaker->InitDigits(); | |
195 | } | |
196 | if(fSubDetector == 0 || fSubDetector == 2) { | |
197 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SDD InitDigits\n"); | |
198 | fSDDDataMaker->InitDigits(); | |
199 | } | |
200 | if(fSubDetector == 0 || fSubDetector == 3) { | |
201 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SSD InitDigits\n"); | |
202 | fSSDDataMaker->InitDigits(); | |
203 | } | |
204 | } | |
205 | ||
206 | //____________________________________________________________________________ | |
207 | void AliITSQADataMakerRec::MakeDigits(TTree * digitsTree) | |
208 | { | |
209 | // Fill QA for recpoints | |
210 | if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeDigits(digitsTree); | |
211 | if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeDigits(digitsTree); | |
212 | if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits(digitsTree); | |
213 | } | |
214 | ||
215 | //____________________________________________________________________________ | |
04236e67 | 216 | void AliITSQADataMakerRec::InitRecPoints() |
1aa7c4f5 | 217 | { |
218 | // Initialization for RECPOINTS | |
8c823e5a | 219 | if(fSubDetector == 0 || fSubDetector == 1) { |
5379c4a3 | 220 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SPD InitRecPoints\n"); |
8c823e5a | 221 | fSPDDataMaker->InitRecPoints(); |
04236e67 | 222 | } |
8c823e5a | 223 | if(fSubDetector == 0 || fSubDetector == 2) { |
5379c4a3 | 224 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SDD InitRecPoints\n"); |
8c823e5a | 225 | fSDDDataMaker->InitRecPoints(); |
1aa7c4f5 | 226 | } |
8c823e5a | 227 | if(fSubDetector == 0 || fSubDetector == 3) { |
5379c4a3 | 228 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM:: SSD InitRecPoints\n"); |
8c823e5a | 229 | fSSDDataMaker->InitRecPoints(); |
1aa7c4f5 | 230 | } |
1aa7c4f5 | 231 | } |
04236e67 | 232 | |
233 | //____________________________________________________________________________ | |
234 | void AliITSQADataMakerRec::MakeRecPoints(TTree * clustersTree) | |
1aa7c4f5 | 235 | { |
236 | // Fill QA for recpoints | |
8c823e5a | 237 | if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeRecPoints(clustersTree); |
238 | if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeRecPoints(clustersTree); | |
239 | if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeRecPoints(clustersTree); | |
04236e67 | 240 | } |
241 | ||
d7d87ceb | 242 | |
a90a332e | 243 | //____________________________________________________________________________ |
244 | void AliITSQADataMakerRec::InitESDs() | |
245 | { | |
246 | // Create ESDs histograms in ESDs subdir | |
247 | ||
585a6e79 | 248 | Bool_t expertHistogram = kTRUE; |
249 | ||
a90a332e | 250 | TH1F *hESDClustersMI = |
251 | new TH1F("hESDClustersMI", "N ITS clusters per track (MI); N clusters; Counts", | |
252 | 7, -0.5, 6.5); | |
253 | hESDClustersMI->Sumw2(); | |
254 | hESDClustersMI->SetMinimum(0); | |
255 | Add2ESDsList(hESDClustersMI, 0); | |
256 | ||
257 | TH1F *hESDClusterMapMI = | |
d7d87ceb | 258 | new TH1F("hESDClusterMapMI", "N tracks with point Layer (MI); Layer; N tracks", |
a90a332e | 259 | 6, -0.5, 5.5); |
260 | hESDClusterMapMI->Sumw2(); | |
261 | hESDClusterMapMI->SetMinimum(0); | |
585a6e79 | 262 | Add2ESDsList(hESDClusterMapMI, 1, expertHistogram); |
a90a332e | 263 | |
264 | TH1F *hESDClustersSA = | |
265 | new TH1F("hESDClustersSA", "N ITS clusters per track (SA); N clusters; Counts", | |
266 | 7, -0.5, 6.5); | |
267 | hESDClustersSA->Sumw2(); | |
268 | hESDClustersSA->SetMinimum(0); | |
269 | Add2ESDsList(hESDClustersSA, 2); | |
270 | ||
271 | TH1F *hESDClusterMapSA = | |
d7d87ceb | 272 | new TH1F("hESDClusterMapSA", "N tracks with point Layer (SA); Layer; N tracks", |
a90a332e | 273 | 6, -0.5, 5.5); |
274 | hESDClusterMapSA->Sumw2(); | |
275 | hESDClusterMapSA->SetMinimum(0); | |
585a6e79 | 276 | Add2ESDsList(hESDClusterMapSA, 3, expertHistogram); |
a90a332e | 277 | |
278 | TH1F *hSPDVertexX = | |
279 | new TH1F("hSPDVertexX","SPD Vertex x; x [cm]; N events", | |
280 | 10000,-2,2); | |
281 | hSPDVertexX->Sumw2(); | |
282 | Add2ESDsList(hSPDVertexX, 4); | |
283 | ||
284 | TH1F *hSPDVertexY = | |
285 | new TH1F("hSPDVertexY","SPD Vertex y; y [cm]; N events", | |
286 | 10000,-2,2); | |
287 | hSPDVertexY->Sumw2(); | |
288 | Add2ESDsList(hSPDVertexY, 5); | |
289 | ||
290 | TH1F *hSPDVertexZ = | |
d7d87ceb | 291 | new TH1F("hSPDVertexZ","SPD Vertex Z; z [cm]; N events", |
a90a332e | 292 | 10000,-20,20); |
293 | hSPDVertexZ->Sumw2(); | |
294 | Add2ESDsList(hSPDVertexZ, 6); | |
295 | ||
296 | TH1F *hSPDVertexContrOverMult = | |
297 | new TH1F("hSPDVertexContrOverMult","SPD Vertex: contributors / multiplicity; N contributors / SPD multiplicity; N events", | |
298 | 100,-4,20); | |
299 | hSPDVertexContrOverMult->Sumw2(); | |
585a6e79 | 300 | Add2ESDsList(hSPDVertexContrOverMult, 7, expertHistogram); |
a90a332e | 301 | |
302 | TH1F *hTrkVertexX = | |
303 | new TH1F("hTrkVertexX","ITS+TPC Trk Vertex x; x [cm]; N events", | |
304 | 10000,-2,2); | |
305 | hTrkVertexX->Sumw2(); | |
585a6e79 | 306 | Add2ESDsList(hTrkVertexX, 8, expertHistogram); |
a90a332e | 307 | |
308 | TH1F *hTrkVertexY = | |
309 | new TH1F("hTrkVertexY","ITS+TPC Trk Vertex y; y [cm]; N events", | |
310 | 10000,-2,2); | |
311 | hTrkVertexY->Sumw2(); | |
585a6e79 | 312 | Add2ESDsList(hTrkVertexY, 9, expertHistogram); |
a90a332e | 313 | |
314 | TH1F *hTrkVertexZ = | |
d7d87ceb | 315 | new TH1F("hTrkVertexZ","ITS+TPC Trk Vertex Z; z [cm]; N events", |
a90a332e | 316 | 10000,-20,20); |
317 | hTrkVertexZ->Sumw2(); | |
585a6e79 | 318 | Add2ESDsList(hTrkVertexZ, 10, expertHistogram); |
a90a332e | 319 | |
d7d87ceb | 320 | TH1F *hTrkVertexContrOverITSrefit5 = |
321 | new TH1F("hTrkVertexContrOverITSrefit5","ITS+TPC Trk Vertex: contributors / tracks; N contributors / N trks kITSrefit with 5 or 6 clusters; N events", | |
322 | 100,-4,2); | |
323 | hTrkVertexContrOverITSrefit5->Sumw2(); | |
585a6e79 | 324 | Add2ESDsList(hTrkVertexContrOverITSrefit5, 11, expertHistogram); |
a90a332e | 325 | |
326 | TH1F *hSPDTrkVertexDeltaX = | |
327 | new TH1F("hSPDTrkVertexDeltaX","Comparison of SPD and Trk vertices: x; xSPD-xTrk [cm]; N events", | |
328 | 1000,-1,1); | |
329 | hSPDTrkVertexDeltaX->Sumw2(); | |
585a6e79 | 330 | Add2ESDsList(hSPDTrkVertexDeltaX, 12, expertHistogram); |
a90a332e | 331 | |
332 | TH1F *hSPDTrkVertexDeltaY = | |
333 | new TH1F("hSPDTrkVertexDeltaY","Comparison of SPD and Trk vertices: y; ySPD-yTrk [cm]; N events", | |
334 | 1000,-1,1); | |
335 | hSPDTrkVertexDeltaY->Sumw2(); | |
585a6e79 | 336 | Add2ESDsList(hSPDTrkVertexDeltaY, 13, expertHistogram); |
a90a332e | 337 | |
338 | TH1F *hSPDTrkVertexDeltaZ = | |
339 | new TH1F("hSPDTrkVertexDeltaZ","Comparison of SPD and Trk vertices: z; zSPD-zTrk [cm]; N events", | |
340 | 1000,-1,1); | |
341 | hSPDTrkVertexDeltaZ->Sumw2(); | |
342 | Add2ESDsList(hSPDTrkVertexDeltaZ, 14); | |
343 | ||
a8100152 | 344 | // SPD Tracklets |
345 | ||
346 | TH1F* hSPDTracklets = | |
347 | new TH1F("hSPDTracklets","N SPD Tracklets; N tracklets; Counts",300,0.,300.); | |
348 | hSPDTracklets->Sumw2(); | |
349 | Add2ESDsList(hSPDTracklets, 15); | |
e23412ab | 350 | |
351 | TH2F* hSPDTrackletsvsFiredChips0 = | |
352 | new TH2F("hSPDTrackletsvsFiredChips0","N SPD Tracklets vs N FiredChips Layer0", | |
353 | 300,0.,300.,300,0.,300.); | |
354 | hSPDTrackletsvsFiredChips0->GetXaxis()->SetTitle("N SPD Tracklets"); | |
355 | hSPDTrackletsvsFiredChips0->GetYaxis()->SetTitle("N FiredChips Layer0"); | |
356 | hSPDTrackletsvsFiredChips0->Sumw2(); | |
357 | Add2ESDsList(hSPDTrackletsvsFiredChips0, 16, expertHistogram ); | |
358 | ||
359 | TH2F* hSPDTrackletsvsFiredChips1 = | |
360 | new TH2F("hSPDTrackletsvsFiredChips1","N SPD Tracklets vs N FiredChips Layer1", | |
361 | 300,0.,300.,300,0.,300.); | |
362 | hSPDTrackletsvsFiredChips1->GetXaxis()->SetTitle("N SPD Tracklets"); | |
363 | hSPDTrackletsvsFiredChips1->GetYaxis()->SetTitle("N FiredChips Layer1"); | |
364 | hSPDTrackletsvsFiredChips1->Sumw2(); | |
365 | Add2ESDsList(hSPDTrackletsvsFiredChips1, 17, expertHistogram); | |
a8100152 | 366 | |
367 | TH1F* hSPDTrackletsDePhi = | |
368 | new TH1F("hSPDTrackletsDePhi","DeltaPhi SPD Tracklets; DeltaPhi [rad]; N events",200,-0.2,0.2); | |
369 | hSPDTrackletsDePhi->Sumw2(); | |
e23412ab | 370 | Add2ESDsList(hSPDTrackletsDePhi, 18); |
a8100152 | 371 | |
372 | TH1F* hSPDTrackletsPhi = | |
373 | new TH1F("hSPDTrackletsPhi","Phi SPD Tracklets; Phi [rad]; N events",1000,0.,2*TMath::Pi()); | |
374 | hSPDTrackletsPhi->Sumw2(); | |
e23412ab | 375 | Add2ESDsList(hSPDTrackletsPhi, 19); |
a8100152 | 376 | |
377 | TH1F* hSPDTrackletsTheta = | |
378 | new TH1F("hSPDTrackletsTheta","Theta SPD Tracklets; Theta [rad]; N events",500,0.,TMath::Pi()); | |
379 | hSPDTrackletsTheta->Sumw2(); | |
e23412ab | 380 | Add2ESDsList(hSPDTrackletsTheta, 20); |
a8100152 | 381 | |
882ac7f1 | 382 | // map of layers skipped by tracking (set in AliITSRecoParam) |
383 | TH1F *hESDSkippedLayers = | |
384 | new TH1F("hESDSkippedLayers", "Map of layers skipped by tracking; Layer; Skipped", | |
385 | 6, -0.5, 5.5); | |
386 | hESDSkippedLayers->Sumw2(); | |
387 | hESDSkippedLayers->SetMinimum(0); | |
e23412ab | 388 | Add2ESDsList(hESDSkippedLayers, 21, expertHistogram); |
882ac7f1 | 389 | |
390 | ||
a90a332e | 391 | return; |
392 | } | |
393 | ||
394 | //____________________________________________________________________________ | |
395 | void AliITSQADataMakerRec::MakeESDs(AliESDEvent *esd) | |
396 | { | |
397 | // Make QA data from ESDs | |
398 | ||
399 | const Int_t nESDTracks = esd->GetNumberOfTracks(); | |
d7d87ceb | 400 | Int_t nITSrefit5 = 0; |
a90a332e | 401 | |
882ac7f1 | 402 | Int_t idet,status; |
403 | Float_t xloc,zloc; | |
404 | ||
a90a332e | 405 | // loop on tracks |
406 | for(Int_t i = 0; i < nESDTracks; i++) { | |
407 | ||
408 | AliESDtrack *track = esd->GetTrack(i); | |
409 | ||
410 | Int_t nclsITS = track->GetNcls(0); | |
411 | ||
83ab496a | 412 | Bool_t itsrefit=kFALSE,tpcin=kFALSE,itsin=kFALSE; |
a90a332e | 413 | if ((track->GetStatus() & AliESDtrack::kITSrefit)) itsrefit=kTRUE; |
414 | if ((track->GetStatus() & AliESDtrack::kTPCin)) tpcin=kTRUE; | |
83ab496a | 415 | if ((track->GetStatus() & AliESDtrack::kITSin)) itsin=kTRUE; |
d7d87ceb | 416 | if(nclsITS>=5 && itsrefit) nITSrefit5++; |
a90a332e | 417 | |
418 | if(tpcin) { | |
419 | GetESDsData(0)->Fill(nclsITS); | |
83ab496a | 420 | } |
421 | if(itsin && !tpcin){ | |
a90a332e | 422 | GetESDsData(2)->Fill(nclsITS); |
423 | } | |
424 | ||
425 | for(Int_t layer=0; layer<6; layer++) { | |
426 | ||
427 | if(TESTBIT(track->GetITSClusterMap(),layer)) { | |
428 | if(tpcin) { | |
429 | GetESDsData(1)->Fill(layer); | |
430 | } else { | |
431 | GetESDsData(3)->Fill(layer); | |
432 | } | |
433 | } | |
882ac7f1 | 434 | track->GetITSModuleIndexInfo(layer,idet,status,xloc,zloc); |
e23412ab | 435 | if(status==3) GetESDsData(21)->SetBinContent(layer,1); |
a90a332e | 436 | } |
437 | ||
438 | } // end loop on tracks | |
439 | ||
440 | // vertices | |
441 | const AliESDVertex *vtxSPD = esd->GetPrimaryVertexSPD(); | |
3884ccc9 | 442 | const AliESDVertex *vtxTrk = esd->GetPrimaryVertexTracks(); |
a90a332e | 443 | |
a90a332e | 444 | Int_t mult = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetNumberOfTracklets(); |
445 | if(mult>0) | |
446 | GetESDsData(7)->Fill((Float_t)(vtxSPD->GetNContributors())/(Float_t)mult); | |
447 | ||
d7d87ceb | 448 | if(nITSrefit5>0) |
449 | GetESDsData(11)->Fill((Float_t)(vtxTrk->GetNIndices())/(Float_t)nITSrefit5); | |
a90a332e | 450 | |
d7d87ceb | 451 | if(vtxSPD->GetNContributors()>0) { |
452 | GetESDsData(4)->Fill(vtxSPD->GetXv()); | |
453 | GetESDsData(5)->Fill(vtxSPD->GetYv()); | |
454 | GetESDsData(6)->Fill(vtxSPD->GetZv()); | |
455 | } | |
a90a332e | 456 | |
d7d87ceb | 457 | if(vtxTrk->GetNContributors()>0) { |
458 | GetESDsData(8)->Fill(vtxTrk->GetXv()); | |
459 | GetESDsData(9)->Fill(vtxTrk->GetYv()); | |
460 | GetESDsData(10)->Fill(vtxTrk->GetZv()); | |
461 | } | |
462 | ||
463 | if(vtxSPD->GetNContributors()>0 && | |
464 | vtxTrk->GetNContributors()>0) { | |
465 | GetESDsData(12)->Fill(vtxSPD->GetXv()-vtxTrk->GetXv()); | |
466 | GetESDsData(13)->Fill(vtxSPD->GetYv()-vtxTrk->GetYv()); | |
467 | GetESDsData(14)->Fill(vtxSPD->GetZv()-vtxTrk->GetZv()); | |
468 | } | |
a90a332e | 469 | |
a8100152 | 470 | // SPD Tracklets |
e23412ab | 471 | GetESDsData(15)->Fill(mult); |
472 | ||
473 | Short_t nFiredChips0 = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetNumberOfFiredChips(0); | |
474 | Short_t nFiredChips1 = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetNumberOfFiredChips(1); | |
475 | GetESDsData(16)->Fill(nFiredChips0,mult); | |
476 | GetESDsData(17)->Fill(nFiredChips1,mult); | |
a8100152 | 477 | |
478 | // Loop over tracklets | |
a8100152 | 479 | for (Int_t itr=0; itr<mult; ++itr) { |
480 | Float_t dePhiTr = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetDeltaPhi(itr); | |
481 | Float_t phiTr = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetPhi(itr); | |
482 | Float_t thetaTr = ((AliMultiplicity*)(esd->GetMultiplicity()))->GetTheta(itr); | |
e23412ab | 483 | GetESDsData(18)->Fill(dePhiTr); |
484 | GetESDsData(19)->Fill(phiTr); | |
485 | GetESDsData(20)->Fill(thetaTr); | |
a8100152 | 486 | } // end loop on tracklets |
487 | ||
a90a332e | 488 | return; |
489 | } | |
614c7e17 | 490 | |
491 | //_________________________________________________________________ | |
4e25ac79 | 492 | Int_t AliITSQADataMakerRec::GetDetTaskOffset(Int_t subdet,AliQAv1::TASKINDEX_t task) |
614c7e17 | 493 | { |
494 | switch(subdet) | |
495 | { | |
496 | ||
497 | Int_t offset; | |
498 | case 1: | |
499 | offset=fSPDDataMaker->GetOffset(task); | |
500 | return offset; | |
501 | break; | |
502 | case 2: | |
503 | offset=fSDDDataMaker->GetOffset(task); | |
504 | return offset; | |
505 | break; | |
506 | case 3: | |
507 | offset=fSSDDataMaker->GetOffset(task); | |
508 | return offset; | |
509 | break; | |
510 | default: | |
511 | AliWarning("No specific subdetector (SPD, SDD, SSD) selected!! Offset set to zero \n"); | |
512 | offset=0; | |
513 | return offset; | |
514 | break; | |
515 | } | |
516 | //return offset; | |
517 | } |