LCOV - code coverage report
Current view: top level - ITS/ITSbase - AliITSQASDDDataMakerRec.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 40 901 4.4 %
Date: 2016-06-14 17:26:59 Functions: 4 27 14.8 %

          Line data    Source code
       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             : 
      16             : /* $Id$ */
      17             : 
      18             : //  *************************************************************
      19             : //  Checks the quality assurance 
      20             : //  by comparing with reference data
      21             : //  contained in a DB
      22             : //  -------------------------------------------------------------
      23             : //  W. Ferrarese + P. Cerello Feb 2008
      24             : //  M.Siciliano Aug 2008 QA RecPoints 
      25             : //  last review: F. Prino Apr 2015
      26             : //  INFN Torino
      27             : 
      28             : // --- ROOT system ---
      29             : 
      30             : #include <RVersion.h>
      31             : #include <TProfile2D.h>
      32             : #include <TH2F.h>
      33             : #include <TH1F.h>
      34             : #include <TBranch.h>
      35             : #include <TTree.h>
      36             : #include <TMath.h>
      37             : #include <TPaveText.h>
      38             : //#include <TObjArray.h>
      39             : 
      40             : // --- Standard library ---
      41             : 
      42             : // --- AliRoot header files ---
      43             : #include "AliITSQASDDDataMakerRec.h"
      44             : #include "AliQAv1.h"
      45             : #include "AliRawReader.h"
      46             : #include "AliITSRawStream.h"
      47             : #include "AliITSRawStreamSDD.h"
      48             : #include "AliITSdigit.h"
      49             : #include "AliITSRecPoint.h"
      50             : #include "AliITSRecPointContainer.h"
      51             : #include "AliITSgeomTGeo.h"
      52             : #include "AliCDBManager.h"
      53             : #include "AliCDBEntry.h"
      54             : #include "AliITSCalibrationSDD.h"
      55             : #include "AliITSQADataMakerRec.h"
      56             : #include "AliLog.h"
      57             : #include <iostream>
      58             : 
      59             : class TGaxis;
      60             : class TF1;
      61             : class TSystem;
      62             : class AliLog;
      63             : class AliQAChecker;
      64             : class AliITSRawStreamSDDCompressed;
      65             : class AliCDBStorage;
      66             : class Riostream;
      67             : class AliITSdigitSDD;
      68             : class AliITS;
      69             : class AliRunLoader;
      70             : class AliITSLoader;
      71             : class AliITSDetTypeRec;
      72             : 
      73             : using std::endl;
      74             : using std::cout;
      75         118 : ClassImp(AliITSQASDDDataMakerRec)
      76             : 
      77             : //____________________________________________________________________________ 
      78           2 : AliITSQASDDDataMakerRec::AliITSQASDDDataMakerRec(AliITSQADataMakerRec *aliITSQADataMakerRec, Bool_t kMode, Short_t ldc) : TObject(),
      79           2 :   fAliITSQADataMakerRec(aliITSQADataMakerRec),
      80           2 :   fkOnline(kMode),
      81           2 :   fLDC(ldc),
      82           2 :   fSDDhRawsTask(0),
      83           2 :   fSDDhDigitsTask(0),
      84           2 :   fSDDhRecPointsTask(0),
      85           2 :   fOnlineOffsetRaws(0),
      86           2 :   fOnlineOffsetRecPoints(0),
      87           2 :   fGenRawsOffset(0),
      88           2 :   fGenDigitsOffset(0),
      89           2 :   fGenRecPointsOffset(0),
      90           2 :   fTimeBinSize(4),
      91           2 :   fDDLModuleMap(0),
      92           2 :   fCalibration(0),
      93           2 :   fHistoCalibration(0),
      94           2 :   fPulserRun(99999999)
      95           6 : {
      96             :   //ctor used to discriminate OnLine-Offline analysis
      97           4 :   fGenRawsOffset = new Int_t[AliRecoParam::kNSpecies];
      98           4 :   fGenRecPointsOffset = new Int_t[AliRecoParam::kNSpecies];
      99           4 :   fGenDigitsOffset = new Int_t[AliRecoParam::kNSpecies];
     100          24 :   for(Int_t i=0; i<AliRecoParam::kNSpecies; i++) {
     101          10 :     fGenRawsOffset[i] = 0;
     102          10 :     fGenRecPointsOffset[i] = 0;
     103          10 :     fGenDigitsOffset[i]=0;
     104             :   }
     105             :   
     106           2 :   InitCalibrationArray();
     107           4 : }
     108             : 
     109             : //____________________________________________________________________________ 
     110             : AliITSQASDDDataMakerRec::AliITSQASDDDataMakerRec(const AliITSQASDDDataMakerRec& qadm) :
     111           0 :   TObject(),
     112           0 :   fAliITSQADataMakerRec(qadm.fAliITSQADataMakerRec),
     113           0 :   fkOnline(qadm.fkOnline),
     114           0 :   fLDC(qadm.fLDC),
     115           0 :   fSDDhRawsTask(qadm.fSDDhRawsTask),
     116           0 :   fSDDhDigitsTask(qadm.fSDDhDigitsTask),
     117           0 :   fSDDhRecPointsTask(qadm.fSDDhRecPointsTask),
     118           0 :   fOnlineOffsetRaws(qadm.fOnlineOffsetRaws),
     119           0 :   fOnlineOffsetRecPoints(qadm.fOnlineOffsetRecPoints),
     120           0 :   fGenRawsOffset(qadm.fGenRawsOffset),
     121           0 :   fGenDigitsOffset(qadm.fGenDigitsOffset),
     122           0 :   fGenRecPointsOffset(qadm.fGenRecPointsOffset),
     123           0 :   fTimeBinSize(qadm.fTimeBinSize),
     124           0 :   fDDLModuleMap(qadm.fDDLModuleMap),
     125           0 :   fCalibration(qadm.fCalibration),
     126           0 :   fHistoCalibration(qadm.fHistoCalibration),
     127           0 :   fPulserRun(qadm.fPulserRun)
     128           0 : {
     129             :   //copy ctor 
     130           0 :   fAliITSQADataMakerRec->SetName((const char*)qadm.fAliITSQADataMakerRec->GetName()) ; 
     131           0 :   fAliITSQADataMakerRec->SetTitle((const char*)qadm.fAliITSQADataMakerRec->GetTitle());
     132             :   //fDDLModuleMap=NULL;
     133           0 : }
     134             : 
     135             : //____________________________________________________________________________ 
     136           0 : AliITSQASDDDataMakerRec::~AliITSQASDDDataMakerRec(){
     137             :   // destructor
     138             :   //if(fDDLModuleMap) delete fDDLModuleMap;
     139           0 :   if(fHistoCalibration){delete fHistoCalibration; fHistoCalibration=NULL;}
     140           0 : }
     141             : //__________________________________________________________________
     142             : AliITSQASDDDataMakerRec& AliITSQASDDDataMakerRec::operator = (const AliITSQASDDDataMakerRec& qac )
     143             : {
     144             :   // Equal operator.
     145           0 :   this->~AliITSQASDDDataMakerRec();
     146           0 :   new(this) AliITSQASDDDataMakerRec(qac);
     147           0 :   return *this;
     148           0 : }
     149             : 
     150             : //____________________________________________________________________________ 
     151             : void AliITSQASDDDataMakerRec::StartOfDetectorCycle()
     152             : {
     153             : 
     154             :   //Start of a QA cycle
     155             :   //
     156           0 :   AliDebug(AliQAv1::GetQADebugLevel(),Form("Start of SDD Cycle with event specie %s for task %s\n",AliRecoParam::GetEventSpecieName(fAliITSQADataMakerRec->GetEventSpecie()),AliQAv1::GetTaskName(fAliITSQADataMakerRec->GetTaskIndexSelected()).Data()));
     157           0 :   if(!fCalibration) {
     158           0 :     CreateTheCalibration();
     159           0 :   }
     160             : 
     161           0 :   if(fAliITSQADataMakerRec->GetEventSpecie()==0) return;
     162             : 
     163             :   //Detector specific actions at start of cycle
     164           0 :   if(fAliITSQADataMakerRec->GetTaskIndexSelected()==AliQAv1::kRAWS){
     165           0 :     AliDebug(AliQAv1::GetQADebugLevel(),"AliITSQADM::Start of SDD Cycle\n");
     166           0 :     if(fAliITSQADataMakerRec->ListExists(AliQAv1::kRAWS)==kFALSE)return;
     167             :     //
     168           0 :     int offsRW = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
     169           0 :     AliDebug(AliQAv1::GetQADebugLevel(),Form("Reset of Raw Data normalized histograms with eventspecie %s ",AliRecoParam::GetEventSpecieName(fAliITSQADataMakerRec->GetEventSpecie())));
     170           0 :     fAliITSQADataMakerRec->ResetRawsData(kSDDRawDataCheck+offsRW );
     171           0 :     fAliITSQADataMakerRec->ResetRawsData(kSDDRawModPatternNorm+offsRW);
     172           0 :     fAliITSQADataMakerRec->ResetRawsData(kSDDRawLadModLay3Norm+offsRW);
     173           0 :     fAliITSQADataMakerRec->ResetRawsData(kSDDRawLadModLay4Norm+offsRW);
     174           0 :   }
     175             : 
     176           0 :   if(fAliITSQADataMakerRec->GetTaskIndexSelected()==AliQAv1::kRECPOINTS){
     177           0 :     if(fAliITSQADataMakerRec->ListExists(AliQAv1::kRECPOINTS)==kFALSE)return;
     178             :     
     179           0 :     AliDebug(AliQAv1::GetQADebugLevel(),Form("Reset of RecPoints normalized histograms with eventspecie %s ",AliRecoParam::GetEventSpecieName(fAliITSQADataMakerRec->GetEventSpecie())));
     180           0 :     int offsRP = fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
     181           0 :     fAliITSQADataMakerRec->ResetRecPointsData(kSDDRecpModPatternNorm+offsRP);
     182           0 :     fAliITSQADataMakerRec->ResetRecPointsData(kSDDRecpLadModLay3Norm+offsRP);
     183           0 :     fAliITSQADataMakerRec->ResetRecPointsData(kSDDRecpLadModLay4Norm+offsRP);
     184           0 :     fAliITSQADataMakerRec->ResetRecPointsData(kSDDRecpDataCheck+offsRP);
     185           0 :   }
     186           0 : }
     187             : 
     188             : //____________________________________________________________________________ 
     189             : void AliITSQASDDDataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray** /*list*/)
     190             : {
     191             :   //end of a QA cycle
     192             : 
     193           0 :   AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); 
     194             :   
     195             :   Double_t nGoodAnodesTot= 0.;
     196             :   Double_t nGoodAnodesL3=0.;
     197             :   Double_t nGoodAnodesL4=0.;
     198           0 :   int offsRW = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
     199           0 :   int offsRP = fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
     200             :   //
     201           0 :   if(fHistoCalibration){
     202           0 :     nGoodAnodesTot= ((TH1F*)(fHistoCalibration->At(0)))->Integral();
     203           0 :     nGoodAnodesL3=((TH2F*)(fHistoCalibration->At(1)))->Integral();
     204           0 :     nGoodAnodesL4=((TH2F*)(fHistoCalibration->At(2)))->Integral();
     205           0 :     AliInfo(Form("Number of good anodes: Lay3=%.0f   Lay4=%.0f   Tot=%.0f",nGoodAnodesL3,nGoodAnodesL4,nGoodAnodesTot));
     206           0 :   }
     207           0 :   else{ AliWarning("Calibration TObjArray is NULL! No Normalization and calibtaion plot will be filled\n");}
     208             :   //
     209           0 :   for (int trCl=-1;trCl<fAliITSQADataMakerRec->GetNTrigClasses();trCl++) { // RS Loop over all trigger classes (+ global counter, -1)
     210             :     //
     211           0 :     if(task==AliQAv1::kRAWS) {
     212           0 :       TObjArray &harr = *fAliITSQADataMakerRec->GetRawsDataOfTrigClass(trCl);
     213           0 :       Int_t nEvent = GetNumberOfEvents(AliQAv1::kRAWS,trCl);
     214           0 :       TH1* h10 = (TH1*)harr[kSDDRawDataCheck+offsRW];
     215           0 :       if(nEvent==0) if(h10) nEvent=h10->GetBinContent(1);
     216             :       Double_t countsMod=0.;
     217             :       Double_t countsLay3=0.;
     218             :       Double_t countsLay4=0.;
     219           0 :       if(harr[kSDDRawModPattern+offsRW]) countsMod=((TH1*)harr[kSDDRawModPattern+offsRW])->GetEntries();
     220           0 :       if(harr[kSDDRawLadModLay3+offsRW]) countsLay3=((TH1*)harr[kSDDRawLadModLay3+offsRW])->GetEntries();
     221           0 :       if(harr[kSDDRawLadModLay4+offsRW]) countsLay4=((TH1*)harr[kSDDRawLadModLay4+offsRW])->GetEntries();
     222             :       Double_t normCountsMod=0.;
     223             :       Double_t normCountsLay3=0.;
     224             :       Double_t normCountsLay4=0.;
     225           0 :       if(nEvent!=0) {
     226           0 :         if(nGoodAnodesTot!=0.) normCountsMod = countsMod/(nGoodAnodesTot*nEvent);
     227           0 :         if(nGoodAnodesL3!=0.) normCountsLay3 = countsLay3/(nGoodAnodesL3*nEvent);
     228           0 :         if(nGoodAnodesL4!=0.) normCountsLay4 = countsLay4/(nGoodAnodesL4*nEvent);
     229           0 :         if(fHistoCalibration){
     230           0 :           if (harr[kSDDRawModPattern+offsRW] && harr[kSDDRawModPatternNorm+offsRW]){
     231           0 :             ((TH1*)harr[kSDDRawModPatternNorm+offsRW])->Divide( (TH1*)harr[kSDDRawModPattern+offsRW],((TH1F*)(fHistoCalibration->At(0))),1.,nEvent);
     232           0 :           }
     233           0 :           if (harr[kSDDRawLadModLay3+offsRW] && harr[kSDDRawLadModLay3Norm+offsRW]){
     234           0 :             ((TH2*)harr[kSDDRawLadModLay3Norm+offsRW])->Divide( (TH2*)harr[kSDDRawLadModLay3+offsRW],((TH2F*)(fHistoCalibration->At(1))),1.,nEvent);
     235           0 :           }
     236           0 :           if (harr[kSDDRawLadModLay4+offsRW] && harr[kSDDRawLadModLay4Norm+offsRW]){
     237           0 :             ((TH2*)harr[kSDDRawLadModLay4Norm+offsRW])->Divide( (TH2*)harr[kSDDRawLadModLay4+offsRW],((TH2F*)(fHistoCalibration->At(2))),1.,nEvent);
     238           0 :           }
     239             :         }
     240             :       }
     241           0 :       if (h10){
     242           0 :         h10->SetBinContent(1,nEvent);
     243           0 :         h10->SetBinContent(2,normCountsMod);
     244           0 :         h10->SetBinContent(3,normCountsLay3);
     245           0 :         h10->SetBinContent(4,normCountsLay4);
     246           0 :       }
     247             : 
     248             :       //
     249           0 :       if(fHistoCalibration){
     250           0 :         TH1* hact3 = (TH1*)harr[kActiveModLay3+offsRW];
     251           0 :         if(hact3){
     252           0 :           TH1* hcal3 = (TH1*)fHistoCalibration->At(1);
     253           0 :           for(Int_t ii=1; ii<hact3->GetNbinsX()+1;ii++) {
     254           0 :             for(Int_t jj=1; jj<hact3->GetNbinsY()+1;jj++) {             
     255           0 :               if( hcal3->GetBinContent(ii,jj) > 0. ) hact3->SetBinContent(ii,jj,1);
     256           0 :               else hact3->SetBinContent(ii,jj,0);
     257             :             }
     258             :           }
     259           0 :           hact3->SetTitle(Form("SDDCalibL3 - Pulser Run %d",fPulserRun));
     260           0 :         }
     261           0 :         TH1* hact4 = (TH1*)harr[kActiveModLay4+offsRW];
     262           0 :         if(hact4){
     263           0 :           TH1* hcal4 = (TH1*)fHistoCalibration->At(2);
     264           0 :           for(Int_t ii=1; ii<hact4->GetNbinsX()+1;ii++) {
     265           0 :             for(Int_t jj=1; jj<hact4->GetNbinsY()+1;jj++) {             
     266           0 :               if( hcal4->GetBinContent(ii,jj) > 0. ) hact4->SetBinContent(ii,jj,1);
     267           0 :               else hact4->SetBinContent(ii,jj,0);
     268             :             }
     269             :           }
     270           0 :           hact4->SetTitle(Form("SDDCalibL4 - Pulser Run %d",fPulserRun));
     271           0 :         }
     272           0 :       }
     273           0 :     }//end raws
     274             : 
     275             : 
     276           0 :     if(task==AliQAv1::kRECPOINTS) {
     277           0 :       TObjArray &harr = *fAliITSQADataMakerRec->GetRecPointsDataOfTrigClass(trCl);
     278           0 :       Int_t nEventRP = GetNumberOfEvents(AliQAv1::kRECPOINTS,trCl);
     279           0 :       TH1* htmp27 = (TH1*)harr[kSDDRecpDataCheck+offsRP];
     280           0 :       if(nEventRP==0) if(htmp27) nEventRP=htmp27->GetBinContent(1);
     281             :       Double_t nrecpMod=0.;
     282             :       Double_t nrecpLay3=0.;
     283             :       Double_t nrecpLay4=0.;
     284           0 :       if(harr[kSDDRecpModPattern+offsRP]) nrecpMod=((TH1*)harr[kSDDRecpModPattern+offsRP])->GetEntries();
     285           0 :       if(harr[kSDDRecpLadModLay3+offsRP]) nrecpLay3=((TH1*)harr[kSDDRecpLadModLay3+offsRP])->GetEntries();
     286           0 :       if(harr[kSDDRecpLadModLay4+offsRP]) nrecpLay4=((TH1*)harr[kSDDRecpLadModLay4+offsRP])->GetEntries();
     287             :       Double_t normNrecpMod=0.;
     288             :       Double_t normNrecpLay3=0.;
     289             :       Double_t normNrecpLay4=0.;
     290           0 :       if(nEventRP!=0) {
     291           0 :         if(nGoodAnodesTot!=0.) normNrecpMod = nrecpMod/(nGoodAnodesTot*nEventRP);
     292           0 :         if(nGoodAnodesL3!=0.) normNrecpLay3 = nrecpLay3/(nGoodAnodesL3*nEventRP);
     293           0 :         if(nGoodAnodesL4!=0.) normNrecpLay4 = nrecpLay4/(nGoodAnodesL4*nEventRP);
     294           0 :         if(fHistoCalibration){
     295           0 :           if (harr[kSDDRecpModPattern+offsRP] && harr[kSDDRecpModPatternNorm+offsRP]){
     296           0 :             ((TH1*)harr[kSDDRecpModPatternNorm+offsRP])->Divide( (TH1*)harr[kSDDRecpModPattern+offsRP],((TH1F*)(fHistoCalibration->At(0))),1.,nEventRP);
     297           0 :           }
     298           0 :           if (harr[kSDDRecpLadModLay3+offsRP] && harr[kSDDRecpLadModLay3Norm+offsRP]){
     299           0 :             ((TH2*)harr[kSDDRecpLadModLay3Norm+offsRP])->Divide( (TH2*)harr[kSDDRecpLadModLay3+offsRP],((TH2F*)(fHistoCalibration->At(1))),1.,nEventRP);
     300           0 :           }
     301           0 :           if (harr[kSDDRecpLadModLay4+offsRP] && harr[kSDDRecpLadModLay4Norm+offsRP]){
     302           0 :             ((TH2*)harr[kSDDRecpLadModLay4Norm+offsRP])->Divide( (TH2*)harr[kSDDRecpLadModLay4+offsRP],((TH2F*)(fHistoCalibration->At(2))),1.,nEventRP);
     303           0 :           }
     304             :         }
     305             :       }
     306           0 :       if (htmp27) {
     307           0 :         htmp27->SetBinContent(1,nEventRP);
     308           0 :         htmp27->SetBinContent(2,normNrecpMod);
     309           0 :         htmp27->SetBinContent(3,normNrecpLay3);
     310           0 :         htmp27->SetBinContent(4,normNrecpLay4);
     311           0 :       }
     312             : 
     313           0 :       FillRelativeOccupancyHistos((TH2*)harr[kSDDRecpLadModLay3Norm+offsRP],(TH1*)harr[kSDDRecpRelOccLay3+offsRP]);
     314           0 :       FillRelativeOccupancyHistos((TH2*)harr[kSDDRecpLadModLay4Norm+offsRP],(TH1*)harr[kSDDRecpRelOccLay4+offsRP]);
     315             :       
     316             :       // RecPoints 2 Raws Ratio
     317           0 :       if(fAliITSQADataMakerRec->ListExists(AliQAv1::kRAWS)==kTRUE) {
     318           0 :         TH2* hratio3  = (TH2*)harr[kSDDRecpToRawLay3+offsRP];
     319           0 :         TH2* hrp3  = (TH2*)harr[kSDDRecpLadModLay3+offsRP];
     320           0 :         TH2* hrw3 =  (TH2*)fAliITSQADataMakerRec->GetRawsData(kSDDRawLadModLay3 + offsRW,trCl);
     321           0 :         FillRecToRaw(hrp3,hrw3,hratio3);
     322           0 :         TH2* hratio4  = (TH2*)harr[kSDDRecpToRawLay4+offsRP];
     323           0 :         TH2* hrp4  = (TH2*)harr[kSDDRecpLadModLay4+offsRP];
     324           0 :         TH2* hrw4 =  (TH2*)fAliITSQADataMakerRec->GetRawsData(kSDDRawLadModLay4 + offsRW,trCl);
     325           0 :         FillRecToRaw(hrp4,hrw4,hratio4);
     326           0 :       }
     327           0 :       else{AliWarning("Ratio between RecPoints and Raws not executed because the raw list has not been created\n");}
     328           0 :     }//end recpoints
     329             :     //
     330             :   } // RS Loop over all trigger classes (+ global counter, -1)
     331             :   //
     332           0 : }
     333             : 
     334             : //____________________________________________________________________________ 
     335             : Int_t AliITSQASDDDataMakerRec::InitRaws()
     336             : { 
     337             : 
     338             :   // Initialization for RAW data - SDD -
     339             :   const Bool_t expert   = kTRUE ; 
     340             :   const Bool_t saveCorr = kTRUE ; 
     341             :   const Bool_t image    = kTRUE ; 
     342             : 
     343             :   Int_t rv = 0 ; 
     344           0 :   Int_t lay, lad, det;
     345             : 
     346           0 :   int offsRW = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
     347           0 :   fSDDhRawsTask = 0;
     348           0 :   if(fkOnline){AliInfo("Book Online Histograms for SDD\n");}
     349           0 :   else {AliInfo("Book Offline Histograms for SDD\n ");}
     350             : 
     351           0 :   TPaveText *paveText0=new TPaveText(0.3,0.88,0.9,0.99,"NDC");
     352           0 :   paveText0->AddText("");
     353           0 :   paveText0->SetFillColor(kMagenta+2);
     354           0 :   paveText0->SetTextColor(kWhite);
     355           0 :   paveText0->SetBorderSize(1);
     356           0 :   paveText0->SetLineWidth(1);        
     357             :   
     358           0 :   TH1D *h0 = new TH1D("SDDModPattern","HW Modules pattern",fgknSDDmodules,239.5,499.5); //0
     359           0 :   h0->GetXaxis()->SetTitle("Module Number");
     360           0 :   h0->GetYaxis()->SetTitle("Counts");
     361           0 :   h0->SetOption("bar1");
     362           0 :   h0->SetBarOffset(0.01);
     363           0 :   h0->SetBarWidth(0.95);
     364           0 :   h0->SetFillColor(45);
     365           0 :   h0->GetListOfFunctions()->Add(paveText0);
     366             :         
     367           0 :   rv = fAliITSQADataMakerRec->Add2RawsList(h0,kSDDRawModPattern+offsRW, expert, !image, !saveCorr);
     368           0 :   fSDDhRawsTask++;
     369             :         
     370           0 :   TPaveText *paveText1=new TPaveText(0.3,0.88,0.9,0.99,"NDC");
     371           0 :   paveText1->AddText("");
     372           0 :   paveText1->SetFillColor(kMagenta+2);
     373           0 :   paveText1->SetTextColor(kWhite);
     374           0 :   paveText1->SetBorderSize(1);
     375           0 :   paveText1->SetLineWidth(1);
     376             : 
     377             :   //zPhi distribution using ladder and modules numbers
     378           0 :   TH2D *hphil3 = new TH2D("SDDphizL3","SDD #varphiz Layer3 ",12,0.5,6.5,14,0.5,14.5);//1
     379           0 :   hphil3->GetXaxis()->SetTitle("z[Module Number L3 ]");
     380           0 :   hphil3->GetYaxis()->SetTitle("#varphi[ Ladder Number L3]");
     381           0 :   hphil3->SetStats(0);
     382           0 :   hphil3->GetListOfFunctions()->Add(paveText1);
     383           0 :   rv = fAliITSQADataMakerRec->Add2RawsList(hphil3,kSDDRawLadModLay3+offsRW, !expert, image, !saveCorr); 
     384           0 :   fSDDhRawsTask++;
     385             :  
     386           0 :   TPaveText *paveText2=new TPaveText(0.3,0.88,0.9,0.99,"NDC");
     387           0 :   paveText2->AddText("");
     388           0 :   paveText2->SetFillColor(kMagenta+2);
     389           0 :   paveText2->SetTextColor(kWhite);
     390           0 :   paveText2->SetBorderSize(1);
     391           0 :   paveText2->SetLineWidth(1);
     392             : 
     393           0 :   TH2D *hphil4 = new TH2D("SDDphizL4","SDD #varphiz Layer4 ",16,0.5,8.5,22,0.5,22.5); //2
     394           0 :   hphil4->GetXaxis()->SetTitle("z[Module Number L4]");
     395           0 :   hphil4->GetYaxis()->SetTitle("#varphi[Ladder Number L4]");
     396           0 :   hphil4->SetStats(0);
     397           0 :   hphil4->GetListOfFunctions()->Add(paveText2);
     398           0 :   rv = fAliITSQADataMakerRec->Add2RawsList(hphil4,kSDDRawLadModLay4+offsRW, !expert, image, !saveCorr); 
     399           0 :   fSDDhRawsTask++;
     400             :         
     401             :   //normalized histograms
     402           0 :   TH1F *h0norm = new TH1F("SDDModPatternNORM","NORM HW Modules pattern",fgknSDDmodules,239.5,499.5); //3
     403           0 :   h0norm->GetXaxis()->SetTitle("Module Number");
     404           0 :   h0norm->GetYaxis()->SetTitle("Counts");
     405           0 :   h0norm->SetOption("bar1");
     406           0 :   h0norm->SetBarOffset(0.01);
     407           0 :   h0norm->SetBarWidth(0.95);
     408           0 :   h0norm->SetFillColor(46);
     409             :   //h0norm->SetStats(0);
     410           0 :   rv = fAliITSQADataMakerRec->Add2RawsList(h0norm,kSDDRawModPatternNorm+offsRW, expert, !image, !saveCorr);
     411           0 :   fSDDhRawsTask++;
     412             :   
     413             :   //zPhi distribution using ladder and modules numbers
     414           0 :   TH2F *hphil3norm = new TH2F("SDDphizL3NORM","NORM SDD #varphiz Layer3 ",12,0.5,6.5,14,0.5,14.5);//4
     415           0 :   hphil3norm->GetXaxis()->SetTitle("z[Module Number L3 ]");
     416           0 :   hphil3norm->GetYaxis()->SetTitle("#varphi[ Ladder Number L3]");
     417           0 :   hphil3norm->SetStats(0);
     418           0 :   rv = fAliITSQADataMakerRec->Add2RawsList(hphil3norm,kSDDRawLadModLay3Norm+offsRW, expert, !image, !saveCorr); 
     419           0 :   fSDDhRawsTask++;
     420             :   
     421           0 :   TH2F *hphil4norm = new TH2F("SDDphizL4NORM","NORM SDD #varphiz Layer4 ",16,0.5,8.5,22,0.5,22.5); //5
     422           0 :   hphil4norm->GetXaxis()->SetTitle("z[Module Number L4]");
     423           0 :   hphil4norm->GetYaxis()->SetTitle("#varphi[Ladder Number L4]");
     424           0 :   hphil4norm->SetStats(0);
     425           0 :   rv = fAliITSQADataMakerRec->Add2RawsList(hphil4norm,kSDDRawLadModLay4Norm+offsRW, expert, !image, !saveCorr); 
     426           0 :   fSDDhRawsTask++;
     427             :         
     428             :   // Histos with number of digits distributions (filled once per event)
     429           0 :   Float_t digbins[201];
     430           0 :   digbins[0]=-0.5;
     431           0 :   for(Int_t ib=1; ib<=200; ib++) digbins[ib]=digbins[ib-1]+(1<<(ib/15));
     432           0 :   Float_t modBins[fgknSDDmodules+1];
     433           0 :   for(Int_t ib=0; ib<=fgknSDDmodules; ib++) modBins[ib]=239.5+ib;
     434             :   
     435           0 :   TH1F *hTotDigits = new TH1F("SDDnOfDigits","SDD Total number of digits ; # of digits",200,digbins);
     436           0 :   rv = fAliITSQADataMakerRec->Add2RawsList(hTotDigits,kSDDNofDigits+offsRW, expert, !image, !saveCorr); //6  
     437           0 :   fSDDhRawsTask++;
     438             :   
     439           0 :   TH2F *hDigitsPerModule = new TH2F("SDDnOfDigitsPerModule","SDD Digits vs module ; module ID ; # of digits", fgknSDDmodules,modBins,200,digbins);
     440           0 :   rv = fAliITSQADataMakerRec->Add2RawsList(hDigitsPerModule,kSDDNofDigitsVsMod+offsRW, expert, !image, !saveCorr); //7   
     441           0 :   fSDDhRawsTask++;
     442             :   
     443             :   // active modules and drift regions
     444           0 :   TH2F *hcalibl3 = new TH2F("SDDphizCalibL3","SDDCalibL3 ",12,0.5,6.5,14,0.5,14.5);//8
     445           0 :   hcalibl3->GetXaxis()->SetTitle("z[Module Number L3]");
     446           0 :   hcalibl3->GetYaxis()->SetTitle("#varphi[ Ladder Number L3]");
     447           0 :   hcalibl3->SetStats(0);
     448           0 :   hcalibl3->SetMaximum(2);
     449           0 :   rv = fAliITSQADataMakerRec->Add2RawsList(hcalibl3,kActiveModLay3+offsRW, !expert, image, !saveCorr); 
     450           0 :   fSDDhRawsTask++;
     451             :   
     452           0 :   TH2F *hcalibl4 = new TH2F("SDDphizCalibL4","SDDCalibL4 ",16,0.5,8.5,22,0.5,22.5); //9
     453           0 :   hcalibl4->GetXaxis()->SetTitle("z[Module Number L4]");
     454           0 :   hcalibl4->GetYaxis()->SetTitle("#varphi[Ladder Number L4]");
     455           0 :   hcalibl4->SetStats(0);
     456           0 :   hcalibl4->SetMaximum(2);
     457           0 :   rv = fAliITSQADataMakerRec->Add2RawsList(hcalibl4,kActiveModLay4+offsRW, !expert, image, !saveCorr); 
     458           0 :   fSDDhRawsTask++;
     459             : 
     460           0 :   TH1F *hsummarydata = new TH1F("SDDRawDataCheck","SDDRawDataCheck",46,-0.5,45.5);//10 summary of raw data checks Non expert and image
     461           0 :   hsummarydata->GetXaxis()->SetLabelSize(0.02);
     462           0 :   hsummarydata->GetXaxis()->SetTickLength(0.01);
     463           0 :   hsummarydata->GetXaxis()->SetNdivisions(110);
     464           0 :   hsummarydata->GetXaxis()->SetTicks("-");
     465           0 :   hsummarydata->GetYaxis()->SetLabelSize(0.02);
     466           0 :   hsummarydata->GetYaxis()->SetTitleSize(0.02);
     467           0 :   hsummarydata->GetYaxis()->SetTitleOffset(1.5);
     468           0 :   hsummarydata->GetYaxis()->SetTitle("#events(norm) or #modules (m) or #drift regions (dr)");
     469           0 :   hsummarydata->SetStats(0);
     470           0 :   hsummarydata->SetMaximum(272);
     471           0 :   hsummarydata->SetMinimum(0.);
     472             : 
     473           0 :   hsummarydata->SetOption("textbar1");
     474           0 :   hsummarydata->SetBarOffset(0.01);
     475           0 :   hsummarydata->SetBarWidth(0.95);
     476           0 :   hsummarydata->SetFillColor(8);
     477             : 
     478             :   //information about the events
     479           0 :   hsummarydata->GetXaxis()->SetBinLabel(1,"Events");
     480           0 :   hsummarydata->GetXaxis()->SetBinLabel(2,"Ent_NORM");
     481           0 :   hsummarydata->GetXaxis()->SetBinLabel(3,"Ent_NORML3");
     482           0 :   hsummarydata->GetXaxis()->SetBinLabel(4,"Ent_NORML4");
     483             :   //all
     484           0 :   hsummarydata->GetXaxis()->SetBinLabel(5,"m_act");
     485           0 :   hsummarydata->GetXaxis()->SetBinLabel(6,"m_fil");
     486           0 :   hsummarydata->GetXaxis()->SetBinLabel(7,"dr_act");
     487           0 :   hsummarydata->GetXaxis()->SetBinLabel(8,"dr_fil");
     488           0 :   hsummarydata->GetXaxis()->SetBinLabel(9,"m_exc");
     489           0 :   hsummarydata->GetXaxis()->SetBinLabel(10,"m_emp");
     490           0 :   hsummarydata->GetXaxis()->SetBinLabel(11,"dr_exc");
     491           0 :   hsummarydata->GetXaxis()->SetBinLabel(12,"dr_emp");
     492           0 :   hsummarydata->GetXaxis()->SetBinLabel(13,"m_exc-act");
     493           0 :   hsummarydata->GetXaxis()->SetBinLabel(14,"m_act-emp");
     494           0 :   hsummarydata->GetXaxis()->SetBinLabel(15,"dr_exc-act");
     495           0 :   hsummarydata->GetXaxis()->SetBinLabel(16,"dr_act-emp");
     496           0 :   hsummarydata->GetXaxis()->SetBinLabel(17,"m_overth");
     497           0 :   hsummarydata->GetXaxis()->SetBinLabel(18,"dr_overth");
     498             :   //l3
     499           0 :   hsummarydata->GetXaxis()->SetBinLabel(19,"m_actl3");
     500           0 :   hsummarydata->GetXaxis()->SetBinLabel(20,"m_fill3");
     501           0 :   hsummarydata->GetXaxis()->SetBinLabel(21,"dr_actl3");
     502           0 :   hsummarydata->GetXaxis()->SetBinLabel(22,"dr_fill3");
     503           0 :   hsummarydata->GetXaxis()->SetBinLabel(23,"m_excl3");
     504           0 :   hsummarydata->GetXaxis()->SetBinLabel(24,"m_empl3");
     505           0 :   hsummarydata->GetXaxis()->SetBinLabel(25,"dr_excl3");
     506           0 :   hsummarydata->GetXaxis()->SetBinLabel(26,"dr_empl3");
     507           0 :   hsummarydata->GetXaxis()->SetBinLabel(27,"m_exc-actl3");
     508           0 :   hsummarydata->GetXaxis()->SetBinLabel(28,"m_act-empl3");
     509           0 :   hsummarydata->GetXaxis()->SetBinLabel(29,"dr_exc-actl3");
     510           0 :   hsummarydata->GetXaxis()->SetBinLabel(30,"dr_act-empl3");
     511           0 :   hsummarydata->GetXaxis()->SetBinLabel(31,"m_overthl3");
     512           0 :   hsummarydata->GetXaxis()->SetBinLabel(32,"dr_overthl3");
     513             :   //l4
     514           0 :   hsummarydata->GetXaxis()->SetBinLabel(33,"m_actl4");
     515           0 :   hsummarydata->GetXaxis()->SetBinLabel(34,"m_fill4");
     516           0 :   hsummarydata->GetXaxis()->SetBinLabel(35,"dr_actl4");
     517           0 :   hsummarydata->GetXaxis()->SetBinLabel(36,"dr_fill4");
     518           0 :   hsummarydata->GetXaxis()->SetBinLabel(37,"m_excl4");
     519           0 :   hsummarydata->GetXaxis()->SetBinLabel(38,"m_empl4");
     520           0 :   hsummarydata->GetXaxis()->SetBinLabel(39,"dr_excl4");
     521           0 :   hsummarydata->GetXaxis()->SetBinLabel(40,"dr_empl4");
     522           0 :   hsummarydata->GetXaxis()->SetBinLabel(41,"m_exc-actl4");
     523           0 :   hsummarydata->GetXaxis()->SetBinLabel(42,"m_act-empl4");
     524           0 :   hsummarydata->GetXaxis()->SetBinLabel(43,"dr_exc-actl4");
     525           0 :   hsummarydata->GetXaxis()->SetBinLabel(44,"dr_act-empl4");
     526           0 :   hsummarydata->GetXaxis()->SetBinLabel(45,"m_overthl4");
     527           0 :   hsummarydata->GetXaxis()->SetBinLabel(46,"dr_overthl4");
     528           0 :   hsummarydata->GetXaxis()->LabelsOption("v");
     529             : 
     530           0 :   rv = fAliITSQADataMakerRec->Add2RawsList(hsummarydata,kSDDRawDataCheck+offsRW, !expert, image, !saveCorr); 
     531           0 :   fSDDhRawsTask++; 
     532           0 :   fOnlineOffsetRaws = fSDDhRawsTask;
     533             : 
     534             :   //online part
     535           0 :   if(fkOnline){
     536             :     //DDL Pattern 
     537           0 :     TH2F *hddl = new TH2F("SDDDDLPattern","SDD DDL Pattern ",24,-0.5,11.5,24,-0.5,23.5); //11
     538           0 :     hddl->GetXaxis()->SetTitle("Channel");
     539           0 :     hddl->GetYaxis()->SetTitle("DDL Number");
     540           0 :     rv = fAliITSQADataMakerRec->Add2RawsList(hddl,kSDDOnlineDDLPattern+offsRW, expert, !image, !saveCorr);
     541           0 :     fSDDhRawsTask++;
     542             : 
     543             :     //Event Size 
     544           0 :     TH1F *hsize = new TH1F("SDDEventSize","SDD Event Size ",500,-0.5,199.5);
     545             : #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,0)
     546           0 :     hsize->SetBit(TH1::kCanRebin);
     547             : #endif
     548           0 :     hsize->GetXaxis()->SetTitle("Event Size [kB]");
     549           0 :     hsize->GetYaxis()->SetTitle("Entries");
     550           0 :     rv = fAliITSQADataMakerRec->Add2RawsList(hsize,kSDDDataSize+offsRW, expert, !image, !saveCorr); 
     551           0 :     fSDDhRawsTask++;
     552             : 
     553           0 :     Int_t nTimeBins= 256/fTimeBinSize;
     554             :     Int_t index1 = 0;
     555             : 
     556           0 :     for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){
     557           0 :       for(Int_t iside=0;iside<fgknSide;iside++){
     558           0 :         AliITSgeomTGeo::GetModuleId(moduleSDD+fgkmodoffset, lay, lad, det);
     559           0 :         TProfile2D *fModuleChargeMapFSE = new TProfile2D(Form("SDDchargeMapFSE_L%d_%d_%d_%d",lay,lad,det,iside),Form("SDDChargeMapForSingleEvent_L%d_%d_%d_%d",lay,lad,det,iside),nTimeBins,-0.5,255.5,256,-0.5,255.5);
     560           0 :         fModuleChargeMapFSE->GetXaxis()->SetTitle("Time Bin");
     561           0 :         fModuleChargeMapFSE->GetYaxis()->SetTitle("Anode");
     562           0 :         rv = fAliITSQADataMakerRec->Add2RawsList(fModuleChargeMapFSE,kChargeMapFirstMod + index1 + offsRW, expert, !image, !saveCorr);         
     563           0 :         index1++;
     564             :       }
     565             :     }
     566           0 :     for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){
     567           0 :       for(Int_t iside=0;iside<fgknSide;iside++){
     568           0 :         AliITSgeomTGeo::GetModuleId(moduleSDD+fgkmodoffset, lay, lad, det);
     569           0 :         TProfile2D *fModuleChargeMap = new TProfile2D(Form("SDDchargeMap_L%d_%d_%d_%d",lay,lad,det,iside),Form("SDDChargeMap_L%d_%d_%d_%d",lay,lad,det,iside),nTimeBins,-0.5,255.5,256,-0.5,255.5);
     570           0 :         fModuleChargeMap->GetXaxis()->SetTitle("Time Bin");
     571           0 :         fModuleChargeMap->GetYaxis()->SetTitle("Anode Number");
     572           0 :         rv = fAliITSQADataMakerRec->Add2RawsList(fModuleChargeMap,kChargeMapFirstMod + index1 + offsRW, expert, !image, !saveCorr); 
     573           0 :         index1++;
     574             :       }
     575             :     }
     576           0 :     fSDDhRawsTask+=index1;
     577           0 :   }  // kONLINE
     578             :   
     579           0 :   cout << fSDDhRawsTask << " SDD Raws histograms booked" << endl;
     580             :   
     581           0 :   AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Raws histograms booked\n",fSDDhRawsTask));
     582             :   //
     583           0 :   return rv ; 
     584           0 : }
     585             : 
     586             : 
     587             : //____________________________________________________________________________
     588             : Int_t AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
     589             : { 
     590             :   // Fill QA for RAW - SDD -
     591             : 
     592             :   Int_t rv = 0;
     593           0 :   int offsRW = fGenRawsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
     594             : 
     595           0 :   if(!fDDLModuleMap) CreateTheMap();
     596           0 :   if(rawReader->GetType() != 7) return rv;  // skips non physical triggers
     597           0 :   AliDebug(AliQAv1::GetQADebugLevel(),"entering MakeRaws\n");                 
     598           0 :   rawReader->Reset();       
     599           0 :   rawReader->Select("ITSSDD");
     600           0 :   AliITSRawStream *stream=AliITSRawStreamSDD::CreateRawStreamSDD(rawReader);
     601           0 :   stream->SetDDLModuleMap(fDDLModuleMap);
     602             :   
     603             :   Int_t index=0;
     604           0 :   if(fkOnline) {
     605           0 :     for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){
     606           0 :       for(Int_t iside=0;iside<fgknSide;iside++) {
     607           0 :         fAliITSQADataMakerRec->ResetRawsData(kChargeMapFirstMod+index+offsRW);   
     608           0 :         index++;
     609             :       }
     610             :     }
     611           0 :   }
     612             :   
     613           0 :   Int_t lay, lad, det;   
     614             :   Int_t cnt = 0;
     615           0 :   Int_t cntMod[fgknSDDmodules];
     616           0 :   for(Int_t jmod=0; jmod<fgknSDDmodules; jmod++) cntMod[jmod]=0;
     617             :   
     618             :   Int_t iddl = -1;
     619             :   Int_t isddmod = -1;
     620             :   Int_t coord1, coord2, signal, moduleSDD; 
     621             :   Int_t prevDDLID = -1;
     622             :   UInt_t size = 0;
     623           0 :   Int_t totalddl=static_cast<int>(fDDLModuleMap->GetNDDLs());
     624           0 :   Bool_t *ddldata=new Bool_t[totalddl];
     625           0 :   for(Int_t jddl=0;jddl<totalddl;jddl++) ddldata[jddl]=kFALSE;
     626             : 
     627           0 :   while(stream->Next()) {
     628           0 :     iddl = rawReader->GetDDLID();// - fgkDDLIDshift;
     629           0 :     if(iddl<0)isddmod=-1;
     630           0 :     else isddmod = fDDLModuleMap->GetModuleNumber(iddl,stream->GetCarlosId());
     631             : 
     632           0 :     if(isddmod==-1){
     633           0 :       AliDebug(AliQAv1::GetQADebugLevel(),Form("Found module with iddl: %d, stream->GetCarlosId: %d \n",iddl,stream->GetCarlosId()));
     634             :       continue;
     635             :     }
     636           0 :     if(stream->IsCompletedModule()) {
     637           0 :       AliDebug(AliQAv1::GetQADebugLevel(),Form("IsCompletedModule == KTRUE\n"));
     638             :       continue;
     639             :     } 
     640           0 :     if(stream->IsCompletedDDL()) {
     641           0 :       if(fkOnline){
     642           0 :         if ((rawReader->GetDDLID() != prevDDLID)&&(ddldata[iddl])==kFALSE){
     643           0 :           size += rawReader->GetDataSize();//in bytes
     644           0 :           prevDDLID = rawReader->GetDDLID();
     645           0 :           ddldata[iddl]=kTRUE;
     646           0 :         }
     647             :       }
     648           0 :       AliDebug(AliQAv1::GetQADebugLevel(),Form("IsCompletedDDL == KTRUE\n"));
     649             :       continue;
     650             :     } 
     651             :     
     652           0 :     coord1 = stream->GetCoord1();
     653           0 :     coord2 = stream->GetCoord2();
     654           0 :     signal = stream->GetSignal();
     655             :     
     656           0 :     moduleSDD = isddmod - fgkmodoffset;
     657             :     
     658           0 :     if(isddmod <fgkmodoffset|| isddmod>fgknSDDmodules+fgkmodoffset-1) {
     659           0 :       AliDebug(AliQAv1::GetQADebugLevel(),Form( "Module SDD = %d, resetting it to 1 \n",isddmod));
     660             :       isddmod = 1;
     661           0 :     }
     662             :     
     663           0 :     AliITSgeomTGeo::GetModuleId(isddmod, lay, lad, det);
     664           0 :     Short_t iside = stream->GetChannel();
     665             : 
     666             :     //printf(" \n%i %i %i %i \n ",lay, lad, det,iside );
     667           0 :     fAliITSQADataMakerRec->FillRawsData( kSDDRawModPattern + offsRW,isddmod);   
     668           0 :     if(lay==3) fAliITSQADataMakerRec->FillRawsData(kSDDRawLadModLay3+offsRW,det+0.5*iside-0.25,lad); //phiz l3 not norm
     669           0 :     else if(lay==4) fAliITSQADataMakerRec->FillRawsData(kSDDRawLadModLay4+offsRW,det+0.5*iside-0.25,lad); //phiz l4 not norm
     670             :  
     671           0 :     if(fkOnline) {
     672             : 
     673           0 :       fAliITSQADataMakerRec->FillRawsData(kSDDOnlineDDLPattern+offsRW, (stream->GetCarlosId())+0.5*iside -0.5,iddl);
     674           0 :       Int_t index1 = moduleSDD * 2 + iside;
     675             :       
     676           0 :       if(index1<0){
     677           0 :         AliDebug(AliQAv1::GetQADebugLevel(),Form("Wrong index number %d - patched to 0\n",index1));
     678             :         index1 = 0;
     679           0 :       }      
     680             : 
     681           0 :       fAliITSQADataMakerRec->FillRawsData(kChargeMapFirstMod + index1 +offsRW, coord2, coord1, signal);     
     682           0 :       fAliITSQADataMakerRec->FillRawsData(kChargeMapFirstMod + index1 + fgknSDDmodules*fgknSide +offsRW, coord2, coord1, signal); 
     683             : 
     684           0 :     }//online
     685           0 :     cnt++;
     686           0 :     if(moduleSDD>=0 && moduleSDD<fgknSDDmodules) cntMod[moduleSDD]++;
     687           0 :     if(!(cnt%10000)) AliDebug(AliQAv1::GetQADebugLevel(),Form(" %d raw digits read",cnt));
     688             :   }//end next()
     689           0 :   fAliITSQADataMakerRec->FillRawsData(kSDDNofDigits+offsRW,cnt);
     690           0 :   for(Int_t jmod=0; jmod<fgknSDDmodules; jmod++){
     691           0 :     fAliITSQADataMakerRec->FillRawsData(kSDDNofDigitsVsMod+offsRW,jmod+fgkmodoffset,cntMod[jmod]);
     692             :   }
     693           0 :   if(fkOnline){
     694           0 :     fAliITSQADataMakerRec->FillRawsData(kSDDDataSize+offsRW,size/1024.);//KB
     695           0 :   }
     696             :         
     697           0 :   AliDebug(AliQAv1::GetQADebugLevel(),Form("Event completed, %d raw digits read",cnt)); 
     698           0 :   delete stream;
     699           0 :   delete [] ddldata;
     700             :   //
     701             :   return rv ; 
     702           0 : }
     703             : 
     704             : //____________________________________________________________________________ 
     705             : Int_t AliITSQASDDDataMakerRec::InitDigits()
     706             : { 
     707             :   //  if(!fHistoCalibration)InitCalibrationArray();
     708             :   // Initialization for DIGIT data - SDD -  
     709             :   const Bool_t expert   = kTRUE ; 
     710             :   const Bool_t image    = kTRUE ;
     711             :   Int_t rv = 0 ; 
     712           0 :   fSDDhDigitsTask=0;
     713           0 :   int offsD = fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
     714             : 
     715           0 :   TH1F* h0=new TH1F("SDD DIGITS Module Pattern","SDD DIGITS Module Pattern",260,239.5,499.5);       //hmod
     716           0 :   h0->GetXaxis()->SetTitle("SDD Module Number");
     717           0 :   h0->GetYaxis()->SetTitle("# DIGITS");
     718           0 :   rv = fAliITSQADataMakerRec->Add2DigitsList(h0,kSDDDigModPattern+offsD, !expert, image);
     719           0 :   fSDDhDigitsTask++;
     720             : 
     721           0 :   TH1F* h1=new TH1F("SDD Anode Distribution","DIGITS Anode Distribution",512,-0.5,511.5);      //hanocc
     722           0 :   h1->GetXaxis()->SetTitle("Anode Number");
     723           0 :   h1->GetYaxis()->SetTitle("# DIGITS");
     724           0 :   rv = fAliITSQADataMakerRec->Add2DigitsList(h1,kSDDDigAnode+offsD, !expert, image);
     725           0 :   fSDDhDigitsTask++;
     726             : 
     727           0 :   TH1F* h2=new TH1F("SDD Tbin Distribution","DIGITS Tbin Distribution",256,-0.5,255.5);      //htbocc
     728           0 :   h2->GetXaxis()->SetTitle("Tbin Number");
     729           0 :   h2->GetYaxis()->SetTitle("# DIGITS");
     730           0 :   rv = fAliITSQADataMakerRec->Add2DigitsList(h2,kSDDDigTimeBin+offsD, !expert, image);
     731           0 :   fSDDhDigitsTask++;
     732             : 
     733           0 :   TH1F* h3=new TH1F("SDD ADC Counts Distribution","DIGITS ADC Counts Distribution",200,0.,1024.);          //hsig
     734           0 :   h3->GetXaxis()->SetTitle("ADC Value");
     735           0 :   h3->GetYaxis()->SetTitle("# DIGITS");
     736           0 :   rv = fAliITSQADataMakerRec->Add2DigitsList(h3,kSDDDigADC+offsD, !expert, image);
     737           0 :   fSDDhDigitsTask++;
     738             : 
     739           0 :   AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Digits histograms booked\n",fSDDhDigitsTask));
     740             :   //
     741           0 :   return rv ; 
     742           0 : }
     743             : 
     744             : //____________________________________________________________________________
     745             : Int_t AliITSQASDDDataMakerRec::MakeDigits(TTree * digits)
     746             : { 
     747             : 
     748             :   // Fill QA for DIGIT - SDD -
     749             : 
     750             :   Int_t rv = 0 ; 
     751           0 :   int offsD = fGenDigitsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
     752           0 :   TBranch *branchD = digits->GetBranch("ITSDigitsSDD");
     753             : 
     754           0 :   if (!branchD) {
     755           0 :     AliError("can't get the branch with the ITS SDD digits !");
     756           0 :     return rv ;
     757             :   }
     758             :   
     759           0 :   static TClonesArray statDigits("AliITSdigitSDD");
     760           0 :   TClonesArray *iITSdigits = &statDigits;
     761           0 :   branchD->SetAddress(&iITSdigits);
     762             : 
     763           0 :   for(Int_t i=0; i<260; i++){
     764           0 :     Int_t nmod=i+240;
     765           0 :     digits->GetEvent(nmod);
     766           0 :     Int_t ndigits = iITSdigits->GetEntries();
     767           0 :     fAliITSQADataMakerRec->FillDigitsData(kSDDDigModPattern+offsD,nmod,ndigits);
     768             : 
     769           0 :     for (Int_t idig=0; idig<ndigits; idig++) {
     770           0 :       AliITSdigit *dig=(AliITSdigit*)iITSdigits->UncheckedAt(idig);
     771           0 :       Int_t iz=dig->GetCoord1();  // cell number z
     772           0 :       Int_t ix=dig->GetCoord2();  // cell number x
     773           0 :       Int_t sig=dig->GetSignal();
     774           0 :       fAliITSQADataMakerRec->FillDigitsData(kSDDDigAnode+offsD,iz);
     775           0 :       fAliITSQADataMakerRec->FillDigitsData(kSDDDigTimeBin+offsD,ix);
     776           0 :       fAliITSQADataMakerRec->FillDigitsData(kSDDDigADC+offsD,sig);
     777             :     }
     778             :   }
     779             : 
     780             :   return rv ; 
     781           0 : }
     782             : 
     783             : //____________________________________________________________________________ 
     784             : Int_t AliITSQASDDDataMakerRec::InitRecPoints()
     785             : {
     786             :   // Initialization for RECPOINTS - SDD -
     787             : 
     788             :   const Bool_t expert   = kTRUE ; 
     789             :   const Bool_t image    = kTRUE ; 
     790             :   Int_t rv = 0 ; 
     791           0 :   int offsRP = fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
     792             : 
     793           0 :   TH1F *h0 = new TH1F("SDDLay3TotCh","Layer 3 total charge",250,-0.5, 499.5); //position number 0
     794             :   //h0->SetBit(TH1::kCanRebin);
     795           0 :   h0->GetXaxis()->SetTitle("Charge (keV)");
     796           0 :   h0->GetYaxis()->SetTitle("Entries");
     797           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h0, kSDDRecpChargeLay3+offsRP, !expert, image);//NON expert image
     798           0 :   fSDDhRecPointsTask++;
     799             :  
     800           0 :   TH1F *h1 = new TH1F("SDDLay4TotCh","Layer 4 total charge",250,-0.5, 499.5);
     801             :   //h1->SetBit(TH1::kCanRebin);
     802           0 :   h1->GetXaxis()->SetTitle("Charge (keV)");
     803           0 :   h1->GetYaxis()->SetTitle("Entries");
     804           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h1, kSDDRecpChargeLay4+offsRP, !expert, image);
     805           0 :   fSDDhRecPointsTask++;
     806             : 
     807           0 :   TH2F *h2 = new TH2F("SDDGlobalCoordDistribYX","YX Global Coord Distrib",56,-28,28,56,-28,28);
     808           0 :   h2->GetYaxis()->SetTitle("Y (cm)");
     809           0 :   h2->GetXaxis()->SetTitle("X (cm)");
     810           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h2,kSDDRecpGloXY+offsRP, expert, image);
     811           0 :   fSDDhRecPointsTask++;
     812             : 
     813           0 :   TH2F *h3 = new TH2F("SDDGlobalCoordDistribRZ","RZ Global Coord Distrib",128,-32,32,56,12,26);
     814           0 :   h3->GetYaxis()->SetTitle("R (cm)");
     815           0 :   h3->GetXaxis()->SetTitle("Z (cm)");
     816           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h3,kSDDRecpGloRZ+offsRP, expert, image);
     817           0 :   fSDDhRecPointsTask++;
     818             :   
     819           0 :   TH2F *h4 = new TH2F("SDDGlobalCoordDistribL3PHIZ","#varphi Z Global Coord Distrib L3",96,-23,23,112,-TMath::Pi(),TMath::Pi());
     820           0 :   h4->GetYaxis()->SetTitle("#varphi (rad)");
     821           0 :   h4->GetXaxis()->SetTitle("Z (cm)");
     822           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h4,kSDDRecpPhiZLay3+offsRP, expert, image);
     823           0 :   fSDDhRecPointsTask++;
     824             : 
     825           0 :   TH2F *h5 = new TH2F("SDDGlobalCoordDistribL4PHIZ","#varphi Z Global Coord Distrib L4",128,-31,31,176,-TMath::Pi(),TMath::Pi());
     826           0 :   h5->GetYaxis()->SetTitle("#varphi (rad)");
     827           0 :   h5->GetXaxis()->SetTitle("Z (cm)");
     828           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h5,kSDDRecpPhiZLay4+offsRP, expert, image);
     829           0 :   fSDDhRecPointsTask++;
     830             :   
     831           0 :   TH1F *h6 = new TH1F("SDDModPatternRP","Modules pattern RP",fgknSDDmodules,239.5,499.5);
     832           0 :   h6->GetXaxis()->SetTitle("Module number");
     833           0 :   h6->GetYaxis()->SetTitle("Entries");
     834           0 :   h6->SetOption("bar1");
     835           0 :   h6->SetBarOffset(0.01);
     836           0 :   h6->SetBarWidth(0.95);
     837           0 :   h6->SetFillColor(39);
     838           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h6,kSDDRecpModPattern+offsRP, expert, !image);
     839           0 :   fSDDhRecPointsTask++;
     840             : 
     841           0 :   TPaveText *paveText7=new TPaveText(0.3,0.88,0.9,0.99,"NDC");
     842           0 :   paveText7->AddText("");
     843           0 :   paveText7->SetFillColor(kMagenta+2);
     844           0 :   paveText7->SetTextColor(kWhite);
     845           0 :   paveText7->SetBorderSize(1);
     846           0 :   paveText7->SetLineWidth(1);        
     847             :         
     848           0 :   TH2F *h7 = new TH2F("SDDModPatternL3RP","Modules pattern L3 RP",12,0.5,6.5,14,0.5,14.5);
     849           0 :   h7->GetXaxis()->SetTitle("z[#Module L3 ]");
     850           0 :   h7->GetYaxis()->SetTitle("#varphi[#Ladder L3]");
     851           0 :   h7->GetListOfFunctions()->Add(paveText7);
     852           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h7,kSDDRecpLadModLay3+offsRP, !expert, image);
     853           0 :   fSDDhRecPointsTask++;
     854             : 
     855           0 :   TPaveText *paveText8=new TPaveText(0.3,0.88,0.9,0.99,"NDC");
     856           0 :   paveText8->AddText("");
     857           0 :   paveText8->SetFillColor(kMagenta+2);
     858           0 :   paveText8->SetTextColor(kWhite);
     859           0 :   paveText8->SetBorderSize(1);
     860           0 :   paveText8->SetLineWidth(1);        
     861             :   
     862           0 :   TH2F *h8 = new TH2F("SDDModPatternL4RP","Modules pattern L4 RP",16,0.5,8.5,22,0.5,22.5); 
     863           0 :   h8->GetXaxis()->SetTitle("[#Module L3 ]");
     864           0 :   h8->GetYaxis()->SetTitle("#varphi[#Ladder L4]");
     865           0 :   h8->GetListOfFunctions()->Add(paveText8);
     866           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h8,kSDDRecpLadModLay4+offsRP, !expert, image);
     867           0 :   fSDDhRecPointsTask++;
     868             : 
     869             :   //------------------------norm--------------------------//
     870             : 
     871             : 
     872           0 :   TH1F *h9 = new TH1F("SDDModPatternRPNORM","Modules pattern RP NORM",fgknSDDmodules,239.5,499.5); 
     873           0 :   h9->GetXaxis()->SetTitle("Module number"); 
     874           0 :   h9->GetYaxis()->SetTitle("Entries");
     875           0 :   h9->SetOption("bar1");
     876           0 :   h9->SetBarOffset(0.01);
     877           0 :   h9->SetBarWidth(0.95);
     878           0 :   h9->SetFillColor(49);
     879           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h9,kSDDRecpModPatternNorm+offsRP, expert, !image);
     880           0 :   fSDDhRecPointsTask++;
     881             : 
     882             :   
     883           0 :   TH2F *h10 = new TH2F("SDDModPatternL3RPNORM","Modules pattern L3 RP NORM",12,0.5,6.5,14,0.5,14.5);
     884           0 :   h10->GetXaxis()->SetTitle("z[#Module L3 ]");
     885           0 :   h10->GetYaxis()->SetTitle("#varphi[#Ladder L3]");
     886           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h10,kSDDRecpLadModLay3Norm+offsRP, expert, !image);
     887           0 :   fSDDhRecPointsTask++;
     888             : 
     889           0 :   TH2F *h11 = new TH2F("SDDModPatternL4RPNORM","Modules pattern L4 RP NORM",16,0.5,8.5,22,0.5,22.5);
     890           0 :   h11->GetXaxis()->SetTitle("[#Module L4 ]");
     891           0 :   h10->GetYaxis()->SetTitle("#varphi[#Ladder L4]");
     892           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h11,kSDDRecpLadModLay4Norm+offsRP, expert, !image);
     893           0 :   fSDDhRecPointsTask++;
     894             : 
     895             :   //--------------------------------------------------------//
     896             : 
     897           0 :   TH2F *h12 = new TH2F("SDDLocalCoordDistrib","Local Coord Distrib",160,-4,4,160,-4,4);
     898           0 :   h12->GetXaxis()->SetTitle("X local coord, drift (cm)");
     899           0 :   h12->GetYaxis()->SetTitle("Z local coord, anode (cm)");
     900           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h12,kSDDRecpLocalCoord+offsRP, expert, !image);
     901           0 :   fSDDhRecPointsTask++;
     902             :   
     903           0 :   TH1F *h13 = new TH1F("SDDrdistrib_Layer3" ,"SDD r distribution Layer3" ,100,14.,16.5);
     904             : #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,0)
     905           0 :   h13->SetBit(TH1::kCanRebin);
     906             : #endif
     907           0 :   h13->GetXaxis()->SetTitle("r (cm)");
     908           0 :   h13->GetXaxis()->CenterTitle();
     909           0 :   h13->GetYaxis()->SetTitle("Entries");
     910           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h13,kSDDRecpRLay3+offsRP, expert, !image);
     911           0 :   fSDDhRecPointsTask++;
     912             :   
     913           0 :   TH1F *h14 = new TH1F("SDDrdistrib_Layer4" ,"SDD r distribution Layer4" ,100,23.,25.);
     914             : #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,0)
     915           0 :   h14->SetBit(TH1::kCanRebin);
     916             : #endif
     917           0 :   h14->GetXaxis()->SetTitle("r (cm)");
     918           0 :   h14->GetXaxis()->CenterTitle();
     919           0 :   h14->GetYaxis()->SetTitle("Entries");
     920           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h14,kSDDRecpRLay4+offsRP, expert, !image);
     921           0 :   fSDDhRecPointsTask++;
     922             :   
     923           0 :   TH1F *h15 = new TH1F("SDDphidistrib_Layer3","SDDphidistrib_Layer3" ,180,-TMath::Pi(),TMath::Pi());
     924           0 :   h15->GetXaxis()->SetTitle("#varphi (rad)");
     925           0 :   h15->GetXaxis()->CenterTitle();
     926           0 :   h15->GetYaxis()->SetTitle("Entries");
     927           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h15,kSDDRecpPhiLay3+offsRP, expert, !image);
     928           0 :   fSDDhRecPointsTask++;
     929             : 
     930           0 :   TH1F *h16 = new TH1F("SDDphidistrib_Layer4","SDDphidistrib_Layer4" ,180,-TMath::Pi(),TMath::Pi());
     931           0 :   h16->GetXaxis()->SetTitle("#varphi (rad)");
     932           0 :   h16->GetXaxis()->CenterTitle();
     933           0 :   h16->GetYaxis()->SetTitle("Entries");
     934           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h16,kSDDRecpPhiLay4+offsRP, expert, !image);
     935           0 :   fSDDhRecPointsTask++;
     936             : 
     937             :   
     938           0 :   TH1F *h17 = new TH1F("SDDdrifttime_Layer3","SDDdrifttime_Layer3",45,-0.5,4499.5);
     939             : #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,0)
     940           0 :   h17->SetBit(TH1::kCanRebin);
     941             : #endif
     942           0 :   h17->GetXaxis()->SetTitle("Drift time (ns)");
     943           0 :   h17->GetXaxis()->CenterTitle();
     944           0 :   h17->GetYaxis()->SetTitle("Entries");
     945           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h17,kSDDRecpDriftTimeLay3+offsRP, !expert, image);
     946           0 :   fSDDhRecPointsTask++;
     947             :   
     948           0 :   TH1F *h18 = new TH1F("SDDdrifttime_Layer4","SDDdrifttime_Layer4",45,-0.5,4499.5);
     949             : #if ROOT_VERSION_CODE < ROOT_VERSION(6,4,0)
     950           0 :   h18->SetBit(TH1::kCanRebin);
     951             : #endif
     952           0 :   h18->GetXaxis()->SetTitle("Drift time (ns)");
     953           0 :   h18->GetXaxis()->CenterTitle();
     954           0 :   h18->GetYaxis()->SetTitle("Entries");
     955           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h18,kSDDRecpDriftTimeLay4+offsRP, !expert, image);
     956           0 :   fSDDhRecPointsTask++;
     957             :   
     958           0 :   TH1F *h19 = new TH1F("SDDL3_RelativeOccupancy","Layer 3 Relative Occupancy (RecPoints)",200,0.,0.2);
     959           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h19,kSDDRecpRelOccLay3+offsRP, expert, !image); 
     960           0 :   fSDDhRecPointsTask++;
     961             :   
     962           0 :   TH1F *h20 = new TH1F("SDDL4_RelativeOccupancy","Layer 4 Relative Occupancy (RecPoints)",200,0.,0.2);
     963           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h20,kSDDRecpRelOccLay4+offsRP, expert, !image);
     964           0 :   fSDDhRecPointsTask++;
     965             :                 
     966           0 :   TH2F *h21 = new TH2F("SDDL3_Rec2Raw_2D","L3 RecPoints to Raws 2D",12,0.5,6.5,14,0.5,14.5);  
     967           0 :   h21->GetXaxis()->SetTitle("z[#Module L3 ]");
     968           0 :   h21->GetYaxis()->SetTitle("#varphi[#Ladder L3]");
     969           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h21,kSDDRecpToRawLay3+offsRP, expert, !image);
     970           0 :   fSDDhRecPointsTask++;
     971             :   
     972           0 :   TH2F *h22 = new TH2F("SDDL4_Rec2Raw_2D","L4 RecPoints to Raws 2D",16,0.5,8.5,22,0.5,22.5);
     973           0 :   h22->GetXaxis()->SetTitle("[#Module L4 ]");
     974           0 :   h22->GetYaxis()->SetTitle("#varphi[#Ladder L4]");
     975           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h22,kSDDRecpToRawLay4+offsRP, expert, !image);
     976           0 :   fSDDhRecPointsTask++;
     977             : 
     978           0 :   TH2F *h23 = new TH2F("SDDL3_clusizAnode","L3 CluSiz Anode",50,0.,6400.,21,-0.5,20.5);
     979           0 :   h23->GetXaxis()->SetTitle("Drift time (ns)");
     980           0 :   h23->GetYaxis()->SetTitle("Cluster Size (anodes)");
     981           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h23,kSDDRecpCluSizAnLay3+offsRP, expert, !image); // 25
     982           0 :   fSDDhRecPointsTask++;
     983             :   
     984           0 :   TH2F *h24 = new TH2F("SDDL4_clusizAnode","L4 CluSiz Anode",50,0.,6400.,21,-0.5,20.5);
     985           0 :   h24->GetXaxis()->SetTitle("Drift time (ns)");
     986           0 :   h24->GetYaxis()->SetTitle("Cluster Size (anodes)");
     987           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h24,kSDDRecpCluSizAnLay4+offsRP, expert, !image); // 26
     988           0 :   fSDDhRecPointsTask++;
     989             : 
     990           0 :   TH2F *h25 = new TH2F("SDDL3_clusizTB","L3 CluSiz TimeBin",50,0.,6400.,21,-0.5,20.5);
     991           0 :   h25->GetXaxis()->SetTitle("Drift time (ns)");
     992           0 :   h25->GetYaxis()->SetTitle("Cluster Size (time bins)");
     993           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h25,kSDDRecpCluSizTbLay3+offsRP, expert, !image); // 25
     994           0 :   fSDDhRecPointsTask++;
     995             :   
     996           0 :   TH2F *h26 = new TH2F("SDDL4_clusizTB","L4 CluSiz TimeBin",50,0.,6400.,21,-0.5,20.5);
     997           0 :   h26->GetXaxis()->SetTitle("Drift time (ns)");
     998           0 :   h26->GetYaxis()->SetTitle("Cluster Size (time bins)");
     999           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(h26,kSDDRecpCluSizTbLay4+offsRP, expert, !image); // 26
    1000           0 :   fSDDhRecPointsTask++;
    1001             :         
    1002             : 
    1003           0 :   TH1F *hsummarydatarp = new TH1F("SDDRecPointCheck","SDDRecPointCheck",46,-0.5,45.5);//27 summary of recpoint checks
    1004           0 :   hsummarydatarp->GetXaxis()->SetLabelSize(0.02);
    1005           0 :   hsummarydatarp->GetXaxis()->SetTickLength(0.01);
    1006           0 :   hsummarydatarp->GetXaxis()->SetNdivisions(110);
    1007           0 :   hsummarydatarp->GetXaxis()->SetTicks("-");
    1008           0 :   hsummarydatarp->GetYaxis()->SetLabelSize(0.02);
    1009           0 :   hsummarydatarp->GetYaxis()->SetTitleSize(0.02);
    1010           0 :   hsummarydatarp->GetYaxis()->SetTitleOffset(1.5);
    1011           0 :   hsummarydatarp->GetYaxis()->SetTitle("#events(norm) or #modules (m) or #drift regions (dr)");
    1012           0 :   hsummarydatarp->SetStats(0);
    1013           0 :   hsummarydatarp->SetMaximum(272);
    1014             : 
    1015           0 :   hsummarydatarp->SetOption("text bar1");
    1016           0 :   hsummarydatarp->SetBarOffset(0.05);
    1017           0 :   hsummarydatarp->SetBarWidth(0.95);
    1018           0 :   hsummarydatarp->SetFillColor(32);
    1019           0 :   hsummarydatarp->SetMinimum(0.);
    1020             : 
    1021             :   //information about the events
    1022           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(1,"Events");
    1023           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(2,"Ent_NORM");
    1024           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(3,"Ent_NORML3");
    1025           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(4,"Ent_NORML4");
    1026             :   //all
    1027             : 
    1028           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(5, "m_act");
    1029           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(6, "m_fil");
    1030           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(7, "dr_act");
    1031           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(8, "dr_fil");
    1032           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(9, "m_exc");
    1033           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(10,"m_emp");
    1034           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(11,"dr_exc");
    1035           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(12,"dr_emp");
    1036           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(13,"m_exc-act");
    1037           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(14,"m_act-emp");
    1038           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(15,"dr_exc-act");
    1039           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(16,"dr_act-emp");
    1040           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(17,"m_overth");
    1041           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(18,"dr_overth");
    1042             : 
    1043             :   //l3
    1044             : 
    1045           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(19,"m_actl3");
    1046           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(20,"m_fill3");
    1047           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(21,"dr_actl3");
    1048           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(22,"dr_fill3");
    1049           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(23,"m_excl3");
    1050           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(24,"m_empl3");
    1051           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(25,"dr_excl3");
    1052           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(26,"dr_empl3");
    1053           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(27,"m_exc-actl3");
    1054           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(28,"m_act-empl3");
    1055           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(29,"dr_exc-actl3");
    1056           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(30,"dr_act-empl3");
    1057           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(31,"m_overthl3");
    1058           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(32,"dr_overthl3");
    1059             : 
    1060             :   //l4
    1061             : 
    1062           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(33,"m_actl4");
    1063           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(34,"m_fill4");
    1064           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(35,"dr_actl4");
    1065           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(36,"dr_fill4");
    1066           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(37,"m_excl4");
    1067           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(38,"m_empl4");
    1068           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(39,"dr_excl4");
    1069           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(40,"dr_empl4");
    1070           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(41,"m_exc-actl4");
    1071           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(42,"m_act-empl4");
    1072           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(43,"dr_exc-actl4");
    1073           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(44,"dr_act-empl4");
    1074           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(45,"m_overthl4");
    1075           0 :   hsummarydatarp->GetXaxis()->SetBinLabel(46,"dr_overthl4");
    1076             : 
    1077           0 :   hsummarydatarp->GetXaxis()->LabelsOption("v");
    1078             : 
    1079           0 :   rv = fAliITSQADataMakerRec->Add2RecPointsList(hsummarydatarp,kSDDRecpDataCheck+offsRP, !expert, image);
    1080           0 :   fSDDhRecPointsTask++;
    1081             : 
    1082           0 :   fOnlineOffsetRecPoints = fSDDhRecPointsTask;
    1083           0 :   if(fkOnline){
    1084           0 :     TH2F *hxy1ev = new TH2F("SDDGlobalCoordDistribYXFSE","YX Global Coord Distrib FSE",112,-28,28,112,-28,28);
    1085           0 :     hxy1ev->GetYaxis()->SetTitle("Y (cm)");
    1086           0 :     hxy1ev->GetXaxis()->SetTitle("X (cm)");
    1087           0 :     rv = fAliITSQADataMakerRec->Add2RecPointsList(hxy1ev,kSDDRecpOnlineGloXYSingEv+offsRP, expert, !image);
    1088           0 :     fSDDhRecPointsTask++;
    1089             :     
    1090           0 :     TH2F *hrz1ev = new TH2F("SDDGlobalCoordDistribRZFSE","RZ Global Coord Distrib FSE",128,-32,32,56,12,26);
    1091           0 :     hrz1ev->GetYaxis()->SetTitle("R (cm)");
    1092           0 :     hrz1ev->GetXaxis()->SetTitle("Z (cm)");
    1093           0 :     rv = fAliITSQADataMakerRec->Add2RecPointsList(hrz1ev,kSDDRecpOnlineGloRZSingEv+offsRP, expert, !image);
    1094           0 :     fSDDhRecPointsTask++;      
    1095           0 :   }
    1096             :   
    1097           0 :   AliDebug(AliQAv1::GetQADebugLevel(),Form("%d SDD Recs histograms booked\n",fSDDhRecPointsTask));
    1098             :   //
    1099           0 :   return rv ; 
    1100           0 : }
    1101             : 
    1102             : //____________________________________________________________________________ 
    1103             : Int_t AliITSQASDDDataMakerRec::MakeRecPoints(TTree * clustersTree)
    1104             : {
    1105             :  // Fill QA for RecPoints - SDD -
    1106             :   Int_t rv = 0 ;
    1107           0 :   Int_t lay, lad, det; 
    1108             : 
    1109           0 :   AliITSRecPointContainer* rpcont=AliITSRecPointContainer::Instance();
    1110             :   TClonesArray *recpoints=NULL; 
    1111           0 :   if(fkOnline){
    1112           0 :     recpoints = rpcont->FetchClusters(0,clustersTree,fAliITSQADataMakerRec->GetEventNumber());
    1113           0 :   }else{
    1114           0 :     recpoints = rpcont->FetchClusters(0,clustersTree);
    1115             :   }
    1116           0 :   AliDebug(10,Form("Fetched RecPoints for %d SDD modules",recpoints->GetEntriesFast()));
    1117           0 :   if(!rpcont->GetStatusOK() || !rpcont->IsSDDActive()){
    1118           0 :     AliError("can't get SDD clusters !");
    1119           0 :     return rv;
    1120             :   }
    1121           0 :   int offsRP = fGenRecPointsOffset[fAliITSQADataMakerRec->GetEventSpecie()];
    1122             :   Int_t npoints = 0;      
    1123           0 :   Float_t cluglo[3]={0.,0.,0.}; 
    1124           0 :   if(fkOnline){
    1125           0 :     fAliITSQADataMakerRec->ResetRecPointsData(kSDDRecpOnlineGloXYSingEv+offsRP);
    1126           0 :     fAliITSQADataMakerRec->ResetRecPointsData(kSDDRecpOnlineGloRZSingEv+offsRP);
    1127           0 :   }
    1128             : 
    1129           0 :   Int_t firMod=TMath::Max(0,AliITSgeomTGeo::GetModuleIndex(3,1,1));
    1130           0 :   Int_t lasMod=AliITSgeomTGeo::GetModuleIndex(5,1,1);
    1131           0 :   for(Int_t module=firMod; module<lasMod;module++){
    1132           0 :     recpoints = rpcont->UncheckedGetClusters(module);
    1133           0 :     npoints += recpoints->GetEntries();
    1134           0 :     for(Int_t j=0;j<recpoints->GetEntries();j++){
    1135           0 :       AliITSRecPoint *recp = (AliITSRecPoint*)recpoints->At(j); 
    1136           0 :       Int_t index = recp->GetDetectorIndex();
    1137           0 :       lay=recp->GetLayer();
    1138           0 :       if(lay < 2 || lay > 3) continue;
    1139           0 :       Int_t modnumb=index+AliITSgeomTGeo::GetModuleIndex(lay+1,1,1);
    1140           0 :       AliITSgeomTGeo::GetModuleId(modnumb, lay, lad, det);  
    1141           0 :       fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpModPattern+offsRP,modnumb);
    1142           0 :       recp->GetGlobalXYZ(cluglo);
    1143           0 :       Float_t rad=TMath::Sqrt(cluglo[0]*cluglo[0]+cluglo[1]*cluglo[1]); 
    1144           0 :       Float_t phi=TMath::ATan2(cluglo[1],cluglo[0]);
    1145           0 :       Float_t drifttime=recp->GetDriftTime();
    1146           0 :       fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpLocalCoord+offsRP,recp->GetDetLocalX(),recp->GetDetLocalZ());
    1147           0 :       fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpGloXY+offsRP,cluglo[0],cluglo[1]);
    1148           0 :       fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpGloRZ+offsRP,cluglo[2],rad);
    1149           0 :       if(fkOnline) {
    1150           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpOnlineGloXYSingEv+offsRP,cluglo[0],cluglo[1]);
    1151           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpOnlineGloRZSingEv+offsRP,cluglo[2],rad);
    1152           0 :       }
    1153           0 :       Int_t iside=recp->GetDriftSide();
    1154           0 :       lay=recp->GetLayer();
    1155           0 :       if(lay == 2) {
    1156           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpChargeLay3+offsRP, recp->GetQ());
    1157           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpLadModLay3+offsRP, det+0.5*iside-0.5,lad);
    1158           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpRLay3+offsRP, rad);
    1159           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpPhiLay3+offsRP, phi);
    1160           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpPhiZLay3+offsRP, cluglo[2],phi);
    1161           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpDriftTimeLay3+offsRP, drifttime);
    1162           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpCluSizAnLay3+offsRP, drifttime,recp->GetNz());
    1163           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpCluSizTbLay3+offsRP, drifttime,recp->GetNy());
    1164           0 :       } else if(lay == 3) {
    1165           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpChargeLay4+offsRP, recp->GetQ());
    1166           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpLadModLay4+offsRP, det+0.5*iside-0.5,lad);
    1167           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpRLay4+offsRP, rad);
    1168           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpPhiLay4+offsRP, phi);
    1169           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpPhiZLay4+offsRP, cluglo[2],phi);
    1170           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpDriftTimeLay4+offsRP, drifttime);
    1171           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpCluSizAnLay4+offsRP, drifttime, recp->GetNz());
    1172           0 :         fAliITSQADataMakerRec->FillRecPointsData(kSDDRecpCluSizTbLay4+offsRP, drifttime, recp->GetNy());
    1173           0 :       }
    1174           0 :     }
    1175             :   }
    1176             :   //
    1177             :   return rv ; 
    1178           0 : }
    1179             : 
    1180             : //_______________________________________________________________
    1181             : Int_t AliITSQASDDDataMakerRec::GetOffset(AliQAv1::TASKINDEX_t task, Int_t specie) const
    1182             : {
    1183             :   // Returns offset number according to the specified task
    1184             :   Int_t offset=0;
    1185           0 :   if( task == AliQAv1::kRAWS ){offset=fGenRawsOffset[specie];}
    1186           0 :   else if(task == AliQAv1::kDIGITSR ){offset=fGenDigitsOffset[specie];}
    1187           0 :   else if( task == AliQAv1::kRECPOINTS ){offset=fGenRecPointsOffset[specie];}
    1188           0 :   return offset;
    1189             : }
    1190             : 
    1191             : //_______________________________________________________________
    1192             : void AliITSQASDDDataMakerRec::SetOffset(AliQAv1::TASKINDEX_t task, Int_t offset, Int_t specie) {
    1193             :   // Set offset number according to the specified task
    1194           0 :   if( task == AliQAv1::kRAWS ) {fGenRawsOffset[specie]=offset;}
    1195           0 :   else if( task == AliQAv1::kDIGITSR ) {fGenDigitsOffset[specie]=offset;}
    1196           0 :   else if( task == AliQAv1::kRECPOINTS ) {fGenRecPointsOffset[specie]=offset;}
    1197           0 : }
    1198             : 
    1199             : //_______________________________________________________________
    1200             : Int_t AliITSQASDDDataMakerRec::GetTaskHisto(AliQAv1::TASKINDEX_t task)
    1201             : {
    1202             :   //return the number of histo booked for a given Task
    1203             :   Int_t histotot=0;
    1204           0 :   if( task == AliQAv1::kRAWS ){ histotot=fSDDhRawsTask ;}
    1205           0 :   else if(task == AliQAv1::kDIGITSR) { histotot=fSDDhDigitsTask;}
    1206           0 :   else if( task == AliQAv1::kRECPOINTS ){ histotot=fSDDhRecPointsTask;}
    1207           0 :   else {AliInfo("No task has been selected. TaskHisto set to zero.\n");}
    1208           0 :   return histotot;
    1209             : }
    1210             : 
    1211             : 
    1212             : //_______________________________________________________________
    1213             : void AliITSQASDDDataMakerRec::CreateTheMap()
    1214             : {
    1215             :   //Create the SDD DDL Module Map
    1216           0 :   AliCDBEntry *ddlMapSDD = AliCDBManager::Instance()->Get("ITS/Calib/DDLMapSDD");
    1217           0 :   Bool_t cacheStatus = AliCDBManager::Instance()->GetCacheFlag();
    1218           0 :   if(!ddlMapSDD){
    1219           0 :       AliError("Calibration object retrieval failed! SDD will not be processed");
    1220           0 :       fDDLModuleMap = NULL;
    1221             :       //return rv;
    1222           0 :     }
    1223             :   else{
    1224           0 :     fDDLModuleMap = (AliITSDDLModuleMapSDD*)ddlMapSDD->GetObject();
    1225           0 :     if(!cacheStatus)ddlMapSDD->SetObject(NULL);
    1226           0 :     ddlMapSDD->SetOwner(kTRUE);
    1227           0 :     if(!cacheStatus){ delete ddlMapSDD;}
    1228           0 :     AliInfo("DDL Map Created\n ");
    1229             :   }
    1230           0 : }
    1231             : 
    1232             : //_______________________________________________________________
    1233             : void AliITSQASDDDataMakerRec::CreateTheCalibration()
    1234             : {
    1235             :   //Take from the OCDB the calibration information for the SDD 
    1236           0 :   AliCDBEntry *calibSDD = AliCDBManager::Instance()->Get("ITS/Calib/CalibSDD");
    1237           0 :   Bool_t cacheStatus = AliCDBManager::Instance()->GetCacheFlag();
    1238           0 :   if(!calibSDD){
    1239           0 :     AliError("Calibration object retrieval failed! SDD will not be processed");
    1240           0 :     fCalibration = NULL;
    1241           0 :   }else{
    1242           0 :     fCalibration = (TObjArray *)calibSDD->GetObject();      
    1243           0 :     if(!cacheStatus) calibSDD->SetObject(NULL);
    1244           0 :     calibSDD->SetOwner(kTRUE);
    1245           0 :     if(!cacheStatus) delete calibSDD;
    1246             : 
    1247           0 :     AliCDBId cdbid=calibSDD->GetId();
    1248           0 :     fPulserRun=cdbid.GetFirstRun();
    1249             : 
    1250             :     AliITSCalibrationSDD * cal=NULL;
    1251           0 :     for(Int_t imod=0;imod<fgknSDDmodules;imod++){
    1252           0 :       Int_t module=imod + 240;
    1253           0 :       Int_t lay,lad,det;
    1254           0 :       AliITSgeomTGeo::GetModuleId(module,lay,lad,det);
    1255           0 :       Int_t index=1+(det-1)*2;
    1256           0 :       Int_t nGoodAnPerSide[2]={0,0};
    1257           0 :       cal=(AliITSCalibrationSDD*)fCalibration->At(imod);
    1258           0 :       if(cal && !cal->IsBad()){
    1259           0 :         for(Int_t iAn=0; iAn<512; iAn++){
    1260           0 :           Int_t iwing=cal->GetWing(iAn);
    1261           0 :           Int_t ichip=cal->GetChip(iAn);
    1262           0 :           if(!cal->IsChipBad(ichip) && !cal->IsBadChannel(iAn)) nGoodAnPerSide[iwing]++;      
    1263             :         }
    1264           0 :       }
    1265           0 :       Int_t totGoodAn=nGoodAnPerSide[0]+nGoodAnPerSide[1];
    1266           0 :       ((TH1F*)(fHistoCalibration->At(0)))->SetBinContent(imod+1,totGoodAn);
    1267           0 :       ((TH2F*)(fHistoCalibration->At(lay-2)))->SetBinContent(index,lad,nGoodAnPerSide[0]);
    1268           0 :       ((TH2F*)(fHistoCalibration->At(lay-2)))->SetBinContent(index+1,lad,nGoodAnPerSide[1]);
    1269           0 :     }
    1270           0 :   }  
    1271           0 : }
    1272             : 
    1273             : //____________________________________________________________________
    1274             : void AliITSQASDDDataMakerRec::InitCalibrationArray()
    1275             : {
    1276             :   //create the histograms with the calibration informations. The histograms are stored in a TObjArray
    1277           4 :     TH1F *pattern1  = new TH1F("CALSDDModPattern","Calibration HW Modules pattern",fgknSDDmodules,239.5,499.5);
    1278           2 :     pattern1->SetDirectory(0) ;
    1279           2 :     TH2F *patternl3 = new TH2F("CALSDDphizL3","Calibration SDD #varphiz Layer3 ",12,0.5,6.5,14,0.5,14.5);
    1280           2 :     patternl3->SetDirectory(0) ;
    1281           2 :     TH2F *patternl4 = new TH2F("CALSDDphizL4"," Calibration SDD #varphiz Layer4 ",16,0.5,8.5,22,0.5,22.5);
    1282           2 :     patternl4->SetDirectory(0) ;
    1283             : 
    1284           6 :     if(!fHistoCalibration)fHistoCalibration = new TObjArray(3);
    1285           2 :     fHistoCalibration->AddAtAndExpand(pattern1,0);
    1286           2 :     fHistoCalibration->AddAtAndExpand(patternl3,1);
    1287           2 :     fHistoCalibration->AddAtAndExpand(patternl4,2);
    1288           2 :     fHistoCalibration->SetOwner(kTRUE); 
    1289             :     //    printf("Calibration Histograms created!\n");
    1290           2 : }
    1291             : 
    1292             : //____________________________________________________________________
    1293             : void AliITSQASDDDataMakerRec::ResetDetector(AliQAv1::TASKINDEX_t task)
    1294             : {
    1295             :   //reset the SDD calibration histograms
    1296           0 :   AliInfo(Form("Reset detector in SDD called for task index %i", task));
    1297           0 :   if(task== AliQAv1::kRAWS ){
    1298           0 :     fDDLModuleMap=NULL;
    1299           0 :   }
    1300             : 
    1301           0 :   fCalibration=NULL;
    1302             : 
    1303           0 :   ((TH1F*)(fHistoCalibration->At(0)))->Reset();
    1304           0 :   ((TH2F*)(fHistoCalibration->At(1)))->Reset();
    1305           0 :   ((TH2F*)(fHistoCalibration->At(2)))->Reset();
    1306             :   //delete fHistoCalibration;
    1307             :   //fHistoCalibration=NULL;
    1308             :   
    1309           0 : }
    1310             : 
    1311             : //____________________________________________________________________
    1312             : 
    1313             : Int_t AliITSQASDDDataMakerRec::GetNumberOfEvents(AliQAv1::TASKINDEX_t task, Int_t trigCl)
    1314             : {
    1315             :   //return the number of the processed events for a given task and trigger class (-1 for all)
    1316           0 :   return fAliITSQADataMakerRec->GetEvCountTotal(task, trigCl);
    1317             : }
    1318             : //____________________________________________________________________
    1319             : void AliITSQASDDDataMakerRec::FillRelativeOccupancyHistos(TH2* hnormc, TH1* hrelocc) const{
    1320             :   // fill histograms with relative occupancy
    1321           0 :   if (hnormc && hrelocc){
    1322           0 :     for(Int_t i=0; i<hnormc->GetNbinsX(); i++){
    1323           0 :       for(Int_t j=0; j<hnormc->GetNbinsY(); j++){
    1324           0 :         hrelocc->Fill(hnormc->GetBinContent(i,j));
    1325             :       }
    1326             :     }
    1327           0 :   }
    1328           0 : }
    1329             : //____________________________________________________________________
    1330             : void AliITSQASDDDataMakerRec::FillRecToRaw(TH2* hrpLay,TH2* hrwLay,TH2* hratioLay) const{
    1331             :   // fill histogram with rec to raw ratios
    1332           0 :   if (hrpLay && hrwLay && hratioLay){
    1333           0 :     Int_t nbx1=hrpLay->GetNbinsX();
    1334           0 :     Int_t nbx2=hrwLay->GetNbinsX();
    1335           0 :     Int_t nbx3=hratioLay->GetNbinsX();
    1336           0 :     Int_t nby1=hrpLay->GetNbinsY();
    1337           0 :     Int_t nby2=hrwLay->GetNbinsY();
    1338           0 :     Int_t nby3=hratioLay->GetNbinsY();
    1339           0 :     if(nbx1==nbx2 && nbx1==nbx3 && nby1==nby2 && nby1==nby3){
    1340           0 :       hratioLay->Divide(hrpLay,hrwLay);
    1341           0 :     }
    1342           0 :     else AliWarning("Number of bins for Raws and RecPoints do not match\n");
    1343           0 :   }
    1344           0 : }

Generated by: LCOV version 1.11