added verbosity to QA histograms (Yves)
[u/mrichter/AliRoot.git] / ITS / AliITSQASSDDataMakerRec.cxx
CommitLineData
0730893d 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 **************************************************************************/
15/* $Id$ */
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
24// --- ROOT system ---
25#include <TH2D.h>
26#include <TTree.h>
27#include <TMath.h>
28#include <TString.h>
29#include <TSystem.h>
30
31// --- Standard library ---
32
33// --- AliRoot header files ---
34#include "AliITSQASSDDataMakerRec.h"
35#include "AliQADataMakerRec.h"
36#include "AliLog.h"
4e25ac79 37#include "AliQAv1.h"
0730893d 38#include "AliQAChecker.h"
39#include "AliRawReader.h"
40#include "AliRawReaderRoot.h"
41#include "AliITSRawStreamSSD.h"
42#include "AliITSgeomTGeo.h"
43#include "AliRawEventHeaderBase.h"
44#include "AliITSRecPoint.h"
6f285ba5 45#include "AliITSdigitSSD.h"
0730893d 46#include "AliITSBadChannelsSSDv2.h"
47
48#include "AliCDBManager.h"
49#include "AliCDBEntry.h"
50
51ClassImp(AliITSQASSDDataMakerRec)
52
53AliITSQASSDDataMakerRec::AliITSQASSDDataMakerRec(AliITSQADataMakerRec *aliITSQADataMakerRec, Bool_t kMode, Int_t ldc) :
54TObject(),
55fAliITSQADataMakerRec(aliITSQADataMakerRec),
56fSSDEvent(0),
57fSSDEventPerCycle(0),
58fkOnline(kMode),
59fLDC(ldc),
60fSSDRawsOffset(0), fSSDRawsDAOffset(0),
61fSSDRawsCommonLevelOffset(0),
7a0e5776 62fSSDhRawsTask(0),
44ed7a66 63fSSDhDigitsTask(0),
7a0e5776 64fSSDhRecPointsTask(0),
430bb675 65fGenRawsOffset(0),
44ed7a66 66fGenDigitsOffset(0),
430bb675 67fGenRecPointsOffset(0),
0730893d 68fCDBManager(0) {
69 // Default constructor
70 //initilize the raw signal vs strip number histograms
71 if(fkOnline) {
72 fCDBManager = AliCDBManager::Instance();
162637e4 73 //fCDBManager->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
0730893d 74 fCDBManager->SetDefaultStorage(gSystem->Getenv("AMORE_CDB_URI"));
75 Int_t runNumber = atoi(gSystem->Getenv("DATE_RUN_NUMBER"));
76 if(!runNumber)
5379c4a3 77 AliWarning("DATE_RUN_NUMBER not defined!!!\n");
0730893d 78
79 fCDBManager->SetRun(runNumber);
80 AliCDBEntry *geomGRP = fCDBManager->Get("GRP/Geometry/Data");
5379c4a3 81 if(!geomGRP) AliWarning("GRP geometry not found!!!\n");
0730893d 82
83 Int_t gLayer = 0,gLadder = 0, gModule = 0;
84 Int_t gHistCounter = 0;
85 TString gTitle;
86
87 for(Int_t iModule = 500; iModule < fgkSSDMODULES + 500; iModule++) {
88 AliITSgeomTGeo::GetModuleId(iModule,gLayer,gLadder,gModule);
89 gTitle = "SSD_RawSignal_Layer"; gTitle += gLayer;
90 gTitle += "_Ladder"; gTitle += gLadder;
91 gTitle += "_Module"; gTitle += gModule;
92 fHistSSDRawSignalModule[gHistCounter] = new TH1D(gTitle.Data(),gTitle.Data(),
93 2*fgkNumberOfPSideStrips,0,2*fgkNumberOfPSideStrips);
94 gHistCounter += 1;
95
96 for(Int_t iStrip = 0; iStrip < 2*fgkNumberOfPSideStrips; iStrip++)
97 fOccupancyMatrix[iModule-500][iStrip] = 0;
98 }//module loop
99 }//online flag
100 else {
101 for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++)
102 fHistSSDRawSignalModule[iModule]=NULL;
103 fCDBManager = NULL;
104 }
105}
106
107//____________________________________________________________________________
108AliITSQASSDDataMakerRec::AliITSQASSDDataMakerRec(const AliITSQASSDDataMakerRec& qadm) :
109TObject(),
110fAliITSQADataMakerRec(qadm.fAliITSQADataMakerRec),
111fSSDEvent(qadm.fSSDEvent),
112fSSDEventPerCycle(qadm.fSSDEventPerCycle),
113fkOnline(qadm.fkOnline),
114fLDC(qadm.fLDC),
115fSSDRawsOffset(qadm.fSSDRawsOffset), fSSDRawsDAOffset(qadm.fSSDRawsDAOffset),
116fSSDRawsCommonLevelOffset(qadm.fSSDRawsCommonLevelOffset),
7a0e5776 117fSSDhRawsTask(qadm.fSSDhRawsTask),
44ed7a66 118fSSDhDigitsTask(qadm.fSSDhDigitsTask),
7a0e5776 119fSSDhRecPointsTask(qadm.fSSDhRecPointsTask),
430bb675 120fGenRawsOffset(qadm.fGenRawsOffset),
44ed7a66 121fGenDigitsOffset(qadm.fGenDigitsOffset),
430bb675 122fGenRecPointsOffset(qadm.fGenRecPointsOffset),
0730893d 123fCDBManager(qadm.fCDBManager) {
124 //copy ctor
125 fAliITSQADataMakerRec->SetName((const char*)qadm.fAliITSQADataMakerRec->GetName()) ;
126 fAliITSQADataMakerRec->SetTitle((const char*)qadm.fAliITSQADataMakerRec->GetTitle());
127}
128
129//__________________________________________________________________
130AliITSQASSDDataMakerRec& AliITSQASSDDataMakerRec::operator = (const AliITSQASSDDataMakerRec& qac )
131{
132 // Equal operator.
133 this->~AliITSQASSDDataMakerRec();
134 new(this) AliITSQASSDDataMakerRec(qac);
135 return *this;
136}
137
138//__________________________________________________________________
139AliITSQASSDDataMakerRec::~AliITSQASSDDataMakerRec() {
140 // destructor
141 for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++)
142 if(fHistSSDRawSignalModule[iModule]) delete fHistSSDRawSignalModule[iModule];
143 if(fCDBManager) delete fCDBManager;
144}
145
146//____________________________________________________________________________
147void AliITSQASSDDataMakerRec::StartOfDetectorCycle()
148{
149 if ( fAliITSQADataMakerRec->GetRawsData(0) == NULL ) // Raws not defined
150 return ;
151
152 //Detector specific actions at start of cycle
5379c4a3 153 AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of SSD Cycle\n");
0730893d 154
155 //Data size per DDL
430bb675 156 ((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+4)))->Reset();
0730893d 157 //Data size per LDC
430bb675 158 ((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+22)))->Reset();
0730893d 159
160 //online part
161 if(fkOnline) {
162 for(Int_t iModule = 500; iModule < fgkSSDMODULES + 500; iModule++) {
163 for(Int_t iStrip = 0; iStrip < 2*fgkNumberOfPSideStrips; iStrip++)
164 fOccupancyMatrix[iModule-500][iStrip] = 0;
165 }//module loop
166
167 Int_t gHistPositionOccupancyPerLadder = 0;
168 Int_t gLayer = 0, gLadder = 0, gModule = 0;
169 for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) {
170 AliITSgeomTGeo::GetModuleId(iModule+500,gLayer,gLadder,gModule);
171
172 gHistPositionOccupancyPerLadder = (gLayer == 5) ? 2*(gLadder - 1) : 2*(gLadder - 1 + fgkSSDLADDERSLAYER5);
173
174 //P-SIDE OCCUPANCY
430bb675 175 fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder)->Reset();
0730893d 176 //N-SIDE OCCUPANCY
430bb675 177 fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder+1)->Reset();
0730893d 178
430bb675 179 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6))->Reset();
180 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1))->Reset();
0730893d 181 }//module loop
182 }//online flag
183}
184
185//____________________________________________________________________________
4e25ac79 186void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t /*task*/, TObjArray* /*list*/)
0730893d 187{
188 // launch the QA checking
0730893d 189 // launch the QA checking
5379c4a3 190 AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n");
191 AliDebug(AliQAv1::GetQADebugLevel(), Form("Offset: %d\n",fGenRawsOffset));
6f285ba5 192
193 if (fAliITSQADataMakerRec->GetRawsData(0) != NULL ) {
194 //Data size per DDL
195 for(Int_t i = 0; i < fgkNumOfDDLs; i++) {
196 Double_t gSizePerDDL = ((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+5+i))->GetMean();
197 //cout<<"DDL: "<<i+2<<" - Size: "<<gSizePerDDL<<" - Mean: "<<
198 //(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+5+i))->GetMean()<<endl;
199 ((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+4)))->SetBinContent(i+2,gSizePerDDL);
200 }
201
202 //Data size per LDC
203 for(Int_t i = 0; i < fgkNumOfLDCs; i++) {
204 Double_t gSizePerLDC = ((TH1D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+23+i))->GetMean();
205 ((TH1D *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+22)))->SetBinContent(i+6,gSizePerLDC);
206 }
207 }//raw data end of cycle
0730893d 208
209 //online part
210 if(fkOnline) {
211 //Output of the DA
212 MonitorOCDBObjects();
213
214 Int_t gHistPositionOccupancyPerModule = 0;
215 Int_t gLayer = 0, gLadder = 0, gModule = 0;
216 //occupancy per module
217 for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) {
218 AliITSgeomTGeo::GetModuleId(iModule+500,gLayer,gLadder,gModule);
219
220 gHistPositionOccupancyPerModule = (gLayer == 5) ? ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + gModule - 1) : ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + gModule + fgkSSDMODULESLAYER5 - 1);
221 for(Int_t iBins = 1; iBins < fHistSSDRawSignalModule[iModule]->GetXaxis()->GetNbins(); iBins++)
430bb675 222 fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule)->SetBinContent(iBins,fOccupancyMatrix[iModule][iBins-1]);
0730893d 223
224 if(fSSDEventPerCycle != 0)
430bb675 225 ((TH1F *)(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule)))->Scale(100./fSSDEventPerCycle);
0730893d 226 }//module loop
227
228 //occupancy per ladder
229 Int_t gHistPositionOccupancyPerLadder = 0;
230 Int_t lLadderLocationY = 0;
231 Double_t occupancy = 0.0, occupancyThreshold = 0.0, occupancyAverage = 0.0;
232 for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) {
233 AliITSgeomTGeo::GetModuleId(iModule+500,gLayer,gLadder,gModule);
234
235 gHistPositionOccupancyPerModule = (gLayer == 5) ? ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + gModule - 1) : ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + gModule + fgkSSDMODULESLAYER5 - 1);
236 gHistPositionOccupancyPerLadder = (gLayer == 5) ? 2*(gLadder - 1) : 2*(gLadder - 1 + fgkSSDLADDERSLAYER5);
237
238 //P-SIDE OCCUPANCY
430bb675 239 occupancy = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),0,0,0);
240 occupancyThreshold = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),0,1,3);
241 occupancyAverage = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),0,2,0);
0730893d 242
430bb675 243 fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder)->Fill(gModule,occupancy);
0730893d 244 lLadderLocationY = 3*gLadder; // sideP=1 sideN=0
245 if(gLayer == 5) {
246 //occupancy per module - no threshold
430bb675 247 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6))->SetBinContent(gModule,lLadderLocationY,occupancy);
0730893d 248 //occupancy per module - threshold @ 3%
430bb675 249 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+2))->SetBinContent(gModule,lLadderLocationY,occupancyThreshold);
0730893d 250 //average occupancy per module
430bb675 251 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+4))->SetBinContent(gModule,lLadderLocationY,occupancyAverage);
0730893d 252 }
253 else if(gLayer == 6) {
254 //occupancy per module - no threshold
430bb675 255 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1))->SetBinContent(gModule,lLadderLocationY,occupancy);
0730893d 256 //occupancy per module - threshold @ 3%
430bb675 257 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+3))->SetBinContent(gModule,lLadderLocationY,occupancyThreshold);
0730893d 258 //average occupancy per module
430bb675 259 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+5))->SetBinContent(gModule,lLadderLocationY,occupancyAverage);
0730893d 260 }
261
262 //N-SIDE OCCUPANCY
430bb675 263 occupancy = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),1,0,0);
264 occupancyThreshold = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),1,1,3);
265 occupancyAverage = GetOccupancyModule((TH1 *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+gHistPositionOccupancyPerModule),1,2,0);
0730893d 266
430bb675 267 fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+gHistPositionOccupancyPerLadder+1)->Fill(gModule,occupancy);
0730893d 268 if(gLayer == 5) {
269 //occupancy per module - no threshold
430bb675 270 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6))->SetBinContent(gModule,lLadderLocationY-1,occupancy);
0730893d 271 //occupancy per module - threshold @ 3%
430bb675 272 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+2))->SetBinContent(gModule,lLadderLocationY-1,occupancyThreshold);
0730893d 273 //average occupancy per module
430bb675 274 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+4))->SetBinContent(gModule,lLadderLocationY-1,occupancyAverage);
0730893d 275 }
276 else if(gLayer == 6) {
277 //occupancy per module - no threshold
430bb675 278 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+1))->SetBinContent(gModule,lLadderLocationY-1,occupancy);
0730893d 279 //occupancy per module - threshold @ 3%
430bb675 280 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+3))->SetBinContent(gModule,lLadderLocationY-1,occupancyThreshold);
0730893d 281 //average occupancy per module
430bb675 282 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsCommonLevelOffset+fgkSSDMODULES+2*fgkSSDLADDERSLAYER5+2*fgkSSDLADDERSLAYER6+5))->SetBinContent(gModule,lLadderLocationY-1,occupancyAverage);
0730893d 283 }
284 }//module loop
285 }//online flag for SSD
286
287 fSSDEventPerCycle = 0;
288
4e25ac79 289 // AliQAChecker::Instance()->Run( AliQAv1::kITS , task, list);
0730893d 290}
291
292//____________________________________________________________________________
293void AliITSQASSDDataMakerRec::InitRaws() {
294 // Initialization for RAW data - SSD -
7d297381 295 const Bool_t expert = kTRUE ;
296 const Bool_t saveCorr = kTRUE ;
297 const Bool_t image = kTRUE ;
298
57acd2d2 299 fGenRawsOffset = (fAliITSQADataMakerRec->fRawsQAList[AliRecoParam::kDefault])->GetEntries();
0730893d 300
301 if(fkOnline) {
5379c4a3 302 AliDebug(AliQAv1::GetQADebugLevel(), "Book Online Histograms for SSD\n");
0730893d 303 }
304 else {
5379c4a3 305 AliDebug(AliQAv1::GetQADebugLevel(), "Book Offline Histograms for SSD\n ");
0730893d 306 }
5379c4a3 307 AliDebug(AliQAv1::GetQADebugLevel(), Form("Number of histograms (SPD+SDD): %d\n",fGenRawsOffset));
0730893d 308 TString gTitle = 0;
db72ff3b 309 TString gName = 0;
0730893d 310 //book online-offline QA histos
6f285ba5 311 TH1D *fHistSSDEventType = new TH1D("fHistSSDEventType",
db72ff3b 312 "SSD Event Type;Event type;Events",
0730893d 313 31,-1,30);
314 fAliITSQADataMakerRec->Add2RawsList(fHistSSDEventType,
7d297381 315 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 316 fSSDRawsOffset += 1;
6f285ba5 317 TH1D *fHistSSDDataSize = new TH1D("fHistSSDDataSize",
db72ff3b 318 "SSD Data Size;(SSD data size) [KB];Events",
6f285ba5 319 1000,0,500);
0730893d 320 fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSize,
7d297381 321 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 322 fSSDRawsOffset += 1;
6f285ba5 323 TH1D *fHistSSDDataSizePercentage = new TH1D("fHistSSDDataSizePercentage",
db72ff3b 324 "SSD Data Size Percentage;SSD data size [%];Events",
6f285ba5 325 1000,0,100);
0730893d 326 fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePercentage,
7d297381 327 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 328 fSSDRawsOffset += 1;
6f285ba5 329 TH1D *fHistSSDDDLId = new TH1D("fHistSSDDDLId",
db72ff3b 330 "SSD DDL Id;DDL id;Events",20,510.5,530.5);
0730893d 331 fAliITSQADataMakerRec->Add2RawsList(fHistSSDDDLId,
7d297381 332 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 333 fSSDRawsOffset += 1;
6f285ba5 334 TH1D *fHistSSDDataSizePerDDL = new TH1D("fHistSSDDataSizePerDDL",
db72ff3b 335 "SSD Data Size Per DDL;DDL id;<SSD data size> [KB]",
0730893d 336 20,510.5,530.5);
337 fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerDDL,
7d297381 338 fGenRawsOffset+fSSDRawsOffset, !expert, image, !saveCorr);
0730893d 339 fSSDRawsOffset += 1;
430bb675 340 TH1D *fHistSSDDataSizeDDL[fgkNumOfDDLs];
0730893d 341 for(Int_t i = 1; i < fgkNumOfDDLs+1; i++) {
db72ff3b 342 gName = Form("fHistSSDDataSizeDDL%d", i+511) ;
343 gTitle = Form("SSD Data Size DDL %d", i+511) ;
344 fHistSSDDataSizeDDL[i-1] = new TH1D(gName.Data(),
345 Form("%s;(SSD data size) [KB];Events", gTitle.Data()),
346 1000,0,50);
347 fHistSSDDataSizeDDL[i-1] = new TH1D(gName.Data(),
348 Form("%s;(SSD data size) [KB];Events", gTitle.Data()),
349 1000,0,50);
0730893d 350 fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeDDL[i-1],
7d297381 351 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 352 fSSDRawsOffset += 1;
353 }
354
db72ff3b 355 TH1D *fHistSSDLDCId = new TH1D("fHistSSDLDCId","SSD LDC Id;LDC id;Events",10,0.5,10.5);
0730893d 356 fAliITSQADataMakerRec->Add2RawsList(fHistSSDLDCId,
7d297381 357 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 358 fSSDRawsOffset += 1;
6f285ba5 359 TH1D *fHistSSDDataSizePerLDC = new TH1D("fHistSSDDataSizePerLDC",
db72ff3b 360 "SSD Data Size Per LDC;LDC id;<SSD data size> [KB]",
0730893d 361 20,0.5,20.5);
362 fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerLDC,
7d297381 363 fGenRawsOffset+fSSDRawsOffset, !expert, image, !saveCorr);
0730893d 364 fSSDRawsOffset += 1;
430bb675 365 TH1D *fHistSSDDataSizeLDC[fgkNumOfLDCs];
0730893d 366 for(Int_t i = 1; i < fgkNumOfLDCs+1; i++) {
db72ff3b 367 gName = "fHistSSDDataSizeLDC";
368 if(i == 1) gName += "082";
369 if(i == 2) gName += "086";
370 if(i == 3) gName += "085";
371
372 gTitle = "SSD Data Size LDC ";
0730893d 373 if(i == 1) gTitle += "082";
374 if(i == 2) gTitle += "086";
375 if(i == 3) gTitle += "085";
db72ff3b 376 fHistSSDDataSizeLDC[i-1] = new TH1D(gName.Data(),
377 Form("%s;SSD data size [KB];Events", gTitle.Data()),
6f285ba5 378 1000,0,100);
0730893d 379 fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeLDC[i-1],
7d297381 380 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 381 fSSDRawsOffset += 1;
382 }
383 fSSDRawsCommonLevelOffset = fSSDRawsOffset;
384
385 if(fkOnline) {
386 Int_t gLayer = 0, gLadder = 0, gModule = 0;
387 //occupancy per SSD module
388 TH1D *fHistSSDOccupancyModule[fgkSSDMODULES];
389 for(Int_t i = 500; i < fgkSSDMODULES + 500; i++) {
390 AliITSgeomTGeo::GetModuleId(i,gLayer,gLadder,gModule);
db72ff3b 391 gName = "fHistSSD_Occupancy_Layer";
392 gTitle = "SSD Occupancy Layer";
c672a510 393 if(gLayer == 5) {
db72ff3b 394 gName += gLayer; gName += "_Ladder";
395 gName += 499+gLadder;
396 gTitle += gLayer; gTitle += "_Ladder";
397 gTitle += 499+gLadder;
c672a510 398 }
399 if(gLayer == 6) {
db72ff3b 400 gName += gLayer; gName += "_Ladder";
401 gName += 599+gLadder;
402 gTitle += gLayer; gTitle += "_Ladder";
403 gTitle += 599+gLadder;
c672a510 404 }
db72ff3b 405 gName += "_Module"; gName += gModule;
0730893d 406 gTitle += "_Module"; gTitle += gModule;
db72ff3b 407
408 fHistSSDOccupancyModule[i-500] = new TH1D(gName.Data(),Form("%s;N_{strip};Occupancy [%]", gTitle.Data()),
409 2*fgkNumberOfPSideStrips,0,2*fgkNumberOfPSideStrips);
0730893d 410 fHistSSDOccupancyModule[i-500]->GetXaxis()->SetTitleColor(1);
c672a510 411 fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyModule[i-500],
7d297381 412 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 413 fSSDRawsOffset += 1;
414 }
415
416 //Occupancy per SSD ladder
417 Int_t occupancyCounter = 0;
418 TH1D *fHistSSDOccupancyLadder[2*(fgkSSDLADDERSLAYER5 + fgkSSDLADDERSLAYER6)];
419 for(Int_t iLayer = 5; iLayer < 7; iLayer++) {
420 for(Int_t iLadder = 1; iLadder < AliITSgeomTGeo::GetNLadders(iLayer) + 1; iLadder++) {
db72ff3b 421 //P-side occupancy plots
422 gName = "fHistSSD_Occupancy_Layer";
423 gTitle = "SSD Occupancy Layer";
424 if(iLayer == 5) {
425 gName += iLayer; gName += "_Ladder";
426 gName += 499+iLadder;
427 gTitle += iLayer; gTitle += "_Ladder";
428 gTitle += 499+iLadder;
429 }
430 if(iLayer == 6) {
431 gName += iLayer; gName += "_Ladder";
432 gName += 599+iLadder;
433 gTitle += iLayer; gTitle += "_Ladder";
434 gTitle += 599+iLadder;
435 }
436 gName += "_PSide";
437 gTitle += "_PSide";
438 fHistSSDOccupancyLadder[occupancyCounter] = new TH1D(gName.Data(),
439 Form("%s;Module number;Occupancy [%]", gTitle.Data()),
440 AliITSgeomTGeo::GetNDetectors(iLayer),
441 0.5,AliITSgeomTGeo::GetNDetectors(iLayer)+0.5);
442 fHistSSDOccupancyLadder[occupancyCounter]->GetXaxis()->SetTitleColor(1);
443 fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLadder[occupancyCounter],
444 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
445 occupancyCounter += 1; fSSDRawsOffset += 1;
446 //N-side occupancy plots
447 gName = "fHistSSD_Occupancy_Layer";
448 gTitle = "SSD Occupancy Layer";
449 if(iLayer == 5) {
450 gName += iLayer; gName += "_Ladder";
451 gName += 499+iLadder;
452 gTitle += iLayer; gTitle += "_Ladder";
453 gTitle += 499+iLadder;
454 }
455 if(iLayer == 6) {
456 gName += iLayer; gName += "_Ladder";
457 gName += 599+iLadder;
458 gTitle += iLayer; gTitle += "_Ladder";
459 gTitle += 599+iLadder;
460 }
461 gName += "_NSide";
462 gTitle += "_NSide";
463 fHistSSDOccupancyLadder[occupancyCounter] = new TH1D(gName.Data(),
464 Form("%s;Module number;Occupancy [%]", gTitle.Data()),
465 AliITSgeomTGeo::GetNDetectors(iLayer),
466 0.5,AliITSgeomTGeo::GetNDetectors(iLayer)+0.5);
467 fHistSSDOccupancyLadder[occupancyCounter]->GetXaxis()->SetTitleColor(1);
468 fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLadder[occupancyCounter],
469 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
470 occupancyCounter += 1; fSSDRawsOffset += 1;
0730893d 471 }//ladder loop
472 }//layer loop
473
474 //top level occupancy plots
475 //occupancy per module - no threshold
6f285ba5 476 TH2D *fHistSSDOccupancyLayer5 = new TH2D("fHistSSDOccupancyLayer5",
db72ff3b 477 "SSD Occupancy (Layer 5) - No threshold;N_{modules};N_{Ladders}",
0730893d 478 fgkSSDMODULESPERLADDERLAYER5,
479 0,fgkSSDMODULESPERLADDERLAYER5,
480 3*fgkSSDLADDERSLAYER5,
430bb675 481 5000,500+fgkSSDLADDERSLAYER5);
430bb675 482 fHistSSDOccupancyLayer5->GetZaxis()->SetRangeUser(0.0,100.0);
0730893d 483 Char_t fLabel[3];
484 for(Int_t iBin = 1; iBin < fgkSSDMODULESPERLADDERLAYER5 + 1; iBin++){
485 sprintf(fLabel,"%d",iBin);
486 fHistSSDOccupancyLayer5->GetXaxis()->SetBinLabel(iBin,fLabel);
487 }
c672a510 488 fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer5,
7d297381 489 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 490 fSSDRawsOffset += 1;
6f285ba5 491 TH2D *fHistSSDOccupancyLayer6 = new TH2D("fHistSSDOccupancyLayer6",
db72ff3b 492 "Occupancy per module (Layer 6) - No threshold;N_{modules};N_{Ladders}",
0730893d 493 fgkSSDMODULESPERLADDERLAYER6,
494 0,fgkSSDMODULESPERLADDERLAYER6,
495 3*fgkSSDLADDERSLAYER6,
430bb675 496 600,600+fgkSSDLADDERSLAYER6);
430bb675 497 fHistSSDOccupancyLayer6->GetZaxis()->SetRangeUser(0.0,100.0);
0730893d 498 for(Int_t iBin = 1; iBin < fgkSSDMODULESPERLADDERLAYER6 + 1; iBin++){
499 sprintf(fLabel,"%d",iBin);
500 fHistSSDOccupancyLayer6->GetXaxis()->SetBinLabel(iBin,fLabel);
501 }
c672a510 502 fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer6,
db72ff3b 503 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 504 fSSDRawsOffset += 1;
505
506 //occupancy per module - threshold @ 3%
6f285ba5 507 TH2D *fHistSSDOccupancyThresholdLayer5 = new TH2D("fHistSSDOccupancyThresholdLayer5",
db72ff3b 508 "Occupancy per module (Layer 5) - Threshold 3%;N_{modules};N_{Ladders};Entries",
6f285ba5 509 fgkSSDMODULESPERLADDERLAYER5,
510 0,fgkSSDMODULESPERLADDERLAYER5,
511 3*fgkSSDLADDERSLAYER5,
512 500,500+fgkSSDLADDERSLAYER5);
430bb675 513 fHistSSDOccupancyThresholdLayer5->GetZaxis()->SetRangeUser(3.0,10.0);
c672a510 514 for(Int_t iBin = 1; iBin < fgkSSDMODULESPERLADDERLAYER5 + 1; iBin++){
0730893d 515 sprintf(fLabel,"%d",iBin);
516 fHistSSDOccupancyThresholdLayer5->GetXaxis()->SetBinLabel(iBin,fLabel);
db72ff3b 517 }
518 fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyThresholdLayer5,
519 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 520 fSSDRawsOffset += 1;
6f285ba5 521 TH2D *fHistSSDOccupancyThresholdLayer6 = new TH2D("fHistSSDOccupancyThresholdLayer6",
db72ff3b 522 "Occupancy per module (Layer 6) - Threshold 3%;N_{modules};N_{Ladders}",
6f285ba5 523 fgkSSDMODULESPERLADDERLAYER6,
524 0,fgkSSDMODULESPERLADDERLAYER6,
525 3*fgkSSDLADDERSLAYER6,
526 600,600+fgkSSDLADDERSLAYER6);
430bb675 527 fHistSSDOccupancyThresholdLayer6->GetZaxis()->SetRangeUser(3.0,10.0);
0730893d 528 for(Int_t iBin = 1; iBin < fgkSSDMODULESPERLADDERLAYER6 + 1; iBin++){
529 sprintf(fLabel,"%d",iBin);
530 fHistSSDOccupancyThresholdLayer6->GetXaxis()->SetBinLabel(iBin,fLabel);
531 }
c672a510 532 fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyThresholdLayer6,
7d297381 533 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 534 fSSDRawsOffset += 1;
535
536 //Average occupancy per module
6f285ba5 537 TH2D *fHistSSDAverageOccupancyLayer5 = new TH2D("fHistSSDAverageOccupancyLayer5",
db72ff3b 538 "Average occupancy per module (Layer 5);N_{modules};N_{Ladders}",
6f285ba5 539 fgkSSDMODULESPERLADDERLAYER5,
540 0,fgkSSDMODULESPERLADDERLAYER5,
541 3*fgkSSDLADDERSLAYER5,
542 500,500+fgkSSDLADDERSLAYER5);
430bb675 543 fHistSSDAverageOccupancyLayer5->GetZaxis()->SetRangeUser(0.0,5.0);
0730893d 544 for(Int_t iBin = 1; iBin < fgkSSDMODULESPERLADDERLAYER5 + 1; iBin++){
545 sprintf(fLabel,"%d",iBin);
546 fHistSSDAverageOccupancyLayer5->GetXaxis()->SetBinLabel(iBin,fLabel);
547 }
c672a510 548 fAliITSQADataMakerRec->Add2RawsList(fHistSSDAverageOccupancyLayer5,
db72ff3b 549 fGenRawsOffset+fSSDRawsOffset);
0730893d 550 fSSDRawsOffset += 1;
6f285ba5 551 TH2D *fHistSSDAverageOccupancyLayer6 = new TH2D("fHistSSDAverageOccupancyLayer6",
db72ff3b 552 "Average occupancy per module (Layer 6);N_{modules};N_{Ladders}",
6f285ba5 553 fgkSSDMODULESPERLADDERLAYER6,
554 0,fgkSSDMODULESPERLADDERLAYER6,
555 3*fgkSSDLADDERSLAYER6,
556 600,600+fgkSSDLADDERSLAYER6);
430bb675 557 fHistSSDAverageOccupancyLayer6->GetZaxis()->SetRangeUser(0.0,5.0);
0730893d 558 for(Int_t iBin = 1; iBin < fgkSSDMODULESPERLADDERLAYER6 + 1; iBin++){
559 sprintf(fLabel,"%d",iBin);
560 fHistSSDAverageOccupancyLayer6->GetXaxis()->SetBinLabel(iBin,fLabel);
561 }
c672a510 562 fAliITSQADataMakerRec->Add2RawsList(fHistSSDAverageOccupancyLayer6,
db72ff3b 563 fGenRawsOffset+fSSDRawsOffset, !expert, image, !saveCorr);
0730893d 564 fSSDRawsOffset += 1;
565
566 //Output of the DA
6f285ba5 567 TH2D *fHistPSideBadChannelMapLayer5 = new TH2D("fHistPSideBadChannelMapLayer5",
db72ff3b 568 "Layer 5;N_{module};N_{ladder}",
569 22,1,23,
570 34,500,534);
0730893d 571 fHistPSideBadChannelMapLayer5->GetXaxis()->SetTitleColor(1);
572 fHistPSideBadChannelMapLayer5->SetStats(kFALSE);
573 fHistPSideBadChannelMapLayer5->GetYaxis()->SetTitleOffset(1.8);
574 fHistPSideBadChannelMapLayer5->GetXaxis()->SetNdivisions(22);
575 fHistPSideBadChannelMapLayer5->GetYaxis()->SetNdivisions(34);
576 fHistPSideBadChannelMapLayer5->GetXaxis()->SetLabelSize(0.03);
577 fHistPSideBadChannelMapLayer5->GetYaxis()->SetLabelSize(0.03);
578 fHistPSideBadChannelMapLayer5->GetZaxis()->SetTitleOffset(1.6);
579 fHistPSideBadChannelMapLayer5->GetZaxis()->SetTitle("Bad channels (p-side)[%]");
c672a510 580 fAliITSQADataMakerRec->Add2RawsList(fHistPSideBadChannelMapLayer5,
db72ff3b 581 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 582 fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
583
6f285ba5 584 TH2D *fHistNSideBadChannelMapLayer5 = new TH2D("fHistNSideBadChannelMapLayer5",
db72ff3b 585 "Layer 5;N_{module};N_{ladder}",
586 22,1,23,
587 34,500,534);
0730893d 588 fHistNSideBadChannelMapLayer5->GetXaxis()->SetTitleColor(1);
589 fHistNSideBadChannelMapLayer5->SetStats(kFALSE);
590 fHistNSideBadChannelMapLayer5->GetYaxis()->SetTitleOffset(1.8);
591 fHistNSideBadChannelMapLayer5->GetXaxis()->SetNdivisions(22);
592 fHistNSideBadChannelMapLayer5->GetYaxis()->SetNdivisions(34);
593 fHistNSideBadChannelMapLayer5->GetXaxis()->SetLabelSize(0.03);
594 fHistNSideBadChannelMapLayer5->GetYaxis()->SetLabelSize(0.03);
595 fHistNSideBadChannelMapLayer5->GetZaxis()->SetTitleOffset(1.6);
596 fHistNSideBadChannelMapLayer5->GetZaxis()->SetTitle("Bad channels (n-side)[%]");
c672a510 597 fAliITSQADataMakerRec->Add2RawsList(fHistNSideBadChannelMapLayer5,
db72ff3b 598 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 599 fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
db72ff3b 600
6f285ba5 601 TH2D *fHistPSideBadChannelMapLayer6 = new TH2D("fHistPSideBadChannelMapLayer6",
db72ff3b 602 "Layer 6;N_{module};N_{ladder}",
603 25,1,26,
604 38,600,638);
0730893d 605 fHistPSideBadChannelMapLayer6->GetXaxis()->SetTitleColor(1);
606 fHistPSideBadChannelMapLayer6->SetStats(kFALSE);
607 fHistPSideBadChannelMapLayer6->GetYaxis()->SetTitleOffset(1.8);
608 fHistPSideBadChannelMapLayer6->GetXaxis()->SetNdivisions(25);
609 fHistPSideBadChannelMapLayer6->GetYaxis()->SetNdivisions(38);
610 fHistPSideBadChannelMapLayer6->GetXaxis()->SetLabelSize(0.03);
611 fHistPSideBadChannelMapLayer6->GetYaxis()->SetLabelSize(0.03);
612 fHistPSideBadChannelMapLayer6->GetZaxis()->SetTitleOffset(1.6);
613 fHistPSideBadChannelMapLayer6->GetZaxis()->SetTitle("Bad channels (p-side)[%]");
c672a510 614 fAliITSQADataMakerRec->Add2RawsList(fHistPSideBadChannelMapLayer6,
db72ff3b 615 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 616 fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
db72ff3b 617
6f285ba5 618 TH2D *fHistNSideBadChannelMapLayer6 = new TH2D("fHistNSideBadChannelMapLayer6",
db72ff3b 619 "Layer 6;N_{module};N_{ladder}",
620 25,1,26,
621 38,600,638);
0730893d 622 fHistNSideBadChannelMapLayer6->GetXaxis()->SetTitleColor(1);
623 fHistNSideBadChannelMapLayer6->SetStats(kFALSE);
624 fHistNSideBadChannelMapLayer6->GetYaxis()->SetTitleOffset(1.8);
625 fHistNSideBadChannelMapLayer6->GetXaxis()->SetNdivisions(25);
626 fHistNSideBadChannelMapLayer6->GetYaxis()->SetNdivisions(38);
627 fHistNSideBadChannelMapLayer6->GetXaxis()->SetLabelSize(0.03);
628 fHistNSideBadChannelMapLayer6->GetYaxis()->SetLabelSize(0.03);
629 fHistNSideBadChannelMapLayer6->GetZaxis()->SetTitleOffset(1.6);
630 fHistNSideBadChannelMapLayer6->GetZaxis()->SetTitle("Bad channels (n-side)[%]");
c672a510 631 fAliITSQADataMakerRec->Add2RawsList(fHistNSideBadChannelMapLayer6,
db72ff3b 632 fGenRawsOffset+fSSDRawsOffset, expert, !image, !saveCorr);
0730893d 633 fSSDRawsOffset += 1; fSSDRawsDAOffset += 1;
634 }//online flag
db72ff3b 635
7a0e5776 636 fSSDhRawsTask = fSSDRawsOffset;
5379c4a3 637 AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD Raws histograms booked\n",fSSDhRawsTask));
638 AliDebug(AliQAv1::GetQADebugLevel(), Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenRawsOffset+fSSDhRawsTask));
639 AliDebug(AliQAv1::GetQADebugLevel(),Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenRawsOffset+fSSDRawsOffset));
7a0e5776 640
641 /*
db72ff3b 642 fSSDhTask = fSSDRawsOffset;
643 AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD Raws histograms booked\n",fSSDhTask));
644 AliDebug(AliQAv1::GetQADebugLevel(), Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenRawsOffset+fSSDhTask));
645 AliDebug(AliQAv1::GetQADebugLevel(),Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenRawsOffset+fSSDRawsOffset));
646 */
0730893d 647}
648
649//____________________________________________________________________________
650void AliITSQASSDDataMakerRec::MakeRaws(AliRawReader* rawReader) {
651 // Fill QA for RAW - SSD -
652 Int_t gStripNumber;
653 Int_t gHistPosition;
654 Int_t gLayer = 0,gLadder = 0, gModule = 0;
655
656 Double_t gSizePerDDL[fgkNumOfDDLs] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
657 Double_t gSizePerLDC[fgkNumOfLDCs] = {0.,0.,0.};
658 Double_t sumSSDDataSize = 0.0;
659 Double_t eventSize = -1.0;
660
661 if(fkOnline) {
662 //reset the signal vs strip number histograms
663 for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++)
664 fHistSSDRawSignalModule[iModule]->Reset();
665 }//online flag
666
667 rawReader->Select("ITSSSD",-1,-1);
668 rawReader->Reset(); //rawReader->NextEvent();
430bb675 669 (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset))->Fill(rawReader->GetType());
0730893d 670 if(rawReader->GetType() == 7) {
671 fSSDEvent += 1;
672 fSSDEventPerCycle += 1;
673 }
674
675 AliITSRawStreamSSD gSSDStream(rawReader);
676 AliRawReaderRoot *rootReader = (AliRawReaderRoot *)rawReader;
677 if(rootReader) {
678 const AliRawEventHeaderBase *header = rootReader->GetEventHeader();
679 if(header)
680 eventSize = header->GetEventSize();
681 }
682 while (gSSDStream.Next()) {
683 if(gSSDStream.GetModuleID() < 0) continue;
684 /*cout<<"DDL: "<<rawReader->GetDDLID()<<
685 " - LDC: "<<rawReader->GetLDCId()<<
686 " - Size: "<<rawReader->GetDataSize()<<
687 " - Equipment size: "<<rawReader->GetEquipmentSize()<<endl;*/
688 gSizePerDDL[rawReader->GetDDLID()] = rawReader->GetDataSize();
689 gSizePerLDC[rawReader->GetLDCId()-6] = rawReader->GetDataSize();
690 AliITSgeomTGeo::GetModuleId(gSSDStream.GetModuleID(),gLayer,gLadder,gModule);
691 if(gSSDStream.GetStrip() < 0) continue;
692 gStripNumber = (gSSDStream.GetSideFlag() == 0) ? gSSDStream.GetStrip() : -gSSDStream.GetStrip() + 2*fgkNumberOfPSideStrips;
693 gHistPosition = (gLayer == 5) ? ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + gModule - 1) : ((gLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + gModule + fgkSSDMODULESLAYER5 - 1);
5379c4a3 694 //AliDebug(AliQAv1::GetQADebugLevel(), Form("ModulePosition: %d - Layer: %d - Ladder: %d - Module: %d\n",gHistPosition,gLayer,gLadder,gModule));
0730893d 695 if(fkOnline)
696 fHistSSDRawSignalModule[gHistPosition]->Fill(gStripNumber,gSSDStream.GetSignal());
430bb675 697 //fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+gHistPosition+fSSDRawsCommonLevelOffset)->Fill(gStripNumber,gSSDStream.GetSignal());
0730893d 698 }//streamer loop
699
700 //event size calculation and filling info
701 for(Int_t i = 0; i < fgkNumOfDDLs; i++) {
702 sumSSDDataSize += gSizePerDDL[i];
703 if(gSizePerDDL[i] > 0) {
430bb675 704 (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+3))->Fill(i+512);
6f285ba5 705 (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+5+i))->Fill(gSizePerDDL[i]/1e+03);
0730893d 706 }
430bb675 707 //(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+4))->Fill(i+512,gSizePerDDL[i]/1e+06);
0730893d 708 }
709 for(Int_t i = 0; i < fgkNumOfLDCs; i++) {
710 if(gSizePerLDC[i] > 0) {
430bb675 711 (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+21))->Fill(i+6);
0730893d 712 //LDC 082
713 if(i == 0)
714 gSizePerLDC[i] = gSizePerDDL[8] + gSizePerDDL[9] + gSizePerDDL[10] +
715 gSizePerDDL[11] + gSizePerDDL[12] + gSizePerDDL[13];
716 //LDC 086
717 if(i == 1)
718 gSizePerLDC[i] = gSizePerDDL[3] + gSizePerDDL[4] + gSizePerDDL[5] +
719 gSizePerDDL[6] + gSizePerDDL[7];
720 //LDC 085
721 if(i == 2)
722 gSizePerLDC[i] = gSizePerDDL[0] + gSizePerDDL[1] + gSizePerDDL[2] +
723 gSizePerDDL[14] + gSizePerDDL[15];
6f285ba5 724 (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+23+i))->Fill(gSizePerLDC[i]/1e+03);
0730893d 725 //cout<<"Event: "<<fSSDEventPerCycle<<" - LDC: "<<i+6<<
726 //" - Data size: "<<gSizePerLDC[i]<<endl;
727 }
430bb675 728 //(fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+22))->Fill(i+6,gSizePerLDC[i]/1e+06);
0730893d 729 }
730 if(sumSSDDataSize)
6f285ba5 731 (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+1))->Fill(sumSSDDataSize/1e+03);
0730893d 732 if(eventSize)
430bb675 733 (fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+2))->Fill(100.*sumSSDDataSize/eventSize);
0730893d 734
735 //Occupancy calculation
736 if(fkOnline) {
737 for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) {
738 GetOccupancyStrip(fHistSSDRawSignalModule[iModule],fOccupancyMatrix[iModule]);
739 //if(iModule == 156) {
740 //cout<<"========================================"<<endl;
741 //AliITSgeomTGeo::GetModuleId(656,gLayer,gLadder,gModule);
742 /*for(Int_t iBin = 1; iBin < fHistSSDRawSignalModule[iModule]->GetXaxis()->GetNbins(); iBin++) {
743 if((iBin >= 750)&&(iBin <= 780))
744 cout<<"Event: "<<fSSDEventPerCycle<<" - Ladder: "<<gLadder+499<<
745 " - Module: "<<gModule<<" - Strip: "<<iBin<<
746 " - Signal: "<<fHistSSDRawSignalModule[iModule]->GetBinContent(iBin)<<endl;
747 }*///strip loop --> to be removed
748 //}//module cut --> to be removed
749 }//module loop
750 }//online flag for SSD
751}
752
753//____________________________________________________________________________ //
754void AliITSQASSDDataMakerRec::GetOccupancyStrip(TH1 *lHisto, Int_t *occupancyMatrix) {
755 //Increments the entries in the occupancy matrix based
756 //on whether the signal for each strip is larger than the cutoff
757 //Currently the cutoff is at 0 which means that if ZS
758 //works, whatever comes from the FEROM is considered as "signal"
759 //Double_t cutoff = 0.0;
760 TString histname = lHisto->GetName();
761 //cout<<histname.Data()<<endl;
762 //if(histname.Contains("Layer5_Ladder8_Module3")) {
763 for(Int_t iBin = 1; iBin < lHisto->GetXaxis()->GetNbins(); iBin++) {
764 Double_t y = lHisto->GetBinContent(iBin);
765 if(y) {
766 occupancyMatrix[iBin-1] += 1;
767 }
768 //if((iBin >= 750)&&(iBin <= 780))
769 //cout<<"Strip: "<<iBin<<
770 //" - Signal: "<<y<<
771 //" - Occupancy: "<<occupancyMatrix[iBin-1]<<endl;
772
773 }
774 //}
775}
776
777//____________________________________________________________________________
778Double_t AliITSQASSDDataMakerRec::GetOccupancyModule(TH1 *lHisto,
779 Int_t stripside,
780 Int_t mode,
781 Double_t threshold) {
782 //Mode 0: calculates the occupancy of a module
783 // without a threshold in the strip occupancy
784 //Mode 1: calculates the occupancy of a module
785 // with the set threshold in the strip occupancy
786 //Mode 2: calculates the average occupancy of a module
787
788 // bo: TDC >0 or # of sigmas wrt noise ?
789 //stripside == 0 --> P-side
790 //stripside == 1 --> N-side
791 Int_t lNumFiredBins = 0;
792 Double_t sumOccupancy = 0.0;
793 TString histname = lHisto->GetName();
794 for(Int_t iBin = 1 + stripside*fgkNumberOfPSideStrips; iBin < fgkNumberOfPSideStrips*(1 + stripside); iBin++){
795 /*if(histname.Contains("Layer5_Ladder507_Module3")) {
796 cout<<lHisto->GetName()<<
797 " - Strip: "<<iBin<<
798 " - Bin content: "<<lHisto->GetBinContent(iBin)<<endl;
799 }*/
800 if (lHisto->GetBinContent(iBin) > threshold) {
801 lNumFiredBins++;
802 sumOccupancy = lHisto->GetBinContent(iBin);
803 }
804 }
805
806 Double_t lOccupancy = 0.0;
807 if((mode == 0)||(mode == 1))
808 lOccupancy = (100.*lNumFiredBins)/fgkNumberOfPSideStrips; // percentage
809 else if(mode == 2)
810 lOccupancy = 100.*sumOccupancy/fgkNumberOfPSideStrips;
811
812 /*if(histname.Contains("Layer5_Ladder507_Module3"))
813 cout<<"Fired strips: "<<lNumFiredBins<<
814 " - Occupancy: "<<lOccupancy<<endl;*/
5379c4a3 815 //AliDebug(AliQAv1::GetQADebugLevel(), Form("Fired strips: %d - Total strips: %d - Occupancy :%lf\n",lNumFiredBins,lHisto->GetNbinsX(),lOccupancy));
0730893d 816
817 return lOccupancy;
818}
819
820//____________________________________________________________________________
821void AliITSQASSDDataMakerRec::MonitorOCDBObjects() {
822 //Monitor in AMORE the output of the DA
823 //Currently only the bad channel list is monitored
824 //Todo: Noise - Pedestal
430bb675 825 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset))->Reset();
826 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+1))->Reset();
827 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+2))->Reset();
828 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+3))->Reset();
c672a510 829
0730893d 830 AliCDBEntry *entryBadChannelsSSD = fCDBManager->Get("ITS/Calib/BadChannelsSSD");
831 if(!entryBadChannelsSSD)
832 AliError("OCDB entry for the bad channel list is not valid!");
833 AliITSBadChannelsSSDv2 *badchannelsSSD = (AliITSBadChannelsSSDv2 *)entryBadChannelsSSD->GetObject();
834 if(!badchannelsSSD)
835 AliError("Bad channel list object is not a valid AliITSBadChannelsSSD object!");
836
837 //_____________________________________________________________________________//
838 Int_t nBadPSideChannels = 0, nBadNSideChannels = 0;
839 Int_t layer = 0, ladder = 0, module = 0;
840 Int_t nPSideChannelsLayer5 = 0, nNSideChannelsLayer5 = 0;
841 Int_t nPSideChannelsLayer6 = 0, nNSideChannelsLayer6 = 0;
842 //_____________________________________________________________________________//
843
844 for(Int_t i = 0; i < fgkSSDMODULES; i++) {
845 AliITSgeomTGeo::GetModuleId(i+500,layer,ladder,module);
846 nBadPSideChannels = 0, nBadNSideChannels = 0;
847 nPSideChannelsLayer5 = 0, nNSideChannelsLayer5 = 0;
848 nPSideChannelsLayer6 = 0, nNSideChannelsLayer6 = 0;
849
850 Int_t badChannel = 0;
851 for(Int_t j = 0; j < fgkNumberOfPSideStrips; j++) {
852 badChannel = (Int_t)(badchannelsSSD->GetBadChannelP(i,j));
853 if(badChannel != 0) {
854 if(layer == 5)
855 nPSideChannelsLayer5 += 1;
856 if(layer == 6)
857 nPSideChannelsLayer6 += 1;
858 nBadPSideChannels += 1;
859 }//badchannel flag != 0
860 badChannel = (Int_t)(badchannelsSSD->GetBadChannelN(i,j));
861 if(badChannel != 0) {
862 if(layer == 5)
863 nNSideChannelsLayer5 += 1;
864 if(layer == 6)
865 nNSideChannelsLayer6 += 1;
866 nBadNSideChannels += 1;
867 }//badchannel flag != 0
868 }//loop over strips
869 if(layer == 5) {
870 if(nPSideChannelsLayer5 > 0)
430bb675 871 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset))->Fill(module,499+ladder,
0730893d 872 100.*nPSideChannelsLayer5/fgkNumberOfPSideStrips);
430bb675 873 else ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset))->Fill(module,499+ladder,0.0001);
0730893d 874 if(nNSideChannelsLayer5 > 0)
430bb675 875 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+1))->Fill(module,499+ladder,
0730893d 876 100.*nNSideChannelsLayer5/fgkNumberOfPSideStrips);
430bb675 877 else ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+1))->Fill(module,499+ladder,0.0001);
0730893d 878 }//layer 5
879 if(layer == 6) {
880 if(nPSideChannelsLayer6 > 0)
430bb675 881 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+2))->Fill(module,599+ladder,
0730893d 882 100.*nPSideChannelsLayer6/fgkNumberOfPSideStrips);
430bb675 883 else ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+2))->Fill(module,599+ladder,0.0001);
0730893d 884 if(nNSideChannelsLayer6 > 0)
430bb675 885 ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+3))->Fill(module,599+ladder,
0730893d 886 100.*nNSideChannelsLayer6/fgkNumberOfPSideStrips);
430bb675 887 else ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset+fSSDRawsOffset-fSSDRawsDAOffset+3))->Fill(module,599+ladder,0.0001);
0730893d 888 }//layer 6
889 }//module loop
890}
891
892//____________________________________________________________________________
44ed7a66 893void AliITSQASSDDataMakerRec::InitDigits() {
894 // Initialization for DIGIT data - SSD -
895 const Bool_t expert = kTRUE ;
896 const Bool_t image = kTRUE ;
897
898 fGenDigitsOffset = (fAliITSQADataMakerRec->fDigitsQAList[AliRecoParam::kDefault])->GetEntries();
899
900 // custom code here
901 TH1F *fHistSSDModule = new TH1F("fHistSSDDigitsModule",
902 ";SSD Module Number;N_{DIGITS}",
903 1698,499.5,2197.5);
904 fAliITSQADataMakerRec->Add2DigitsList(fHistSSDModule,
905 fGenDigitsOffset + 0, !expert, image);
906 fSSDhDigitsTask += 1;
907 TH2F *fHistSSDModuleStrip = new TH2F("fHistSSDDigitsModuleStrip",
908 ";N_{Strip};N_{Module}",
909 1540,0,1540,1698,499.5,2197.5);
910 fAliITSQADataMakerRec->Add2DigitsList(fHistSSDModuleStrip,
911 fGenDigitsOffset + 1, !expert, image);
912 fSSDhDigitsTask += 1;
913
914 AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD Digits histograms booked\n",fSSDhDigitsTask));
915
916}
917
918//____________________________________________________________________________
919void AliITSQASSDDataMakerRec::MakeDigits(TTree *digits) {
920 // Fill QA for DIGIT - SSD -
921// AliITS *fITS = (AliITS*)gAlice->GetModule("ITS");
922// fITS->SetTreeAddress();
923// TClonesArray *iSSDdigits = fITS->DigitsAddress(2);
6f285ba5 924 TBranch *branchD = digits->GetBranch("ITSDigitsSSD");
44ed7a66 925 if (!branchD) {
6f285ba5 926 AliError("can't get the branch with the SSD ITS digits !");
44ed7a66 927 return;
928 }
c0bed747 929 static TClonesArray statDigits("AliITSdigitSSD");
44ed7a66 930 TClonesArray *iSSDdigits = &statDigits;
931 branchD->SetAddress(&iSSDdigits);
932 for(Int_t iModule = 500; iModule < 2198; iModule++) {
933 iSSDdigits->Clear();
934 digits->GetEvent(iModule);
935 Int_t ndigits = iSSDdigits->GetEntries();
936 fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset + 0)->Fill(iModule,ndigits);
937 if(ndigits != 0)
938 AliDebug(AliQAv1::GetQADebugLevel(),Form("Module: %d - Digits: %d",iModule,ndigits));
939
940 for (Int_t iDigit = 0; iDigit < ndigits; iDigit++) {
941 AliITSdigit *dig = (AliITSdigit*)iSSDdigits->UncheckedAt(iDigit);
942 Int_t fStripNumber = (dig->GetCoord1() == 0) ? dig->GetCoord2() : dig->GetCoord2() + fgkNumberOfPSideStrips;
943 ((TH2F *)fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset + 1))->Fill(fStripNumber,iModule,dig->GetSignal());
944 }//digit loop
945 }//module loop
946}
947
948//____________________________________________________________________________
0730893d 949void AliITSQASSDDataMakerRec::InitRecPoints()
950{
951 // Initialization for RECPOINTS - SSD -
7d297381 952 const Bool_t expert = kTRUE ;
953 const Bool_t image = kTRUE ;
954
57acd2d2 955 fGenRecPointsOffset = (fAliITSQADataMakerRec->fRecPointsQAList[AliRecoParam::kDefault])->GetEntries();
5379c4a3 956 //AliDebug(AliQAv1::GetQADebugLevel(), Form("**-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints offset %d \t %d \n",fGenOffset,fGenRecPointsOffset));
0730893d 957 Int_t nModuleOffset = 500;
958 Int_t nITSTotalModules = AliITSgeomTGeo::GetNModules();
959
6f285ba5 960 TH1F *fHistSSDModuleIdLayer5 = new TH1F("fHistSSDModuleIdLayer5",
961 "Module Id - Layer 5;Module Id;Entries",
962 fgkSSDMODULESLAYER5,
963 nModuleOffset - 0.5,
964 nITSTotalModules-fgkSSDMODULESLAYER6+0.5);
c672a510 965 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDModuleIdLayer5,
7d297381 966 fGenRecPointsOffset + 0, expert, !image);
7a0e5776 967 fSSDhRecPointsTask += 1;
6f285ba5 968 TH1F *fHistSSDModuleIdLayer6 = new TH1F("fHistSSDModuleIdLayer6",
969 "Module Id - Layer 6;Module Id;Entries",
970 fgkSSDMODULESLAYER6,
971 nModuleOffset+fgkSSDMODULESLAYER5 - 0.5,
972 nITSTotalModules + 0.5);
c672a510 973 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDModuleIdLayer6,
7d297381 974 fGenRecPointsOffset + 1, expert, !image);
7a0e5776 975 fSSDhRecPointsTask += 1;
6f285ba5 976 TH1F *fHistSSDClusterPerEventLayer5 = new TH1F("fHistSSDClusterPerEventLayer5",
977 "N_{clusters} - Layer 5;N_{clusters};Entries;",
978 100,0.1,5000);
c672a510 979 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterPerEventLayer5,
7d297381 980 fGenRecPointsOffset + 2, expert, !image);
7a0e5776 981 fSSDhRecPointsTask += 1;
6f285ba5 982 TH1F *fHistSSDClusterPerEventLayer6 = new TH1F("fHistSSDClusterPerEventLayer6",
983 "N_{clusters} - Layer 6;N_{clusters};Entries;",
984 100,0.1,5000);
c672a510 985 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterPerEventLayer6,
7d297381 986 fGenRecPointsOffset + 3, expert, !image);
7a0e5776 987 fSSDhRecPointsTask += 1;
6f285ba5 988 TH1F *fHistSSDLocalXLayer5 = new TH1F("fHistSSDLocalXLayer5",
989 "Local x coord.- Layer 5;x [cm];Entries;",
990 100,-4.,4.);
c672a510 991 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalXLayer5,
7d297381 992 fGenRecPointsOffset + 4, expert, !image);
7a0e5776 993 fSSDhRecPointsTask += 1;
6f285ba5 994 TH1F *fHistSSDLocalXLayer6 = new TH1F("fHistSSDLocalXLayer6",
995 "Local x coord.- Layer 6;x [cm];Entries;",
996 100,-4.,4.);
c672a510 997 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalXLayer6,
7d297381 998 fGenRecPointsOffset + 5, expert, !image);
7a0e5776 999 fSSDhRecPointsTask += 1;
6f285ba5 1000 TH1F *fHistSSDLocalZLayer5 = new TH1F("fHistSSDLocalZLayer5",
1001 "Local z coord.- Layer 5;z [cm];Entries;",
1002 100,-4.,4.);
c672a510 1003 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalZLayer5,
7d297381 1004 fGenRecPointsOffset + 6, expert, !image);
7a0e5776 1005 fSSDhRecPointsTask += 1;
6f285ba5 1006 TH1F *fHistSSDLocalZLayer6 = new TH1F("fHistSSDLocalZLayer6",
1007 "Local z coord.- Layer 6;z [cm];Entries;",
1008 100,-4.,4.);
c672a510 1009 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalZLayer6,
7d297381 1010 fGenRecPointsOffset + 7, expert, !image);
7a0e5776 1011 fSSDhRecPointsTask += 1;
6f285ba5 1012 TH1F *fHistSSDGlobalXLayer5 = new TH1F("fHistSSDGlobalXLayer5",
1013 "Global x - Layer 5;x [cm];Entries;",
1014 100,-40.,40.);
c672a510 1015 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalXLayer5,
7d297381 1016 fGenRecPointsOffset + 8, expert, !image);
7a0e5776 1017 fSSDhRecPointsTask += 1;
6f285ba5 1018 TH1F *fHistSSDGlobalXLayer6 = new TH1F("fHistSSDGlobalXLayer6",
1019 "Global x - Layer 6;x [cm];Entries;",
1020 100,-45.,45.);
c672a510 1021 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalXLayer6,
7d297381 1022 fGenRecPointsOffset + 9, expert, !image);
7a0e5776 1023 fSSDhRecPointsTask += 1;
6f285ba5 1024 TH1F *fHistSSDGlobalYLayer5 = new TH1F("fHistSSDGlobalYLayer5",
1025 "Global y - Layer 5;y [cm];Entries;",
1026 100,-40.,40);
c672a510 1027 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalYLayer5,
7d297381 1028 fGenRecPointsOffset + 10, expert, !image);
7a0e5776 1029 fSSDhRecPointsTask += 1;
6f285ba5 1030 TH1F *fHistSSDGlobalYLayer6 = new TH1F("fHistSSDGlobalYLayer6",
1031 "Global y - Layer 6;y [cm];Entries;",
1032 100,-45.,45.);
c672a510 1033 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalYLayer6,
7d297381 1034 fGenRecPointsOffset + 11, expert, !image);
7a0e5776 1035 fSSDhRecPointsTask += 1;
6f285ba5 1036 TH1F *fHistSSDGlobalZLayer5 = new TH1F("fHistSSDGlobalZLayer5",
1037 "Global z - Layer 5;z [cm];Entries;",
1038 100,-45.,45);
c672a510 1039 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalZLayer5,
7d297381 1040 fGenRecPointsOffset + 12, expert, !image);
7a0e5776 1041 fSSDhRecPointsTask += 1;
6f285ba5 1042 TH1F *fHistSSDGlobalZLayer6 = new TH1F("fHistSSDGlobalZLayer6",
1043 "Global z - Layer 6;z [cm];Entries;",
1044 100,-55.,55.);
c672a510 1045 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalZLayer6,
7d297381 1046 fGenRecPointsOffset + 13, expert, !image);
7a0e5776 1047 fSSDhRecPointsTask += 1;
6f285ba5 1048 TH1F *fHistSSDPhiLayer5 = new TH1F("fHistSSDPhiLayer5",
1049 "#phi - Layer 5;#phi [rad];Entries;",
1050 100,-TMath::Pi(),TMath::Pi());
c672a510 1051 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDPhiLayer5,
7d297381 1052 fGenRecPointsOffset + 14, expert, !image);
7a0e5776 1053 fSSDhRecPointsTask += 1;
6f285ba5 1054 TH1F *fHistSSDPhiLayer6 = new TH1F("fHistSSDPhiLayer6",
1055 "#phi - Layer 6;#phi [rad];Entries;",
1056 100,-TMath::Pi(),TMath::Pi());
c672a510 1057 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDPhiLayer6,
7d297381 1058 fGenRecPointsOffset + 15, expert, !image);
7a0e5776 1059 fSSDhRecPointsTask += 1;
6f285ba5 1060 TH1F *fHistSSDThetaLayer5 = new TH1F("fHistSSDThetaLayer5",
1061 "#theta - Layer 5;#theta [rad];Entries;",
1062 100,-TMath::Pi(),TMath::Pi());
c672a510 1063 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDThetaLayer5,
7d297381 1064 fGenRecPointsOffset + 16, expert, !image);
7a0e5776 1065 fSSDhRecPointsTask += 1;
6f285ba5 1066 TH1F *fHistSSDThetaLayer6 = new TH1F("fHistSSDThetaLayer6",
1067 "#theta - Layer 6;#theta [rad];Entries;",
1068 100,-TMath::Pi(),TMath::Pi());
c672a510 1069 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDThetaLayer6,
7d297381 1070 fGenRecPointsOffset + 17, expert, !image);
7a0e5776 1071 fSSDhRecPointsTask += 1;
6f285ba5 1072 TH1F *fHistSSDRadiusLayer5 = new TH1F("fHistSSDRadiusLayer5",
1073 "r - Layer 5;r [cm];Entries;",
1074 100,35.,50.);
c672a510 1075 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDRadiusLayer5,
7d297381 1076 fGenRecPointsOffset + 18, expert, !image);
7a0e5776 1077 fSSDhRecPointsTask += 1;
6f285ba5 1078 TH1F *fHistSSDRadiusLayer6 = new TH1F("fHistSSDRadiusLayer6",
1079 "r - Layer 6;r [cm];Entries;",
1080 100,35.,50.);
c672a510 1081 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDRadiusLayer6,
7d297381 1082 fGenRecPointsOffset + 19, expert, !image);
7a0e5776 1083 fSSDhRecPointsTask += 1;
6f285ba5 1084 TH1F *fHistSSDClusterTypeLayer5 = new TH1F("fHistSSDClusterTypeLayer5",
1085 "CL type - Layer 5;Cluster type;Entries;",
1086 150,0,150);
c672a510 1087 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterTypeLayer5,
7d297381 1088 fGenRecPointsOffset + 20, expert, !image);
7a0e5776 1089 fSSDhRecPointsTask += 1;
6f285ba5 1090 TH1F *fHistSSDClusterTypeLayer6 = new TH1F("fHistSSDClusterTypeLayer6",
1091 "CL type - Layer 6;Cluster type;Entries;",
1092 150,0,150);
c672a510 1093 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterTypeLayer6,
7d297381 1094 fGenRecPointsOffset + 21, expert, !image);
7a0e5776 1095 fSSDhRecPointsTask += 1;
6f285ba5 1096 TH1F *fHistSSDChargeRatioLayer5 = new TH1F("fHistSSDChargeRatioLayer5",
1097 "Charge ratio - Layer 5;q_{ratio};Entries;",
1098 100,-2.0,2.0);
c672a510 1099 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatioLayer5,
7d297381 1100 fGenRecPointsOffset + 22, expert, !image);
7a0e5776 1101 fSSDhRecPointsTask += 1;
6f285ba5 1102 TH1F *fHistSSDChargeRatioLayer6 = new TH1F("fHistSSDChargeRatioLayer6",
1103 "Charge ratio - Layer 6;q_{ratio};Entries;",
1104 100,-2.0,2.0);
c672a510 1105 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatioLayer6,
7d297381 1106 fGenRecPointsOffset + 23, expert, !image);
7a0e5776 1107 fSSDhRecPointsTask += 1;
6f285ba5 1108 TH1F *fHistSSDChargekeVLayer5 = new TH1F("fHistSSDChargekeVLayer5",
1109 "Charge - Layer 5;q [keV];Entries;",
1110 100,0.,300.);
c672a510 1111 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargekeVLayer5,
7d297381 1112 fGenRecPointsOffset + 24, !expert, image);
7a0e5776 1113 fSSDhRecPointsTask += 1;
6f285ba5 1114 TH1F *fHistSSDChargekeVLayer6 = new TH1F("fHistSSDChargekeVLayer6",
1115 "Charge - Layer 6;q [keV];Entries;",
1116 100,0.,300.);
c672a510 1117 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargekeVLayer6,
7d297381 1118 fGenRecPointsOffset + 25, !expert, image);
7a0e5776 1119 fSSDhRecPointsTask += 1;
6f285ba5 1120 TH1F *fHistSSDChargePSideLayer5 = new TH1F("fHistSSDChargePSideLayer5",
1121 "Charge P- Layer 5;q_{P} [keV];Entries;",
1122 100,0.,300.);
c672a510 1123 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePSideLayer5,
7d297381 1124 fGenRecPointsOffset + 26, expert, !image);
7a0e5776 1125 fSSDhRecPointsTask += 1;
6f285ba5 1126 TH1F *fHistSSDChargePSideLayer6 = new TH1F("fHistSSDChargePSideLayer6",
1127 "Charge P- Layer 6;q_{P} [keV];Entries;",
1128 100,0.,300.);
c672a510 1129 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePSideLayer6,
7d297381 1130 fGenRecPointsOffset + 27, expert, !image);
7a0e5776 1131 fSSDhRecPointsTask += 1;
6f285ba5 1132 TH1F *fHistSSDChargeNSideLayer5 = new TH1F("fHistSSDChargeNSideLayer5",
1133 "Charge N- Layer 5;q_{N} [keV];Entries;",
1134 100,0.,300.);
c672a510 1135 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeNSideLayer5,
7d297381 1136 fGenRecPointsOffset + 28, expert, !image);
7a0e5776 1137 fSSDhRecPointsTask += 1;
6f285ba5 1138 TH1F *fHistSSDChargeNSideLayer6 = new TH1F("fHistSSDChargeNSideLayer6",
1139 "Charge N- Layer 6;q_{N} [keV];Entries;",
1140 100,0.,300.);
c672a510 1141 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeNSideLayer6,
7d297381 1142 fGenRecPointsOffset + 29, expert, !image);
7a0e5776 1143 fSSDhRecPointsTask += 1;
6f285ba5 1144 TH1F *fHistSSDChargeRatio2Layer5 = new TH1F("fHistSSDChargeRatio2Layer5",
1145 "Charge Ratio qN/qP - Layer 5;q_{N}/q_{P};Entries;",
1146 100,0,2);
c672a510 1147 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatio2Layer5,
7d297381 1148 fGenRecPointsOffset + 30, expert, !image);
7a0e5776 1149 fSSDhRecPointsTask += 1;
6f285ba5 1150 TH1F *fHistSSDChargeRatio2Layer6 = new TH1F("fHistSSDChargeRatio2Layer6",
1151 "Charge Ratio qN/qP - Layer 6;q_{N}/q_{P};Entries;",
1152 100,0,2);
c672a510 1153 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatio2Layer6,
7d297381 1154 fGenRecPointsOffset + 31, expert, !image);
7a0e5776 1155 fSSDhRecPointsTask += 1;
6f285ba5 1156 TH2F *fHistSSDChargePNSideLayer5 = new TH2F("fHistSSDChargePNSideLayer5",
1157 "Charge correlation - Layer 5;q_{P} [keV];q_{N} [keV]",
1158 100,0.,300.,
1159 100,0.,300.);
c672a510 1160 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePNSideLayer5,
7d297381 1161 fGenRecPointsOffset + 32, expert, !image);
7a0e5776 1162 fSSDhRecPointsTask += 1;
6f285ba5 1163 TH2F *fHistSSDChargePNSideLayer6 = new TH2F("fHistSSDChargePNSideLayer6",
1164 "Charge correlation - Layer 6;q_{P} [keV];q_{N} [keV]",
1165 100,0.,300.,
1166 100,0.,300.);
c672a510 1167 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargePNSideLayer6,
7d297381 1168 fGenRecPointsOffset + 33, expert, !image);
7a0e5776 1169 fSSDhRecPointsTask += 1;
6f285ba5 1170 TH2F *fHistSSDChargeMapLayer5 = new TH2F("fHistSSDChargeMapLayer5",
1171 "Charge map;N_{modules};N_{Ladders}",
1172 fgkSSDMODULESPERLADDERLAYER5,
1173 -0.5,fgkSSDMODULESPERLADDERLAYER5+0.5,
1174 3*fgkSSDLADDERSLAYER5,
1175 -0.5,fgkSSDLADDERSLAYER5+0.5);
c672a510 1176 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeMapLayer5,
7d297381 1177 fGenRecPointsOffset + 34, expert, !image);
7a0e5776 1178 fSSDhRecPointsTask += 1;
6f285ba5 1179 TH2F *fHistSSDChargeMapLayer6 = new TH2F("fHistSSDChargeMapLayer6",
1180 "Charge map;N_{modules};N_{Ladders}",
1181 fgkSSDMODULESPERLADDERLAYER6,
1182 -0.5,fgkSSDMODULESPERLADDERLAYER6+0.5,
1183 3*fgkSSDLADDERSLAYER6,
1184 -0.5,fgkSSDLADDERSLAYER6+0.5);
c672a510 1185 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeMapLayer6,
7d297381 1186 fGenRecPointsOffset + 35, expert, !image);
7a0e5776 1187 fSSDhRecPointsTask += 1;
6f285ba5 1188 TH2F *fHistSSDClusterMapLayer5 = new TH2F("fHistSSDClusterMapLayer5",
1189 "Layer 5;N_{module};N_{ladder}",
1190 22,1,23,
1191 34,500,534);
c672a510 1192 fHistSSDClusterMapLayer5->GetXaxis()->SetTitleColor(1);
1193 fHistSSDClusterMapLayer5->SetStats(kFALSE);
1194 fHistSSDClusterMapLayer5->GetYaxis()->SetTitleOffset(1.8);
1195 fHistSSDClusterMapLayer5->GetXaxis()->SetNdivisions(22);
1196 fHistSSDClusterMapLayer5->GetYaxis()->SetNdivisions(34);
1197 fHistSSDClusterMapLayer5->GetXaxis()->SetLabelSize(0.03);
1198 fHistSSDClusterMapLayer5->GetYaxis()->SetLabelSize(0.03);
1199 fHistSSDClusterMapLayer5->GetZaxis()->SetTitleOffset(1.4);
1200 fHistSSDClusterMapLayer5->GetZaxis()->SetTitle("N_{clusters}");
1201 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterMapLayer5,
7d297381 1202 fGenRecPointsOffset + 36, !expert, image);
7a0e5776 1203 fSSDhRecPointsTask += 1;
6f285ba5 1204 TH2F *fHistSSDClusterMapLayer6 = new TH2F("fHistSSDClusterMapLayer6",
1205 "Layer 6;N_{module};N_{ladder}",
1206 25,1,26,
1207 38,600,638);
c672a510 1208 fHistSSDClusterMapLayer6->GetXaxis()->SetTitleColor(1);
1209 fHistSSDClusterMapLayer6->SetStats(kFALSE);
1210 fHistSSDClusterMapLayer6->GetYaxis()->SetTitleOffset(1.8);
1211 fHistSSDClusterMapLayer6->GetXaxis()->SetNdivisions(25);
1212 fHistSSDClusterMapLayer6->GetYaxis()->SetNdivisions(38);
1213 fHistSSDClusterMapLayer6->GetXaxis()->SetLabelSize(0.03);
1214 fHistSSDClusterMapLayer6->GetYaxis()->SetLabelSize(0.03);
1215 fHistSSDClusterMapLayer6->GetZaxis()->SetTitleOffset(1.4);
1216 fHistSSDClusterMapLayer6->GetZaxis()->SetTitle("N_{clusters}");
1217 fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterMapLayer6,
7d297381 1218 fGenRecPointsOffset + 37, !expert, image);
7a0e5776 1219 fSSDhRecPointsTask += 1;
1220 //printf ("%d SSD Recs histograms booked\n",fSSDhRecPointsTask);
5379c4a3 1221 AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SSD Recs histograms booked\n",fSSDhRecPointsTask));
0730893d 1222}
1223
1224//____________________________________________________________________________
1225void AliITSQASSDDataMakerRec::MakeRecPoints(TTree *clustersTree)
1226{
1227 // Fill QA for recpoints - SSD -
7a0e5776 1228 //printf("*-*-*-*-*-*-*---*-*-*-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints called \n");
0730893d 1229 Int_t gLayer = 0, gLadder = 0, gModule = 0;
1230 Int_t lLadderLocationY = 0;
1231 TBranch *branchRecP = clustersTree->GetBranch("ITSRecPoints");
1232 if (!branchRecP) {
1233 AliError("can't get the branch with the ITS clusters !");
1234 return;
1235 }
1236 static TClonesArray statRecpoints("AliITSRecPoint");
1237 TClonesArray *recpoints = &statRecpoints;
1238 branchRecP->SetAddress(&recpoints);
1239 Int_t nClustersLayer5 = 0, nClustersLayer6 = 0;
1240 Int_t npoints = 0;
1241 Float_t cluglo[3]={0.,0.,0.};
7a0e5776 1242 //printf("*-*-*-*-*-*-*---*-*-*-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints STEP1 \n");
0730893d 1243 for(Int_t module = 0; module < clustersTree->GetEntries(); module++){
1244 branchRecP->GetEvent(module);
1245 npoints += recpoints->GetEntries();
1246 AliITSgeomTGeo::GetModuleId(module,gLayer,gLadder,gModule);
7a0e5776 1247 //printf("SSDDataMAkerRec:::::::::::::::::::::::gLayer ========== %d \n\n",gLayer);
0730893d 1248 lLadderLocationY = 3*gLadder;
7a0e5776 1249 ////printf("*-*-*-*-*-*-*---*-*-*-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints inside loop \n");
0730893d 1250 for(Int_t j = 0;j < recpoints->GetEntries(); j++){
7a0e5776 1251 ////printf("*-*-*-*-*-*-*---*-*-*-------*-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints inside loop 2\n");
0730893d 1252 AliITSRecPoint *recp = (AliITSRecPoint*)recpoints->At(j);
1253 Int_t layer = recp->GetLayer();
7a0e5776 1254 //printf("SSDDataMAkerRec:::::::::::::::::::::::layer ========== %d \n\n",layer);
0730893d 1255 recp->GetGlobalXYZ(cluglo);
1256 Float_t radius = TMath::Sqrt(cluglo[0]*cluglo[0]+cluglo[1]*cluglo[1]);
1257 Float_t phi = TMath::ATan2(cluglo[1],cluglo[0]);
1258 Float_t theta = TMath::ATan2(radius,cluglo[2]);
1259 Double_t chargeRatio = recp->GetChargeRatio();
1260 Double_t clusterCharge = recp->GetQ();
1261 Double_t chargePSide = clusterCharge*(1. + chargeRatio);
1262 Double_t chargeNSide = clusterCharge*(1. - chargeRatio);
1263 if(layer == 4) {
7a0e5776 1264 //printf("-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints Filling 4 called \n");
6f285ba5 1265 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 20)->Fill(recp->GetType());
1266
1267 if(recp->GetType() != 1) continue;
430bb675 1268 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 0)->Fill(module);
1269 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 4)->Fill(recp->GetDetLocalX());
1270 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 6)->Fill(recp->GetDetLocalZ());
1271 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 8)->Fill(cluglo[0]);
1272 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 10)->Fill(cluglo[1]);
1273 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 12)->Fill(cluglo[2]);
1274 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 14)->Fill(phi);
1275 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 16)->Fill(theta);
1276 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 18)->Fill(radius);
430bb675 1277 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 22)->Fill(recp->GetChargeRatio());
1278 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 24)->Fill(recp->GetQ());
1279 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 26)->Fill(chargePSide);
1280 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 28)->Fill(chargeNSide);
1281 if(chargePSide != 0.) fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 30)->Fill(chargeNSide/chargePSide);
1282 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 32)->Fill(chargePSide,chargeNSide);
1283 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 34)->SetBinContent(gModule,lLadderLocationY,recp->GetQ());
1284 ((TH2F *)fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 36))->Fill(gModule,499+gLadder,1);
0730893d 1285 nClustersLayer5 += 1;
1286 }//layer 5 histograms
1287 if(layer == 5) {
7a0e5776 1288 //printf("-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints Filling 5 called \n");
6f285ba5 1289 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 21)->Fill(recp->GetType());
1290
1291 if(recp->GetType() != 1) continue;
430bb675 1292 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 1)->Fill(module);
1293 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 5)->Fill(recp->GetDetLocalX());
1294 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 7)->Fill(recp->GetDetLocalZ());
1295 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 9)->Fill(cluglo[0]);
1296 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 11)->Fill(cluglo[1]);
1297 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 13)->Fill(cluglo[2]);
1298 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 15)->Fill(phi);
1299 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 17)->Fill(theta);
1300 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 19)->Fill(radius);
430bb675 1301 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 23)->Fill(recp->GetChargeRatio());
1302 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 25)->Fill(recp->GetQ());
1303 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 27)->Fill(chargePSide);
1304 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 29)->Fill(chargeNSide);
1305 if(chargePSide != 0.) fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 31)->Fill(chargeNSide/chargePSide);
1306 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 33)->Fill(chargePSide,chargeNSide);
1307 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 35)->SetBinContent(gModule,lLadderLocationY,recp->GetQ());
1308 ((TH2F *)fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 37))->Fill(gModule,599+gLadder,1);
0730893d 1309 nClustersLayer6 += 1;
1310 }//layer 6 histograms
1311 }//rec. points loop
1312 }//module loop
7a0e5776 1313
1314 //printf("-*-*-*-*-*-***************AliITSQASSDataMakerRec::MakeRecpoints Filling called \n");
430bb675 1315 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 2)->Fill(nClustersLayer5);
1316 fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset + 3)->Fill(nClustersLayer6);
0730893d 1317
1318 statRecpoints.Clear();
1319}
1320
7a0e5776 1321//____________________________________________________________________________
4e25ac79 1322Int_t AliITSQASSDDataMakerRec::GetOffset(AliQAv1::TASKINDEX_t task) {
7a0e5776 1323 // Returns offset number according to the specified task
1324 Int_t offset=0;
4e25ac79 1325 if( task == AliQAv1::kRAWS ) {
7a0e5776 1326 offset=fGenRawsOffset;
1327 }
6f285ba5 1328 else if( task == AliQAv1::kDIGITSR ) {
1329 offset=fGenDigitsOffset;
1330 }
4e25ac79 1331 else if( task == AliQAv1::kRECPOINTS ) {
7a0e5776 1332 offset=fGenRecPointsOffset;
1333 }
1334 else {
5379c4a3 1335 AliWarning("No task has been selected. Offset set to zero.\n");
7a0e5776 1336 }
1337
1338 return offset;
1339}
1340
1341//____________________________________________________________________________
4e25ac79 1342Int_t AliITSQASSDDataMakerRec::GetTaskHisto(AliQAv1::TASKINDEX_t task) {
7a0e5776 1343 // Returns the number of histograms associated to the specified task
1344 Int_t histotot=0;
1345
4e25ac79 1346 if( task == AliQAv1::kRAWS ) {
7a0e5776 1347 histotot=fSSDhRawsTask;
1348 }
6f285ba5 1349 else if( task == AliQAv1::kDIGITSR ) {
1350 histotot=fSSDhDigitsTask;
1351 }
4e25ac79 1352 else if( task == AliQAv1::kRECPOINTS ){
7a0e5776 1353 histotot=fSSDhRecPointsTask;
1354 }
1355 else {
5379c4a3 1356 AliWarning("No task has been selected. TaskHisto set to zero.\n");
7a0e5776 1357 }
1358
1359 return histotot;
1360}