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