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