]>
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> | |
96d29da9 | 29 | #include <TH1I.h> |
30 | #include <TH1F.h> | |
31 | #include <TH2F.h> | |
096292ae | 32 | #include <TMath.h> |
33 | // --- Standard library --- | |
34 | ||
35 | // --- AliRoot header files --- | |
36 | #include "AliITSQADataMakerRec.h" | |
37 | #include "AliITSQASPDDataMakerRec.h" | |
38 | #include "AliLog.h" | |
4e25ac79 | 39 | #include "AliQAv1.h" |
096292ae | 40 | #include "AliRawReader.h" |
379510c2 | 41 | #include "AliITSRawStreamSPD.h" |
42 | #include "AliITSRawStreamSPDErrorLog.h" | |
33626263 | 43 | #include "AliITSdigitSPD.h" |
096292ae | 44 | #include "AliITSRecPoint.h" |
e62fe478 | 45 | #include "AliITSRecPointContainer.h" |
379510c2 | 46 | |
096292ae | 47 | ClassImp(AliITSQASPDDataMakerRec) |
48 | ||
49 | //____________________________________________________________________________ | |
379510c2 | 50 | AliITSQASPDDataMakerRec::AliITSQASPDDataMakerRec(AliITSQADataMakerRec *aliITSQADataMakerRec, Bool_t kMode, Short_t ldc, AliITSRawStreamSPDErrorLog *aliITSRawStreamSPDErrorLog) : |
096292ae | 51 | TObject(), |
52 | fAliITSQADataMakerRec(aliITSQADataMakerRec), | |
53 | fkOnline(kMode), | |
54 | fLDC(ldc), | |
7a0e5776 | 55 | fSPDhRawsTask(0), |
44ed7a66 | 56 | fSPDhDigitsTask(0), |
7a0e5776 | 57 | fSPDhRecPointsTask(0), |
58 | fGenRawsOffset(0), | |
44ed7a66 | 59 | fGenDigitsOffset(0), |
7a0e5776 | 60 | fGenRecPointsOffset(0), |
379510c2 | 61 | fAdvLogger(aliITSRawStreamSPDErrorLog) |
096292ae | 62 | { |
63 | //ctor used to discriminate OnLine-Offline analysis | |
8b7e858c | 64 | //AliInfo(Form("AliRecoParam::kNSpecies %d\n",AliRecoParam::kNSpecies)); |
65 | fGenRawsOffset = new Int_t[AliRecoParam::kNSpecies]; | |
66 | fGenRecPointsOffset = new Int_t[AliRecoParam::kNSpecies]; | |
4a903927 | 67 | fGenDigitsOffset = new Int_t[AliRecoParam::kNSpecies]; |
8b7e858c | 68 | for(Int_t i=0; i<AliRecoParam::kNSpecies;i++) { |
69 | fGenRawsOffset[i] = 0; | |
70 | fGenRecPointsOffset[i] = 0; | |
4a903927 | 71 | fGenDigitsOffset[i]=0; |
8b7e858c | 72 | } |
096292ae | 73 | } |
74 | ||
75 | //____________________________________________________________________________ | |
76 | AliITSQASPDDataMakerRec::AliITSQASPDDataMakerRec(const AliITSQASPDDataMakerRec& qadm) : | |
77 | TObject(), | |
78 | fAliITSQADataMakerRec(qadm.fAliITSQADataMakerRec), | |
79 | fkOnline(qadm.fkOnline), | |
80 | fLDC(qadm.fLDC), | |
7a0e5776 | 81 | fSPDhRawsTask(qadm.fSPDhRawsTask), |
44ed7a66 | 82 | fSPDhDigitsTask(qadm.fSPDhDigitsTask), |
7a0e5776 | 83 | fSPDhRecPointsTask(qadm.fSPDhRecPointsTask), |
84 | fGenRawsOffset(qadm.fGenRawsOffset), | |
44ed7a66 | 85 | fGenDigitsOffset(qadm.fGenDigitsOffset), |
7a0e5776 | 86 | fGenRecPointsOffset(qadm.fGenRecPointsOffset), |
379510c2 | 87 | fAdvLogger(qadm.fAdvLogger) |
096292ae | 88 | { |
89 | //copy ctor | |
90 | fAliITSQADataMakerRec->SetName((const char*)qadm.fAliITSQADataMakerRec->GetName()) ; | |
91 | fAliITSQADataMakerRec->SetTitle((const char*)qadm.fAliITSQADataMakerRec->GetTitle()); | |
92 | } | |
93 | ||
94 | //__________________________________________________________________ | |
95 | AliITSQASPDDataMakerRec::~AliITSQASPDDataMakerRec(){ | |
96 | // destructor | |
379510c2 | 97 | // delete fAdvLogger; |
096292ae | 98 | } |
99 | //__________________________________________________________________ | |
100 | ||
101 | AliITSQASPDDataMakerRec& AliITSQASPDDataMakerRec::operator = (const AliITSQASPDDataMakerRec& qac ) | |
102 | { | |
103 | // Equal operator. | |
104 | this->~AliITSQASPDDataMakerRec(); | |
105 | new(this) AliITSQASPDDataMakerRec(qac); | |
106 | return *this; | |
107 | } | |
108 | ||
109 | //____________________________________________________________________________ | |
110 | void AliITSQASPDDataMakerRec::StartOfDetectorCycle() | |
111 | { | |
112 | //Detector specific actions at start of cycle | |
5379c4a3 | 113 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of SPD Cycle\n"); |
096292ae | 114 | } |
115 | ||
116 | //____________________________________________________________________________ | |
96d29da9 | 117 | void AliITSQASPDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray* list) |
096292ae | 118 | { |
119 | // launch the QA checking | |
5379c4a3 | 120 | AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); |
96d29da9 | 121 | if(!list){ |
122 | AliError(" Histogram list is NULL"); | |
123 | return; | |
124 | } | |
125 | ||
66133c2f | 126 | Int_t shift = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]; |
127 | ||
128 | if(task == AliQAv1::kRAWS) { | |
96d29da9 | 129 | if(!list->At(0+shift)) { |
130 | AliError(" no histogram 0 at the end of detector cycle in raws"); | |
131 | return; | |
132 | } | |
133 | //((TH1I*)list->At(5+shift))->Print(); | |
134 | ((TH1I*)list->At(5+shift))->Reset(); // clean up MEB histo (needed at the first cycles for small statistics) | |
135 | ||
136 | for(Int_t eq=0; eq<20; eq++){ | |
137 | for(Int_t hs=0; hs<6; hs++){ | |
138 | for(Int_t chip=0; chip<10;chip++){ | |
139 | Double_t expectedFO = ((TH1F*)list->At(0+shift))->GetBinContent(eq*60+hs*10+chip+1);// fired chips | |
140 | if(expectedFO){ | |
141 | Float_t actualFO = ((TH1F*)list->At(1+shift))->GetBinContent(eq*60+hs*10+chip+1); | |
142 | Float_t missingFO = ((TH1F*)list->At(2+shift))->GetBinContent(eq*60+hs*10+chip+1); | |
143 | Float_t noisyFO = ((TH1F*)list->At(3+shift))->GetBinContent(eq*60+hs*10+chip+1); | |
144 | ((TH1F*)list->At(7+eq+shift))->SetBinContent(hs*10+chip+1,actualFO/expectedFO); // FO eff per eq | |
145 | ((TH1F*)list->At(27+eq+shift))->SetBinContent(hs*10+chip+1,missingFO/expectedFO);// missing FO per eq | |
146 | ((TH1F*)list->At(47+eq+shift))->SetBinContent(hs*10+chip+1,noisyFO/expectedFO); // Noisy FO per eq | |
147 | ||
148 | if(noisyFO/expectedFO>0.5 && missingFO/expectedFO>0.5) { | |
149 | // MEB problem if the missing FO and noisy FO sugnals and BOTH above some threshold | |
150 | ((TH1I*)list->At(5+shift))->Fill(eq*60+hs*10+chip); | |
151 | } | |
152 | } | |
153 | } | |
154 | } | |
155 | } | |
156 | ||
66133c2f | 157 | } |
96d29da9 | 158 | ((TH1I*)list->At(5+shift))->Print(); |
096292ae | 159 | } |
160 | ||
161 | //____________________________________________________________________________ | |
eca4fa66 | 162 | Int_t AliITSQASPDDataMakerRec::InitRaws() |
096292ae | 163 | { |
96d29da9 | 164 | |
096292ae | 165 | // Initialization for RAW data - SPD - |
7d297381 | 166 | const Bool_t expert = kTRUE ; |
167 | const Bool_t saveCorr = kTRUE ; | |
168 | const Bool_t image = kTRUE ; | |
eca4fa66 | 169 | Int_t rv = 0 ; |
170 | // fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries(); | |
66133c2f | 171 | |
8bab7823 | 172 | if(!fAdvLogger) fAdvLogger = new AliITSRawStreamSPDErrorLog(); |
5379c4a3 | 173 | AliDebug(AliQAv1::GetQADebugLevel(), "Book Offline Histograms for SPD\n "); |
439e7a8a | 174 | |
379510c2 | 175 | Char_t name[50]; |
176 | Char_t title[50]; | |
66133c2f | 177 | // offset for online histogram numbering |
178 | Int_t shift = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]; | |
179 | ||
180 | ||
181 | Float_t range[2] = {-0.5,1199.}; | |
096292ae | 182 | |
66133c2f | 183 | // ********** online histo booking (shift is added) ********************* |
184 | ||
96d29da9 | 185 | //0 |
186 | TH1F *hFiredChips = new TH1F("SPDFiredChips_OnlineSPD","FiredChips - SPD",fgkSPDchips,range[0],range[1]); | |
66133c2f | 187 | hFiredChips->GetXaxis()->SetTitle("chip index (eq*60 + hs*10 + chip)"); |
188 | hFiredChips->GetYaxis()->SetTitle("Fired Chip yield"); | |
96d29da9 | 189 | rv = fAliITSQADataMakerRec->Add2RawsList(hFiredChips, 0+shift, expert, !image, !saveCorr); |
190 | fSPDhRawsTask++; | |
191 | // 1 | |
192 | TH1F *hFastOrFiredChips = new TH1F("SPDFastOrFiredChips_OnlineSPD","FastOr-Fired Chips (if pixel hit present) - SPD",fgkSPDchips,range[0],range[1]); | |
193 | hFastOrFiredChips->GetXaxis()->SetTitle("chip index (eq*60 + hs*10 + chip)"); | |
194 | hFastOrFiredChips->GetYaxis()->SetTitle("FastOr-Fired Chip yield (per event)"); | |
195 | rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrFiredChips, 1+shift, expert, !image, !saveCorr); | |
66133c2f | 196 | fSPDhRawsTask++; |
197 | // 2 | |
96d29da9 | 198 | TH1F *hFastOrMissing = new TH1F("SPDFastOrMissing_OnlineSPD","Missing FastOr signal - SPD",fgkSPDchips,range[0],range[1]); |
66133c2f | 199 | hFastOrMissing->GetXaxis()->SetTitle("chip index (eq*60 + hs*10 + chip)"); |
200 | hFastOrMissing->GetYaxis()->SetTitle("Missing Fast Or yield"); | |
201 | rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrMissing, 2+shift, expert, !image, !saveCorr); | |
202 | fSPDhRawsTask++; | |
203 | // 3 | |
96d29da9 | 204 | TH1F *hFastOrNoisy = new TH1F("SPDFastOrNoisy_OnlineSPD","Noisy (no pixel hit present) FastOr signal - SPD",fgkSPDchips,range[0],range[1]); |
66133c2f | 205 | hFastOrNoisy->GetXaxis()->SetTitle("chipkey"); |
206 | hFastOrNoisy->GetYaxis()->SetTitle("Noisy Fast Or"); | |
207 | rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrNoisy, 3+shift, expert, !image, !saveCorr); | |
208 | fSPDhRawsTask++; | |
209 | // 4 | |
96d29da9 | 210 | TH1F *hFastOrCumulative = new TH1F("SPDFastOrCumulative_OnlineSPD","Cumulative FastOr signal - SPD",fgkSPDchips,range[0],range[1]); |
211 | hFastOrCumulative->GetXaxis()->SetTitle("chipkey"); | |
212 | hFastOrCumulative->GetYaxis()->SetTitle("Cumulative Fast Or yield"); | |
213 | rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrCumulative, 4+shift, expert, !image, !saveCorr); | |
214 | fSPDhRawsTask++; | |
66133c2f | 215 | // 5 |
96d29da9 | 216 | TH1I *hSPDChipsMEB = new TH1I("SPDChipsMEB_OnlineSPD","Chips with MEB problem - SPD",fgkSPDchips,range[0],range[1]); |
217 | hSPDChipsMEB->GetXaxis()->SetTitle("chipkey"); | |
218 | hSPDChipsMEB->SetLineColor(kRed); | |
219 | hSPDChipsMEB->GetYaxis()->SetTitle("MEB Problem (per cycle)"); | |
220 | rv = fAliITSQADataMakerRec->Add2RawsList(hSPDChipsMEB, 5+shift, expert, !image, !saveCorr); | |
221 | fSPDhRawsTask++; | |
66133c2f | 222 | // 6 |
96d29da9 | 223 | TH2F *hFastOrCorrelation = new TH2F("SPDFastOrCorrelation_OnlineSPD","Fast Or multiplicity correlation - SPD",100,0.,100.,100,0,100); |
224 | hFastOrCorrelation->GetXaxis()->SetTitle("Layer 1"); | |
225 | hFastOrCorrelation->GetYaxis()->SetTitle("Layer 2"); | |
226 | rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrCorrelation, 6+shift, expert, !image, !saveCorr); | |
227 | fSPDhRawsTask++; | |
228 | // 7-26 | |
229 | TH1F *hFastOrEfficiency[20], *hFastOrMissingRatio[20], *hFastOrNoisyRatio[20]; | |
230 | for(Int_t eq =0; eq<20; eq++){ | |
231 | hFastOrEfficiency[eq] = new TH1F(Form("SPDFastOrEfficiencyEq%i_OnlineSPD",eq),Form("FastOr Efficiency : FastOr / fired chips (per event) - Eq %i SPD",eq),60,-0.5,59.5); | |
232 | hFastOrEfficiency[eq]->SetFillColor(kBlue); | |
233 | hFastOrEfficiency[eq]->SetMaximum(1.05); | |
234 | hFastOrEfficiency[eq]->GetXaxis()->SetTitle("chip index [hs*10+chip]"); | |
235 | hFastOrEfficiency[eq]->GetYaxis()->SetTitle("FastOr Efficiency (per event)"); | |
236 | rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrEfficiency[eq], 7+shift+eq, expert, !image, !saveCorr); | |
237 | fSPDhRawsTask++; | |
238 | } | |
239 | // 27-46 | |
240 | for(Int_t eq=0; eq<20; eq++){ | |
241 | hFastOrMissingRatio[eq] = new TH1F(Form("SPDFastOrMissingRatioEq%i_OnlineSPD",eq),Form(" Missing FastOr / fired chips (per event) - Eq %i - SPD)",eq),60,-0.5,59.5); | |
242 | hFastOrMissingRatio[eq]->SetFillColor(kBlue); | |
243 | hFastOrMissingRatio[eq]->SetMaximum(1.05); | |
244 | hFastOrMissingRatio[eq]->GetXaxis()->SetTitle("chip index [hs*10+chip]"); | |
245 | hFastOrMissingRatio[eq]->GetYaxis()->SetTitle("ratio of Missing FastOr (per event)"); | |
246 | rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrMissingRatio[eq], 27+shift+eq, expert, !image, !saveCorr); | |
247 | fSPDhRawsTask++; | |
248 | } | |
249 | // 47-66 | |
250 | for(Int_t eq=0; eq<20; eq++){ | |
251 | hFastOrNoisyRatio[eq] = new TH1F(Form("SPDFastOrNoisyRatioEq%i_OnlineSPD",eq),Form("Noisy Fast Or / fired chips (per event) - Eq %i - SPD",eq),60,-0.5,69.5); | |
252 | hFastOrNoisyRatio[eq]->SetFillColor(kBlue); | |
253 | hFastOrNoisyRatio[eq]->SetMaximum(1.05); | |
254 | hFastOrNoisyRatio[eq]->GetXaxis()->SetTitle("chip index [hs*10+chip]"); | |
255 | hFastOrNoisyRatio[eq]->GetYaxis()->SetTitle("ratio of Noisy FastOr (per event)"); | |
256 | rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrNoisyRatio[eq], 47+shift+eq, expert, !image, !saveCorr); | |
257 | fSPDhRawsTask++; | |
258 | } | |
259 | ||
260 | // 67 | |
261 | TH1F *herrorsAll = new TH1F("SPDErrorsAll_OnlineSPD","Error codes - SPD",20,0.,20.); | |
66133c2f | 262 | herrorsAll->GetXaxis()->SetTitle("DDL"); |
263 | herrorsAll->GetYaxis()->SetTitle("Entries"); | |
96d29da9 | 264 | rv = fAliITSQADataMakerRec->Add2RawsList(herrorsAll, 67+shift, !expert, image, !saveCorr); |
66133c2f | 265 | fSPDhRawsTask++; |
96d29da9 | 266 | //68-87 |
66133c2f | 267 | TH1F **herrors = new TH1F*[20]; |
268 | for (Int_t iEq=0; iEq<20; iEq++) { | |
96d29da9 | 269 | sprintf(name,"SPDErrors_Eq%d_OnlineSPD",iEq+1); |
66133c2f | 270 | sprintf(title,"Error codes - SPD Eq %d",iEq+1); |
271 | herrors[iEq] = new TH1F (name,title,fAdvLogger->GetNrErrorCodes(),0,fAdvLogger->GetNrErrorCodes()); | |
272 | herrors[iEq]->SetXTitle("Error Code"); | |
273 | herrors[iEq]->SetYTitle("Nr of errors"); | |
96d29da9 | 274 | rv = fAliITSQADataMakerRec->Add2RawsList(herrors[iEq], 68+shift+iEq, expert, !image, !saveCorr); |
66133c2f | 275 | fSPDhRawsTask++; |
276 | } | |
66133c2f | 277 | // ********* offline histo booking (offset is added) **************************** |
278 | ||
279 | // offset for offline histogram numbering | |
280 | Int_t offset = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()] + kAmoreFoOffset + kAmoreErrorsOffset; | |
96d29da9 | 281 | |
282 | // printf("now booking offline raw data : genrawoffset %i, kAmoreOffset %i , kAmoreErrorsOffset %i -> total %i , list numbering %i\n",fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()],(Int_t)kAmoreFoOffset,(Int_t)kAmoreErrorsOffset, offset,fSPDhRawsTask); | |
66133c2f | 283 | // 0 |
26ee9565 | 284 | TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.); |
379510c2 | 285 | hlayer->GetXaxis()->SetTitle("Layer number"); |
286 | hlayer->GetYaxis()->SetTitle("Entries"); | |
66133c2f | 287 | rv = fAliITSQADataMakerRec->Add2RawsList(hlayer, 0+offset, expert, !image, !saveCorr); |
7a0e5776 | 288 | fSPDhRawsTask++; |
379510c2 | 289 | |
290 | TH1F **hmod = new TH1F*[2]; | |
291 | TH2F **hhitMap = new TH2F*[20]; | |
66133c2f | 292 | |
293 | ||
294 | // 1-2 | |
379510c2 | 295 | for (Int_t iLay=0; iLay<2; iLay++) { |
26ee9565 | 296 | sprintf(name,"SPDModPattern_SPD%d",iLay+1); |
379510c2 | 297 | sprintf(title,"Module map - SPD Layer %d",iLay+1); |
298 | hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules); | |
299 | hmod[iLay]->GetXaxis()->SetTitle("Module number"); | |
300 | hmod[iLay]->GetYaxis()->SetTitle("Entries"); | |
66133c2f | 301 | rv = fAliITSQADataMakerRec->Add2RawsList(hmod[iLay], 1+iLay+offset, expert, !image, !saveCorr); |
7a0e5776 | 302 | fSPDhRawsTask++; |
379510c2 | 303 | } |
66133c2f | 304 | // 3 |
8ec28eb2 | 305 | TH2F *hHitMapHalfStaveChipSideA |
306 | = new TH2F("SPDHitMapHalfStaveChipSideA_SPD","Hit map per HalfStave per Chip Side A - SPD",60,0.,60.,10,0.,10.); | |
307 | hHitMapHalfStaveChipSideA->GetXaxis()->SetTitle("HalfStave"); | |
308 | hHitMapHalfStaveChipSideA->GetYaxis()->SetTitle("Chip"); | |
66133c2f | 309 | rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapHalfStaveChipSideA, 3+offset, expert, !image, !saveCorr); |
8ec28eb2 | 310 | fSPDhRawsTask++; |
66133c2f | 311 | // 4 |
8ec28eb2 | 312 | TH2F *hHitMapHalfStaveChipSideC |
313 | = new TH2F("SPDHitMapHalfStaveChipSideC_SPD","Hit map per HalfStave per Chip Side C - SPD",60,0.,60.,10,0.,10.); | |
314 | hHitMapHalfStaveChipSideC->GetXaxis()->SetTitle("HalfStave"); | |
315 | hHitMapHalfStaveChipSideC->GetYaxis()->SetTitle("Chip"); | |
66133c2f | 316 | rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapHalfStaveChipSideC, 4+offset, expert, !image, !saveCorr); |
8ec28eb2 | 317 | fSPDhRawsTask++; |
66133c2f | 318 | //5-24 |
379510c2 | 319 | for (Int_t iDDL=0; iDDL<20; iDDL++) { |
26ee9565 | 320 | sprintf(name,"SPDHitMap_SPD_DDL%d",iDDL+1); |
379510c2 | 321 | sprintf(title,"Hit map - SPD DDL %d",iDDL+1); |
322 | hhitMap[iDDL]=new TH2F(name,title,320,0,10*32,1536,0,6*256); | |
323 | hhitMap[iDDL]->GetXaxis()->SetTitle("Column"); | |
324 | hhitMap[iDDL]->GetYaxis()->SetTitle("Row"); | |
66133c2f | 325 | rv = fAliITSQADataMakerRec->Add2RawsList(hhitMap[iDDL], 5+iDDL+offset, expert, !image, !saveCorr); |
7a0e5776 | 326 | fSPDhRawsTask++; |
66133c2f | 327 | } |
328 | // 25-26 | |
379510c2 | 329 | TH1F** hMultSPDhits = new TH1F*[2]; |
330 | for (Int_t iLay=0; iLay<2; iLay++) { | |
26ee9565 | 331 | sprintf(name,"SPDHitsMultiplicity_SPD%d",iLay+1); |
379510c2 | 332 | sprintf(title,"Hit multiplicity - SPD Layer %d",iLay+1); |
333 | hMultSPDhits[iLay]=new TH1F(name,title,200,0.,200.); | |
334 | hMultSPDhits[iLay]->GetXaxis()->SetTitle("Hit multiplicity"); | |
335 | hMultSPDhits[iLay]->GetYaxis()->SetTitle("Entries"); | |
66133c2f | 336 | rv = fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits[iLay], 25+iLay+offset, expert, !image, !saveCorr); |
7a0e5776 | 337 | fSPDhRawsTask++; |
379510c2 | 338 | } |
66133c2f | 339 | // 27 |
954ef57a | 340 | TH2F *hMultSPDhits2MultSPDhits1 |
26ee9565 | 341 | = new TH2F("SPDHitMultCorrelation_SPD","Hit multiplicity correlation - SPD",200,0.,200.,200,0.,200.); |
379510c2 | 342 | hMultSPDhits2MultSPDhits1->GetXaxis()->SetTitle("Hit multiplicity (Layer 1)"); |
343 | hMultSPDhits2MultSPDhits1->GetYaxis()->SetTitle("Hit multiplicity (Layer 2)"); | |
66133c2f | 344 | rv = fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits2MultSPDhits1, 27+offset, !expert, image, !saveCorr); |
8ec28eb2 | 345 | fSPDhRawsTask++; |
66133c2f | 346 | // 28 |
8ec28eb2 | 347 | TH2F *hFastOrMapHalfStaveChip |
348 | = new TH2F("SPDFastOrMapHalfStaveChip_SPD","FastOr map per HalfStave per Chip - SPD",120,0.,120.,10,0.,10.); | |
349 | hFastOrMapHalfStaveChip->GetXaxis()->SetTitle("HalfStave"); | |
350 | hFastOrMapHalfStaveChip->GetYaxis()->SetTitle("Chip"); | |
66133c2f | 351 | rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrMapHalfStaveChip, 28+offset, !expert, image, !saveCorr); |
8ec28eb2 | 352 | fSPDhRawsTask++; |
66133c2f | 353 | // 29 |
8ec28eb2 | 354 | TH1F *hFastOrFiredMap = new TH1F("SPDFastOrPattern_SPD","FastOrFiredChip map - SPD",1200,0.,1200.); |
355 | hFastOrFiredMap->GetXaxis()->SetTitle("Chip number"); | |
356 | hFastOrFiredMap->GetYaxis()->SetTitle("Entries"); | |
66133c2f | 357 | rv = fAliITSQADataMakerRec->Add2RawsList(hFastOrFiredMap, 29+offset, expert, !image, !saveCorr); |
8ec28eb2 | 358 | fSPDhRawsTask++; |
66133c2f | 359 | // 30 |
8ec28eb2 | 360 | TH2F *hHitMapHalfStaveChipInner |
96d29da9 | 361 | = new TH2F("SPDHitMapStaveChipInner_SPD","Hit map per Stave per Chip Inner Layer- SPD",20,0.,20.,20,0.,20.); |
362 | hHitMapHalfStaveChipInner->GetXaxis()->SetTitle("SIDE C SIDE A Chip"); | |
363 | hHitMapHalfStaveChipInner->GetYaxis()->SetTitle("Stave in Sector S"); | |
364 | for(Int_t ibinx =0; ibinx< hHitMapHalfStaveChipInner->GetNbinsX(); ibinx++){ | |
365 | if(ibinx < 10) hHitMapHalfStaveChipInner->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",ibinx)); | |
366 | else hHitMapHalfStaveChipInner->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",20-(ibinx+1))); | |
367 | } | |
368 | for(Int_t ibiny =0; ibiny< hHitMapHalfStaveChipInner->GetNbinsY(); ibiny++){ | |
369 | if(ibiny%2==1) hHitMapHalfStaveChipInner->GetYaxis()->SetBinLabel(ibiny+1,Form(" S %i - %i",ibiny/2,ibiny%2)); | |
370 | else hHitMapHalfStaveChipInner->GetYaxis()->SetBinLabel(ibiny+1,Form("%i",ibiny%2)); | |
371 | hHitMapHalfStaveChipInner->GetYaxis()->SetTitleOffset(1.4); | |
372 | } | |
66133c2f | 373 | rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapHalfStaveChipInner, 30+offset, !expert, image, !saveCorr); |
8ec28eb2 | 374 | fSPDhRawsTask++; |
66133c2f | 375 | // 31 |
8ec28eb2 | 376 | TH2F *hHitMapHalfStaveChipOuter |
96d29da9 | 377 | = new TH2F("SPDHitMapStaveChipOuter_SPD","Hit map per Stave per Chip Outer Layer - SPD",20,0.,20.,40,0.,40.); |
378 | hHitMapHalfStaveChipOuter->GetXaxis()->SetTitle("SIDE C SIDE A Chip"); | |
379 | hHitMapHalfStaveChipOuter->GetYaxis()->SetTitle("Stave in Sector S"); | |
380 | for(Int_t ibinx =0; ibinx< hHitMapHalfStaveChipOuter->GetNbinsX(); ibinx++){ | |
381 | if(ibinx < 10) hHitMapHalfStaveChipOuter->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",ibinx)); | |
382 | else hHitMapHalfStaveChipOuter->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",20-(ibinx+1))); | |
383 | } | |
384 | for(Int_t ibiny =0; ibiny< hHitMapHalfStaveChipOuter->GetNbinsY(); ibiny++){ | |
385 | if(ibiny%4==3) hHitMapHalfStaveChipOuter->GetYaxis()->SetBinLabel(ibiny+1,Form(" S %i - %i",ibiny/4,ibiny%4+2)); | |
386 | else hHitMapHalfStaveChipOuter->GetYaxis()->SetBinLabel(ibiny+1,Form("%i",ibiny%4+2)); | |
387 | hHitMapHalfStaveChipOuter->GetYaxis()->SetTitleOffset(1.4); | |
388 | } | |
66133c2f | 389 | rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapHalfStaveChipOuter, 31+offset, !expert, image, !saveCorr); |
8ec28eb2 | 390 | fSPDhRawsTask++; |
66133c2f | 391 | // 32 |
8ec28eb2 | 392 | TH1F *hHitMapChipInnerZ = new TH1F("SPDHitMapChipInnerZ_SPD","Hit map per ChipZ Inner - SPD",20,0.,20.); |
393 | hHitMapChipInnerZ->GetXaxis()->SetTitle("Chip"); | |
394 | hHitMapChipInnerZ->GetYaxis()->SetTitle("Entries"); | |
66133c2f | 395 | rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapChipInnerZ, 32+offset, !expert, image, !saveCorr); |
8ec28eb2 | 396 | fSPDhRawsTask++; |
66133c2f | 397 | // 33 |
8ec28eb2 | 398 | TH1F *hHitMapChipOuterZ = new TH1F("SPDHitMapChipOuterZ_SPD","Hit map per ChipZ Outer - SPD",20,0.,20.); |
399 | hHitMapChipOuterZ->GetXaxis()->SetTitle("Chip"); | |
400 | hHitMapChipOuterZ->GetYaxis()->SetTitle("Entries"); | |
66133c2f | 401 | rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapChipOuterZ, 33+offset, !expert, image, !saveCorr); |
8ec28eb2 | 402 | fSPDhRawsTask++; |
66133c2f | 403 | // 34 |
96d29da9 | 404 | TH1F *hHitMapStaveInnerPhi = new TH1F("SPDHitMapChipInnerPhi_SPD","Hit map per Stave in Phi Inner - SPD",20,0.,20.); |
405 | hHitMapStaveInnerPhi->GetXaxis()->SetTitle("Stave"); | |
406 | hHitMapStaveInnerPhi->GetYaxis()->SetTitle("Entries"); | |
407 | for(Int_t ibinx =0; ibinx< hHitMapStaveInnerPhi->GetNbinsX(); ibinx++){ | |
408 | if(ibinx%2==0) hHitMapStaveInnerPhi->GetXaxis()->SetBinLabel(ibinx+1,Form("%i___Sector %i",ibinx%2,ibinx/2)); | |
409 | else hHitMapStaveInnerPhi->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",ibinx%2)); | |
410 | } | |
411 | rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapStaveInnerPhi, 34+offset, !expert, image, !saveCorr); | |
8ec28eb2 | 412 | fSPDhRawsTask++; |
66133c2f | 413 | // 35 |
96d29da9 | 414 | TH1F *hHitMapStaveOuterPhi = new TH1F("SPDHitMapChipOuterPhi_SPD","Hit map per Stave in Phi Outer - SPD",40,0.,40.); |
415 | hHitMapStaveOuterPhi->GetXaxis()->SetTitle("Stave"); | |
416 | hHitMapStaveOuterPhi->GetYaxis()->SetTitle("Entries"); | |
417 | for(Int_t ibinx =0; ibinx< hHitMapStaveOuterPhi->GetNbinsX(); ibinx++){ | |
418 | if(ibinx%4==0) hHitMapStaveOuterPhi->GetXaxis()->SetBinLabel(ibinx+1,Form("%i___Sector %i ",ibinx%4+2,ibinx/4)); | |
419 | else hHitMapStaveOuterPhi->GetXaxis()->SetBinLabel(ibinx+1,Form("%i",ibinx%4+2)); | |
420 | } | |
421 | rv = fAliITSQADataMakerRec->Add2RawsList(hHitMapStaveOuterPhi, 35+offset, !expert, image, !saveCorr); | |
8ec28eb2 | 422 | fSPDhRawsTask++; |
66133c2f | 423 | |
96d29da9 | 424 | //AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Raws histograms booked\n",fSPDhRawsTask)); |
425 | //printf("------------------ %d SPD Raws histograms booked \n",fSPDhRawsTask); | |
eca4fa66 | 426 | return rv ; |
096292ae | 427 | } |
428 | ||
096292ae | 429 | //____________________________________________________________________________ |
eca4fa66 | 430 | Int_t AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader) |
096292ae | 431 | { |
432 | // Fill QA for RAW - SPD - | |
eca4fa66 | 433 | Int_t rv = 0 ; |
96d29da9 | 434 | if(!rawReader) { |
435 | AliError("rawReader is NULL"); | |
436 | return -1; | |
437 | } | |
eca4fa66 | 438 | |
379510c2 | 439 | rawReader->Reset(); |
66eae3f0 | 440 | AliITSRawStreamSPD rawStreamSPD(rawReader); |
441 | rawStreamSPD.ActivateAdvancedErrorLog(kTRUE,fAdvLogger); | |
66133c2f | 442 | |
443 | // shift for online histos | |
444 | Int_t shift = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()]; | |
445 | ||
96d29da9 | 446 | // shift for offline histos |
66133c2f | 447 | Int_t offset = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()] + kAmoreFoOffset+kAmoreErrorsOffset; |
379510c2 | 448 | |
449 | Int_t nDigitsL1 = 0; | |
450 | Int_t nDigitsL2 = 0; | |
451 | Int_t iEq; | |
452 | Int_t iLayer; | |
453 | Int_t iHalfStave, iChip; | |
8bab7823 | 454 | Int_t chipKey; |
379510c2 | 455 | Int_t col, row; |
456 | UInt_t module, colM, rowM; | |
8ec28eb2 | 457 | Bool_t isFiredChip[1200]; |
458 | for(Int_t ichK=0; ichK<1200; ichK++) isFiredChip[ichK] = kFALSE; | |
66133c2f | 459 | Bool_t isOnlineFiredChip[1200]; |
460 | for(Int_t iOnlineKey=0; iOnlineKey<1200; iOnlineKey++) isOnlineFiredChip[iOnlineKey] = kFALSE; | |
461 | UInt_t nFastOr[2]={0,0}; | |
8ec28eb2 | 462 | |
66eae3f0 | 463 | while(rawStreamSPD.Next()) { |
379510c2 | 464 | |
465 | iEq = rawReader->GetDDLID(); | |
466 | if (iEq>=0 && iEq<20) { | |
66eae3f0 | 467 | iHalfStave = rawStreamSPD.GetHalfStaveNr(); |
468 | iChip = rawStreamSPD.GetChipAddr(); | |
66133c2f | 469 | col = rawStreamSPD.GetChipCol(); |
470 | row = rawStreamSPD.GetChipRow(); | |
471 | isOnlineFiredChip[iEq*60+iHalfStave*10+iChip] = kTRUE; | |
8ec28eb2 | 472 | chipKey = rawStreamSPD.GetOfflineChipKeyFromOnline(iEq,iHalfStave,iChip); |
473 | isFiredChip[chipKey] = kTRUE; | |
474 | ||
66eae3f0 | 475 | rawStreamSPD.OnlineToOffline(iEq, iHalfStave, iChip, col, row, module, colM, rowM); |
379510c2 | 476 | |
477 | if (iHalfStave>=0 && iHalfStave<2) iLayer=0; | |
478 | else iLayer=1; | |
479 | ||
66133c2f | 480 | fAliITSQADataMakerRec->GetRawsData(0+offset)->Fill(iLayer); |
379510c2 | 481 | if (iLayer==0) { |
66133c2f | 482 | fAliITSQADataMakerRec->GetRawsData(1+offset)->Fill(module); |
379510c2 | 483 | nDigitsL1++; |
484 | } else { | |
66133c2f | 485 | fAliITSQADataMakerRec->GetRawsData(2+offset)->Fill(module); |
379510c2 | 486 | nDigitsL2++; |
487 | } | |
488 | ||
8ec28eb2 | 489 | if(iEq<10) { |
66133c2f | 490 | fAliITSQADataMakerRec->GetRawsData(3+offset)->Fill(iHalfStave+iEq*6,iChip); |
8ec28eb2 | 491 | } |
492 | else { | |
66133c2f | 493 | fAliITSQADataMakerRec->GetRawsData(4+offset)->Fill(iHalfStave+(iEq-10)*6,iChip); |
8ec28eb2 | 494 | } |
8bab7823 | 495 | |
8ec28eb2 | 496 | if(iLayer==0) { |
497 | if(iEq<10) { | |
66133c2f | 498 | fAliITSQADataMakerRec->GetRawsData(30+offset)->Fill(19-iChip,1-iHalfStave+iEq*2); |
499 | fAliITSQADataMakerRec->GetRawsData(32+offset)->Fill(19-iChip); | |
500 | fAliITSQADataMakerRec->GetRawsData(34+offset)->Fill(1-iHalfStave+iEq*2); | |
8ec28eb2 | 501 | } |
502 | else { | |
66133c2f | 503 | fAliITSQADataMakerRec->GetRawsData(30+offset)->Fill(iChip,1-iHalfStave+(iEq-10)*2); |
504 | fAliITSQADataMakerRec->GetRawsData(32+offset)->Fill(iChip); | |
505 | fAliITSQADataMakerRec->GetRawsData(34+offset)->Fill(1-iHalfStave+(iEq-10)*2); | |
8ec28eb2 | 506 | } |
507 | } | |
508 | else { | |
509 | if(iEq<10) { | |
66133c2f | 510 | fAliITSQADataMakerRec->GetRawsData(31+offset)->Fill(19-iChip,iHalfStave-2+iEq*4); |
511 | fAliITSQADataMakerRec->GetRawsData(33+offset)->Fill(19-iChip); | |
512 | fAliITSQADataMakerRec->GetRawsData(35+offset)->Fill(iHalfStave-2+iEq*4); | |
8ec28eb2 | 513 | } |
514 | else { | |
66133c2f | 515 | fAliITSQADataMakerRec->GetRawsData(31+offset)->Fill(iChip,iHalfStave-2+(iEq-10)*4); |
516 | fAliITSQADataMakerRec->GetRawsData(33+offset)->Fill(iChip); | |
517 | fAliITSQADataMakerRec->GetRawsData(35+offset)->Fill(iHalfStave-2+(iEq-10)*4); | |
8ec28eb2 | 518 | } |
519 | } | |
66133c2f | 520 | fAliITSQADataMakerRec->GetRawsData(5+iEq+offset)->Fill(colM+(module%2)*160,rowM+iHalfStave*256); |
379510c2 | 521 | } |
379510c2 | 522 | } |
8bab7823 | 523 | |
8ec28eb2 | 524 | UInt_t nErrorsDDL[20]; |
96d29da9 | 525 | |
8b7e858c | 526 | for (Int_t ieq=0; ieq<20; ieq++) { |
8ec28eb2 | 527 | nErrorsDDL[ieq] = 0; |
96d29da9 | 528 | |
66133c2f | 529 | |
96d29da9 | 530 | |
8ec28eb2 | 531 | for (UInt_t ierr=0; ierr<fAdvLogger->GetNrErrorCodes(); ierr++) { |
66133c2f | 532 | fAliITSQADataMakerRec->GetRawsData(ieq+(kAmoreFoOffset+1)+shift)->Fill(ierr,fAdvLogger->GetNrErrors(ierr,ieq)); |
96d29da9 | 533 | if(ierr>0) nErrorsDDL[ieq] = nErrorsDDL[ieq] + fAdvLogger->GetNrErrors(ierr,ieq); |
534 | } | |
535 | ||
536 | fAliITSQADataMakerRec->GetRawsData(8+offset)->Fill(ieq,nErrorsDDL[ieq]); | |
8bab7823 | 537 | |
538 | for (Int_t ihs=0; ihs<6; ihs++) { | |
539 | for (Int_t ichip=0; ichip<10; ichip++) { | |
96d29da9 | 540 | if(isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->GetRawsData(0+shift)->Fill(ieq*60+ihs*10+ichip); // online |
541 | if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip)) fAliITSQADataMakerRec->GetRawsData(4+shift)->Fill(ieq*60+ihs*10+ichip); // online | |
542 | // now filling the 3 possibile combinations | |
543 | if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip) && isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->GetRawsData(1+shift)->Fill(ieq*60+ihs*10+ichip); // online | |
66133c2f | 544 | if(!rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip) && isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->GetRawsData(2+shift)->Fill(ieq*60+ihs*10+ichip); // online |
545 | if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip) && !isOnlineFiredChip[ieq*60+ihs*10+ichip]) fAliITSQADataMakerRec->GetRawsData(3+shift)->Fill(ieq*60+ihs*10+ichip); // online | |
546 | ||
8ec28eb2 | 547 | chipKey = rawStreamSPD.GetOfflineChipKeyFromOnline(ieq,ihs,ichip); |
66133c2f | 548 | |
66eae3f0 | 549 | if(rawStreamSPD.GetFastOrSignal(ieq,ihs,ichip)) { |
66133c2f | 550 | if(ihs <2) nFastOr[0]++; // online |
551 | else nFastOr[1]++; // online | |
552 | fAliITSQADataMakerRec->GetRawsData(28+offset)->Fill(ihs+ieq*6,ichip); | |
553 | fAliITSQADataMakerRec->GetRawsData(29+offset)->Fill(chipKey); | |
8bab7823 | 554 | } |
555 | } | |
556 | } | |
66133c2f | 557 | |
558 | ||
8bab7823 | 559 | } |
96d29da9 | 560 | if(fAliITSQADataMakerRec->GetRawsData(6+shift)) { |
561 | fAliITSQADataMakerRec->GetRawsData(6+shift)->Fill(nFastOr[0],nFastOr[1]); // online | |
562 | } | |
563 | ||
379510c2 | 564 | fAdvLogger->Reset(); |
66133c2f | 565 | fAliITSQADataMakerRec->GetRawsData(25+offset)->Fill(nDigitsL1); |
566 | fAliITSQADataMakerRec->GetRawsData(26+offset)->Fill(nDigitsL2); | |
567 | fAliITSQADataMakerRec->GetRawsData(27+offset)->Fill(nDigitsL1,nDigitsL2); | |
379510c2 | 568 | |
5379c4a3 | 569 | AliDebug(AliQAv1::GetQADebugLevel(),Form("Event completed, %d raw digits read",nDigitsL1+nDigitsL2)); |
eca4fa66 | 570 | return rv ; |
096292ae | 571 | } |
572 | ||
44ed7a66 | 573 | //____________________________________________________________________________ |
eca4fa66 | 574 | Int_t AliITSQASPDDataMakerRec::InitDigits() |
44ed7a66 | 575 | { |
576 | // Initialization for DIGIT data - SPD - | |
577 | const Bool_t expert = kTRUE ; | |
578 | const Bool_t image = kTRUE ; | |
eca4fa66 | 579 | Int_t rv = 0 ; |
580 | // fGenDigitsOffset = (fAliITSQADataMakerRec->fDigitsQAList[AliRecoParam::kDefault])->GetEntries(); | |
44ed7a66 | 581 | //fSPDhDigitsTask must be incremented by one unit every time a histogram is ADDED to the QA List |
582 | ||
583 | Char_t name[50]; | |
584 | Char_t title[50]; | |
585 | ||
586 | TH1F *hlayer = new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.); | |
587 | hlayer->GetXaxis()->SetTitle("Layer number"); | |
588 | hlayer->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 589 | rv = fAliITSQADataMakerRec->Add2DigitsList(hlayer,fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
44ed7a66 | 590 | fSPDhDigitsTask++; |
591 | ||
592 | TH1F **hmod = new TH1F*[2]; | |
593 | for (Int_t iLay=0; iLay<2; iLay++) { | |
594 | sprintf(name,"SPDModPattern_SPD%d",iLay+1); | |
595 | sprintf(title,"Module map - SPD Layer %d",iLay+1); | |
596 | hmod[iLay]=new TH1F(name,title,240,0,240); | |
597 | hmod[iLay]->GetXaxis()->SetTitle("Module number"); | |
598 | hmod[iLay]->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 599 | rv = fAliITSQADataMakerRec->Add2DigitsList(hmod[iLay],1+iLay+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image); |
44ed7a66 | 600 | fSPDhDigitsTask++; |
601 | } | |
602 | ||
603 | TH1F *hcolumns = new TH1F("SPDColumns_SPD","Columns - SPD",160,0.,160.); | |
604 | hcolumns->GetXaxis()->SetTitle("Column number"); | |
605 | hcolumns->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 606 | rv = fAliITSQADataMakerRec->Add2DigitsList(hcolumns,3+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
44ed7a66 | 607 | fSPDhDigitsTask++; |
608 | ||
609 | TH1F *hrows = new TH1F("SPDRows_SPD","Rows - SPD",256,0.,256.); | |
610 | hrows->GetXaxis()->SetTitle("Row number"); | |
611 | hrows->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 612 | rv = fAliITSQADataMakerRec->Add2DigitsList(hrows,4+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
44ed7a66 | 613 | fSPDhDigitsTask++; |
614 | ||
615 | TH1F** hMultSPDdigits = new TH1F*[2]; | |
616 | for (Int_t iLay=0; iLay<2; ++iLay) { | |
617 | sprintf(name,"SPDDigitMultiplicity_SPD%d",iLay+1); | |
618 | sprintf(title,"Digit multiplicity - SPD Layer %d",iLay+1); | |
619 | hMultSPDdigits[iLay]=new TH1F(name,title,200,0.,200.); | |
620 | hMultSPDdigits[iLay]->GetXaxis()->SetTitle("Digit multiplicity"); | |
621 | hMultSPDdigits[iLay]->GetYaxis()->SetTitle("Entries"); | |
4a903927 | 622 | rv = fAliITSQADataMakerRec->Add2DigitsList(hMultSPDdigits[iLay], 5+iLay+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image); |
44ed7a66 | 623 | fSPDhDigitsTask++; |
624 | } | |
625 | ||
626 | TH2F *hMultSPDdig2MultSPDdig1 | |
627 | = new TH2F("SPDDigitMultCorrelation_SPD","Digit multiplicity correlation - SPD",200,0.,200.,200,0.,200.); | |
628 | hMultSPDdig2MultSPDdig1->GetXaxis()->SetTitle("Digit multiplicity (Layer 1)"); | |
629 | hMultSPDdig2MultSPDdig1->GetYaxis()->SetTitle("Digit multiplicity (Layer 2)"); | |
4a903927 | 630 | rv = fAliITSQADataMakerRec->Add2DigitsList(hMultSPDdig2MultSPDdig1,7+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image); |
44ed7a66 | 631 | fSPDhDigitsTask++; |
632 | ||
633 | AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Digits histograms booked\n",fSPDhDigitsTask)); | |
eca4fa66 | 634 | return rv ; |
44ed7a66 | 635 | } |
636 | ||
637 | //____________________________________________________________________________ | |
eca4fa66 | 638 | Int_t AliITSQASPDDataMakerRec::MakeDigits(TTree *digits) |
44ed7a66 | 639 | { |
640 | // Fill QA for DIGIT - SPD - | |
eca4fa66 | 641 | Int_t rv = 0 ; |
eca4fa66 | 642 | |
44ed7a66 | 643 | // AliITS *fITS = (AliITS*)gAlice->GetModule("ITS"); |
644 | // fITS->SetTreeAddress(); | |
645 | // TClonesArray *iITSdigits = fITS->DigitsAddress(0); // 0->SPD | |
33626263 | 646 | TBranch *branchD = digits->GetBranch("ITSDigitsSPD"); |
44ed7a66 | 647 | if (!branchD) { |
33626263 | 648 | AliError("can't get the branch with the SPD ITS digits !"); |
eca4fa66 | 649 | return rv; |
44ed7a66 | 650 | } |
33626263 | 651 | static TClonesArray statDigits("AliITSdigitSPD"); |
44ed7a66 | 652 | TClonesArray *iITSdigits = &statDigits; |
653 | branchD->SetAddress(&iITSdigits); | |
654 | Int_t nDigitsL1=0; | |
655 | Int_t nDigitsL2=0; | |
656 | ||
657 | for (Int_t imod=0; imod<240; ++imod){ | |
658 | digits->GetEvent(imod); | |
659 | Int_t ndigits = iITSdigits->GetEntries(); | |
660 | if (imod<80) { | |
4a903927 | 661 | fAliITSQADataMakerRec->GetDigitsData(0+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(0.5,ndigits); |
662 | fAliITSQADataMakerRec->GetDigitsData(1+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(imod,ndigits); | |
44ed7a66 | 663 | nDigitsL1+=ndigits; |
664 | } | |
665 | else { | |
4a903927 | 666 | fAliITSQADataMakerRec->GetDigitsData(0+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(1,ndigits); |
667 | fAliITSQADataMakerRec->GetDigitsData(2+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(imod,ndigits); | |
44ed7a66 | 668 | nDigitsL2+=ndigits; |
669 | } | |
670 | for (Int_t idig=0; idig<ndigits; ++idig) { | |
671 | AliITSdigit *dig=(AliITSdigit*)iITSdigits->UncheckedAt(idig); | |
672 | Int_t col=dig->GetCoord1(); // cell number z | |
673 | Int_t row=dig->GetCoord2(); // cell number x | |
4a903927 | 674 | fAliITSQADataMakerRec->GetDigitsData(3+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(col); |
675 | fAliITSQADataMakerRec->GetDigitsData(4+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(row); | |
44ed7a66 | 676 | } |
677 | } | |
4a903927 | 678 | fAliITSQADataMakerRec->GetDigitsData(5+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nDigitsL1); |
679 | fAliITSQADataMakerRec->GetDigitsData(6+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nDigitsL2); | |
680 | fAliITSQADataMakerRec->GetDigitsData(7+fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nDigitsL1,nDigitsL2); | |
eca4fa66 | 681 | return rv ; |
44ed7a66 | 682 | } |
683 | ||
096292ae | 684 | //____________________________________________________________________________ |
eca4fa66 | 685 | Int_t AliITSQASPDDataMakerRec::InitRecPoints() |
096292ae | 686 | { |
687 | // Initialization for RECPOINTS - SPD - | |
7d297381 | 688 | const Bool_t expert = kTRUE ; |
689 | const Bool_t image = kTRUE ; | |
eca4fa66 | 690 | Int_t rv = 0 ; |
8b7e858c | 691 | //AliInfo(Form("fAliITSQADataMakerRec->GetEventSpecie() %d\n",fAliITSQADataMakerRec->GetEventSpecie())); |
692 | //AliInfo(Form("fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()] %d\n",fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])); | |
eca4fa66 | 693 | // fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries(); |
26ee9565 | 694 | TH1F* hlayer= new TH1F("SPDLayPattern_SPD","Layer map - SPD",6,0.,6.); |
096292ae | 695 | hlayer->GetXaxis()->SetTitle("Layer number"); |
696 | hlayer->GetYaxis()->SetTitle("Entries"); | |
8b7e858c | 697 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hlayer, 0+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
7a0e5776 | 698 | fSPDhRecPointsTask++; |
096292ae | 699 | |
700 | TH1F** hmod = new TH1F*[2]; | |
701 | TH1F** hxl = new TH1F*[2]; | |
702 | TH1F** hzl = new TH1F*[2]; | |
703 | TH1F** hxg = new TH1F*[2]; | |
704 | TH1F** hyg = new TH1F*[2]; | |
705 | TH1F** hzg = new TH1F*[2]; | |
706 | TH1F** hr = new TH1F*[2]; | |
707 | TH1F** hphi = new TH1F*[2]; | |
708 | TH1F** hMultSPDcl = new TH1F*[2]; | |
8bab7823 | 709 | TH2F** hNyNz = new TH2F*[2]; // y and z cluster length |
710 | TH1F** hNpixels = new TH1F*[2]; // cluster size in number of pixels | |
711 | TH1F** hType = new TH1F*[2]; // cluster type according to conventional table | |
712 | TH2F** hPhiZ = new TH2F*[2]; | |
096292ae | 713 | |
714 | Float_t xlim[2]={4.5,8.}; | |
715 | Float_t zlim[2]={15.,15.}; | |
716 | ||
717 | Char_t name[50]; | |
718 | Char_t title[50]; | |
719 | for (Int_t iLay=0;iLay<2;iLay++) { | |
26ee9565 | 720 | sprintf(name,"SPDModPattern_SPD%d",iLay+1); |
096292ae | 721 | sprintf(title,"Module map - SPD Layer %d",iLay+1); |
722 | hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules); | |
723 | hmod[iLay]->GetXaxis()->SetTitle("Module number"); | |
724 | hmod[iLay]->GetYaxis()->SetTitle("Entries"); | |
8bab7823 | 725 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hmod[iLay], 1+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
7a0e5776 | 726 | fSPDhRecPointsTask++; |
096292ae | 727 | |
26ee9565 | 728 | sprintf(name,"SPDxLoc_SPD%d",iLay+1); |
096292ae | 729 | sprintf(title,"Local x coordinate - SPD Layer %d",iLay+1); |
730 | hxl[iLay]=new TH1F(name,title,100,-4.,4.); | |
731 | hxl[iLay]->GetXaxis()->SetTitle("Local x [cm]"); | |
732 | hxl[iLay]->GetYaxis()->SetTitle("Entries"); | |
8bab7823 | 733 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hxl[iLay], 2+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
7a0e5776 | 734 | fSPDhRecPointsTask++; |
096292ae | 735 | |
26ee9565 | 736 | sprintf(name,"SPDzLoc_SPD%d",iLay+1); |
096292ae | 737 | sprintf(title,"Local z coordinate - SPD Layer %d",iLay+1); |
738 | hzl[iLay]=new TH1F(name,title,100,-4.,4.); | |
739 | hzl[iLay]->GetXaxis()->SetTitle("Local z [cm]"); | |
740 | hzl[iLay]->GetYaxis()->SetTitle("Entries"); | |
8bab7823 | 741 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hzl[iLay], 3+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
7a0e5776 | 742 | fSPDhRecPointsTask++; |
096292ae | 743 | |
26ee9565 | 744 | sprintf(name,"SPDxGlob_SPD%d",iLay+1); |
096292ae | 745 | sprintf(title,"Global x coordinate - SPD Layer %d",iLay+1); |
746 | hxg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]); | |
747 | hxg[iLay]->GetXaxis()->SetTitle("Global x [cm]"); | |
748 | hxg[iLay]->GetYaxis()->SetTitle("Entries"); | |
8bab7823 | 749 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hxg[iLay],4+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
7a0e5776 | 750 | fSPDhRecPointsTask++; |
096292ae | 751 | |
26ee9565 | 752 | sprintf(name,"SPDyGlob_SPD%d",iLay+1); |
096292ae | 753 | sprintf(title,"Global y coordinate - SPD Layer %d",iLay+1); |
754 | hyg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]); | |
755 | hyg[iLay]->GetXaxis()->SetTitle("Global y [cm]"); | |
756 | hyg[iLay]->GetYaxis()->SetTitle("Entries"); | |
8bab7823 | 757 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hyg[iLay], 5+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
7a0e5776 | 758 | fSPDhRecPointsTask++; |
096292ae | 759 | |
26ee9565 | 760 | sprintf(name,"SPDzGlob_SPD%d",iLay+1); |
096292ae | 761 | sprintf(title,"Global z coordinate - SPD Layer %d",iLay+1); |
762 | hzg[iLay]=new TH1F(name,title,150,-zlim[iLay],zlim[iLay]); | |
763 | hzg[iLay]->GetXaxis()->SetTitle("Global z [cm]"); | |
764 | hzg[iLay]->GetYaxis()->SetTitle("Entries"); | |
8bab7823 | 765 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hzg[iLay], 6+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
7a0e5776 | 766 | fSPDhRecPointsTask++; |
096292ae | 767 | |
26ee9565 | 768 | sprintf(name,"SPDr_SPD%d",iLay+1); |
096292ae | 769 | sprintf(title,"Radius - SPD Layer %d",iLay+1); |
770 | hr[iLay]=new TH1F(name,title,100,0.,10.); | |
771 | hr[iLay]->GetXaxis()->SetTitle("r [cm]"); | |
772 | hr[iLay]->GetYaxis()->SetTitle("Entries"); | |
8bab7823 | 773 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hr[iLay], 7+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
7a0e5776 | 774 | fSPDhRecPointsTask++; |
096292ae | 775 | |
26ee9565 | 776 | sprintf(name,"SPDphi_SPD%d",iLay+1); |
096292ae | 777 | sprintf(title,"#varphi - SPD Layer %d",iLay+1); |
439e7a8a | 778 | hphi[iLay]=new TH1F(name,title,1000,0.,2*TMath::Pi()); |
096292ae | 779 | hphi[iLay]->GetXaxis()->SetTitle("#varphi [rad]"); |
780 | hphi[iLay]->GetYaxis()->SetTitle("Entries"); | |
8bab7823 | 781 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hphi[iLay], 8+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
7a0e5776 | 782 | fSPDhRecPointsTask++; |
096292ae | 783 | |
26ee9565 | 784 | sprintf(name,"SPDSizeYvsZ_SPD%d",iLay+1); |
096292ae | 785 | sprintf(title,"Cluster dimension - SPD Layer %d",iLay+1); |
786 | hNyNz[iLay]=new TH2F(name,title,100,0.,100.,100,0.,100.); | |
787 | hNyNz[iLay]->GetXaxis()->SetTitle("z length"); | |
788 | hNyNz[iLay]->GetYaxis()->SetTitle("y length"); | |
8bab7823 | 789 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hNyNz[iLay], 9+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
790 | fSPDhRecPointsTask++; | |
791 | ||
792 | sprintf(name,"SPDSizeTot_SPD%d",iLay+1); | |
793 | sprintf(title,"Cluster size - SPD Layer %d",iLay+1); | |
794 | hNpixels[iLay]=new TH1F(name,title,100,0.,100.); | |
795 | hNpixels[iLay]->GetXaxis()->SetTitle("Cluster size"); | |
796 | hNpixels[iLay]->GetYaxis()->SetTitle("Entries"); | |
797 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hNpixels[iLay], 10+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); | |
798 | fSPDhRecPointsTask++; | |
799 | ||
800 | sprintf(name,"SPDType_SPD%d",iLay+1); | |
801 | sprintf(title,"Cluster type - SPD Layer %d",iLay+1); | |
802 | hType[iLay]=new TH1F(name,title,20,0.,20.); | |
803 | hType[iLay]->GetXaxis()->SetTitle("Cluster type"); | |
804 | hType[iLay]->GetYaxis()->SetTitle("Entries"); | |
805 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hType[iLay], 11+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image); | |
7a0e5776 | 806 | fSPDhRecPointsTask++; |
096292ae | 807 | |
26ee9565 | 808 | sprintf(name,"SPDphi_z_SPD%d",iLay+1); |
096292ae | 809 | sprintf(title,"#varphi vs z - SPD Layer %d",iLay+1); |
439e7a8a | 810 | hPhiZ[iLay]=new TH2F(name,title,150,-zlim[iLay],zlim[iLay],200,0.,2*TMath::Pi()); |
096292ae | 811 | hPhiZ[iLay]->GetXaxis()->SetTitle("Global z [cm]"); |
812 | hPhiZ[iLay]->GetYaxis()->SetTitle("#varphi [rad]"); | |
8bab7823 | 813 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hPhiZ[iLay], 12+(12*iLay)+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image); |
7a0e5776 | 814 | fSPDhRecPointsTask++; |
096292ae | 815 | |
816 | } | |
817 | ||
26ee9565 | 818 | TH2F *hrPhi=new TH2F("SPDr_phi_SPD","#varphi vs r - SPD",100,0.,10.,100,0.,2*TMath::Pi()); |
096292ae | 819 | hrPhi->GetXaxis()->SetTitle("r [cm]"); |
820 | hrPhi->GetYaxis()->SetTitle("#varphi [rad]"); | |
8bab7823 | 821 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hrPhi, 25+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], expert, !image); |
7a0e5776 | 822 | fSPDhRecPointsTask++; |
096292ae | 823 | |
26ee9565 | 824 | TH2F *hxy=new TH2F("SPDx_y_SPD","Global y vs x - SPD",200,-10.,10.,200,-10.,10.); |
096292ae | 825 | hxy->GetXaxis()->SetTitle("Global x [cm]"); |
826 | hxy->GetYaxis()->SetTitle("Global y [cm]"); | |
8bab7823 | 827 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hxy, 26+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image); |
7a0e5776 | 828 | fSPDhRecPointsTask++; |
096292ae | 829 | |
830 | for (Int_t iLay=0;iLay<2;iLay++) { | |
26ee9565 | 831 | sprintf(name,"SPDMultiplicity_SPD%d",iLay+1); |
096292ae | 832 | sprintf(title,"Cluster multiplicity - SPD Layer %d",iLay+1); |
833 | hMultSPDcl[iLay]=new TH1F(name,title,200,0.,200.); | |
834 | hMultSPDcl[iLay]->GetXaxis()->SetTitle("Cluster multiplicity"); | |
835 | hMultSPDcl[iLay]->GetYaxis()->SetTitle("Entries"); | |
8bab7823 | 836 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl[iLay], 27+iLay+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image); |
7a0e5776 | 837 | fSPDhRecPointsTask++; |
096292ae | 838 | } |
839 | ||
840 | TH2F *hMultSPDcl2MultSPDcl1 = | |
26ee9565 | 841 | new TH2F("SPDMultCorrelation_SPD","Cluster multiplicity correlation - SPD",200,0.,200.,200,0.,200.); |
096292ae | 842 | hMultSPDcl2MultSPDcl1->GetXaxis()->SetTitle("Clusters multiplicity (Layer 1)"); |
843 | hMultSPDcl2MultSPDcl1->GetYaxis()->SetTitle("Clusters multiplicity (Layer 2)"); | |
8bab7823 | 844 | rv = fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl2MultSPDcl1, 29+fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()], !expert, image); |
7a0e5776 | 845 | fSPDhRecPointsTask++; |
096292ae | 846 | |
5379c4a3 | 847 | AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SPD Recs histograms booked\n",fSPDhRecPointsTask)); |
096292ae | 848 | |
eca4fa66 | 849 | return rv ; |
096292ae | 850 | } |
851 | ||
852 | //____________________________________________________________________________ | |
eca4fa66 | 853 | Int_t AliITSQASPDDataMakerRec::MakeRecPoints(TTree * clusterTree) |
096292ae | 854 | { |
855 | // Fill QA for RecPoints - SPD - | |
8ec28eb2 | 856 | Int_t rv = 0 ; |
e62fe478 | 857 | AliITSRecPointContainer* rpcont=AliITSRecPointContainer::Instance(); |
8ec28eb2 | 858 | TClonesArray *recpoints = rpcont->FetchClusters(0,clusterTree); |
e62fe478 | 859 | if(!rpcont->GetStatusOK() || !rpcont->IsSPDActive()){ |
860 | AliError("can't get SPD clusters !"); | |
eca4fa66 | 861 | return rv; |
3647765c | 862 | } |
8ec28eb2 | 863 | |
8b7e858c | 864 | //AliInfo(Form("fAliITSQADataMakerRec->GetEventSpecie() %d\n",fAliITSQADataMakerRec->GetEventSpecie())); |
865 | //AliInfo(Form("fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()] %d\n",fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])); | |
e62fe478 | 866 | Int_t nSPDmod = AliITSgeomTGeo::GetModuleIndex(3,1,1); |
8ec28eb2 | 867 | |
3647765c | 868 | Float_t cluGlo[3] = {0.,0.,0.}; |
869 | Int_t nClusters[2] = {0,0}; | |
8ec28eb2 | 870 | |
e62fe478 | 871 | for (Int_t iIts=0; iIts < nSPDmod; iIts++) { |
872 | recpoints = rpcont->UncheckedGetClusters(iIts); | |
873 | Int_t nCluster = recpoints->GetEntriesFast(); | |
874 | if(nCluster == 0)continue; | |
3647765c | 875 | // loop over clusters |
876 | while(nCluster--) { | |
8ec28eb2 | 877 | AliITSRecPoint* cluster = |
e62fe478 | 878 | (AliITSRecPoint*)recpoints->UncheckedAt(nCluster); |
879 | if (cluster->GetLayer()>1)continue; | |
3647765c | 880 | Int_t lay=cluster->GetLayer(); |
8b7e858c | 881 | fAliITSQADataMakerRec->GetRecPointsData(0 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(lay); |
3647765c | 882 | cluster->GetGlobalXYZ(cluGlo); |
883 | Float_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]); | |
096292ae | 884 | Float_t phi= TMath::Pi() + TMath::ATan2(-cluGlo[1],-cluGlo[0]); |
885 | if (lay==0) { | |
8ec28eb2 | 886 | fAliITSQADataMakerRec->GetRecPointsData(1 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(iIts); |
887 | fAliITSQADataMakerRec->GetRecPointsData(2 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetDetLocalX()); | |
888 | fAliITSQADataMakerRec->GetRecPointsData(3 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetDetLocalZ()); | |
889 | fAliITSQADataMakerRec->GetRecPointsData(4 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[0]); | |
890 | fAliITSQADataMakerRec->GetRecPointsData(5 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[1]); | |
891 | fAliITSQADataMakerRec->GetRecPointsData(6 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[2]); | |
892 | fAliITSQADataMakerRec->GetRecPointsData(7 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(rad); | |
893 | fAliITSQADataMakerRec->GetRecPointsData(8 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(phi); | |
894 | fAliITSQADataMakerRec->GetRecPointsData(9 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetNz(),cluster->GetNy()); | |
895 | fAliITSQADataMakerRec->GetRecPointsData(10 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetNpixels()); | |
896 | fAliITSQADataMakerRec->GetRecPointsData(11 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetSPDclusterType()); | |
897 | fAliITSQADataMakerRec->GetRecPointsData(12 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[2],phi); | |
898 | } else { | |
8bab7823 | 899 | fAliITSQADataMakerRec->GetRecPointsData(13 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(iIts); |
900 | fAliITSQADataMakerRec->GetRecPointsData(14 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetDetLocalX()); | |
901 | fAliITSQADataMakerRec->GetRecPointsData(15 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetDetLocalZ()); | |
902 | fAliITSQADataMakerRec->GetRecPointsData(16 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[0]); | |
903 | fAliITSQADataMakerRec->GetRecPointsData(17 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[1]); | |
904 | fAliITSQADataMakerRec->GetRecPointsData(18 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[2]); | |
905 | fAliITSQADataMakerRec->GetRecPointsData(19 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(rad); | |
906 | fAliITSQADataMakerRec->GetRecPointsData(20 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(phi); | |
907 | fAliITSQADataMakerRec->GetRecPointsData(21 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetNz(),cluster->GetNy()); | |
908 | fAliITSQADataMakerRec->GetRecPointsData(22 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetNpixels()); | |
909 | fAliITSQADataMakerRec->GetRecPointsData(23 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluster->GetSPDclusterType()); | |
910 | fAliITSQADataMakerRec->GetRecPointsData(24 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[2],phi); | |
096292ae | 911 | } |
8bab7823 | 912 | fAliITSQADataMakerRec->GetRecPointsData(25 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(rad,phi); |
913 | fAliITSQADataMakerRec->GetRecPointsData(26 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(cluGlo[0],cluGlo[1]); | |
8ec28eb2 | 914 | |
915 | nClusters[lay]++; | |
3647765c | 916 | } // end of cluster loop |
917 | } // end of its "subdetector" loop | |
8ec28eb2 | 918 | |
3647765c | 919 | for (Int_t iLay=0; iLay<2; iLay++) |
8bab7823 | 920 | fAliITSQADataMakerRec->GetRecPointsData(27 +iLay +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nClusters[iLay]); |
8ec28eb2 | 921 | |
8bab7823 | 922 | fAliITSQADataMakerRec->GetRecPointsData(29 +fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()])->Fill(nClusters[0],nClusters[1]); |
8ec28eb2 | 923 | |
eca4fa66 | 924 | return rv ; |
096292ae | 925 | } |
7a0e5776 | 926 | |
927 | ||
928 | ||
929 | //_______________________________________________________________ | |
930 | ||
96d29da9 | 931 | Int_t AliITSQASPDDataMakerRec::GetOffset(AliQAv1::TASKINDEX_t task,Int_t specie) const { |
7a0e5776 | 932 | // Returns offset number according to the specified task |
933 | Int_t offset=0; | |
4e25ac79 | 934 | if( task == AliQAv1::kRAWS ) { |
80b9610c | 935 | offset=fGenRawsOffset[specie]; |
7a0e5776 | 936 | } |
eca4fa66 | 937 | else if( task == AliQAv1::kDIGITSR ) { |
80b9610c | 938 | offset=fGenDigitsOffset[specie]; |
eca4fa66 | 939 | } |
4e25ac79 | 940 | else if( task == AliQAv1::kRECPOINTS ) { |
80b9610c | 941 | offset=fGenRecPointsOffset[specie]; |
7a0e5776 | 942 | } |
7a0e5776 | 943 | |
944 | return offset; | |
945 | } | |
946 | ||
947 | //_______________________________________________________________ | |
948 | ||
8b7e858c | 949 | void AliITSQASPDDataMakerRec::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset, Int_t specie) { |
eca4fa66 | 950 | // Returns offset number according to the specified task |
951 | if( task == AliQAv1::kRAWS ) { | |
8b7e858c | 952 | fGenRawsOffset[specie]=offset; |
eca4fa66 | 953 | } |
954 | else if( task == AliQAv1::kDIGITSR ) { | |
4a903927 | 955 | fGenDigitsOffset[specie]=offset; |
eca4fa66 | 956 | } |
957 | else if( task == AliQAv1::kRECPOINTS ) { | |
8b7e858c | 958 | fGenRecPointsOffset[specie]=offset; |
eca4fa66 | 959 | } |
960 | } | |
961 | ||
962 | //_______________________________________________________________ | |
963 | ||
96d29da9 | 964 | Int_t AliITSQASPDDataMakerRec::GetTaskHisto(AliQAv1::TASKINDEX_t task) const { |
7a0e5776 | 965 | // Returns the number of histograms associated to the specified task |
eca4fa66 | 966 | |
7a0e5776 | 967 | Int_t histotot=0; |
968 | ||
4e25ac79 | 969 | if( task == AliQAv1::kRAWS ) { |
7a0e5776 | 970 | histotot=fSPDhRawsTask; |
971 | } | |
eca4fa66 | 972 | else if( task == AliQAv1::kDIGITSR ) { |
973 | histotot=fSPDhDigitsTask; | |
974 | } | |
4e25ac79 | 975 | else if( task == AliQAv1::kRECPOINTS ){ |
7a0e5776 | 976 | histotot=fSPDhRecPointsTask; |
977 | } | |
4a903927 | 978 | |
a1287af5 | 979 | return histotot; |
7a0e5776 | 980 | } |
96d29da9 | 981 |