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