]>
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 | **************************************************************************/ | |
3f905799 | 15 | /* $Id$ */ |
096292ae | 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), | |
7a0e5776 | 52 | fSPDhRawsTask(0), |
53 | fSPDhRecPointsTask(0), | |
54 | fGenRawsOffset(0), | |
55 | fGenRecPointsOffset(0), | |
379510c2 | 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), | |
7a0e5776 | 67 | fSPDhRawsTask(qadm.fSPDhRawsTask), |
68 | fSPDhRecPointsTask(qadm.fSPDhRecPointsTask), | |
69 | fGenRawsOffset(qadm.fGenRawsOffset), | |
70 | fGenRecPointsOffset(qadm.fGenRecPointsOffset), | |
379510c2 | 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 - | |
57acd2d2 | 113 | fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries(); |
439e7a8a | 114 | AliInfo("Book Offline Histograms for SPD\n "); |
115 | ||
379510c2 | 116 | Char_t name[50]; |
117 | Char_t title[50]; | |
096292ae | 118 | |
26ee9565 | 119 | TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.); |
379510c2 | 120 | hlayer->GetXaxis()->SetTitle("Layer number"); |
121 | hlayer->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 122 | fAliITSQADataMakerRec->Add2RawsList(hlayer, 0+fGenRawsOffset, kTRUE); |
123 | fSPDhRawsTask++; | |
379510c2 | 124 | |
125 | TH1F **hmod = new TH1F*[2]; | |
126 | TH2F **hhitMap = new TH2F*[20]; | |
127 | TH1F **herrors = new TH1F*[20]; | |
128 | for (Int_t iLay=0; iLay<2; iLay++) { | |
26ee9565 | 129 | sprintf(name,"SPDModPattern_SPD%d",iLay+1); |
379510c2 | 130 | sprintf(title,"Module map - SPD Layer %d",iLay+1); |
131 | hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules); | |
132 | hmod[iLay]->GetXaxis()->SetTitle("Module number"); | |
133 | hmod[iLay]->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 134 | fAliITSQADataMakerRec->Add2RawsList(hmod[iLay], 1+iLay+fGenRawsOffset); |
135 | fSPDhRawsTask++; | |
379510c2 | 136 | } |
137 | fAdvLogger = new AliITSRawStreamSPDErrorLog(); | |
138 | for (Int_t iDDL=0; iDDL<20; iDDL++) { | |
26ee9565 | 139 | sprintf(name,"SPDHitMap_SPD_DDL%d",iDDL+1); |
379510c2 | 140 | sprintf(title,"Hit map - SPD DDL %d",iDDL+1); |
141 | hhitMap[iDDL]=new TH2F(name,title,320,0,10*32,1536,0,6*256); | |
142 | hhitMap[iDDL]->GetXaxis()->SetTitle("Column"); | |
143 | hhitMap[iDDL]->GetYaxis()->SetTitle("Row"); | |
7a0e5776 | 144 | fAliITSQADataMakerRec->Add2RawsList(hhitMap[iDDL], 3+(2*iDDL)+fGenRawsOffset, kTRUE); |
145 | fSPDhRawsTask++; | |
26ee9565 | 146 | sprintf(name,"SPDErrors_SPD_DDL%d",iDDL+1); |
379510c2 | 147 | sprintf(title,"Error codes - SPD DDL %d",iDDL+1); |
148 | herrors[iDDL] = new TH1F (name,title,15,0,15); | |
149 | herrors[iDDL]->SetXTitle("Error Code"); | |
150 | herrors[iDDL]->SetYTitle("Nr of errors"); | |
7a0e5776 | 151 | fAliITSQADataMakerRec->Add2RawsList(herrors[iDDL], 4+(2*iDDL)+fGenRawsOffset, kTRUE); |
152 | fSPDhRawsTask++; | |
379510c2 | 153 | } |
096292ae | 154 | |
379510c2 | 155 | TH1F** hMultSPDhits = new TH1F*[2]; |
156 | for (Int_t iLay=0; iLay<2; iLay++) { | |
26ee9565 | 157 | sprintf(name,"SPDHitsMultiplicity_SPD%d",iLay+1); |
379510c2 | 158 | sprintf(title,"Hit multiplicity - SPD Layer %d",iLay+1); |
159 | hMultSPDhits[iLay]=new TH1F(name,title,200,0.,200.); | |
160 | hMultSPDhits[iLay]->GetXaxis()->SetTitle("Hit multiplicity"); | |
161 | hMultSPDhits[iLay]->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 162 | fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits[iLay], 43+iLay+fGenRawsOffset, kTRUE); |
163 | fSPDhRawsTask++; | |
379510c2 | 164 | } |
165 | ||
954ef57a | 166 | TH2F *hMultSPDhits2MultSPDhits1 |
26ee9565 | 167 | = new TH2F("SPDHitMultCorrelation_SPD","Hit multiplicity correlation - SPD",200,0.,200.,200,0.,200.); |
379510c2 | 168 | hMultSPDhits2MultSPDhits1->GetXaxis()->SetTitle("Hit multiplicity (Layer 1)"); |
169 | hMultSPDhits2MultSPDhits1->GetYaxis()->SetTitle("Hit multiplicity (Layer 2)"); | |
7a0e5776 | 170 | fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits2MultSPDhits1, 45+fGenRawsOffset); |
171 | fSPDhRawsTask++; | |
379510c2 | 172 | |
7a0e5776 | 173 | AliDebug(1,Form("%d SPD Raws histograms booked\n",fSPDhRawsTask)); |
096292ae | 174 | } |
175 | ||
176 | ||
177 | //____________________________________________________________________________ | |
379510c2 | 178 | void AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader) |
096292ae | 179 | { |
180 | // Fill QA for RAW - SPD - | |
379510c2 | 181 | rawReader->Reset(); |
182 | AliITSRawStreamSPD *rawStreamSPD = new AliITSRawStreamSPD(rawReader); | |
183 | rawStreamSPD->ActivateAdvancedErrorLog(kTRUE,fAdvLogger); | |
184 | ||
185 | Int_t nDigitsL1 = 0; | |
186 | Int_t nDigitsL2 = 0; | |
187 | Int_t iEq; | |
188 | Int_t iLayer; | |
189 | Int_t iHalfStave, iChip; | |
190 | Int_t col, row; | |
191 | UInt_t module, colM, rowM; | |
192 | while(rawStreamSPD->Next()) { | |
193 | ||
194 | iEq = rawReader->GetDDLID(); | |
195 | if (iEq>=0 && iEq<20) { | |
196 | iHalfStave = rawStreamSPD->GetHalfStaveNr(); | |
197 | iChip = rawStreamSPD->GetChipAddr(); | |
198 | col = rawStreamSPD->GetChipCol(); | |
199 | row = rawStreamSPD->GetChipRow(); | |
200 | ||
201 | rawStreamSPD->OnlineToOffline(iEq, iHalfStave, iChip, col, row, module, colM, rowM); | |
202 | ||
203 | if (iHalfStave>=0 && iHalfStave<2) iLayer=0; | |
204 | else iLayer=1; | |
205 | ||
7a0e5776 | 206 | fAliITSQADataMakerRec->GetRawsData(0+fGenRawsOffset)->Fill(iLayer); |
379510c2 | 207 | if (iLayer==0) { |
7a0e5776 | 208 | fAliITSQADataMakerRec->GetRawsData(1+fGenRawsOffset)->Fill(module); |
379510c2 | 209 | nDigitsL1++; |
210 | } else { | |
7a0e5776 | 211 | fAliITSQADataMakerRec->GetRawsData(2+fGenRawsOffset)->Fill(module); |
379510c2 | 212 | nDigitsL2++; |
213 | } | |
214 | ||
7a0e5776 | 215 | fAliITSQADataMakerRec->GetRawsData((2*iEq)+3+fGenRawsOffset)->Fill(colM+(module%2)*160,rowM+iHalfStave*256); |
379510c2 | 216 | } |
217 | ||
218 | } | |
219 | for (Int_t ieq=0; ieq<20; ieq++) | |
c71529b0 | 220 | for (UInt_t ierr=0; ierr<fAdvLogger->GetNrErrorCodes(); ierr++) |
7a0e5776 | 221 | fAliITSQADataMakerRec->GetRawsData((2*ieq)+4+fGenRawsOffset)->Fill(ierr,fAdvLogger->GetNrErrors(ierr,ieq)); |
379510c2 | 222 | |
223 | fAdvLogger->Reset(); | |
224 | ||
7a0e5776 | 225 | fAliITSQADataMakerRec->GetRawsData(43+fGenRawsOffset)->Fill(nDigitsL1); |
226 | fAliITSQADataMakerRec->GetRawsData(44+fGenRawsOffset)->Fill(nDigitsL2); | |
227 | fAliITSQADataMakerRec->GetRawsData(45+fGenRawsOffset)->Fill(nDigitsL1,nDigitsL2); | |
379510c2 | 228 | |
229 | delete rawStreamSPD; | |
230 | AliDebug(1,Form("Event completed, %d raw digits read",nDigitsL1+nDigitsL2)); | |
096292ae | 231 | } |
232 | ||
233 | //____________________________________________________________________________ | |
234 | void AliITSQASPDDataMakerRec::InitRecPoints() | |
235 | { | |
236 | // Initialization for RECPOINTS - SPD - | |
57acd2d2 | 237 | fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries(); |
26ee9565 | 238 | TH1F* hlayer= new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.); |
096292ae | 239 | hlayer->GetXaxis()->SetTitle("Layer number"); |
240 | hlayer->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 241 | fAliITSQADataMakerRec->Add2RecPointsList(hlayer, 0+fGenRecPointsOffset, kTRUE); |
242 | fSPDhRecPointsTask++; | |
096292ae | 243 | |
244 | TH1F** hmod = new TH1F*[2]; | |
245 | TH1F** hxl = new TH1F*[2]; | |
246 | TH1F** hzl = new TH1F*[2]; | |
247 | TH1F** hxg = new TH1F*[2]; | |
248 | TH1F** hyg = new TH1F*[2]; | |
249 | TH1F** hzg = new TH1F*[2]; | |
250 | TH1F** hr = new TH1F*[2]; | |
251 | TH1F** hphi = new TH1F*[2]; | |
252 | TH1F** hMultSPDcl = new TH1F*[2]; | |
253 | TH2F** hNyNz = new TH2F*[2]; // y and z cluster length | |
254 | TH2F** hPhiZ = new TH2F*[2]; | |
255 | ||
256 | Float_t xlim[2]={4.5,8.}; | |
257 | Float_t zlim[2]={15.,15.}; | |
258 | ||
259 | Char_t name[50]; | |
260 | Char_t title[50]; | |
261 | for (Int_t iLay=0;iLay<2;iLay++) { | |
26ee9565 | 262 | sprintf(name,"SPDModPattern_SPD%d",iLay+1); |
096292ae | 263 | sprintf(title,"Module map - SPD Layer %d",iLay+1); |
264 | hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules); | |
265 | hmod[iLay]->GetXaxis()->SetTitle("Module number"); | |
266 | hmod[iLay]->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 267 | fAliITSQADataMakerRec->Add2RecPointsList(hmod[iLay], 1+(10*iLay)+fGenRecPointsOffset, kTRUE); |
268 | fSPDhRecPointsTask++; | |
096292ae | 269 | |
26ee9565 | 270 | sprintf(name,"SPDxLoc_SPD%d",iLay+1); |
096292ae | 271 | sprintf(title,"Local x coordinate - SPD Layer %d",iLay+1); |
272 | hxl[iLay]=new TH1F(name,title,100,-4.,4.); | |
273 | hxl[iLay]->GetXaxis()->SetTitle("Local x [cm]"); | |
274 | hxl[iLay]->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 275 | fAliITSQADataMakerRec->Add2RecPointsList(hxl[iLay], 2+(10*iLay)+fGenRecPointsOffset, kTRUE); |
276 | fSPDhRecPointsTask++; | |
096292ae | 277 | |
26ee9565 | 278 | sprintf(name,"SPDzLoc_SPD%d",iLay+1); |
096292ae | 279 | sprintf(title,"Local z coordinate - SPD Layer %d",iLay+1); |
280 | hzl[iLay]=new TH1F(name,title,100,-4.,4.); | |
281 | hzl[iLay]->GetXaxis()->SetTitle("Local z [cm]"); | |
282 | hzl[iLay]->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 283 | fAliITSQADataMakerRec->Add2RecPointsList(hzl[iLay], 3+(10*iLay)+fGenRecPointsOffset, kTRUE); |
284 | fSPDhRecPointsTask++; | |
096292ae | 285 | |
26ee9565 | 286 | sprintf(name,"SPDxGlob_SPD%d",iLay+1); |
096292ae | 287 | sprintf(title,"Global x coordinate - SPD Layer %d",iLay+1); |
288 | hxg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]); | |
289 | hxg[iLay]->GetXaxis()->SetTitle("Global x [cm]"); | |
290 | hxg[iLay]->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 291 | fAliITSQADataMakerRec->Add2RecPointsList(hxg[iLay],4+(10*iLay)+fGenRecPointsOffset, kTRUE); |
292 | fSPDhRecPointsTask++; | |
096292ae | 293 | |
26ee9565 | 294 | sprintf(name,"SPDyGlob_SPD%d",iLay+1); |
096292ae | 295 | sprintf(title,"Global y coordinate - SPD Layer %d",iLay+1); |
296 | hyg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]); | |
297 | hyg[iLay]->GetXaxis()->SetTitle("Global y [cm]"); | |
298 | hyg[iLay]->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 299 | fAliITSQADataMakerRec->Add2RecPointsList(hyg[iLay], 5+(10*iLay)+fGenRecPointsOffset, kTRUE); |
300 | fSPDhRecPointsTask++; | |
096292ae | 301 | |
26ee9565 | 302 | sprintf(name,"SPDzGlob_SPD%d",iLay+1); |
096292ae | 303 | sprintf(title,"Global z coordinate - SPD Layer %d",iLay+1); |
304 | hzg[iLay]=new TH1F(name,title,150,-zlim[iLay],zlim[iLay]); | |
305 | hzg[iLay]->GetXaxis()->SetTitle("Global z [cm]"); | |
306 | hzg[iLay]->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 307 | fAliITSQADataMakerRec->Add2RecPointsList(hzg[iLay], 6+(10*iLay)+fGenRecPointsOffset, kTRUE); |
308 | fSPDhRecPointsTask++; | |
096292ae | 309 | |
26ee9565 | 310 | sprintf(name,"SPDr_SPD%d",iLay+1); |
096292ae | 311 | sprintf(title,"Radius - SPD Layer %d",iLay+1); |
312 | hr[iLay]=new TH1F(name,title,100,0.,10.); | |
313 | hr[iLay]->GetXaxis()->SetTitle("r [cm]"); | |
314 | hr[iLay]->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 315 | fAliITSQADataMakerRec->Add2RecPointsList(hr[iLay], 7+(10*iLay)+fGenRecPointsOffset, kTRUE); |
316 | fSPDhRecPointsTask++; | |
096292ae | 317 | |
26ee9565 | 318 | sprintf(name,"SPDphi_SPD%d",iLay+1); |
096292ae | 319 | sprintf(title,"#varphi - SPD Layer %d",iLay+1); |
439e7a8a | 320 | hphi[iLay]=new TH1F(name,title,1000,0.,2*TMath::Pi()); |
096292ae | 321 | hphi[iLay]->GetXaxis()->SetTitle("#varphi [rad]"); |
322 | hphi[iLay]->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 323 | fAliITSQADataMakerRec->Add2RecPointsList(hphi[iLay], 8+(10*iLay)+fGenRecPointsOffset, kTRUE); |
324 | fSPDhRecPointsTask++; | |
096292ae | 325 | |
26ee9565 | 326 | sprintf(name,"SPDSizeYvsZ_SPD%d",iLay+1); |
096292ae | 327 | sprintf(title,"Cluster dimension - SPD Layer %d",iLay+1); |
328 | hNyNz[iLay]=new TH2F(name,title,100,0.,100.,100,0.,100.); | |
329 | hNyNz[iLay]->GetXaxis()->SetTitle("z length"); | |
330 | hNyNz[iLay]->GetYaxis()->SetTitle("y length"); | |
7a0e5776 | 331 | fAliITSQADataMakerRec->Add2RecPointsList(hNyNz[iLay], 9+(10*iLay)+fGenRecPointsOffset, kTRUE); |
332 | fSPDhRecPointsTask++; | |
096292ae | 333 | |
26ee9565 | 334 | sprintf(name,"SPDphi_z_SPD%d",iLay+1); |
096292ae | 335 | sprintf(title,"#varphi vs z - SPD Layer %d",iLay+1); |
439e7a8a | 336 | hPhiZ[iLay]=new TH2F(name,title,150,-zlim[iLay],zlim[iLay],200,0.,2*TMath::Pi()); |
096292ae | 337 | hPhiZ[iLay]->GetXaxis()->SetTitle("Global z [cm]"); |
338 | hPhiZ[iLay]->GetYaxis()->SetTitle("#varphi [rad]"); | |
7a0e5776 | 339 | fAliITSQADataMakerRec->Add2RecPointsList(hPhiZ[iLay], 10+(10*iLay)+fGenRecPointsOffset); |
340 | fSPDhRecPointsTask++; | |
096292ae | 341 | |
342 | } | |
343 | ||
26ee9565 | 344 | TH2F *hrPhi=new TH2F("SPDr_phi_SPD","#varphi vs r - SPD",100,0.,10.,100,0.,2*TMath::Pi()); |
096292ae | 345 | hrPhi->GetXaxis()->SetTitle("r [cm]"); |
346 | hrPhi->GetYaxis()->SetTitle("#varphi [rad]"); | |
7a0e5776 | 347 | fAliITSQADataMakerRec->Add2RecPointsList(hrPhi, 21+fGenRecPointsOffset, kTRUE); |
348 | fSPDhRecPointsTask++; | |
096292ae | 349 | |
26ee9565 | 350 | TH2F *hxy=new TH2F("SPDx_y_SPD","Global y vs x - SPD",200,-10.,10.,200,-10.,10.); |
096292ae | 351 | hxy->GetXaxis()->SetTitle("Global x [cm]"); |
352 | hxy->GetYaxis()->SetTitle("Global y [cm]"); | |
7a0e5776 | 353 | fAliITSQADataMakerRec->Add2RecPointsList(hxy, 22+fGenRecPointsOffset); |
354 | fSPDhRecPointsTask++; | |
096292ae | 355 | |
356 | for (Int_t iLay=0;iLay<2;iLay++) { | |
26ee9565 | 357 | sprintf(name,"SPDMultiplicity_SPD%d",iLay+1); |
096292ae | 358 | sprintf(title,"Cluster multiplicity - SPD Layer %d",iLay+1); |
359 | hMultSPDcl[iLay]=new TH1F(name,title,200,0.,200.); | |
360 | hMultSPDcl[iLay]->GetXaxis()->SetTitle("Cluster multiplicity"); | |
361 | hMultSPDcl[iLay]->GetYaxis()->SetTitle("Entries"); | |
7a0e5776 | 362 | fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl[iLay], 23+iLay+fGenRecPointsOffset); |
363 | fSPDhRecPointsTask++; | |
096292ae | 364 | } |
365 | ||
366 | TH2F *hMultSPDcl2MultSPDcl1 = | |
26ee9565 | 367 | new TH2F("SPDMultCorrelation_SPD","Cluster multiplicity correlation - SPD",200,0.,200.,200,0.,200.); |
096292ae | 368 | hMultSPDcl2MultSPDcl1->GetXaxis()->SetTitle("Clusters multiplicity (Layer 1)"); |
369 | hMultSPDcl2MultSPDcl1->GetYaxis()->SetTitle("Clusters multiplicity (Layer 2)"); | |
7a0e5776 | 370 | fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl2MultSPDcl1, 25+fGenRecPointsOffset, kFALSE); |
371 | fSPDhRecPointsTask++; | |
096292ae | 372 | |
7a0e5776 | 373 | AliDebug(1,Form("%d SPD Recs histograms booked\n",fSPDhRecPointsTask)); |
096292ae | 374 | |
3f905799 | 375 | |
096292ae | 376 | } |
377 | ||
378 | //____________________________________________________________________________ | |
379 | void AliITSQASPDDataMakerRec::MakeRecPoints(TTree * clusterTree) | |
380 | { | |
381 | // Fill QA for RecPoints - SPD - | |
3647765c | 382 | static TClonesArray statITSCluster("AliITSRecPoint"); |
383 | TClonesArray *ITSCluster = &statITSCluster; | |
384 | TBranch* itsClusterBranch=clusterTree->GetBranch("ITSRecPoints"); | |
385 | if (!itsClusterBranch) { | |
386 | AliError("can't get the branch with the ITS clusters !"); | |
387 | return; | |
388 | } | |
389 | itsClusterBranch->SetAddress(&ITSCluster); | |
390 | Int_t nItsMods = (Int_t)clusterTree->GetEntries(); | |
391 | ||
392 | Float_t cluGlo[3] = {0.,0.,0.}; | |
393 | Int_t nClusters[2] = {0,0}; | |
394 | ||
395 | for (Int_t iIts=0; iIts < nItsMods; iIts++) { | |
396 | ||
397 | if (!clusterTree->GetEvent(iIts)) continue; | |
398 | Int_t nCluster = ITSCluster->GetEntriesFast(); | |
399 | // loop over clusters | |
400 | while(nCluster--) { | |
401 | AliITSRecPoint* cluster = (AliITSRecPoint*)ITSCluster->UncheckedAt(nCluster); | |
402 | ||
403 | if (cluster->GetLayer()>1) continue; | |
404 | Int_t lay=cluster->GetLayer(); | |
7a0e5776 | 405 | fAliITSQADataMakerRec->GetRecPointsData(0 +fGenRecPointsOffset)->Fill(lay); |
3647765c | 406 | cluster->GetGlobalXYZ(cluGlo); |
407 | Float_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]); | |
096292ae | 408 | Float_t phi= TMath::Pi() + TMath::ATan2(-cluGlo[1],-cluGlo[0]); |
409 | if (lay==0) { | |
7a0e5776 | 410 | fAliITSQADataMakerRec->GetRecPointsData(1 +fGenRecPointsOffset)->Fill(iIts); |
411 | fAliITSQADataMakerRec->GetRecPointsData(2 +fGenRecPointsOffset)->Fill(cluster->GetDetLocalX()); | |
412 | fAliITSQADataMakerRec->GetRecPointsData(3 +fGenRecPointsOffset)->Fill(cluster->GetDetLocalZ()); | |
413 | fAliITSQADataMakerRec->GetRecPointsData(4 +fGenRecPointsOffset)->Fill(cluGlo[0]); | |
414 | fAliITSQADataMakerRec->GetRecPointsData(5 +fGenRecPointsOffset)->Fill(cluGlo[1]); | |
415 | fAliITSQADataMakerRec->GetRecPointsData(6 +fGenRecPointsOffset)->Fill(cluGlo[2]); | |
416 | fAliITSQADataMakerRec->GetRecPointsData(7 +fGenRecPointsOffset)->Fill(rad); | |
417 | fAliITSQADataMakerRec->GetRecPointsData(8 +fGenRecPointsOffset)->Fill(phi); | |
418 | fAliITSQADataMakerRec->GetRecPointsData(9 +fGenRecPointsOffset)->Fill(cluster->GetNz(),cluster->GetNy()); | |
419 | fAliITSQADataMakerRec->GetRecPointsData(10 +fGenRecPointsOffset)->Fill(cluGlo[2],phi); | |
096292ae | 420 | } else { |
7a0e5776 | 421 | fAliITSQADataMakerRec->GetRecPointsData(11 +fGenRecPointsOffset)->Fill(iIts); |
422 | fAliITSQADataMakerRec->GetRecPointsData(12 +fGenRecPointsOffset)->Fill(cluster->GetDetLocalX()); | |
423 | fAliITSQADataMakerRec->GetRecPointsData(13 +fGenRecPointsOffset)->Fill(cluster->GetDetLocalZ()); | |
424 | fAliITSQADataMakerRec->GetRecPointsData(14 +fGenRecPointsOffset)->Fill(cluGlo[0]); | |
425 | fAliITSQADataMakerRec->GetRecPointsData(15 +fGenRecPointsOffset)->Fill(cluGlo[1]); | |
426 | fAliITSQADataMakerRec->GetRecPointsData(16 +fGenRecPointsOffset)->Fill(cluGlo[2]); | |
427 | fAliITSQADataMakerRec->GetRecPointsData(17 +fGenRecPointsOffset)->Fill(rad); | |
428 | fAliITSQADataMakerRec->GetRecPointsData(18 +fGenRecPointsOffset)->Fill(phi); | |
429 | fAliITSQADataMakerRec->GetRecPointsData(19 +fGenRecPointsOffset)->Fill(cluster->GetNz(),cluster->GetNy()); | |
430 | fAliITSQADataMakerRec->GetRecPointsData(20 +fGenRecPointsOffset)->Fill(cluGlo[2],phi); | |
096292ae | 431 | } |
7a0e5776 | 432 | fAliITSQADataMakerRec->GetRecPointsData(21 +fGenRecPointsOffset)->Fill(rad,phi); |
433 | fAliITSQADataMakerRec->GetRecPointsData(22 +fGenRecPointsOffset)->Fill(cluGlo[0],cluGlo[1]); | |
3647765c | 434 | |
096292ae | 435 | nClusters[lay]++; |
3647765c | 436 | } // end of cluster loop |
437 | } // end of its "subdetector" loop | |
438 | ||
439 | for (Int_t iLay=0; iLay<2; iLay++) | |
7a0e5776 | 440 | fAliITSQADataMakerRec->GetRecPointsData(23+iLay +fGenRecPointsOffset)->Fill(nClusters[iLay]); |
3647765c | 441 | |
7a0e5776 | 442 | fAliITSQADataMakerRec->GetRecPointsData(25 +fGenRecPointsOffset)->Fill(nClusters[0],nClusters[1]); |
3647765c | 443 | |
444 | statITSCluster.Clear(); | |
096292ae | 445 | } |
7a0e5776 | 446 | |
447 | ||
448 | ||
449 | //_______________________________________________________________ | |
450 | ||
451 | Int_t AliITSQASPDDataMakerRec::GetOffset(AliQA::TASKINDEX_t task) { | |
452 | // Returns offset number according to the specified task | |
453 | Int_t offset=0; | |
454 | if( task == AliQA::kRAWS ) { | |
455 | offset=fGenRawsOffset; | |
456 | } | |
457 | else if( task == AliQA::kRECPOINTS ) { | |
458 | offset=fGenRecPointsOffset; | |
459 | } | |
460 | else { | |
461 | AliInfo("No task has been selected. Offset set to zero.\n"); | |
462 | } | |
463 | ||
464 | return offset; | |
465 | } | |
466 | ||
467 | //_______________________________________________________________ | |
468 | ||
469 | Int_t AliITSQASPDDataMakerRec::GetTaskHisto(AliQA::TASKINDEX_t task) { | |
470 | // Returns the number of histograms associated to the specified task | |
471 | Int_t histotot=0; | |
472 | ||
473 | if( task == AliQA::kRAWS ) { | |
474 | histotot=fSPDhRawsTask; | |
475 | } | |
476 | else if( task == AliQA::kRECPOINTS ){ | |
477 | histotot=fSPDhRecPointsTask; | |
478 | } | |
479 | else { | |
480 | AliInfo("No task has been selected. TaskHisto set to zero.\n"); | |
481 | } | |
482 | ||
483 | return histotot; | |
484 | } |