]>
Commit | Line | Data |
---|---|---|
8c823e5a | 1 | /**************************************************************************\r |
2 | * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *\r | |
3 | * *\r | |
4 | * Author: The ALICE Off-line Project. *\r | |
5 | * Contributors are mentioned in the code where appropriate. *\r | |
6 | * *\r | |
7 | * Permission to use, copy, modify and distribute this software and its *\r | |
8 | * documentation strictly for non-commercial purposes is hereby granted *\r | |
9 | * without fee, provided that the above copyright notice appears in all *\r | |
10 | * copies and that both the copyright notice and this permission notice *\r | |
11 | * appear in the supporting documentation. The authors make no claims *\r | |
12 | * about the suitability of this software for any purpose. It is *\r | |
13 | * provided "as is" without express or implied warranty. *\r | |
14 | **************************************************************************/\r | |
15 | \r | |
35b6918d | 16 | /* $Id$ */\r |
8c823e5a | 17 | \r |
18 | // *************************************************************\r | |
19 | // Checks the quality assurance \r | |
20 | // by comparing with reference data\r | |
21 | // contained in a DB\r | |
22 | // -------------------------------------------------------------\r | |
23 | // W. Ferrarese + P. Cerello Feb 2008\r | |
24 | // INFN Torino\r | |
25 | \r | |
26 | // --- ROOT system ---\r | |
2d1354e5 | 27 | #include <TProfile2D.h>\r |
8c823e5a | 28 | #include <TH2D.h>\r |
29 | #include <TBranch.h>\r | |
30 | #include <TTree.h>\r | |
31 | #include <TGaxis.h>\r | |
32 | #include <TMath.h>\r | |
33 | // --- Standard library ---\r | |
34 | \r | |
35 | // --- AliRoot header files ---\r | |
36 | #include "AliITSQASDDDataMakerRec.h"\r | |
37 | #include "AliLog.h"\r | |
38 | #include "AliQA.h"\r | |
39 | #include "AliQAChecker.h"\r | |
40 | #include "AliRawReader.h"\r | |
41 | #include "AliITSRawStreamSDD.h"\r | |
42 | #include "AliITSRecPoint.h"\r | |
43 | #include "AliITSgeomTGeo.h"\r | |
44 | \r | |
45 | #include "AliCDBManager.h"\r | |
46 | #include "AliCDBStorage.h"\r | |
47 | #include "AliCDBEntry.h"\r | |
48 | \r | |
49 | \r | |
50 | ClassImp(AliITSQASDDDataMakerRec)\r | |
51 | \r | |
52 | //____________________________________________________________________________ \r | |
53 | AliITSQASDDDataMakerRec::AliITSQASDDDataMakerRec(AliITSQADataMakerRec *aliITSQADataMakerRec, Bool_t kMode, Short_t ldc) :\r | |
54 | TObject(),\r | |
55 | fAliITSQADataMakerRec(aliITSQADataMakerRec),\r | |
56 | fkOnline(kMode),\r | |
57 | fLDC(ldc),\r | |
58 | fSDDhRaws(0),\r | |
59 | fSDDhRecs(0),\r | |
60 | fRawsOffset(0),\r | |
61 | fRecsOffset(0),\r | |
cab24fe6 | 62 | fDDLModuleMap(0)\r |
8c823e5a | 63 | {\r |
64 | //ctor used to discriminate OnLine-Offline analysis\r | |
65 | if(fLDC < 0 || fLDC > 4) {\r | |
66 | AliError("Error: LDC number out of range; return\n");\r | |
67 | }\r | |
8c823e5a | 68 | }\r |
69 | \r | |
70 | //____________________________________________________________________________ \r | |
71 | AliITSQASDDDataMakerRec::AliITSQASDDDataMakerRec(const AliITSQASDDDataMakerRec& qadm) :\r | |
72 | TObject(),\r | |
73 | fAliITSQADataMakerRec(qadm.fAliITSQADataMakerRec),\r | |
74 | fkOnline(qadm.fkOnline),\r | |
75 | fLDC(qadm.fLDC),\r | |
76 | fSDDhRaws(qadm.fSDDhRaws),\r | |
77 | fSDDhRecs(qadm.fSDDhRecs),\r | |
78 | fRawsOffset(qadm.fRawsOffset),\r | |
79 | fRecsOffset(qadm.fRecsOffset),\r | |
cab24fe6 | 80 | fDDLModuleMap(0)\r |
8c823e5a | 81 | {\r |
82 | //copy ctor \r | |
83 | fAliITSQADataMakerRec->SetName((const char*)qadm.fAliITSQADataMakerRec->GetName()) ; \r | |
84 | fAliITSQADataMakerRec->SetTitle((const char*)qadm.fAliITSQADataMakerRec->GetTitle());\r | |
85 | }\r | |
86 | \r | |
87 | //____________________________________________________________________________ \r | |
88 | AliITSQASDDDataMakerRec::~AliITSQASDDDataMakerRec(){\r | |
89 | // destructor\r | |
cab24fe6 | 90 | if(fDDLModuleMap) delete fDDLModuleMap;\r |
8c823e5a | 91 | }\r |
92 | //__________________________________________________________________\r | |
93 | AliITSQASDDDataMakerRec& AliITSQASDDDataMakerRec::operator = (const AliITSQASDDDataMakerRec& qac )\r | |
94 | {\r | |
95 | // Equal operator.\r | |
96 | this->~AliITSQASDDDataMakerRec();\r | |
97 | new(this) AliITSQASDDDataMakerRec(qac);\r | |
98 | return *this;\r | |
99 | }\r | |
100 | \r | |
101 | //____________________________________________________________________________ \r | |
102 | void AliITSQASDDDataMakerRec::StartOfDetectorCycle()\r | |
103 | {\r | |
104 | //Detector specific actions at start of cycle\r | |
105 | AliDebug(1,"AliITSQADM::Start of SDD Cycle\n");\r | |
106 | }\r | |
107 | \r | |
108 | //____________________________________________________________________________ \r | |
2d1354e5 | 109 | void AliITSQASDDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)\r |
8c823e5a | 110 | {\r |
111 | // launch the QA checking\r | |
112 | AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n"); \r | |
8c823e5a | 113 | }\r |
114 | \r | |
115 | //____________________________________________________________________________ \r | |
116 | void AliITSQASDDDataMakerRec::InitRaws()\r | |
117 | { \r | |
118 | // Initialization for RAW data - SDD -\r | |
119 | fRawsOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();\r | |
120 | \r | |
121 | AliCDBEntry *ddlMapSDD = AliCDBManager::Instance()->Get("ITS/Calib/DDLMapSDD");\r | |
122 | if( !ddlMapSDD){\r | |
cab24fe6 | 123 | AliError("Calibration object retrieval failed! SDD will not be processed");\r |
124 | fDDLModuleMap = NULL;\r | |
125 | return;\r | |
8c823e5a | 126 | } \r |
cab24fe6 | 127 | fDDLModuleMap = (AliITSDDLModuleMapSDD*)ddlMapSDD->GetObject();\r |
8c823e5a | 128 | ddlMapSDD->SetOwner(kTRUE);\r |
8c823e5a | 129 | \r |
130 | Int_t lay, lad, det;\r | |
131 | Int_t LAY = -1; //, LAD = -1;\r | |
132 | char hname0[50];\r | |
133 | Int_t indexlast = 0;\r | |
134 | Int_t index1 = 0;\r | |
135 | \r | |
136 | if(fLDC == 1 || fLDC == 2) LAY = 2;\r | |
137 | if(fLDC == 3 || fLDC == 4) LAY = 3;\r | |
138 | \r | |
139 | if(fkOnline) {\r | |
140 | AliInfo("Book Online Histograms for SDD\n");\r | |
141 | }\r | |
142 | else {\r | |
143 | AliInfo("Book Offline Histograms for SDD\n ");\r | |
144 | }\r | |
2d1354e5 | 145 | TH1D *h0 = new TH1D("ModPattern","HW Modules pattern",fgknSDDmodules,-0.5,259.5);\r |
8c823e5a | 146 | h0->GetXaxis()->SetTitle("Module Number");\r |
147 | h0->GetYaxis()->SetTitle("Counts");\r | |
2d1354e5 | 148 | fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h0)),0+fRawsOffset);\r |
149 | delete h0;\r | |
8c823e5a | 150 | fSDDhRaws++;\r |
151 | if(fLDC==0 || fLDC==1 || fLDC==2){\r | |
2d1354e5 | 152 | TH1D *h1 = new TH1D("LadPatternL3","Ladder pattern L3",14,0.5,14.5); \r |
8c823e5a | 153 | h1->GetXaxis()->SetTitle("Ladder Number on Lay3");\r |
154 | h1->GetYaxis()->SetTitle("Counts");\r | |
2d1354e5 | 155 | fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h1)),1+fRawsOffset);\r |
156 | delete h1;\r | |
8c823e5a | 157 | fSDDhRaws++;\r |
158 | } \r | |
159 | if(fLDC==0 || fLDC==3 || fLDC==4){\r | |
2d1354e5 | 160 | TH1D *h2 = new TH1D("LadPatternL4","Ladder pattern L4",22,0.5,22.5); \r |
8c823e5a | 161 | h2->GetXaxis()->SetTitle("Ladder Number on Lay4");\r |
162 | h2->GetYaxis()->SetTitle("Counts");\r | |
2d1354e5 | 163 | fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h2)),2+fRawsOffset);\r |
164 | delete h2;\r | |
8c823e5a | 165 | fSDDhRaws++;\r |
166 | }\r | |
167 | if(fLDC==0 || fLDC==1 || fLDC==2){\r | |
2d1354e5 | 168 | for(Int_t i=1; i<=fgkLADDonLAY3; i++) {\r |
8c823e5a | 169 | sprintf(hname0,"ModPattern_L3_%d",i);\r |
2d1354e5 | 170 | TH1D *h3 = new TH1D(hname0,hname0,6,0.5,6.5);\r |
171 | h3->GetXaxis()->SetTitle("Module Number");\r | |
172 | h3->GetYaxis()->SetTitle("Counts");\r | |
173 | fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h3)),i-1+3+fRawsOffset);\r | |
174 | delete h3;\r | |
8c823e5a | 175 | fSDDhRaws++;\r |
176 | }\r | |
177 | }\r | |
178 | if(fLDC==0 || fLDC==3 || fLDC==4){\r | |
8c823e5a | 179 | for(Int_t i=1; i<=fgkLADDonLAY4; i++) {\r |
180 | sprintf(hname0,"ModPattern_L4_%d",i);\r | |
2d1354e5 | 181 | TH1D *h4 = new TH1D(hname0,hname0,8,0.5,8.5);\r |
182 | h4->GetXaxis()->SetTitle("Module Number");\r | |
183 | h4->GetYaxis()->SetTitle("Counts");\r | |
184 | fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h4)),i-1+17+fRawsOffset);\r | |
185 | delete h4;\r | |
8c823e5a | 186 | fSDDhRaws++;\r |
187 | }\r | |
188 | }\r | |
189 | \r | |
190 | Int_t indexlast1 = 0;\r | |
191 | Int_t indexlast2 = 0;\r | |
192 | \r | |
193 | if(fkOnline) {\r | |
194 | indexlast = 0;\r | |
8c823e5a | 195 | index1 = 0;\r |
2d1354e5 | 196 | indexlast1 = fSDDhRaws;\r |
8c823e5a | 197 | indexlast2 = 0;\r |
8c823e5a | 198 | char *hname[3];\r |
199 | for(Int_t i=0; i<3; i++) hname[i]= new char[50];\r | |
200 | for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){\r | |
2d1354e5 | 201 | for(Int_t iside=0;iside<fgknSide;iside++){\r |
202 | AliITSgeomTGeo::GetModuleId(moduleSDD+fgkmodoffset, lay, lad, det);\r | |
203 | sprintf(hname[0],"chargeMapFSE_L%d_%d_%d_%d",lay,lad,det,iside);\r | |
204 | sprintf(hname[1],"ChargeMapForSingleEvent_L%d_%d_%d_%d",lay,lad,det,iside);\r | |
205 | sprintf(hname[2],"hmonoDMap_L%d_%d_%d_%d",lay,lad,det,iside);\r | |
206 | TProfile2D *fModuleChargeMapFSE = new TProfile2D(hname[0],hname[1],128,-0.5,255.5,256,-0.5,255.5);\r | |
207 | fModuleChargeMapFSE->GetXaxis()->SetTitle("Time Bin");\r | |
208 | fModuleChargeMapFSE->GetYaxis()->SetTitle("Anode");\r | |
209 | fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMapFSE)),indexlast1 + index1 + fRawsOffset);\r | |
210 | delete fModuleChargeMapFSE;\r | |
211 | \r | |
212 | fSDDhRaws++;\r | |
213 | index1++; \r | |
214 | indexlast2 = indexlast1 + index1;\r | |
215 | }\r | |
216 | }\r | |
8c823e5a | 217 | \r |
2d1354e5 | 218 | for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){\r |
219 | for(Int_t iside=0;iside<fgknSide;iside++){\r | |
220 | AliITSgeomTGeo::GetModuleId(moduleSDD+fgkmodoffset, lay, lad, det);\r | |
221 | sprintf(hname[0],"chargeMap_L%d_%d_%d_%d",lay,lad,det,iside);\r | |
222 | sprintf(hname[1],"ChargeMap_L%d_%d_%d_%d",lay,lad,det,iside);\r | |
223 | TProfile2D *fModuleChargeMap = new TProfile2D(hname[0],hname[1],128,-0.5,255.5,256,-0.5,255.5);\r | |
224 | fModuleChargeMap->GetXaxis()->SetTitle("Time Bin");\r | |
225 | fModuleChargeMap->GetYaxis()->SetTitle("Anode");\r | |
226 | fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMap)),indexlast1 + index1 + fRawsOffset);\r | |
227 | delete fModuleChargeMap;\r | |
228 | \r | |
229 | fSDDhRaws++;\r | |
230 | index1++; \r | |
231 | indexlast2 = indexlast1 + index1;\r | |
232 | }\r | |
233 | }\r | |
234 | \r | |
8c823e5a | 235 | } // kONLINE\r |
236 | \r | |
237 | \r | |
238 | AliDebug(1,Form("%d SDD Raws histograms booked\n",fSDDhRaws));\r | |
239 | }\r | |
240 | \r | |
241 | \r | |
242 | //____________________________________________________________________________\r | |
243 | void AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)\r | |
244 | { \r | |
245 | // Fill QA for RAW - SDD -\r | |
cab24fe6 | 246 | if(!fDDLModuleMap){\r |
247 | AliError("SDD DDL module map not available - skipping SDD QA");\r | |
248 | return;\r | |
249 | }\r | |
8c823e5a | 250 | if(rawReader->GetType() != 7) return; // skips non physical triggers\r |
251 | AliDebug(1,"entering MakeRaws\n"); \r | |
252 | rawReader->SelectEquipment(17,fgkeqOffset,fgkeqOffset + fgkDDLidRange); \r | |
253 | \r | |
254 | /*\r | |
255 | if(rawReader->GetEventId()!=fEvtId){\r | |
256 | TFile *DAoutput = new TFile::Open(filename);\r | |
257 | TH1F *BLhisto;\r | |
258 | for(Int_t imod=0; imod<nSDDmodules; imod++){ \r | |
259 | BLhisto = (TH1F*)DAoutput->Get("BLhistoname[imod]");\r | |
260 | mean = BLhisto->take mean;\r | |
261 | fAliITSQADataMakerRec->GetRawsData(i+1887)->Fill(mean, imod);\r | |
262 | Noisehisto....;\r | |
263 | Vdrifthisto...;\r | |
264 | <Q>histo....;\r | |
265 | }\r | |
266 | }\r | |
267 | fEvtId==rawReader->GetEventId();\r | |
268 | */\r | |
269 | \r | |
270 | rawReader->Reset(); \r | |
271 | AliITSRawStreamSDD s(rawReader); \r | |
cab24fe6 | 272 | s.SetDDLModuleMap(fDDLModuleMap);\r |
8c823e5a | 273 | Int_t lay, lad, det; \r |
274 | \r | |
275 | Int_t index=0;\r | |
276 | if(fkOnline) {\r | |
277 | for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){\r | |
8c823e5a | 278 | for(Int_t iside=0;iside<fgknSide;iside++) {\r |
2d1354e5 | 279 | if(fSDDhRaws > 39 + index) fAliITSQADataMakerRec->GetRawsData(39 + index +fRawsOffset)->Reset();\r |
8c823e5a | 280 | index++;\r |
281 | }\r | |
8c823e5a | 282 | }\r |
283 | }\r | |
284 | Int_t cnt = 0;\r | |
285 | Int_t ildcID = -1;\r | |
286 | Int_t iddl = -1;\r | |
287 | Int_t isddmod = -1;\r | |
2d1354e5 | 288 | Int_t coord1, coord2, signal, moduleSDD, ioffset, iorder, activeModule, index1;\r |
8c823e5a | 289 | while(s.Next()) {\r |
290 | ildcID = rawReader->GetLDCId();\r | |
291 | iddl = rawReader->GetDDLID() - fgkDDLIDshift;\r | |
292 | isddmod = s.GetModuleNumber(iddl,s.GetCarlosId());\r | |
293 | if(isddmod==-1){\r | |
294 | AliDebug(1,Form("Found module with iddl: %d, s.GetCarlosId: %d \n",iddl,s.GetCarlosId() ));\r | |
295 | continue;\r | |
296 | }\r | |
297 | if(s.IsCompletedModule()) {\r | |
298 | AliDebug(1,Form("IsCompletedModule == KTRUE\n"));\r | |
299 | continue;\r | |
300 | } \r | |
301 | \r | |
302 | coord1 = s.GetCoord1();\r | |
303 | coord2 = s.GetCoord2();\r | |
304 | signal = s.GetSignal();\r | |
305 | \r | |
306 | moduleSDD = isddmod - fgkmodoffset;\r | |
307 | if(moduleSDD < 0 || moduleSDD>fgknSDDmodules) {\r | |
308 | AliDebug(1,Form( "Module SDD = %d, resetting it to 1 \n",moduleSDD));\r | |
309 | moduleSDD = 1;\r | |
310 | }\r | |
311 | fAliITSQADataMakerRec->GetRawsData(0 +fRawsOffset)->Fill(moduleSDD); \r | |
312 | \r | |
313 | AliITSgeomTGeo::GetModuleId(isddmod, lay, lad, det);\r | |
314 | ioffset = 3;\r | |
315 | iorder = 1;\r | |
316 | if(lay==4) { \r | |
317 | ioffset += 14;\r | |
318 | iorder = 2; \r | |
319 | } \r | |
320 | fAliITSQADataMakerRec->GetRawsData(iorder +fRawsOffset)->Fill(lad);\r | |
321 | fAliITSQADataMakerRec->GetRawsData(ioffset+lad-1 +fRawsOffset)->Fill(det); //-1 because ladder# starts from 1 \r | |
322 | \r | |
323 | Short_t iside = s.GetChannel();\r | |
324 | activeModule = moduleSDD;\r | |
8c823e5a | 325 | index1 = activeModule * 2 + iside;\r |
326 | \r | |
327 | if(index1<0){\r | |
328 | AliDebug(1,Form("Wrong index number %d - patched to 0\n",index1));\r | |
329 | index1 = 0;\r | |
330 | }\r | |
331 | \r | |
332 | if(fkOnline) {\r | |
2d1354e5 | 333 | if(fSDDhRaws > 39 + index1) {\r |
334 | ((TProfile2D *)(fAliITSQADataMakerRec->GetRawsData(39 + index1 +fRawsOffset)))->Fill(coord2, coord1, signal);\r | |
335 | ((TProfile2D *)(fAliITSQADataMakerRec->GetRawsData(39 + index1 + 260*2 +fRawsOffset)))->Fill(coord2, coord1, signal);\r | |
8c823e5a | 336 | }\r |
337 | }\r | |
338 | cnt++;\r | |
339 | if(!(cnt%10000)) AliDebug(1,Form(" %d raw digits read",cnt));\r | |
340 | }\r | |
341 | AliDebug(1,Form("Event completed, %d raw digits read",cnt)); \r | |
342 | \r | |
8c823e5a | 343 | }\r |
344 | \r | |
345 | //____________________________________________________________________________ \r | |
346 | void AliITSQASDDDataMakerRec::InitRecPoints()\r | |
347 | {\r | |
348 | // Initialization for RECPOINTS - SDD -\r | |
349 | fRecsOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();\r | |
350 | \r | |
2d1354e5 | 351 | TH1F *h0 = new TH1F("Lay3TotCh","Layer 3 total charge",1000,-0.5, 499.5);\r |
8c823e5a | 352 | h0->GetXaxis()->SetTitle("ADC value");\r |
353 | h0->GetYaxis()->SetTitle("Entries");\r | |
2d1354e5 | 354 | fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h0)), 0 +fRecsOffset);\r |
355 | delete h0;\r | |
8c823e5a | 356 | fSDDhRecs++;\r |
357 | \r | |
2d1354e5 | 358 | TH1F *h1 = new TH1F("Lay4TotCh","Layer 4 total charge",1000,-0.5, 499.5);\r |
8c823e5a | 359 | h1->GetXaxis()->SetTitle("ADC value");\r |
360 | h1->GetYaxis()->SetTitle("Entries");\r | |
2d1354e5 | 361 | fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h1)), 1 +fRecsOffset);\r |
362 | delete h1;\r | |
8c823e5a | 363 | fSDDhRecs++;\r |
364 | \r | |
365 | \r | |
366 | char hisnam[50];\r | |
8c823e5a | 367 | for(Int_t i=1; i<=3; i++){\r |
368 | sprintf(hisnam,"Charge_L3_Strip%d",i);\r | |
2d1354e5 | 369 | TH1F *h2 = new TH1F(hisnam,hisnam,1000,-0.5, 499.5);\r |
370 | fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h2)),i+1 +fRecsOffset);\r | |
371 | delete h2;\r | |
8c823e5a | 372 | fSDDhRecs++;\r |
373 | }\r | |
374 | \r | |
8c823e5a | 375 | for(Int_t i=1; i<=4; i++){\r |
376 | sprintf(hisnam,"Charge_L4_Strip%d",i);\r | |
2d1354e5 | 377 | TH1F *h3 = new TH1F(hisnam,hisnam,1000,-0.5, 499.5);\r |
378 | fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h3)),i+4 +fRecsOffset);\r | |
379 | delete h3;\r | |
8c823e5a | 380 | fSDDhRecs++;\r |
381 | }\r | |
382 | \r | |
383 | TH1F *h4 = new TH1F("ModPatternRP","Modules pattern RP",fgknSDDmodules,239.5,499.5); \r | |
384 | h4->GetXaxis()->SetTitle("Module number");\r | |
385 | h4->GetYaxis()->SetTitle("Entries");\r | |
2d1354e5 | 386 | fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h4)),9 +fRecsOffset);\r |
387 | delete h4;\r | |
8c823e5a | 388 | fSDDhRecs++;\r |
389 | TH1F *h5 = new TH1F("ModPatternL3 RP","Ladder pattern L3 RP",14,0.5,14.5); \r | |
390 | h5->GetXaxis()->SetTitle("Ladder #, Layer 3");\r | |
391 | h5->GetYaxis()->SetTitle("Entries");\r | |
2d1354e5 | 392 | fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h5)),10 +fRecsOffset);\r |
393 | delete h5;\r | |
8c823e5a | 394 | fSDDhRecs++;\r |
395 | TH1F *h6 = new TH1F("ModPatternL4 RP","Ladder pattern L4 RP",22,0.5,22.5); \r | |
396 | h6->GetXaxis()->SetTitle("Ladder #, Layer 4");\r | |
397 | h6->GetYaxis()->SetTitle("Entries");\r | |
2d1354e5 | 398 | fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h6)),11 +fRecsOffset);\r |
399 | delete h6;\r | |
8c823e5a | 400 | fSDDhRecs++;\r |
401 | TH2F *h7 = new TH2F("Local Coord Distrib","Local Coord Distrib",1000,-4,4,1000,-4,4);\r | |
402 | h7->GetXaxis()->SetTitle("X local coord, drift, cm");\r | |
403 | h7->GetYaxis()->SetTitle("Z local coord, anode, cm");\r | |
2d1354e5 | 404 | fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h7)),12 +fRecsOffset);\r |
405 | delete h7;\r | |
8c823e5a | 406 | fSDDhRecs++;\r |
407 | TH2F *h8 = new TH2F("Global Coord Distrib","Global Coord Distrib",6000,-30,30,6000,-30,30);\r | |
408 | h8->GetYaxis()->SetTitle("Y glob coord, cm");\r | |
409 | h8->GetXaxis()->SetTitle("X glob coord, cm");\r | |
2d1354e5 | 410 | fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h8)),13 +fRecsOffset);\r |
411 | delete h8;\r | |
8c823e5a | 412 | fSDDhRecs++;\r |
2d1354e5 | 413 | \r |
8c823e5a | 414 | for(Int_t iLay=0; iLay<=1; iLay++){\r |
415 | sprintf(hisnam,"hr_Layer%d",iLay+3);\r | |
2d1354e5 | 416 | TH1F *h9 = new TH1F(hisnam,hisnam,100,10.,30.);\r |
417 | h9->GetXaxis()->SetTitle("r (cm)");\r | |
418 | h9->GetXaxis()->CenterTitle();\r | |
419 | h9->GetYaxis()->SetTitle("Entries");\r | |
420 | fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h9)),iLay+14 +fRecsOffset);\r | |
421 | delete h9;\r | |
8c823e5a | 422 | fSDDhRecs++;\r |
423 | }\r | |
2d1354e5 | 424 | \r |
8c823e5a | 425 | for(Int_t iLay=0; iLay<=1; iLay++){\r |
426 | sprintf(hisnam,"hphi_Layer%d",iLay+3);\r | |
2d1354e5 | 427 | TH1F *h10 = new TH1F(hisnam,hisnam,100,-TMath::Pi(),TMath::Pi());\r |
428 | h10->GetXaxis()->SetTitle("#varphi (rad)");\r | |
429 | h10->GetXaxis()->CenterTitle();\r | |
430 | h10->GetYaxis()->SetTitle("Entries");\r | |
431 | fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h10)),iLay+16 +fRecsOffset);\r | |
432 | delete h10;\r | |
8c823e5a | 433 | fSDDhRecs++;\r |
434 | }\r | |
435 | \r | |
436 | AliDebug(1,Form("%d SDD Recs histograms booked\n",fSDDhRecs));\r | |
437 | }\r | |
438 | \r | |
439 | //____________________________________________________________________________ \r | |
440 | void AliITSQASDDDataMakerRec::MakeRecPoints(TTree * clustersTree)\r | |
441 | {\r | |
442 | // Fill QA for RecPoints - SDD -\r | |
443 | Int_t lay, lad, det; \r | |
444 | TBranch *branchRecP = clustersTree->GetBranch("ITSRecPoints");\r | |
445 | if (!branchRecP) { \r | |
446 | AliError("can't get the branch with the ITS clusters !");\r | |
447 | return;\r | |
448 | }\r | |
449 | TClonesArray * recpoints = new TClonesArray("AliITSRecPoint") ;\r | |
450 | branchRecP->SetAddress(&recpoints);\r | |
451 | Int_t npoints = 0; \r | |
452 | Float_t cluglo[3]={0.,0.,0.}; \r | |
453 | for(Int_t module=0; module<clustersTree->GetEntries();module++){\r | |
454 | branchRecP->GetEvent(module);\r | |
455 | npoints += recpoints->GetEntries();\r | |
456 | AliITSgeomTGeo::GetModuleId(module, lay, lad, det);\r | |
457 | //printf("modnumb %d, lay %d, lad %d, det %d \n",module, lay, lad, det);\r | |
458 | \r | |
459 | for(Int_t j=0;j<recpoints->GetEntries();j++){\r | |
460 | AliITSRecPoint *recp = (AliITSRecPoint*)recpoints->At(j); \r | |
461 | fAliITSQADataMakerRec->GetRecPointsData(9 +fRecsOffset)->Fill(module);\r | |
462 | recp->GetGlobalXYZ(cluglo);\r | |
463 | Float_t rad=TMath::Sqrt(cluglo[0]*cluglo[0]+cluglo[1]*cluglo[1]); \r | |
464 | Float_t phi=TMath::ATan2(cluglo[1],cluglo[0]);\r | |
465 | if(recp->GetLayer() ==2) {\r | |
466 | fAliITSQADataMakerRec->GetRecPointsData(0 +fRecsOffset)->Fill(recp->GetQ()) ;\r | |
467 | fAliITSQADataMakerRec->GetRecPointsData(10 +fRecsOffset)->Fill(lad);\r | |
468 | fAliITSQADataMakerRec->GetRecPointsData(14 +fRecsOffset)->Fill(rad);\r | |
469 | fAliITSQADataMakerRec->GetRecPointsData(16 +fRecsOffset)->Fill(phi);\r | |
470 | fAliITSQADataMakerRec->GetRecPointsData(9 +fRecsOffset)->Fill(module);\r | |
471 | fAliITSQADataMakerRec->GetRecPointsData(12 +fRecsOffset)->Fill(recp->GetDetLocalX(),recp->GetDetLocalZ());\r | |
472 | fAliITSQADataMakerRec->GetRecPointsData(13 +fRecsOffset)->Fill(cluglo[0],cluglo[1]);\r | |
473 | }\r | |
474 | else if(recp->GetLayer() ==3) {\r | |
475 | fAliITSQADataMakerRec->GetRecPointsData(1 +fRecsOffset)->Fill(recp->GetQ()) ;\r | |
476 | fAliITSQADataMakerRec->GetRecPointsData(11 +fRecsOffset)->Fill(lad);\r | |
477 | fAliITSQADataMakerRec->GetRecPointsData(15 +fRecsOffset)->Fill(rad);\r | |
478 | fAliITSQADataMakerRec->GetRecPointsData(17 +fRecsOffset)->Fill(phi);\r | |
479 | fAliITSQADataMakerRec->GetRecPointsData(9 +fRecsOffset)->Fill(module);\r | |
480 | fAliITSQADataMakerRec->GetRecPointsData(12 +fRecsOffset)->Fill(recp->GetDetLocalX(),recp->GetDetLocalZ());\r | |
481 | fAliITSQADataMakerRec->GetRecPointsData(13 +fRecsOffset)->Fill(cluglo[0],cluglo[1]);\r | |
482 | }\r | |
483 | }\r | |
484 | }\r | |
485 | recpoints->Delete();\r | |
486 | delete recpoints;\r | |
487 | \r | |
488 | }\r | |
489 | \r |