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