]>
Commit | Line | Data |
---|---|---|
096292ae | 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 | /* $Id:$ */ | |
16 | // ************************************************************* | |
17 | // Checks the quality assurance | |
18 | // by comparing with reference data | |
19 | // contained in a DB | |
20 | // ------------------------------------------------------------- | |
21 | // W. Ferrarese + P. Cerello Feb 2008 | |
22 | // INFN Torino | |
23 | // M. Nicassio D. Elia INFN Bari March 2008 | |
24 | // maria.nicassio@ba.infn.it | |
25 | ||
26 | ||
27 | // --- ROOT system --- | |
28 | #include <TTree.h> | |
29 | #include <TH1.h> | |
30 | #include <TH2.h> | |
31 | #include <TMath.h> | |
32 | // --- Standard library --- | |
33 | ||
34 | // --- AliRoot header files --- | |
35 | #include "AliITSQADataMakerRec.h" | |
36 | #include "AliITSQASPDDataMakerRec.h" | |
37 | #include "AliLog.h" | |
38 | #include "AliQA.h" | |
39 | #include "AliRawReader.h" | |
379510c2 | 40 | #include "AliITSRawStreamSPD.h" |
41 | #include "AliITSRawStreamSPDErrorLog.h" | |
096292ae | 42 | #include "AliITSRecPoint.h" |
379510c2 | 43 | |
096292ae | 44 | ClassImp(AliITSQASPDDataMakerRec) |
45 | ||
46 | //____________________________________________________________________________ | |
379510c2 | 47 | AliITSQASPDDataMakerRec::AliITSQASPDDataMakerRec(AliITSQADataMakerRec *aliITSQADataMakerRec, Bool_t kMode, Short_t ldc, AliITSRawStreamSPDErrorLog *aliITSRawStreamSPDErrorLog) : |
096292ae | 48 | TObject(), |
49 | fAliITSQADataMakerRec(aliITSQADataMakerRec), | |
50 | fkOnline(kMode), | |
51 | fLDC(ldc), | |
52 | fSPDhRaws(0), | |
53 | fSPDhRecs(0), | |
54 | fRawsOffset(0), | |
379510c2 | 55 | fRecsOffset(0), |
56 | fAdvLogger(aliITSRawStreamSPDErrorLog) | |
096292ae | 57 | { |
58 | //ctor used to discriminate OnLine-Offline analysis | |
59 | } | |
60 | ||
61 | //____________________________________________________________________________ | |
62 | AliITSQASPDDataMakerRec::AliITSQASPDDataMakerRec(const AliITSQASPDDataMakerRec& qadm) : | |
63 | TObject(), | |
64 | fAliITSQADataMakerRec(qadm.fAliITSQADataMakerRec), | |
65 | fkOnline(qadm.fkOnline), | |
66 | fLDC(qadm.fLDC), | |
67 | fSPDhRaws(qadm.fSPDhRaws), | |
68 | fSPDhRecs(qadm.fSPDhRecs), | |
69 | fRawsOffset(qadm.fRawsOffset), | |
379510c2 | 70 | fRecsOffset(qadm.fRecsOffset), |
71 | fAdvLogger(qadm.fAdvLogger) | |
096292ae | 72 | { |
73 | //copy ctor | |
74 | fAliITSQADataMakerRec->SetName((const char*)qadm.fAliITSQADataMakerRec->GetName()) ; | |
75 | fAliITSQADataMakerRec->SetTitle((const char*)qadm.fAliITSQADataMakerRec->GetTitle()); | |
76 | } | |
77 | ||
78 | //__________________________________________________________________ | |
79 | AliITSQASPDDataMakerRec::~AliITSQASPDDataMakerRec(){ | |
80 | // destructor | |
379510c2 | 81 | // delete fAdvLogger; |
096292ae | 82 | } |
83 | //__________________________________________________________________ | |
84 | ||
85 | AliITSQASPDDataMakerRec& AliITSQASPDDataMakerRec::operator = (const AliITSQASPDDataMakerRec& qac ) | |
86 | { | |
87 | // Equal operator. | |
88 | this->~AliITSQASPDDataMakerRec(); | |
89 | new(this) AliITSQASPDDataMakerRec(qac); | |
90 | return *this; | |
91 | } | |
92 | ||
93 | //____________________________________________________________________________ | |
94 | void AliITSQASPDDataMakerRec::StartOfDetectorCycle() | |
95 | { | |
96 | //Detector specific actions at start of cycle | |
97 | AliDebug(1,"AliITSQADM::Start of SPD Cycle\n"); | |
98 | } | |
99 | ||
100 | //____________________________________________________________________________ | |
101 | void AliITSQASPDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TObjArray* /*list*/) | |
102 | { | |
103 | // launch the QA checking | |
104 | AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n"); | |
105 | ||
106 | //AliQAChecker::Instance()->Run( AliQA::kITS , task, list); | |
107 | } | |
108 | ||
109 | //____________________________________________________________________________ | |
110 | void AliITSQASPDDataMakerRec::InitRaws() | |
111 | { | |
112 | // Initialization for RAW data - SPD - | |
113 | fRawsOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries(); | |
114 | ||
379510c2 | 115 | Char_t name[50]; |
116 | Char_t title[50]; | |
096292ae | 117 | |
379510c2 | 118 | TH1F *hlayer = new TH1F("LayPattern_SPD","Layer map - SPD",6,0.,6.); |
119 | hlayer->GetXaxis()->SetTitle("Layer number"); | |
120 | hlayer->GetYaxis()->SetTitle("Entries"); | |
121 | fAliITSQADataMakerRec->Add2RawsList(hlayer,fSPDhRaws+fRawsOffset); | |
122 | fSPDhRaws++; | |
123 | ||
124 | TH1F **hmod = new TH1F*[2]; | |
125 | TH2F **hhitMap = new TH2F*[20]; | |
126 | TH1F **herrors = new TH1F*[20]; | |
127 | for (Int_t iLay=0; iLay<2; iLay++) { | |
128 | sprintf(name,"ModPattern_SPD%d",iLay+1); | |
129 | sprintf(title,"Module map - SPD Layer %d",iLay+1); | |
130 | hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules); | |
131 | hmod[iLay]->GetXaxis()->SetTitle("Module number"); | |
132 | hmod[iLay]->GetYaxis()->SetTitle("Entries"); | |
133 | fAliITSQADataMakerRec->Add2RawsList(hmod[iLay], fSPDhRaws +fRawsOffset); | |
134 | fSPDhRaws++; | |
135 | } | |
136 | fAdvLogger = new AliITSRawStreamSPDErrorLog(); | |
137 | for (Int_t iDDL=0; iDDL<20; iDDL++) { | |
138 | sprintf(name,"HitMap_SPD_DDL%d",iDDL+1); | |
139 | sprintf(title,"Hit map - SPD DDL %d",iDDL+1); | |
140 | hhitMap[iDDL]=new TH2F(name,title,320,0,10*32,1536,0,6*256); | |
141 | hhitMap[iDDL]->GetXaxis()->SetTitle("Column"); | |
142 | hhitMap[iDDL]->GetYaxis()->SetTitle("Row"); | |
143 | fAliITSQADataMakerRec->Add2RawsList(hhitMap[iDDL], fSPDhRaws +fRawsOffset); | |
144 | fSPDhRaws++; | |
145 | sprintf(name,"Errors_SPD_DDL%d",iDDL+1); | |
146 | sprintf(title,"Error codes - SPD DDL %d",iDDL+1); | |
147 | herrors[iDDL] = new TH1F (name,title,15,0,15); | |
148 | herrors[iDDL]->SetXTitle("Error Code"); | |
149 | herrors[iDDL]->SetYTitle("Nr of errors"); | |
150 | fAliITSQADataMakerRec->Add2RawsList(herrors[iDDL], fSPDhRaws +fRawsOffset); | |
151 | fSPDhRaws++; | |
152 | } | |
096292ae | 153 | |
379510c2 | 154 | TH1F** hMultSPDhits = new TH1F*[2]; |
155 | for (Int_t iLay=0; iLay<2; iLay++) { | |
156 | sprintf(name,"HitsMultiplicity_SPD%d",iLay+1); | |
157 | sprintf(title,"Hit multiplicity - SPD Layer %d",iLay+1); | |
158 | hMultSPDhits[iLay]=new TH1F(name,title,200,0.,200.); | |
159 | hMultSPDhits[iLay]->GetXaxis()->SetTitle("Hit multiplicity"); | |
160 | hMultSPDhits[iLay]->GetYaxis()->SetTitle("Entries"); | |
161 | fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits[iLay], fSPDhRaws+fRawsOffset); | |
162 | fSPDhRaws++; | |
163 | } | |
164 | ||
165 | TH2F *hMultSPDhits2MultSPDhits1 = new TH2F("HitMultCorrelation_SPD","Hit multiplicity correlation - SPD",200,0.,200.,200,0.,200.); | |
166 | hMultSPDhits2MultSPDhits1->GetXaxis()->SetTitle("Hit multiplicity (Layer 1)"); | |
167 | hMultSPDhits2MultSPDhits1->GetYaxis()->SetTitle("Hit multiplicity (Layer 2)"); | |
168 | fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits2MultSPDhits1, fSPDhRaws+fRawsOffset); | |
169 | fSPDhRaws++; | |
170 | ||
096292ae | 171 | AliDebug(1,Form("%d SPD Raws histograms booked\n",fSPDhRaws)); |
172 | ||
173 | } | |
174 | ||
175 | ||
176 | //____________________________________________________________________________ | |
379510c2 | 177 | void AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader) |
096292ae | 178 | { |
179 | // Fill QA for RAW - SPD - | |
379510c2 | 180 | rawReader->Reset(); |
181 | AliITSRawStreamSPD *rawStreamSPD = new AliITSRawStreamSPD(rawReader); | |
182 | rawStreamSPD->ActivateAdvancedErrorLog(kTRUE,fAdvLogger); | |
183 | ||
184 | Int_t nDigitsL1 = 0; | |
185 | Int_t nDigitsL2 = 0; | |
186 | Int_t iEq; | |
187 | Int_t iLayer; | |
188 | Int_t iHalfStave, iChip; | |
189 | Int_t col, row; | |
190 | UInt_t module, colM, rowM; | |
191 | while(rawStreamSPD->Next()) { | |
192 | ||
193 | iEq = rawReader->GetDDLID(); | |
194 | if (iEq>=0 && iEq<20) { | |
195 | iHalfStave = rawStreamSPD->GetHalfStaveNr(); | |
196 | iChip = rawStreamSPD->GetChipAddr(); | |
197 | col = rawStreamSPD->GetChipCol(); | |
198 | row = rawStreamSPD->GetChipRow(); | |
199 | ||
200 | rawStreamSPD->OnlineToOffline(iEq, iHalfStave, iChip, col, row, module, colM, rowM); | |
201 | ||
202 | if (iHalfStave>=0 && iHalfStave<2) iLayer=0; | |
203 | else iLayer=1; | |
204 | ||
205 | fAliITSQADataMakerRec->GetRawsData(0+fRawsOffset)->Fill(iLayer); | |
206 | if (iLayer==0) { | |
207 | fAliITSQADataMakerRec->GetRawsData(1+fRawsOffset)->Fill(module); | |
208 | nDigitsL1++; | |
209 | } else { | |
210 | fAliITSQADataMakerRec->GetRawsData(2+fRawsOffset)->Fill(module); | |
211 | nDigitsL2++; | |
212 | } | |
213 | ||
214 | fAliITSQADataMakerRec->GetRawsData((2*iEq)+3+fRawsOffset)->Fill(colM+(module%2)*160,rowM+iHalfStave*256); | |
215 | } | |
216 | ||
217 | } | |
218 | for (Int_t ieq=0; ieq<20; ieq++) | |
219 | for (Int_t ierr=0; ierr<fAdvLogger->GetNrErrorCodes(); ierr++) | |
220 | fAliITSQADataMakerRec->GetRawsData((2*ieq)+4+fRawsOffset)->Fill(ierr,fAdvLogger->GetNrErrors(ierr,ieq)); | |
221 | ||
222 | fAdvLogger->Reset(); | |
223 | ||
224 | fAliITSQADataMakerRec->GetRawsData(43+fRawsOffset)->Fill(nDigitsL1); | |
225 | fAliITSQADataMakerRec->GetRawsData(44+fRawsOffset)->Fill(nDigitsL2); | |
226 | fAliITSQADataMakerRec->GetRawsData(45+fRawsOffset)->Fill(nDigitsL1,nDigitsL2); | |
227 | ||
228 | delete rawStreamSPD; | |
229 | AliDebug(1,Form("Event completed, %d raw digits read",nDigitsL1+nDigitsL2)); | |
096292ae | 230 | } |
231 | ||
232 | //____________________________________________________________________________ | |
233 | void AliITSQASPDDataMakerRec::InitRecPoints() | |
234 | { | |
235 | // Initialization for RECPOINTS - SPD - | |
236 | fRecsOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries(); | |
237 | ||
238 | ||
239 | TH1F* hlayer= new TH1F("LayPattern_SPD","Layer map - SPD",6,0.,6.); | |
240 | hlayer->GetXaxis()->SetTitle("Layer number"); | |
241 | hlayer->GetYaxis()->SetTitle("Entries"); | |
242 | fAliITSQADataMakerRec->Add2RecPointsList(hlayer, fSPDhRecs+fRecsOffset); | |
243 | fSPDhRecs++; | |
244 | ||
245 | TH1F** hmod = new TH1F*[2]; | |
246 | TH1F** hxl = new TH1F*[2]; | |
247 | TH1F** hzl = new TH1F*[2]; | |
248 | TH1F** hxg = new TH1F*[2]; | |
249 | TH1F** hyg = new TH1F*[2]; | |
250 | TH1F** hzg = new TH1F*[2]; | |
251 | TH1F** hr = new TH1F*[2]; | |
252 | TH1F** hphi = new TH1F*[2]; | |
253 | TH1F** hMultSPDcl = new TH1F*[2]; | |
254 | TH2F** hNyNz = new TH2F*[2]; // y and z cluster length | |
255 | TH2F** hPhiZ = new TH2F*[2]; | |
256 | ||
257 | Float_t xlim[2]={4.5,8.}; | |
258 | Float_t zlim[2]={15.,15.}; | |
259 | ||
260 | Char_t name[50]; | |
261 | Char_t title[50]; | |
262 | for (Int_t iLay=0;iLay<2;iLay++) { | |
263 | sprintf(name,"ModPattern_SPD%d",iLay+1); | |
264 | sprintf(title,"Module map - SPD Layer %d",iLay+1); | |
265 | hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules); | |
266 | hmod[iLay]->GetXaxis()->SetTitle("Module number"); | |
267 | hmod[iLay]->GetYaxis()->SetTitle("Entries"); | |
268 | fAliITSQADataMakerRec->Add2RecPointsList(hmod[iLay], fSPDhRecs +fRecsOffset); | |
269 | fSPDhRecs++; | |
270 | ||
271 | sprintf(name,"xLoc_SPD%d",iLay+1); | |
272 | sprintf(title,"Local x coordinate - SPD Layer %d",iLay+1); | |
273 | hxl[iLay]=new TH1F(name,title,100,-4.,4.); | |
274 | hxl[iLay]->GetXaxis()->SetTitle("Local x [cm]"); | |
275 | hxl[iLay]->GetYaxis()->SetTitle("Entries"); | |
276 | fAliITSQADataMakerRec->Add2RecPointsList(hxl[iLay], fSPDhRecs +fRecsOffset); | |
277 | fSPDhRecs++; | |
278 | ||
279 | sprintf(name,"zLoc_SPD%d",iLay+1); | |
280 | sprintf(title,"Local z coordinate - SPD Layer %d",iLay+1); | |
281 | hzl[iLay]=new TH1F(name,title,100,-4.,4.); | |
282 | hzl[iLay]->GetXaxis()->SetTitle("Local z [cm]"); | |
283 | hzl[iLay]->GetYaxis()->SetTitle("Entries"); | |
284 | fAliITSQADataMakerRec->Add2RecPointsList(hzl[iLay], fSPDhRecs+fRecsOffset); | |
285 | fSPDhRecs++; | |
286 | ||
287 | sprintf(name,"xGlob_SPD%d",iLay+1); | |
288 | sprintf(title,"Global x coordinate - SPD Layer %d",iLay+1); | |
289 | hxg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]); | |
290 | hxg[iLay]->GetXaxis()->SetTitle("Global x [cm]"); | |
291 | hxg[iLay]->GetYaxis()->SetTitle("Entries"); | |
292 | fAliITSQADataMakerRec->Add2RecPointsList(hxg[iLay],fSPDhRecs+fRecsOffset); | |
293 | fSPDhRecs++; | |
294 | ||
295 | sprintf(name,"yGlob_SPD%d",iLay+1); | |
296 | sprintf(title,"Global y coordinate - SPD Layer %d",iLay+1); | |
297 | hyg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]); | |
298 | hyg[iLay]->GetXaxis()->SetTitle("Global y [cm]"); | |
299 | hyg[iLay]->GetYaxis()->SetTitle("Entries"); | |
300 | fAliITSQADataMakerRec->Add2RecPointsList(hyg[iLay], fSPDhRecs+fRecsOffset); | |
301 | fSPDhRecs++; | |
302 | ||
303 | sprintf(name,"zGlob_SPD%d",iLay+1); | |
304 | sprintf(title,"Global z coordinate - SPD Layer %d",iLay+1); | |
305 | hzg[iLay]=new TH1F(name,title,150,-zlim[iLay],zlim[iLay]); | |
306 | hzg[iLay]->GetXaxis()->SetTitle("Global z [cm]"); | |
307 | hzg[iLay]->GetYaxis()->SetTitle("Entries"); | |
308 | fAliITSQADataMakerRec->Add2RecPointsList(hzg[iLay], fSPDhRecs+fRecsOffset); | |
309 | fSPDhRecs++; | |
310 | ||
311 | sprintf(name,"r_SPD%d",iLay+1); | |
312 | sprintf(title,"Radius - SPD Layer %d",iLay+1); | |
313 | hr[iLay]=new TH1F(name,title,100,0.,10.); | |
314 | hr[iLay]->GetXaxis()->SetTitle("r [cm]"); | |
315 | hr[iLay]->GetYaxis()->SetTitle("Entries"); | |
316 | fAliITSQADataMakerRec->Add2RecPointsList(hr[iLay], fSPDhRecs+fRecsOffset); | |
317 | fSPDhRecs++; | |
318 | ||
319 | sprintf(name,"phi_SPD%d",iLay+1); | |
320 | sprintf(title,"#varphi - SPD Layer %d",iLay+1); | |
321 | hphi[iLay]=new TH1F(name,title,600,0.,2*TMath::Pi()); | |
322 | hphi[iLay]->GetXaxis()->SetTitle("#varphi [rad]"); | |
323 | hphi[iLay]->GetYaxis()->SetTitle("Entries"); | |
324 | fAliITSQADataMakerRec->Add2RecPointsList(hphi[iLay], fSPDhRecs+fRecsOffset); | |
325 | fSPDhRecs++; | |
326 | ||
327 | sprintf(name,"SizeYvsZ_SPD%d",iLay+1); | |
328 | sprintf(title,"Cluster dimension - SPD Layer %d",iLay+1); | |
329 | hNyNz[iLay]=new TH2F(name,title,100,0.,100.,100,0.,100.); | |
330 | hNyNz[iLay]->GetXaxis()->SetTitle("z length"); | |
331 | hNyNz[iLay]->GetYaxis()->SetTitle("y length"); | |
332 | fAliITSQADataMakerRec->Add2RecPointsList(hNyNz[iLay], fSPDhRecs+fRecsOffset); | |
333 | fSPDhRecs++; | |
334 | ||
335 | sprintf(name,"phi_z_SPD%d",iLay+1); | |
336 | sprintf(title,"#varphi vs z - SPD Layer %d",iLay+1); | |
337 | hPhiZ[iLay]=new TH2F(name,title,150,-zlim[iLay],zlim[iLay],100,0.,2*TMath::Pi()); | |
338 | hPhiZ[iLay]->GetXaxis()->SetTitle("Global z [cm]"); | |
339 | hPhiZ[iLay]->GetYaxis()->SetTitle("#varphi [rad]"); | |
340 | fAliITSQADataMakerRec->Add2RecPointsList(hPhiZ[iLay], fSPDhRecs+fRecsOffset); | |
341 | fSPDhRecs++; | |
342 | ||
343 | } | |
344 | ||
345 | TH2F *hrPhi=new TH2F("r_phi_SPD","#varphi vs r - SPD",100,0.,10.,100,0.,2*TMath::Pi()); | |
346 | hrPhi->GetXaxis()->SetTitle("r [cm]"); | |
347 | hrPhi->GetYaxis()->SetTitle("#varphi [rad]"); | |
348 | fAliITSQADataMakerRec->Add2RecPointsList(hrPhi, fSPDhRecs+fRecsOffset); | |
349 | fSPDhRecs++; | |
350 | ||
351 | TH2F *hxy=new TH2F("x_y_SPD","Global y vs x - SPD",200,-10.,10.,200,-10.,10.); | |
352 | hxy->GetXaxis()->SetTitle("Global x [cm]"); | |
353 | hxy->GetYaxis()->SetTitle("Global y [cm]"); | |
354 | fAliITSQADataMakerRec->Add2RecPointsList(hxy, fSPDhRecs+fRecsOffset); | |
355 | fSPDhRecs++; | |
356 | ||
357 | for (Int_t iLay=0;iLay<2;iLay++) { | |
358 | sprintf(name,"Multiplicity_SPD%d",iLay+1); | |
359 | sprintf(title,"Cluster multiplicity - SPD Layer %d",iLay+1); | |
360 | hMultSPDcl[iLay]=new TH1F(name,title,200,0.,200.); | |
361 | hMultSPDcl[iLay]->GetXaxis()->SetTitle("Cluster multiplicity"); | |
362 | hMultSPDcl[iLay]->GetYaxis()->SetTitle("Entries"); | |
363 | fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl[iLay], fSPDhRecs+fRecsOffset); | |
364 | fSPDhRecs++; | |
365 | } | |
366 | ||
367 | TH2F *hMultSPDcl2MultSPDcl1 = | |
368 | new TH2F("MultCorrelation_SPD","Cluster multiplicity correlation - SPD",200,0.,200.,200,0.,200.); | |
369 | hMultSPDcl2MultSPDcl1->GetXaxis()->SetTitle("Clusters multiplicity (Layer 1)"); | |
370 | hMultSPDcl2MultSPDcl1->GetYaxis()->SetTitle("Clusters multiplicity (Layer 2)"); | |
371 | fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl2MultSPDcl1, fSPDhRecs+fRecsOffset); | |
372 | fSPDhRecs++; | |
373 | ||
374 | AliDebug(1,Form("%d SPD Recs histograms booked\n",fSPDhRecs)); | |
375 | ||
376 | } | |
377 | ||
378 | //____________________________________________________________________________ | |
379 | void AliITSQASPDDataMakerRec::MakeRecPoints(TTree * clusterTree) | |
380 | { | |
381 | // Fill QA for RecPoints - SPD - | |
382 | TClonesArray* itsClusters = new TClonesArray("AliITSRecPoint"); | |
383 | TBranch* itsClusterBranch=clusterTree->GetBranch("ITSRecPoints"); | |
384 | if (!itsClusterBranch) { | |
385 | AliError("can't get the branch with the ITS clusters !"); | |
386 | return; | |
387 | } | |
388 | itsClusterBranch->SetAddress(&itsClusters); | |
389 | Int_t nItsMods = (Int_t)clusterTree->GetEntries(); | |
390 | ||
391 | Float_t cluGlo[3] = {0.,0.,0.}; | |
392 | Int_t nClusters[2] = {0,0}; | |
393 | ||
394 | for (Int_t iIts=0; iIts < nItsMods; iIts++) { | |
395 | ||
396 | if (!clusterTree->GetEvent(iIts)) continue; | |
397 | Int_t nCluster = itsClusters->GetEntriesFast(); | |
398 | // loop over clusters | |
399 | while(nCluster--) { | |
400 | AliITSRecPoint* cluster = (AliITSRecPoint*)itsClusters->UncheckedAt(nCluster); | |
401 | ||
402 | if (cluster->GetLayer()>1) continue; | |
403 | Int_t lay=cluster->GetLayer(); | |
404 | fAliITSQADataMakerRec->GetRecPointsData(0 +fRecsOffset)->Fill(lay); | |
405 | cluster->GetGlobalXYZ(cluGlo); | |
406 | Float_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]); | |
407 | Float_t phi= TMath::Pi() + TMath::ATan2(-cluGlo[1],-cluGlo[0]); | |
408 | if (lay==0) { | |
409 | fAliITSQADataMakerRec->GetRecPointsData(1 +fRecsOffset)->Fill(iIts); | |
410 | fAliITSQADataMakerRec->GetRecPointsData(2 +fRecsOffset)->Fill(cluster->GetDetLocalX()); | |
411 | fAliITSQADataMakerRec->GetRecPointsData(3 +fRecsOffset)->Fill(cluster->GetDetLocalZ()); | |
412 | fAliITSQADataMakerRec->GetRecPointsData(4 +fRecsOffset)->Fill(cluGlo[0]); | |
413 | fAliITSQADataMakerRec->GetRecPointsData(5 +fRecsOffset)->Fill(cluGlo[1]); | |
414 | fAliITSQADataMakerRec->GetRecPointsData(6 +fRecsOffset)->Fill(cluGlo[2]); | |
415 | fAliITSQADataMakerRec->GetRecPointsData(7 +fRecsOffset)->Fill(rad); | |
416 | fAliITSQADataMakerRec->GetRecPointsData(8 +fRecsOffset)->Fill(phi); | |
417 | fAliITSQADataMakerRec->GetRecPointsData(9 +fRecsOffset)->Fill(cluster->GetNz(),cluster->GetNy()); | |
418 | fAliITSQADataMakerRec->GetRecPointsData(10 +fRecsOffset)->Fill(cluGlo[2],phi); | |
419 | } else { | |
420 | fAliITSQADataMakerRec->GetRecPointsData(11 +fRecsOffset)->Fill(iIts); | |
421 | fAliITSQADataMakerRec->GetRecPointsData(12 +fRecsOffset)->Fill(cluster->GetDetLocalX()); | |
422 | fAliITSQADataMakerRec->GetRecPointsData(13 +fRecsOffset)->Fill(cluster->GetDetLocalZ()); | |
423 | fAliITSQADataMakerRec->GetRecPointsData(14 +fRecsOffset)->Fill(cluGlo[0]); | |
424 | fAliITSQADataMakerRec->GetRecPointsData(15 +fRecsOffset)->Fill(cluGlo[1]); | |
425 | fAliITSQADataMakerRec->GetRecPointsData(16 +fRecsOffset)->Fill(cluGlo[2]); | |
426 | fAliITSQADataMakerRec->GetRecPointsData(17 +fRecsOffset)->Fill(rad); | |
427 | fAliITSQADataMakerRec->GetRecPointsData(18 +fRecsOffset)->Fill(phi); | |
428 | fAliITSQADataMakerRec->GetRecPointsData(19 +fRecsOffset)->Fill(cluster->GetNz(),cluster->GetNy()); | |
429 | fAliITSQADataMakerRec->GetRecPointsData(20 +fRecsOffset)->Fill(cluGlo[2],phi); | |
430 | } | |
431 | fAliITSQADataMakerRec->GetRecPointsData(21 +fRecsOffset)->Fill(rad,phi); | |
432 | fAliITSQADataMakerRec->GetRecPointsData(22 +fRecsOffset)->Fill(cluGlo[0],cluGlo[1]); | |
433 | ||
434 | nClusters[lay]++; | |
435 | } // end of cluster loop | |
436 | } // end of its "subdetector" loop | |
437 | ||
438 | for (Int_t iLay=0; iLay<2; iLay++) | |
439 | fAliITSQADataMakerRec->GetRecPointsData(23+iLay +fRecsOffset)->Fill(nClusters[iLay]); | |
440 | ||
441 | fAliITSQADataMakerRec->GetRecPointsData(25 +fRecsOffset)->Fill(nClusters[0],nClusters[1]); | |
442 | ||
443 | if (itsClusters) { | |
444 | itsClusters->Delete(); | |
445 | delete itsClusters; | |
446 | itsClusters = 0; | |
447 | } | |
448 | ||
449 | } |