Implemented checker subdetector splitting with subdetector offsets. Checker enabled
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 May 2008 17:42:38 +0000 (17:42 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 May 2008 17:42:38 +0000 (17:42 +0000)
22 files changed:
ITS/AliITSQAChecker.cxx
ITS/AliITSQAChecker.h
ITS/AliITSQADataMakerRec.cxx
ITS/AliITSQADataMakerSim.cxx
ITS/AliITSQASDDChecker.cxx
ITS/AliITSQASDDChecker.h
ITS/AliITSQASDDDataMakerRec.cxx
ITS/AliITSQASDDDataMakerRec.h
ITS/AliITSQASDDDataMakerSim.cxx
ITS/AliITSQASDDDataMakerSim.h
ITS/AliITSQASPDChecker.cxx
ITS/AliITSQASPDChecker.h
ITS/AliITSQASPDDataMakerRec.cxx
ITS/AliITSQASPDDataMakerRec.h
ITS/AliITSQASPDDataMakerSim.cxx
ITS/AliITSQASPDDataMakerSim.h
ITS/AliITSQASSDChecker.cxx
ITS/AliITSQASSDChecker.h
ITS/AliITSQASSDDataMakerRec.cxx
ITS/AliITSQASSDDataMakerRec.h
ITS/AliITSQASSDDataMakerSim.cxx
ITS/AliITSQASSDDataMakerSim.h

index 1b96da0..47b95d7 100644 (file)
@@ -34,7 +34,16 @@ ClassImp(AliITSQAChecker)
 
 //____________________________________________________________________________
 AliITSQAChecker::AliITSQAChecker(Bool_t kMode, Short_t subDet, Short_t ldc) :
-AliQACheckerBase("ITS","SDD Quality Assurance Checker")
+AliQACheckerBase("ITS","SDD Quality Assurance Checker"),
+fkOnline(0),
+fDet(0),  
+fLDC(0),
+fSPDOffset(0), 
+fSDDOffset(0), 
+fSSDOffset(0),
+fSPDChecker(0),  // SPD Checker
+fSDDChecker(0),  // SDD Checker
+fSSDChecker(0)  // SSD Checker
 {
   fkOnline = kMode; fDet = subDet; fLDC = ldc;
   if(fDet == 0 || fDet == 1) {
@@ -64,23 +73,38 @@ const Double_t AliITSQAChecker::Check(AliQA::ALITASK_t index, TObjArray * list)
 
   // Super-basic check on the QA histograms on the input list:
   // look whether they are empty!
+  Double_t spdCheck, sddCheck, ssdCheck;
+  Double_t retval = 0.;
   if(fDet == 0 || fDet == 1) {
     AliDebug(1,"AliITSQAChecker::Create SPD Checker\n");
-       if(!fSPDChecker) fSPDChecker = new AliITSQASPDChecker();
-       Double_t SPDcheck = fSPDChecker->Check(index);
+    if(!fSPDChecker) fSPDChecker = new AliITSQASPDChecker();
+    spdCheck = fSPDChecker->Check(index, list, fSPDOffset);
+    if(spdCheck>retval)retval = spdCheck;
   }
   if(fDet == 0 || fDet == 2) {
     AliDebug(1,"AliITSQAChecker::Create SDD Checker\n");
-       if(!fSDDChecker) fSDDChecker = new AliITSQASDDChecker();
-       Double_t SDDcheck = fSDDChecker->Check(index);
+    if(!fSDDChecker) fSDDChecker = new AliITSQASDDChecker();
+    sddCheck = fSDDChecker->Check(index, list, fSDDOffset);
+    if(sddCheck>retval)retval = sddCheck;
   }
   if(fDet == 0 || fDet == 3) {
     AliDebug(1,"AliITSQAChecker::Create SSD Checker\n");
-       if(!fSSDChecker) fSSDChecker = new AliITSQASSDChecker();
-       Double_t SSDcheck = fSSDChecker->Check(index);
+    if(!fSSDChecker) fSSDChecker = new AliITSQASSDChecker();
+    //AliInfo(Form("Number of monitored objects SSD: %d", list->GetEntries()));             
+    ssdCheck = fSSDChecker->Check(index, list, fSSDOffset);
+    if(ssdCheck>retval)retval = ssdCheck;
   }
   // here merging part for common ITS QA result
-  return 0;
+  // 
+  return retval;
 }
 
 
+//____________________________________________________________________________
+void AliITSQAChecker::SetTaskOffset(Int_t SPDOffset, Int_t SDDOffset, Int_t SSDOffset)
+{
+  //Setting the 3 offsets for each task called
+  fSPDOffset = SPDOffset;
+  fSDDOffset = SDDOffset;
+  fSSDOffset = SSDOffset;
+}
index 634dc19..58a2140 100644 (file)
@@ -35,7 +35,8 @@ friend class AliITSQASSDChecker;
 
 public:
   AliITSQAChecker(Bool_t kMode = kFALSE, Short_t subDet = 0, Short_t ldc = 0) ;         // ctor
-  AliITSQAChecker(const AliITSQAChecker& qac) : AliQACheckerBase(qac.GetName(), qac.GetTitle()), fkOnline(kFALSE), fDet(0), fLDC(0), fSPDChecker(0), fSDDChecker(0), fSSDChecker(0) {;} // cpy ctor   
+  //AliITSQAChecker(Int_t SPDoffset, Int_t SDDoffset, Int_t SSDoffset, Bool_t kMode = kFALSE, Short_t subDet = 0, Short_t ldc = 0) ;
+  AliITSQAChecker(const AliITSQAChecker& qac) : AliQACheckerBase(qac.GetName(), qac.GetTitle()), fkOnline(kFALSE), fDet(0), fLDC(0), fSPDOffset(0), fSDDOffset(0), fSSDOffset(0), fSPDChecker(0), fSDDChecker(0), fSSDChecker(0) {;} // cpy ctor   
   AliITSQAChecker& operator = (const AliITSQAChecker& qac) ; //operator =
   virtual ~AliITSQAChecker() {;} // dtor
   void SetMode(Bool_t kMode) { fkOnline = kMode; }
@@ -44,17 +45,21 @@ public:
   Bool_t GetMode() { return fkOnline; }
   Short_t GetSubDet() { return fDet; }
   Short_t GetLDC() { return fLDC; }
+  virtual void SetTaskOffset(Int_t SPDOffset, Int_t SDDOffset, Int_t SSDOffset);
 
  protected:
 
-  virtual const Double_t Check(AliQA::ALITASK_t index, TObjArray * list) ;
-  virtual const Double_t Check(AliQA::ALITASK_t /*index*/) {return 0.;} ;
+  virtual const Double_t Check(AliQA::ALITASK_t index, TObjArray * list ) ;
+  virtual const Double_t Check(AliQA::ALITASK_t /*index*/, TObjArray * /*list*/, Int_t /*SubDetOffset*/) {return 0.;};
 
 private:
 
   Bool_t  fkOnline;
   Short_t fDet;  
   Short_t fLDC;
+  Int_t fSPDOffset; //starting point for the QACheck list
+  Int_t fSDDOffset;
+  Int_t fSSDOffset;
 
   AliITSQASPDChecker *fSPDChecker;  // SPD Checker
   AliITSQASDDChecker *fSDDChecker;  // SDD Checker
index bab1587..91a7d2f 100644 (file)
@@ -35,6 +35,7 @@
 #include "AliLog.h"
 #include "AliQA.h"
 #include "AliQAChecker.h"
+#include "AliITSQAChecker.h"
 #include "AliRawReader.h"
 
 ClassImp(AliITSQADataMakerRec)
@@ -120,7 +121,10 @@ void AliITSQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray
   if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list);
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list);
   
-  //AliQAChecker::Instance()->Run( AliQA::kITS , task, list);  //temporary skipping the checking
+  AliQAChecker *qac = AliQAChecker::Instance();
+  AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
+  qacb->SetTaskOffset(fSPDDataMaker->GetOffset(), fSDDDataMaker->GetOffset(), fSSDDataMaker->GetOffset()); //Setting the offset for the QAChecker list
+  qac->Run( AliQA::kITS , task, list);  //temporary skipping the checking
 }
 
 //____________________________________________________________________________ 
index 61f03f5..081d9e3 100644 (file)
@@ -86,7 +86,6 @@ fSDDDataMaker(NULL),
 fSSDDataMaker(NULL)
 {
   //copy ctor 
-  //printf("AliITSQADataMakerSim::AliITSQADataMakerSim   using copy ctor \n");
   SetName((const char*)qadm.GetName()) ; 
   SetTitle((const char*)qadm.GetTitle());
 }
@@ -107,7 +106,6 @@ void AliITSQADataMakerSim::StartOfDetectorCycle()
   AliDebug(1,"AliITSQADM::Start of ITS Cycle\n");
 
   if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->StartOfDetectorCycle();
-  //printf("AliITSQADataMakerSim::StartOfDetectorCycle() now launching fSDDDataMaker->StartOfDetectorCycle... \n");
   if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->StartOfDetectorCycle();
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->StartOfDetectorCycle();
 }
@@ -117,13 +115,13 @@ void AliITSQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray
 {
   // launch the QA checking
   AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n"); 
-  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list);  
-  //printf("AliITSQADataMakerSim::StartOfDetectorCycle() now launching fSDDDataMaker->EndOfDetectorCycle... \n");
+  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list);
   if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list);
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list);
   
   AliQAChecker *qac = AliQAChecker::Instance();
   AliITSQAChecker *qacb = (AliITSQAChecker *) qac->GetDetQAChecker(0);
+  qacb->SetTaskOffset(fSPDDataMaker->GetOffset(), fSDDDataMaker->GetOffset(), fSSDDataMaker->GetOffset()); //Setting the offset for the QAChecker list
   qac->Run( AliQA::kITS , task, list);  //temporary skipping the checking
 }
 
@@ -137,7 +135,6 @@ void AliITSQADataMakerSim::InitDigits()
        }
        if(fSubDetector == 0 || fSubDetector == 2) {
          AliDebug(1,"AliITSQADM:: SDD InitDigits\n");
-//       printf("AliITSQADataMakerSim::InitDigits()   launching AliITSQADM:: SDD InitDigits\n");
          fSDDDataMaker->InitDigits();
        }
        if(fSubDetector == 0 || fSubDetector == 3) {
@@ -151,7 +148,6 @@ void AliITSQADataMakerSim::MakeDigits(TClonesArray * digits)
 { 
   // Fill QA for RAW   
   if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeDigits(digits);
-  //printf("AliITSQADataMakerSim::MakeDigits()   launching fSDDDataMaker->MakeDigits with TClonesArray\n");
   if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeDigits(digits);
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits(digits);
 }
@@ -161,7 +157,6 @@ void AliITSQADataMakerSim::MakeDigits(TTree * digits)
 { 
   // Fill QA for RAW   
   if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeDigits(digits);
-  //printf("AliITSQADataMakerSim::MakeDigits()   launching fSDDDataMaker->MakeDigits with TTree\n");
   if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeDigits(digits);
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits(digits);
 }
@@ -176,7 +171,6 @@ void AliITSQADataMakerSim::InitSDigits()
   }
   if(fSubDetector == 0 || fSubDetector == 2) {
        AliDebug(1,"AliITSQADM:: SDD InitSDigits\n");
-//     printf("AliITSQADataMakerSim::InitSDigits()   launching AliITSQADM:: SDD InitSDigits\n");
        fSDDDataMaker->InitSDigits();
   }
   if(fSubDetector == 0 || fSubDetector == 3) {
@@ -189,8 +183,7 @@ void AliITSQADataMakerSim::InitSDigits()
 void AliITSQADataMakerSim::MakeSDigits(TClonesArray * sdigits)
 {
   // Fill QA for recpoints
-  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeSDigits(sdigits); 
-  //printf("AliITSQADataMakerSim::MakeSDigits()   launching fSDDDataMaker->MakeSDigits with TClonesArray\n");
+  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeSDigits(sdigits);
   if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeSDigits(sdigits);
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeSDigits(sdigits);
 }
@@ -199,8 +192,7 @@ void AliITSQADataMakerSim::MakeSDigits(TClonesArray * sdigits)
 void AliITSQADataMakerSim::MakeSDigits(TTree * sdigits)
 {
   // Fill QA for recpoints
-  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeSDigits(sdigits); 
-  //printf("AliITSQADataMakerSim::MakeSDigits()   launching fSDDDataMaker->MakeSDigits with TTree\n");
+  if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeSDigits(sdigits);
   if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeSDigits(sdigits);
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeSDigits(sdigits);
 }
@@ -215,7 +207,6 @@ void AliITSQADataMakerSim::InitHits()
   }
   if(fSubDetector == 0 || fSubDetector == 2) {
        AliDebug(1,"AliITSQADM:: SDD InitHits\n");
-//     printf("AliITSQADataMakerSim::InitHits()   launching AliITSQADM:: SDD InitHits\n");
        fSDDDataMaker->InitHits();
   }
   if(fSubDetector == 0 || fSubDetector == 3) {
@@ -229,7 +220,6 @@ void AliITSQADataMakerSim::MakeHits(TClonesArray * hits)
 {
   // Fill QA for recpoints
   if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeHits(hits);
-  //printf("AliITSQADataMakerSim::MakeHits()   launching fSDDDataMaker->MakeHits with TClonesArray\n");
   if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeHits(hits);
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeHits(hits);
 }
@@ -239,7 +229,6 @@ void AliITSQADataMakerSim::MakeHits(TTree * hits)
 {
   // Fill QA for recpoints
   if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->MakeHits(hits);
-  //printf("AliITSQADataMakerSim::MakeHits()   launching fSDDDataMaker->MakeHits with TTree\n");
   if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->MakeHits(hits);
   if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeHits(hits);
 }
index 04634b9..7a83990 100644 (file)
@@ -25,6 +25,7 @@
 
 // --- AliRoot header files ---
 #include "AliITSQASDDChecker.h"
+#include "AliLog.h"
 
 ClassImp(AliITSQASDDChecker)
 
@@ -38,9 +39,10 @@ AliITSQASDDChecker& AliITSQASDDChecker::operator = (const AliITSQASDDChecker& qa
 }
 
 //__________________________________________________________________
-const Double_t AliITSQASDDChecker::Check(AliQA::ALITASK_t /*index*/) 
-{
-/*
+const Double_t AliITSQASDDChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray * /*list*/, Int_t SubDetOffset) 
+{  
+  AliDebug(1,Form("AliITSQASDDChecker called with offset: %d\n", SubDetOffset));
+  /*
   TObjArray * list
   Double_t test = 0.0  ;
   Int_t count = 0 ;
@@ -78,7 +80,7 @@ const Double_t AliITSQASDDChecker::Check(AliQA::ALITASK_t /*index*/)
 
   AliInfo(Form("Test Result = %f", test)) ;
   return test ;
-*/
+  */
   return 0.;   
 }
  
index 46aa932..a1680e1 100644 (file)
@@ -30,10 +30,10 @@ public:
   AliITSQASDDChecker() {;}          // ctor
   AliITSQASDDChecker& operator = (const AliITSQASDDChecker& qac) ; //operator =
   virtual ~AliITSQASDDChecker() {;} // dtor
-  const Double_t Check(AliQA::ALITASK_t index);
+  const Double_t Check(AliQA::ALITASK_t /*index*/, TObjArray * /*list*/, Int_t SubDetOffset);
 
 private:
-  AliITSQASDDChecker(const AliITSQASDDChecker& qac) {;} // cpy ctor   
+  AliITSQASDDChecker(const AliITSQASDDChecker& /*qac*/):TObject() {;} // cpy ctor   
   
   ClassDef(AliITSQASDDChecker,1)  // description 
 
index 9ae1f32..af18f0c 100644 (file)
@@ -57,8 +57,7 @@ fkOnline(kMode),
 fLDC(ldc),\r
 fSDDhRaws(0),\r
 fSDDhRecs(0),\r
-fRawsOffset(0),\r
-fRecsOffset(0),\r
+fGenOffset(0),\r
 fDDLModuleMap(0)\r
 {\r
   //ctor used to discriminate OnLine-Offline analysis\r
@@ -75,8 +74,7 @@ fkOnline(qadm.fkOnline),
 fLDC(qadm.fLDC),\r
 fSDDhRaws(qadm.fSDDhRaws),\r
 fSDDhRecs(qadm.fSDDhRecs),\r
-fRawsOffset(qadm.fRawsOffset),\r
-fRecsOffset(qadm.fRecsOffset),\r
+fGenOffset(qadm.fGenOffset),\r
 fDDLModuleMap(0)\r
 {\r
   //copy ctor \r
@@ -106,7 +104,7 @@ void AliITSQASDDDataMakerRec::StartOfDetectorCycle()
 }\r
 \r
 //____________________________________________________________________________ \r
-void AliITSQASDDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)\r
+void AliITSQASDDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TObjArray* /*list*/)\r
 {\r
   // launch the QA checking\r
   AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n"); \r
@@ -116,7 +114,7 @@ void AliITSQASDDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjAr
 void AliITSQASDDDataMakerRec::InitRaws()\r
 { \r
   // Initialization for RAW data - SDD -\r
-  fRawsOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();\r
+  fGenOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();\r
 \r
   AliCDBEntry *ddlMapSDD = AliCDBManager::Instance()->Get("ITS/Calib/DDLMapSDD");\r
   Bool_t cacheStatus = AliCDBManager::Instance()->GetCacheFlag();\r
@@ -149,14 +147,14 @@ void AliITSQASDDDataMakerRec::InitRaws()
   TH1D *h0 = new TH1D("ModPattern","HW Modules pattern",fgknSDDmodules,-0.5,259.5);\r
   h0->GetXaxis()->SetTitle("Module Number");\r
   h0->GetYaxis()->SetTitle("Counts");\r
-  fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h0)),0+fRawsOffset);\r
+  fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h0)),0+fGenOffset);\r
   delete h0;\r
   fSDDhRaws++;\r
   if(fLDC==0 || fLDC==1 || fLDC==2){\r
     TH1D *h1 = new TH1D("LadPatternL3","Ladder pattern L3",14,0.5,14.5);  \r
     h1->GetXaxis()->SetTitle("Ladder Number on Lay3");\r
     h1->GetYaxis()->SetTitle("Counts");\r
-    fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h1)),1+fRawsOffset);\r
+    fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h1)),1+fGenOffset);\r
        delete h1;\r
     fSDDhRaws++;\r
   }    \r
@@ -164,7 +162,7 @@ void AliITSQASDDDataMakerRec::InitRaws()
     TH1D *h2 = new TH1D("LadPatternL4","Ladder pattern L4",22,0.5,22.5);  \r
     h2->GetXaxis()->SetTitle("Ladder Number on Lay4");\r
     h2->GetYaxis()->SetTitle("Counts");\r
-    fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h2)),2+fRawsOffset);\r
+    fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h2)),2+fGenOffset);\r
        delete h2;\r
     fSDDhRaws++;\r
   }\r
@@ -174,7 +172,7 @@ void AliITSQASDDDataMakerRec::InitRaws()
       TH1D *h3 = new TH1D(hname0,hname0,6,0.5,6.5);\r
       h3->GetXaxis()->SetTitle("Module Number");\r
       h3->GetYaxis()->SetTitle("Counts");\r
-      fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h3)),i-1+3+fRawsOffset);\r
+      fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h3)),i-1+3+fGenOffset);\r
          delete h3;\r
       fSDDhRaws++;\r
     }\r
@@ -185,7 +183,7 @@ void AliITSQASDDDataMakerRec::InitRaws()
          TH1D *h4 = new TH1D(hname0,hname0,8,0.5,8.5);\r
       h4->GetXaxis()->SetTitle("Module Number");\r
       h4->GetYaxis()->SetTitle("Counts");\r
-      fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h4)),i-1+17+fRawsOffset);\r
+      fAliITSQADataMakerRec->Add2RawsList((new TH1D(*h4)),i-1+17+fGenOffset);\r
          delete h4;\r
       fSDDhRaws++;\r
     }\r
@@ -210,7 +208,7 @@ void AliITSQASDDDataMakerRec::InitRaws()
                        TProfile2D *fModuleChargeMapFSE = new TProfile2D(hname[0],hname[1],128,-0.5,255.5,256,-0.5,255.5);\r
                        fModuleChargeMapFSE->GetXaxis()->SetTitle("Time Bin");\r
                        fModuleChargeMapFSE->GetYaxis()->SetTitle("Anode");\r
-                       fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMapFSE)),indexlast1 + index1 + fRawsOffset);\r
+                       fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMapFSE)),indexlast1 + index1 + fGenOffset);\r
                        delete fModuleChargeMapFSE;\r
                        \r
                        fSDDhRaws++;\r
@@ -227,7 +225,7 @@ void AliITSQASDDDataMakerRec::InitRaws()
                        TProfile2D *fModuleChargeMap = new TProfile2D(hname[0],hname[1],128,-0.5,255.5,256,-0.5,255.5);\r
                        fModuleChargeMap->GetXaxis()->SetTitle("Time Bin");\r
                        fModuleChargeMap->GetYaxis()->SetTitle("Anode");\r
-                       fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMap)),indexlast1 + index1 + fRawsOffset);\r
+                       fAliITSQADataMakerRec->Add2RawsList((new TProfile2D(*fModuleChargeMap)),indexlast1 + index1 + fGenOffset);\r
                        delete fModuleChargeMap;\r
 \r
                        fSDDhRaws++;\r
@@ -280,7 +278,7 @@ void AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
   if(fkOnline) {\r
     for(Int_t moduleSDD =0; moduleSDD<fgknSDDmodules; moduleSDD++){\r
         for(Int_t iside=0;iside<fgknSide;iside++) {\r
-          if(fSDDhRaws > 39 + index) fAliITSQADataMakerRec->GetRawsData(39 + index +fRawsOffset)->Reset();\r
+          if(fSDDhRaws > 39 + index) fAliITSQADataMakerRec->GetRawsData(39 + index +fGenOffset)->Reset();\r
           index++;\r
         }\r
     }\r
@@ -312,7 +310,7 @@ void AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
       AliDebug(1,Form( "Module SDD = %d, resetting it to 1 \n",moduleSDD));\r
       moduleSDD = 1;\r
     }\r
-    fAliITSQADataMakerRec->GetRawsData(0 +fRawsOffset)->Fill(moduleSDD); \r
+    fAliITSQADataMakerRec->GetRawsData(0 +fGenOffset)->Fill(moduleSDD); \r
     \r
     AliITSgeomTGeo::GetModuleId(isddmod, lay, lad, det);\r
     ioffset = 3;\r
@@ -321,8 +319,8 @@ void AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
       ioffset += 14;\r
       iorder = 2;   \r
     } \r
-    fAliITSQADataMakerRec->GetRawsData(iorder +fRawsOffset)->Fill(lad);\r
-    fAliITSQADataMakerRec->GetRawsData(ioffset+lad-1 +fRawsOffset)->Fill(det); //-1 because ladder# starts from 1    \r
+    fAliITSQADataMakerRec->GetRawsData(iorder +fGenOffset)->Fill(lad);\r
+    fAliITSQADataMakerRec->GetRawsData(ioffset+lad-1 +fGenOffset)->Fill(det); //-1 because ladder# starts from 1    \r
     \r
     Short_t iside = s.GetChannel();\r
     activeModule = moduleSDD;\r
@@ -335,8 +333,8 @@ void AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
     \r
     if(fkOnline) {\r
       if(fSDDhRaws > 39 + index1) {\r
-        ((TProfile2D *)(fAliITSQADataMakerRec->GetRawsData(39 + index1 +fRawsOffset)))->Fill(coord2, coord1, signal);\r
-        ((TProfile2D *)(fAliITSQADataMakerRec->GetRawsData(39 + index1 + 260*2 +fRawsOffset)))->Fill(coord2, coord1, signal);\r
+        ((TProfile2D *)(fAliITSQADataMakerRec->GetRawsData(39 + index1 +fGenOffset)))->Fill(coord2, coord1, signal);\r
+        ((TProfile2D *)(fAliITSQADataMakerRec->GetRawsData(39 + index1 + 260*2 +fGenOffset)))->Fill(coord2, coord1, signal);\r
       }\r
     }\r
     cnt++;\r
@@ -350,19 +348,19 @@ void AliITSQASDDDataMakerRec::MakeRaws(AliRawReader* rawReader)
 void AliITSQASDDDataMakerRec::InitRecPoints()\r
 {\r
   // Initialization for RECPOINTS - SDD -\r
-  fRecsOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();\r
+  fGenOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();\r
   \r
   TH1F *h0 = new TH1F("Lay3TotCh","Layer 3 total charge",1000,-0.5, 499.5);\r
   h0->GetXaxis()->SetTitle("ADC value");\r
   h0->GetYaxis()->SetTitle("Entries");\r
-  fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h0)), 0 +fRecsOffset);\r
+  fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h0)), 0 +fGenOffset);\r
   delete h0;\r
   fSDDhRecs++;\r
  \r
   TH1F *h1 = new TH1F("Lay4TotCh","Layer 4 total charge",1000,-0.5, 499.5);\r
   h1->GetXaxis()->SetTitle("ADC value");\r
   h1->GetYaxis()->SetTitle("Entries");\r
-  fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h1)), 1 +fRecsOffset);\r
+  fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h1)), 1 +fGenOffset);\r
   delete h1;\r
   fSDDhRecs++;\r
 \r
@@ -371,7 +369,7 @@ void AliITSQASDDDataMakerRec::InitRecPoints()
   for(Int_t i=1; i<=3; i++){\r
     sprintf(hisnam,"Charge_L3_Strip%d",i);\r
     TH1F *h2 = new TH1F(hisnam,hisnam,1000,-0.5, 499.5);\r
-    fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h2)),i+1 +fRecsOffset);\r
+    fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h2)),i+1 +fGenOffset);\r
        delete h2;\r
     fSDDhRecs++;\r
   }\r
@@ -379,7 +377,7 @@ void AliITSQASDDDataMakerRec::InitRecPoints()
   for(Int_t i=1; i<=4; i++){\r
     sprintf(hisnam,"Charge_L4_Strip%d",i);\r
     TH1F *h3 = new TH1F(hisnam,hisnam,1000,-0.5, 499.5);\r
-    fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h3)),i+4 +fRecsOffset);\r
+    fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h3)),i+4 +fGenOffset);\r
        delete h3;\r
     fSDDhRecs++;\r
   }\r
@@ -387,31 +385,31 @@ void AliITSQASDDDataMakerRec::InitRecPoints()
   TH1F *h4 = new TH1F("ModPatternRP","Modules pattern RP",fgknSDDmodules,239.5,499.5); \r
   h4->GetXaxis()->SetTitle("Module number");\r
   h4->GetYaxis()->SetTitle("Entries");\r
-  fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h4)),9 +fRecsOffset);\r
+  fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h4)),9 +fGenOffset);\r
   delete h4;\r
   fSDDhRecs++;\r
   TH1F *h5 = new TH1F("ModPatternL3 RP","Ladder pattern L3 RP",14,0.5,14.5);  \r
   h5->GetXaxis()->SetTitle("Ladder #, Layer 3");\r
   h5->GetYaxis()->SetTitle("Entries");\r
-  fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h5)),10 +fRecsOffset);\r
+  fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h5)),10 +fGenOffset);\r
   delete h5;\r
   fSDDhRecs++;\r
   TH1F *h6 = new TH1F("ModPatternL4 RP","Ladder pattern L4 RP",22,0.5,22.5); \r
   h6->GetXaxis()->SetTitle("Ladder #, Layer 4");\r
   h6->GetYaxis()->SetTitle("Entries");\r
-  fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h6)),11 +fRecsOffset);\r
+  fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h6)),11 +fGenOffset);\r
   delete h6;\r
   fSDDhRecs++;\r
   TH2F *h7 = new TH2F("Local Coord Distrib","Local Coord Distrib",1000,-4,4,1000,-4,4);\r
   h7->GetXaxis()->SetTitle("X local coord, drift, cm");\r
   h7->GetYaxis()->SetTitle("Z local coord, anode, cm");\r
-  fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h7)),12 +fRecsOffset);\r
+  fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h7)),12 +fGenOffset);\r
   delete h7;\r
   fSDDhRecs++;\r
   TH2F *h8 = new TH2F("Global Coord Distrib","Global Coord Distrib",6000,-30,30,6000,-30,30);\r
   h8->GetYaxis()->SetTitle("Y glob coord, cm");\r
   h8->GetXaxis()->SetTitle("X glob coord, cm");\r
-  fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h8)),13 +fRecsOffset);\r
+  fAliITSQADataMakerRec->Add2RecPointsList((new TH2F(*h8)),13 +fGenOffset);\r
   delete h8;\r
   fSDDhRecs++;\r
    \r
@@ -421,7 +419,7 @@ void AliITSQASDDDataMakerRec::InitRecPoints()
     h9->GetXaxis()->SetTitle("r (cm)");\r
     h9->GetXaxis()->CenterTitle();\r
     h9->GetYaxis()->SetTitle("Entries");\r
-    fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h9)),iLay+14 +fRecsOffset);\r
+    fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h9)),iLay+14 +fGenOffset);\r
        delete h9;\r
     fSDDhRecs++;\r
   }\r
@@ -432,7 +430,7 @@ void AliITSQASDDDataMakerRec::InitRecPoints()
     h10->GetXaxis()->SetTitle("#varphi (rad)");\r
     h10->GetXaxis()->CenterTitle();\r
     h10->GetYaxis()->SetTitle("Entries");\r
-    fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h10)),iLay+16 +fRecsOffset);\r
+    fAliITSQADataMakerRec->Add2RecPointsList((new TH1F(*h10)),iLay+16 +fGenOffset);\r
        delete h10;\r
     fSDDhRecs++;\r
   }\r
@@ -462,27 +460,27 @@ void AliITSQASDDDataMakerRec::MakeRecPoints(TTree * clustersTree)
     \r
     for(Int_t j=0;j<recpoints->GetEntries();j++){\r
       AliITSRecPoint *recp = (AliITSRecPoint*)recpoints->At(j);    \r
-      fAliITSQADataMakerRec->GetRecPointsData(9 +fRecsOffset)->Fill(module);\r
+      fAliITSQADataMakerRec->GetRecPointsData(9 +fGenOffset)->Fill(module);\r
       recp->GetGlobalXYZ(cluglo);\r
       Float_t rad=TMath::Sqrt(cluglo[0]*cluglo[0]+cluglo[1]*cluglo[1]); \r
       Float_t phi=TMath::ATan2(cluglo[1],cluglo[0]);\r
       if(recp->GetLayer() ==2) {\r
-       fAliITSQADataMakerRec->GetRecPointsData(0 +fRecsOffset)->Fill(recp->GetQ()) ;\r
-       fAliITSQADataMakerRec->GetRecPointsData(10 +fRecsOffset)->Fill(lad);\r
-       fAliITSQADataMakerRec->GetRecPointsData(14 +fRecsOffset)->Fill(rad);\r
-       fAliITSQADataMakerRec->GetRecPointsData(16 +fRecsOffset)->Fill(phi);\r
-       fAliITSQADataMakerRec->GetRecPointsData(9 +fRecsOffset)->Fill(module);\r
-       fAliITSQADataMakerRec->GetRecPointsData(12 +fRecsOffset)->Fill(recp->GetDetLocalX(),recp->GetDetLocalZ());\r
-       fAliITSQADataMakerRec->GetRecPointsData(13 +fRecsOffset)->Fill(cluglo[0],cluglo[1]);\r
+       fAliITSQADataMakerRec->GetRecPointsData(0 +fGenOffset)->Fill(recp->GetQ()) ;\r
+       fAliITSQADataMakerRec->GetRecPointsData(10 +fGenOffset)->Fill(lad);\r
+       fAliITSQADataMakerRec->GetRecPointsData(14 +fGenOffset)->Fill(rad);\r
+       fAliITSQADataMakerRec->GetRecPointsData(16 +fGenOffset)->Fill(phi);\r
+       fAliITSQADataMakerRec->GetRecPointsData(9 +fGenOffset)->Fill(module);\r
+       fAliITSQADataMakerRec->GetRecPointsData(12 +fGenOffset)->Fill(recp->GetDetLocalX(),recp->GetDetLocalZ());\r
+       fAliITSQADataMakerRec->GetRecPointsData(13 +fGenOffset)->Fill(cluglo[0],cluglo[1]);\r
       }\r
       else if(recp->GetLayer() ==3) {\r
-       fAliITSQADataMakerRec->GetRecPointsData(1 +fRecsOffset)->Fill(recp->GetQ()) ;\r
-       fAliITSQADataMakerRec->GetRecPointsData(11 +fRecsOffset)->Fill(lad);\r
-       fAliITSQADataMakerRec->GetRecPointsData(15 +fRecsOffset)->Fill(rad);\r
-       fAliITSQADataMakerRec->GetRecPointsData(17 +fRecsOffset)->Fill(phi);\r
-       fAliITSQADataMakerRec->GetRecPointsData(9 +fRecsOffset)->Fill(module);\r
-       fAliITSQADataMakerRec->GetRecPointsData(12 +fRecsOffset)->Fill(recp->GetDetLocalX(),recp->GetDetLocalZ());\r
-       fAliITSQADataMakerRec->GetRecPointsData(13 +fRecsOffset)->Fill(cluglo[0],cluglo[1]);\r
+       fAliITSQADataMakerRec->GetRecPointsData(1 +fGenOffset)->Fill(recp->GetQ()) ;\r
+       fAliITSQADataMakerRec->GetRecPointsData(11 +fGenOffset)->Fill(lad);\r
+       fAliITSQADataMakerRec->GetRecPointsData(15 +fGenOffset)->Fill(rad);\r
+       fAliITSQADataMakerRec->GetRecPointsData(17 +fGenOffset)->Fill(phi);\r
+       fAliITSQADataMakerRec->GetRecPointsData(9 +fGenOffset)->Fill(module);\r
+       fAliITSQADataMakerRec->GetRecPointsData(12 +fGenOffset)->Fill(recp->GetDetLocalX(),recp->GetDetLocalZ());\r
+       fAliITSQADataMakerRec->GetRecPointsData(13 +fGenOffset)->Fill(cluglo[0],cluglo[1]);\r
       }\r
     }\r
   }\r
index d0b889d..70b44d6 100644 (file)
@@ -35,10 +35,11 @@ public:
   virtual void MakeRaws(AliRawReader *rawReader);\r
   virtual void MakeRecPoints(TTree *clustersTree);\r
   virtual void StartOfDetectorCycle();\r
-       virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list);\r
+  virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list);\r
   virtual ~AliITSQASDDDataMakerRec(); // dtor\r
-  inline Int_t Raws() { return fSDDhRaws; }\r
-  inline Int_t Recs() { return fSDDhRecs; }\r
+  Int_t Raws() { return fSDDhRaws; }\r
+  Int_t Recs() { return fSDDhRecs; }\r
+  Int_t GetOffset() { return fGenOffset; }\r
 \r
 private:\r
 \r
@@ -57,8 +58,7 @@ private:
   Int_t   fLDC;                            //LDC number (0 for offline, 1 to 4 for online) \r
   Int_t   fSDDhRaws;                       // number of histo booked for Raws SDD\r
   Int_t   fSDDhRecs;                       // number of histo booked for Recs SDD\r
-  Int_t   fRawsOffset;                     // number of histo booked when SDD start\r
-  Int_t   fRecsOffset;                     // number of histo booked when SDD start\r
+  Int_t   fGenOffset;                         // qachecking offset       \r
   AliITSDDLModuleMapSDD  *fDDLModuleMap;// SDD Detector configuration for the decoding\r
 /*\r
   TProfile2D *fModuleChargeMap[2*fgknSDDmodules];//module map\r
index a508317..1de0249 100644 (file)
@@ -54,9 +54,7 @@ fAliITSQADataMakerSim(aliITSQADataMakerSim),
 fSDDhDigits(0),\r
 fSDDhSDigits(0),\r
 fSDDhHits(0),\r
-fDigitsOffset(0),\r
-fSDigitsOffset(0),\r
-fHitsOffset(0)\r
+fGenOffset(0)\r
 {\r
   //ctor used to discriminate OnLine-Offline analysis   \r
 }\r
@@ -68,9 +66,7 @@ fAliITSQADataMakerSim(qadm.fAliITSQADataMakerSim),
 fSDDhDigits(qadm.fSDDhDigits),\r
 fSDDhSDigits(qadm.fSDDhSDigits),\r
 fSDDhHits(qadm.fSDDhHits),\r
-fDigitsOffset(qadm.fDigitsOffset),\r
-fSDigitsOffset(qadm.fSDigitsOffset),\r
-fHitsOffset(qadm.fHitsOffset)\r
+fGenOffset(qadm.fGenOffset)\r
 {\r
   //copy ctor \r
   fAliITSQADataMakerSim->SetName((const char*)qadm.fAliITSQADataMakerSim->GetName()) ; \r
@@ -104,29 +100,28 @@ void AliITSQASDDDataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TO
 //____________________________________________________________________________ \r
 void AliITSQASDDDataMakerSim::InitDigits()\r
 { \r
-  // Initialization for DIGIT data - SDD -\r
-  fDigitsOffset = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();\r
+  // Initialization for DIGIT data - SDD -  \r
+  fGenOffset = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();\r
   //fSDDhDigits must be incremented by one unit every time a histogram is ADDED to the QA List\r
-  //printf("AliITSQASDDDataMakerSim::InitDigits called \n");\r
   TH1F* h0=new TH1F("SDD DIGITS Module Pattern","SDD DIGITS Module Pattern",260,239.5,499.5);       //hmod\r
   h0->GetXaxis()->SetTitle("SDD Module Number");\r
   h0->GetYaxis()->SetTitle("# DIGITS");\r
-  fAliITSQADataMakerSim->Add2DigitsList(h0,1+fDigitsOffset);\r
+  fAliITSQADataMakerSim->Add2DigitsList(h0,fGenOffset);\r
   fSDDhDigits ++;\r
   TH1F* h1=new TH1F("SDD Anode Distribution","DIGITS Anode Distribution",512,-0.5,511.5);      //hanocc\r
   h1->GetXaxis()->SetTitle("Anode Number");\r
   h1->GetYaxis()->SetTitle("# DIGITS");\r
-  fAliITSQADataMakerSim->Add2DigitsList(h1,2+fDigitsOffset);\r
+  fAliITSQADataMakerSim->Add2DigitsList(h1,1+fGenOffset);\r
   fSDDhDigits ++;\r
   TH1F* h2=new TH1F("SDD Tbin Distribution","DIGITS Tbin Distribution",256,-0.5,255.5);      //htbocc\r
   h2->GetXaxis()->SetTitle("Tbin Number");\r
   h2->GetYaxis()->SetTitle("# DIGITS");\r
-  fAliITSQADataMakerSim->Add2DigitsList(h2,3+fDigitsOffset);\r
+  fAliITSQADataMakerSim->Add2DigitsList(h2,2+fGenOffset);\r
   fSDDhDigits ++;\r
   TH1F* h3=new TH1F("SDD ADC Counts Distribution","DIGITS ADC Counts Distribution",200,0.,1024.);          //hsig\r
   h3->GetXaxis()->SetTitle("ADC Value");\r
   h3->GetYaxis()->SetTitle("# DIGITS");\r
-  fAliITSQADataMakerSim->Add2DigitsList(h3,4+fDigitsOffset);\r
+  fAliITSQADataMakerSim->Add2DigitsList(h3,3+fGenOffset);\r
   fSDDhDigits ++;\r
   AliDebug(1,Form("%d SDD Digits histograms booked\n",fSDDhDigits));\r
 }\r
@@ -143,15 +138,15 @@ void AliITSQASDDDataMakerSim::MakeDigits(TTree * digits)
     Int_t nmod=i+240;\r
     digits->GetEvent(nmod);\r
     Int_t ndigits = iITSdigits->GetEntries();\r
-    fAliITSQADataMakerSim->GetDigitsData(1+fDigitsOffset)->Fill(nmod,ndigits);\r
+    fAliITSQADataMakerSim->GetDigitsData(fGenOffset)->Fill(nmod,ndigits);\r
     for (Int_t idig=0; idig<ndigits; idig++) {\r
       AliITSdigit *dig=(AliITSdigit*)iITSdigits->UncheckedAt(idig);\r
       Int_t iz=dig->GetCoord1();  // cell number z\r
       Int_t ix=dig->GetCoord2();  // cell number x\r
       Int_t sig=dig->GetSignal();\r
-      fAliITSQADataMakerSim->GetDigitsData(2+fDigitsOffset)->Fill(iz);\r
-      fAliITSQADataMakerSim->GetDigitsData(3+fDigitsOffset)->Fill(ix);\r
-      fAliITSQADataMakerSim->GetDigitsData(4+fDigitsOffset)->Fill(sig);\r
+      fAliITSQADataMakerSim->GetDigitsData(1+fGenOffset)->Fill(iz);\r
+      fAliITSQADataMakerSim->GetDigitsData(2+fGenOffset)->Fill(ix);\r
+      fAliITSQADataMakerSim->GetDigitsData(3+fGenOffset)->Fill(sig);\r
     }\r
   }\r
 }\r
@@ -160,28 +155,27 @@ void AliITSQASDDDataMakerSim::MakeDigits(TTree * digits)
 void AliITSQASDDDataMakerSim::InitSDigits()\r
 { \r
   // Initialization for SDIGIT data - SDD -\r
-  fSDigitsOffset = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();\r
-  //printf("AliITSQASDDDataMakerSim::InitSDigits called \n");\r
+  fGenOffset = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();\r
   //fSDDhSDigits must be incremented by one unit every time a histogram is ADDED to the QA List\r
   TH1F* h0=new TH1F("SDD SDIGITS Module Pattern","SDIGITS SDD Module Pattern",260,239.5,499.5);       //hmod\r
   h0->GetXaxis()->SetTitle("SDD Module Number");\r
   h0->GetYaxis()->SetTitle("# SDIGITS");\r
-  fAliITSQADataMakerSim->Add2SDigitsList(h0,1+fSDigitsOffset);\r
+  fAliITSQADataMakerSim->Add2SDigitsList(h0,fGenOffset);\r
   fSDDhSDigits ++;\r
   TH1F* h1=new TH1F("SDD Anode Distribution","SDIGITS Anode Distribution",512,-0.5,511.5);      //hanocc\r
   h1->GetXaxis()->SetTitle("Anode Number");\r
   h1->GetYaxis()->SetTitle("# SDIGITS");\r
-  fAliITSQADataMakerSim->Add2SDigitsList(h1,2+fSDigitsOffset);\r
+  fAliITSQADataMakerSim->Add2SDigitsList(h1,1+fGenOffset);\r
   fSDDhSDigits ++;\r
   TH1F* h2=new TH1F("SDD Tbin Distribution","SDIGITS Tbin Distribution",256,-0.5,255.5);      //htbocc\r
   h2->GetXaxis()->SetTitle("Tbin Number");\r
   h2->GetYaxis()->SetTitle("# SDIGITS");\r
-  fAliITSQADataMakerSim->Add2SDigitsList(h2,3+fSDigitsOffset);\r
+  fAliITSQADataMakerSim->Add2SDigitsList(h2,2+fGenOffset);\r
   fSDDhSDigits ++;\r
   TH1F* h3=new TH1F("SDD ADC Counts Distribution","SDIGITS ADC Counts Distribution",200,0.,1024.);          //hsig\r
   h3->GetXaxis()->SetTitle("ADC Value");\r
   h3->GetYaxis()->SetTitle("# SDIGITS");\r
-  fAliITSQADataMakerSim->Add2SDigitsList(h3,4+fSDigitsOffset);\r
+  fAliITSQADataMakerSim->Add2SDigitsList(h3,3+fGenOffset);\r
   fSDDhSDigits ++;\r
 \r
   AliDebug(1,Form("%d SDD SDigits histograms booked\n",fSDDhSDigits));\r
@@ -213,16 +207,16 @@ void AliITSQASDDDataMakerSim::MakeSDigits(TTree * sdigits)
     brchSDigits->SetAddress( &sdig );\r
     brchSDigits->GetEvent(nmod);\r
     Int_t nsdig=sdig->GetEntries();\r
-    fAliITSQADataMakerSim->GetSDigitsData(1+fSDigitsOffset)->Fill(nmod,nsdig);\r
+    fAliITSQADataMakerSim->GetSDigitsData(fGenOffset)->Fill(nmod,nsdig);\r
     for(Int_t i=0;i<nsdig;i++){\r
       AliITSpListItem *cell=(AliITSpListItem*)sdig->At(i);\r
       Float_t sig=cell->GetSignal();\r
       Int_t idx=cell->GetIndex();\r
       Int_t ia,it;\r
       list->GetCell(idx,ia,it);\r
-      fAliITSQADataMakerSim->GetSDigitsData(2+fSDigitsOffset)->Fill(ia);\r
-      fAliITSQADataMakerSim->GetSDigitsData(3+fSDigitsOffset)->Fill(it);\r
-      fAliITSQADataMakerSim->GetSDigitsData(4+fSDigitsOffset)->Fill(sig);\r
+      fAliITSQADataMakerSim->GetSDigitsData(1+fGenOffset)->Fill(ia);\r
+      fAliITSQADataMakerSim->GetSDigitsData(2+fGenOffset)->Fill(it);\r
+      fAliITSQADataMakerSim->GetSDigitsData(3+fGenOffset)->Fill(sig);\r
     }\r
     delete sdig;\r
   }\r
@@ -232,28 +226,28 @@ void AliITSQASDDDataMakerSim::MakeSDigits(TTree * sdigits)
 void AliITSQASDDDataMakerSim::InitHits()\r
 { \r
   // Initialization for HITS data - SDD -\r
-  fHitsOffset = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();\r
+  fGenOffset = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();\r
   //fSDDhHits must be incremented by one unit every time a histogram is ADDED to the QA List\r
   //printf("AliITSQASDDDataMakerSim::InitHits called \n");\r
   TH1F *h0=new TH1F("SDD HITS Module Pattern","SDD HITS Module Pattern",260,239.5,499.5);  \r
   h0->GetXaxis()->SetTitle("SDD Module Number");\r
   h0->GetYaxis()->SetTitle("# HITS");\r
-  fAliITSQADataMakerSim->Add2HitsList(h0,1+fHitsOffset);\r
+  fAliITSQADataMakerSim->Add2HitsList(h0,fGenOffset);\r
   fSDDhHits ++;\r
   TH1F *h1=new TH1F("SDD HIT lenght along local Y Coord","HIT lenght along local Y Coord",200,0.,350.);\r
   h1->GetXaxis()->SetTitle("HIT lenght (um)");\r
   h1->GetYaxis()->SetTitle("# HITS");\r
-  fAliITSQADataMakerSim->Add2HitsList(h1,2+fHitsOffset);\r
+  fAliITSQADataMakerSim->Add2HitsList(h1,1+fGenOffset);\r
   fSDDhHits ++;\r
   TH1F *h2=new TH1F("SDD HIT lenght along local Y Coord - Zoom","SDD HIT lenght along local Y Coord - Zoom",200,250.,350.);\r
   h2->GetXaxis()->SetTitle("HIT lenght (um)");\r
   h2->GetYaxis()->SetTitle("# HITS");\r
-  fAliITSQADataMakerSim->Add2HitsList(h2,3+fHitsOffset);\r
+  fAliITSQADataMakerSim->Add2HitsList(h2,2+fGenOffset);\r
   fSDDhHits ++;\r
   TH1F *h3=new TH1F("SDD Deposited Energy Distribution (loc Y > 200um)","SDD HITS Deposited Energy Distribution (loc Y > 200um)",200,0.,350.);\r
   h3->GetXaxis()->SetTitle("ADC counts???");\r
   h3->GetYaxis()->SetTitle("# HITS");\r
-  fAliITSQADataMakerSim->Add2HitsList(h3,4+fHitsOffset);\r
+  fAliITSQADataMakerSim->Add2HitsList(h3,3+fGenOffset);\r
   fSDDhHits ++;\r
   //printf("%d SDD Hits histograms booked\n",fSDDhHits);\r
   AliDebug(1,Form("%d SDD Hits histograms booked\n",fSDDhHits));\r
@@ -282,17 +276,17 @@ void AliITSQASDDDataMakerSim::MakeHits(TTree * hits)
     //printf("--w--AliITSQASDDDataMakerSim::MakeHits  nhits = %d\n",nhits);\r
     for (Int_t iHit=0;iHit<nhits;iHit++) {\r
       AliITShit *hit = (AliITShit*) arrHits->At(iHit);\r
-      fAliITSQADataMakerSim->GetHitsData(1 + fHitsOffset)->Fill(nmod);\r
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset)->Fill(nmod);\r
       Double_t xl,yl,zl,xl0,yl0,zl0;\r
       Double_t tof,tof0;\r
       hit->GetPositionL(xl,yl,zl,tof);\r
       hit->GetPositionL0(xl0,yl0,zl0,tof0);\r
       Float_t dyloc=TMath::Abs(yl-yl0)*10000.;\r
-      fAliITSQADataMakerSim->GetHitsData(2 + fHitsOffset)->Fill(dyloc);\r
+      fAliITSQADataMakerSim->GetHitsData(1+fGenOffset)->Fill(dyloc);\r
       Float_t edep=hit->GetIonization()*1000000;\r
       if(dyloc>200.){ \r
-       fAliITSQADataMakerSim->GetHitsData(4 + fHitsOffset)->Fill(edep);\r
-       fAliITSQADataMakerSim->GetHitsData(3 + fHitsOffset)->Fill(dyloc);\r
+       fAliITSQADataMakerSim->GetHitsData(2+fGenOffset)->Fill(edep);\r
+       fAliITSQADataMakerSim->GetHitsData(3+fGenOffset)->Fill(dyloc);\r
       }\r
     }\r
   }\r
index f12057e..d45ff77 100644 (file)
@@ -43,6 +43,7 @@ public:
   const Int_t Digits() { return fSDDhDigits; }\r
   const Int_t SDigits() { return fSDDhSDigits; }\r
   const Int_t Hits() { return fSDDhHits; }\r
+  Int_t GetOffset() { return fGenOffset; }\r
 \r
 private:\r
 \r
@@ -50,9 +51,7 @@ private:
   Int_t   fSDDhDigits;                        //number of booked SDD Digits histograms;\r
   Int_t   fSDDhSDigits;                       //number of booked SDD SDigits histograms;\r
   Int_t   fSDDhHits;                          //number of booked SDD Hits histograms;\r
-  Int_t   fDigitsOffset;                      // number of histo booked when SDD start\r
-  Int_t   fSDigitsOffset;                     // number of histo booked when SDD start\r
-  Int_t   fHitsOffset;                        // number of histo booked when SDD start\r
+  Int_t   fGenOffset;                         // qachecking offset\r
   ClassDef(AliITSQASDDDataMakerSim,1)      // description \r
 \r
 };\r
index 9a3a912..b47f844 100644 (file)
@@ -25,6 +25,7 @@
 
 // --- AliRoot header files ---
 #include "AliITSQASPDChecker.h"
+#include "AliLog.h"
 
 ClassImp(AliITSQASPDChecker)
 
@@ -38,8 +39,10 @@ AliITSQASPDChecker& AliITSQASPDChecker::operator = (const AliITSQASPDChecker& qa
 }
 
 //__________________________________________________________________
-const Double_t AliITSQASPDChecker::Check(AliQA::ALITASK_t /*index*/) 
+const Double_t AliITSQASPDChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray * /*list*/, Int_t SubDetOffset) 
 {
+  AliDebug(1,Form("AliITSQASPDChecker called with offset: %d\n", SubDetOffset));
+
 /*
   TObjArray * list
   Double_t test = 0.0  ;
index 9c44adb..d1e0268 100644 (file)
@@ -30,10 +30,10 @@ public:
   AliITSQASPDChecker() {;}          // ctor
   AliITSQASPDChecker& operator = (const AliITSQASPDChecker& qac) ; //operator =
   virtual ~AliITSQASPDChecker() {;} // dtor
-  const Double_t Check(AliQA::ALITASK_t index);
+  const Double_t Check(AliQA::ALITASK_t index, TObjArray * list, Int_t SubDetOffset);
 private:
   
-  AliITSQASPDChecker(const AliITSQASPDChecker& qac){;}  // cpy ctor   
+  AliITSQASPDChecker(const AliITSQASPDChecker& /*qac*/):TObject(){;}  // cpy ctor   
   ClassDef(AliITSQASPDChecker,1)  // description 
 
 };
index eff1918..709bb35 100644 (file)
@@ -51,8 +51,7 @@ fkOnline(kMode),
 fLDC(ldc),
 fSPDhRaws(0),
 fSPDhRecs(0),
-fRawsOffset(0),
-fRecsOffset(0),
+fGenOffset(0),
 fAdvLogger(aliITSRawStreamSPDErrorLog) 
 {
   //ctor used to discriminate OnLine-Offline analysis  
@@ -66,8 +65,7 @@ fkOnline(qadm.fkOnline),
 fLDC(qadm.fLDC),
 fSPDhRaws(qadm.fSPDhRaws),
 fSPDhRecs(qadm.fSPDhRecs),
-fRawsOffset(qadm.fRawsOffset),
-fRecsOffset(qadm.fRecsOffset),
+fGenOffset(qadm.fGenOffset),
 fAdvLogger(qadm.fAdvLogger)
 {
   //copy ctor 
@@ -110,7 +108,7 @@ void AliITSQASPDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TO
 void AliITSQASPDDataMakerRec::InitRaws()
 { 
   // Initialization for RAW data - SPD -
-  fRawsOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
+  fGenOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
 
   Char_t name[50];
   Char_t title[50];
@@ -118,7 +116,7 @@ void AliITSQASPDDataMakerRec::InitRaws()
   TH1F *hlayer = new TH1F("LayPattern_SPD","Layer map - SPD",6,0.,6.);
   hlayer->GetXaxis()->SetTitle("Layer number");
   hlayer->GetYaxis()->SetTitle("Entries");
-  fAliITSQADataMakerRec->Add2RawsList(hlayer,fSPDhRaws+fRawsOffset);
+  fAliITSQADataMakerRec->Add2RawsList(hlayer,fSPDhRaws+fGenOffset);
   fSPDhRaws++;
 
   TH1F **hmod = new TH1F*[2];
@@ -130,7 +128,7 @@ void AliITSQASPDDataMakerRec::InitRaws()
     hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules);
     hmod[iLay]->GetXaxis()->SetTitle("Module number");
     hmod[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerRec->Add2RawsList(hmod[iLay], fSPDhRaws +fRawsOffset);
+    fAliITSQADataMakerRec->Add2RawsList(hmod[iLay], fSPDhRaws +fGenOffset);
     fSPDhRaws++;
   }
   fAdvLogger = new AliITSRawStreamSPDErrorLog();  
@@ -140,14 +138,14 @@ void AliITSQASPDDataMakerRec::InitRaws()
     hhitMap[iDDL]=new TH2F(name,title,320,0,10*32,1536,0,6*256);
     hhitMap[iDDL]->GetXaxis()->SetTitle("Column");
     hhitMap[iDDL]->GetYaxis()->SetTitle("Row");
-    fAliITSQADataMakerRec->Add2RawsList(hhitMap[iDDL], fSPDhRaws +fRawsOffset);
+    fAliITSQADataMakerRec->Add2RawsList(hhitMap[iDDL], fSPDhRaws +fGenOffset);
     fSPDhRaws++;
     sprintf(name,"Errors_SPD_DDL%d",iDDL+1);
     sprintf(title,"Error codes - SPD DDL %d",iDDL+1);
     herrors[iDDL] = new TH1F (name,title,15,0,15);
     herrors[iDDL]->SetXTitle("Error Code");
     herrors[iDDL]->SetYTitle("Nr of errors");
-    fAliITSQADataMakerRec->Add2RawsList(herrors[iDDL], fSPDhRaws +fRawsOffset);
+    fAliITSQADataMakerRec->Add2RawsList(herrors[iDDL], fSPDhRaws +fGenOffset);
     fSPDhRaws++;
   }
 
@@ -158,14 +156,14 @@ void AliITSQASPDDataMakerRec::InitRaws()
     hMultSPDhits[iLay]=new TH1F(name,title,200,0.,200.);
     hMultSPDhits[iLay]->GetXaxis()->SetTitle("Hit multiplicity");
     hMultSPDhits[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits[iLay], fSPDhRaws+fRawsOffset);
+    fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits[iLay], fSPDhRaws+fGenOffset);
     fSPDhRaws++;
   }
 
   TH2F *hMultSPDhits2MultSPDhits1 = new TH2F("HitMultCorrelation_SPD","Hit multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
   hMultSPDhits2MultSPDhits1->GetXaxis()->SetTitle("Hit multiplicity (Layer 1)");
   hMultSPDhits2MultSPDhits1->GetYaxis()->SetTitle("Hit multiplicity (Layer 2)");
-  fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits2MultSPDhits1, fSPDhRaws+fRawsOffset);
+  fAliITSQADataMakerRec->Add2RawsList(hMultSPDhits2MultSPDhits1, fSPDhRaws+fGenOffset);
   fSPDhRaws++;
  
   AliDebug(1,Form("%d SPD Raws histograms booked\n",fSPDhRaws));
@@ -202,28 +200,28 @@ void AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader)
       if (iHalfStave>=0 && iHalfStave<2) iLayer=0;
       else iLayer=1;
       
-      fAliITSQADataMakerRec->GetRawsData(0+fRawsOffset)->Fill(iLayer);
+      fAliITSQADataMakerRec->GetRawsData(0+fGenOffset)->Fill(iLayer);
       if (iLayer==0) {
-        fAliITSQADataMakerRec->GetRawsData(1+fRawsOffset)->Fill(module);
+        fAliITSQADataMakerRec->GetRawsData(1+fGenOffset)->Fill(module);
         nDigitsL1++;
       } else {
-        fAliITSQADataMakerRec->GetRawsData(2+fRawsOffset)->Fill(module);
+        fAliITSQADataMakerRec->GetRawsData(2+fGenOffset)->Fill(module);
         nDigitsL2++;
       }
       
-      fAliITSQADataMakerRec->GetRawsData((2*iEq)+3+fRawsOffset)->Fill(colM+(module%2)*160,rowM+iHalfStave*256);
+      fAliITSQADataMakerRec->GetRawsData((2*iEq)+3+fGenOffset)->Fill(colM+(module%2)*160,rowM+iHalfStave*256);
     }
 
   }
   for (Int_t ieq=0; ieq<20; ieq++)
-    for (Int_t ierr=0; ierr<fAdvLogger->GetNrErrorCodes(); ierr++)
-      fAliITSQADataMakerRec->GetRawsData((2*ieq)+4+fRawsOffset)->Fill(ierr,fAdvLogger->GetNrErrors(ierr,ieq));
+    for (UInt_t ierr=0; ierr<fAdvLogger->GetNrErrorCodes(); ierr++)
+      fAliITSQADataMakerRec->GetRawsData((2*ieq)+4+fGenOffset)->Fill(ierr,fAdvLogger->GetNrErrors(ierr,ieq));
 
   fAdvLogger->Reset();
  
-  fAliITSQADataMakerRec->GetRawsData(43+fRawsOffset)->Fill(nDigitsL1);
-  fAliITSQADataMakerRec->GetRawsData(44+fRawsOffset)->Fill(nDigitsL2);
-  fAliITSQADataMakerRec->GetRawsData(45+fRawsOffset)->Fill(nDigitsL1,nDigitsL2);
+  fAliITSQADataMakerRec->GetRawsData(43+fGenOffset)->Fill(nDigitsL1);
+  fAliITSQADataMakerRec->GetRawsData(44+fGenOffset)->Fill(nDigitsL2);
+  fAliITSQADataMakerRec->GetRawsData(45+fGenOffset)->Fill(nDigitsL1,nDigitsL2);
   
   delete rawStreamSPD;  
   AliDebug(1,Form("Event completed, %d raw digits read",nDigitsL1+nDigitsL2));
@@ -233,13 +231,12 @@ void AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader)
 void AliITSQASPDDataMakerRec::InitRecPoints()
 {
   // Initialization for RECPOINTS - SPD -
-  fRecsOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
-
+  fGenOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
 
   TH1F* hlayer= new TH1F("LayPattern_SPD","Layer map - SPD",6,0.,6.);
   hlayer->GetXaxis()->SetTitle("Layer number");
   hlayer->GetYaxis()->SetTitle("Entries");
-  fAliITSQADataMakerRec->Add2RecPointsList(hlayer, fSPDhRecs+fRecsOffset); 
+  fAliITSQADataMakerRec->Add2RecPointsList(hlayer, fSPDhRecs+fGenOffset); 
   fSPDhRecs++;
 
   TH1F** hmod = new TH1F*[2];
@@ -265,7 +262,7 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
     hmod[iLay]=new TH1F(name,title,fgknSPDmodules,0,fgknSPDmodules);
     hmod[iLay]->GetXaxis()->SetTitle("Module number");
     hmod[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerRec->Add2RecPointsList(hmod[iLay], fSPDhRecs +fRecsOffset); 
+    fAliITSQADataMakerRec->Add2RecPointsList(hmod[iLay], fSPDhRecs +fGenOffset); 
     fSPDhRecs++;
 
     sprintf(name,"xLoc_SPD%d",iLay+1);
@@ -273,7 +270,7 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
     hxl[iLay]=new TH1F(name,title,100,-4.,4.);
     hxl[iLay]->GetXaxis()->SetTitle("Local x [cm]");
     hxl[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerRec->Add2RecPointsList(hxl[iLay], fSPDhRecs +fRecsOffset);
+    fAliITSQADataMakerRec->Add2RecPointsList(hxl[iLay], fSPDhRecs +fGenOffset);
     fSPDhRecs++;
 
     sprintf(name,"zLoc_SPD%d",iLay+1);
@@ -281,7 +278,7 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
     hzl[iLay]=new TH1F(name,title,100,-4.,4.);
     hzl[iLay]->GetXaxis()->SetTitle("Local z [cm]");
     hzl[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerRec->Add2RecPointsList(hzl[iLay], fSPDhRecs+fRecsOffset); 
+    fAliITSQADataMakerRec->Add2RecPointsList(hzl[iLay], fSPDhRecs+fGenOffset); 
     fSPDhRecs++;
 
     sprintf(name,"xGlob_SPD%d",iLay+1);
@@ -289,7 +286,7 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
     hxg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]);
     hxg[iLay]->GetXaxis()->SetTitle("Global x [cm]");
     hxg[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerRec->Add2RecPointsList(hxg[iLay],fSPDhRecs+fRecsOffset);  
+    fAliITSQADataMakerRec->Add2RecPointsList(hxg[iLay],fSPDhRecs+fGenOffset);  
     fSPDhRecs++;
 
     sprintf(name,"yGlob_SPD%d",iLay+1);
@@ -297,7 +294,7 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
     hyg[iLay]=new TH1F(name,title,100,-xlim[iLay],xlim[iLay]);
     hyg[iLay]->GetXaxis()->SetTitle("Global y [cm]");
     hyg[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerRec->Add2RecPointsList(hyg[iLay], fSPDhRecs+fRecsOffset); 
+    fAliITSQADataMakerRec->Add2RecPointsList(hyg[iLay], fSPDhRecs+fGenOffset); 
     fSPDhRecs++;
 
     sprintf(name,"zGlob_SPD%d",iLay+1);
@@ -305,7 +302,7 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
     hzg[iLay]=new TH1F(name,title,150,-zlim[iLay],zlim[iLay]);
     hzg[iLay]->GetXaxis()->SetTitle("Global z [cm]");
     hzg[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerRec->Add2RecPointsList(hzg[iLay], fSPDhRecs+fRecsOffset); 
+    fAliITSQADataMakerRec->Add2RecPointsList(hzg[iLay], fSPDhRecs+fGenOffset); 
     fSPDhRecs++;
 
     sprintf(name,"r_SPD%d",iLay+1);
@@ -313,7 +310,7 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
     hr[iLay]=new TH1F(name,title,100,0.,10.);
     hr[iLay]->GetXaxis()->SetTitle("r [cm]");
     hr[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerRec->Add2RecPointsList(hr[iLay], fSPDhRecs+fRecsOffset);  
+    fAliITSQADataMakerRec->Add2RecPointsList(hr[iLay], fSPDhRecs+fGenOffset);  
     fSPDhRecs++;
 
     sprintf(name,"phi_SPD%d",iLay+1);
@@ -321,7 +318,7 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
     hphi[iLay]=new TH1F(name,title,600,0.,2*TMath::Pi());
     hphi[iLay]->GetXaxis()->SetTitle("#varphi [rad]");
     hphi[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerRec->Add2RecPointsList(hphi[iLay], fSPDhRecs+fRecsOffset);
+    fAliITSQADataMakerRec->Add2RecPointsList(hphi[iLay], fSPDhRecs+fGenOffset);
     fSPDhRecs++;
     
     sprintf(name,"SizeYvsZ_SPD%d",iLay+1);
@@ -329,7 +326,7 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
     hNyNz[iLay]=new TH2F(name,title,100,0.,100.,100,0.,100.);
     hNyNz[iLay]->GetXaxis()->SetTitle("z length");
     hNyNz[iLay]->GetYaxis()->SetTitle("y length");
-    fAliITSQADataMakerRec->Add2RecPointsList(hNyNz[iLay], fSPDhRecs+fRecsOffset); 
+    fAliITSQADataMakerRec->Add2RecPointsList(hNyNz[iLay], fSPDhRecs+fGenOffset); 
     fSPDhRecs++;
 
     sprintf(name,"phi_z_SPD%d",iLay+1);
@@ -337,7 +334,7 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
     hPhiZ[iLay]=new TH2F(name,title,150,-zlim[iLay],zlim[iLay],100,0.,2*TMath::Pi());
     hPhiZ[iLay]->GetXaxis()->SetTitle("Global z [cm]");
     hPhiZ[iLay]->GetYaxis()->SetTitle("#varphi [rad]");
-    fAliITSQADataMakerRec->Add2RecPointsList(hPhiZ[iLay], fSPDhRecs+fRecsOffset);
+    fAliITSQADataMakerRec->Add2RecPointsList(hPhiZ[iLay], fSPDhRecs+fGenOffset);
     fSPDhRecs++;
 
   }
@@ -345,13 +342,13 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
   TH2F *hrPhi=new TH2F("r_phi_SPD","#varphi vs r - SPD",100,0.,10.,100,0.,2*TMath::Pi());
   hrPhi->GetXaxis()->SetTitle("r [cm]");
   hrPhi->GetYaxis()->SetTitle("#varphi [rad]");
-  fAliITSQADataMakerRec->Add2RecPointsList(hrPhi, fSPDhRecs+fRecsOffset);
+  fAliITSQADataMakerRec->Add2RecPointsList(hrPhi, fSPDhRecs+fGenOffset);
   fSPDhRecs++;
 
   TH2F *hxy=new TH2F("x_y_SPD","Global y vs x - SPD",200,-10.,10.,200,-10.,10.);
   hxy->GetXaxis()->SetTitle("Global x [cm]");
   hxy->GetYaxis()->SetTitle("Global y [cm]");
-  fAliITSQADataMakerRec->Add2RecPointsList(hxy, fSPDhRecs+fRecsOffset);
+  fAliITSQADataMakerRec->Add2RecPointsList(hxy, fSPDhRecs+fGenOffset);
   fSPDhRecs++;
 
   for (Int_t iLay=0;iLay<2;iLay++) {
@@ -360,7 +357,7 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
     hMultSPDcl[iLay]=new TH1F(name,title,200,0.,200.);
     hMultSPDcl[iLay]->GetXaxis()->SetTitle("Cluster multiplicity");
     hMultSPDcl[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl[iLay], fSPDhRecs+fRecsOffset);
+    fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl[iLay], fSPDhRecs+fGenOffset);
     fSPDhRecs++;
   } 
 
@@ -368,7 +365,7 @@ void AliITSQASPDDataMakerRec::InitRecPoints()
             new TH2F("MultCorrelation_SPD","Cluster multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
   hMultSPDcl2MultSPDcl1->GetXaxis()->SetTitle("Clusters multiplicity (Layer 1)");
   hMultSPDcl2MultSPDcl1->GetYaxis()->SetTitle("Clusters multiplicity (Layer 2)"); 
-  fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl2MultSPDcl1, fSPDhRecs+fRecsOffset);
+  fAliITSQADataMakerRec->Add2RecPointsList(hMultSPDcl2MultSPDcl1, fSPDhRecs+fGenOffset);
   fSPDhRecs++;
 
   AliDebug(1,Form("%d SPD Recs histograms booked\n",fSPDhRecs));
@@ -401,44 +398,44 @@ void AliITSQASPDDataMakerRec::MakeRecPoints(TTree * clusterTree)
 
         if (cluster->GetLayer()>1)        continue;
         Int_t lay=cluster->GetLayer();
-        fAliITSQADataMakerRec->GetRecPointsData(0 +fRecsOffset)->Fill(lay);
+        fAliITSQADataMakerRec->GetRecPointsData(0 +fGenOffset)->Fill(lay);
         cluster->GetGlobalXYZ(cluGlo);
         Float_t rad=TMath::Sqrt(cluGlo[0]*cluGlo[0]+cluGlo[1]*cluGlo[1]);
         Float_t phi= TMath::Pi() + TMath::ATan2(-cluGlo[1],-cluGlo[0]);
         if (lay==0) {
-         fAliITSQADataMakerRec->GetRecPointsData(1 +fRecsOffset)->Fill(iIts);
-         fAliITSQADataMakerRec->GetRecPointsData(2 +fRecsOffset)->Fill(cluster->GetDetLocalX());
-         fAliITSQADataMakerRec->GetRecPointsData(3 +fRecsOffset)->Fill(cluster->GetDetLocalZ());
-         fAliITSQADataMakerRec->GetRecPointsData(4 +fRecsOffset)->Fill(cluGlo[0]);
-         fAliITSQADataMakerRec->GetRecPointsData(5 +fRecsOffset)->Fill(cluGlo[1]);
-         fAliITSQADataMakerRec->GetRecPointsData(6 +fRecsOffset)->Fill(cluGlo[2]);
-         fAliITSQADataMakerRec->GetRecPointsData(7 +fRecsOffset)->Fill(rad);
-         fAliITSQADataMakerRec->GetRecPointsData(8 +fRecsOffset)->Fill(phi);
-         fAliITSQADataMakerRec->GetRecPointsData(9 +fRecsOffset)->Fill(cluster->GetNz(),cluster->GetNy());
-         fAliITSQADataMakerRec->GetRecPointsData(10 +fRecsOffset)->Fill(cluGlo[2],phi);
+         fAliITSQADataMakerRec->GetRecPointsData(1 +fGenOffset)->Fill(iIts);
+         fAliITSQADataMakerRec->GetRecPointsData(2 +fGenOffset)->Fill(cluster->GetDetLocalX());
+         fAliITSQADataMakerRec->GetRecPointsData(3 +fGenOffset)->Fill(cluster->GetDetLocalZ());
+         fAliITSQADataMakerRec->GetRecPointsData(4 +fGenOffset)->Fill(cluGlo[0]);
+         fAliITSQADataMakerRec->GetRecPointsData(5 +fGenOffset)->Fill(cluGlo[1]);
+         fAliITSQADataMakerRec->GetRecPointsData(6 +fGenOffset)->Fill(cluGlo[2]);
+         fAliITSQADataMakerRec->GetRecPointsData(7 +fGenOffset)->Fill(rad);
+         fAliITSQADataMakerRec->GetRecPointsData(8 +fGenOffset)->Fill(phi);
+         fAliITSQADataMakerRec->GetRecPointsData(9 +fGenOffset)->Fill(cluster->GetNz(),cluster->GetNy());
+         fAliITSQADataMakerRec->GetRecPointsData(10 +fGenOffset)->Fill(cluGlo[2],phi);
        } else  {
-          fAliITSQADataMakerRec->GetRecPointsData(11 +fRecsOffset)->Fill(iIts);
-          fAliITSQADataMakerRec->GetRecPointsData(12 +fRecsOffset)->Fill(cluster->GetDetLocalX());
-          fAliITSQADataMakerRec->GetRecPointsData(13 +fRecsOffset)->Fill(cluster->GetDetLocalZ());
-          fAliITSQADataMakerRec->GetRecPointsData(14 +fRecsOffset)->Fill(cluGlo[0]);
-          fAliITSQADataMakerRec->GetRecPointsData(15 +fRecsOffset)->Fill(cluGlo[1]);
-          fAliITSQADataMakerRec->GetRecPointsData(16 +fRecsOffset)->Fill(cluGlo[2]);
-          fAliITSQADataMakerRec->GetRecPointsData(17 +fRecsOffset)->Fill(rad);
-          fAliITSQADataMakerRec->GetRecPointsData(18 +fRecsOffset)->Fill(phi);
-          fAliITSQADataMakerRec->GetRecPointsData(19 +fRecsOffset)->Fill(cluster->GetNz(),cluster->GetNy());
-          fAliITSQADataMakerRec->GetRecPointsData(20 +fRecsOffset)->Fill(cluGlo[2],phi);
+          fAliITSQADataMakerRec->GetRecPointsData(11 +fGenOffset)->Fill(iIts);
+          fAliITSQADataMakerRec->GetRecPointsData(12 +fGenOffset)->Fill(cluster->GetDetLocalX());
+          fAliITSQADataMakerRec->GetRecPointsData(13 +fGenOffset)->Fill(cluster->GetDetLocalZ());
+          fAliITSQADataMakerRec->GetRecPointsData(14 +fGenOffset)->Fill(cluGlo[0]);
+          fAliITSQADataMakerRec->GetRecPointsData(15 +fGenOffset)->Fill(cluGlo[1]);
+          fAliITSQADataMakerRec->GetRecPointsData(16 +fGenOffset)->Fill(cluGlo[2]);
+          fAliITSQADataMakerRec->GetRecPointsData(17 +fGenOffset)->Fill(rad);
+          fAliITSQADataMakerRec->GetRecPointsData(18 +fGenOffset)->Fill(phi);
+          fAliITSQADataMakerRec->GetRecPointsData(19 +fGenOffset)->Fill(cluster->GetNz(),cluster->GetNy());
+          fAliITSQADataMakerRec->GetRecPointsData(20 +fGenOffset)->Fill(cluGlo[2],phi);
         }
-        fAliITSQADataMakerRec->GetRecPointsData(21 +fRecsOffset)->Fill(rad,phi);
-        fAliITSQADataMakerRec->GetRecPointsData(22 +fRecsOffset)->Fill(cluGlo[0],cluGlo[1]);
+        fAliITSQADataMakerRec->GetRecPointsData(21 +fGenOffset)->Fill(rad,phi);
+        fAliITSQADataMakerRec->GetRecPointsData(22 +fGenOffset)->Fill(cluGlo[0],cluGlo[1]);
 
        nClusters[lay]++; 
       } // end of cluster loop
     } // end of its "subdetector" loop
 
     for (Int_t iLay=0; iLay<2; iLay++)
-      fAliITSQADataMakerRec->GetRecPointsData(23+iLay +fRecsOffset)->Fill(nClusters[iLay]);
+      fAliITSQADataMakerRec->GetRecPointsData(23+iLay +fGenOffset)->Fill(nClusters[iLay]);
 
-    fAliITSQADataMakerRec->GetRecPointsData(25 +fRecsOffset)->Fill(nClusters[0],nClusters[1]);
+    fAliITSQADataMakerRec->GetRecPointsData(25 +fGenOffset)->Fill(nClusters[0],nClusters[1]);
 
     if (itsClusters) {
       itsClusters->Delete();
index 7570186..1271a16 100644 (file)
@@ -37,6 +37,7 @@ public:
   virtual ~AliITSQASPDDataMakerRec();   // dtor
   Int_t Raws() const { return fSPDhRaws; }
   Int_t Recs() const { return fSPDhRecs; }
+  Int_t GetOffset() { return fGenOffset; }
 
 private: 
 
@@ -49,9 +50,8 @@ private:
   Int_t   fLDC;                               //LDC number (0 for offline, 1 to 4 for online) 
   Int_t   fSPDhRaws;                          //number of booked SPD Raws histograms;
   Int_t   fSPDhRecs;                          //number of booked SPD Recs histograms;
-  Int_t   fRawsOffset;                        // number of histo booked when SPD start 
-  Int_t   fRecsOffset;                        // number of histo booked when SPD start
-  
+  Int_t   fGenOffset;                         // qachecking offset       
+
   AliITSRawStreamSPDErrorLog *fAdvLogger;  // pointer to special error logger object
 
   ClassDef(AliITSQASPDDataMakerRec,2)      // description 
index 80a858a..c1dda01 100644 (file)
@@ -52,9 +52,7 @@ fAliITSQADataMakerSim(aliITSQADataMakerSim),
 fSPDhDigits(0),
 fSPDhSDigits(0),
 fSPDhHits(0),
-fDigitsOffset(0),
-fSDigitsOffset(0),
-fHitsOffset(0)
+fGenOffset(0)
 {
   //ctor used to discriminate OnLine-Offline analysis   
 }
@@ -66,9 +64,7 @@ fAliITSQADataMakerSim(qadm.fAliITSQADataMakerSim),
 fSPDhDigits(qadm.fSPDhDigits),
 fSPDhSDigits(qadm.fSPDhSDigits),
 fSPDhHits(qadm.fSPDhHits),
-fDigitsOffset(qadm.fDigitsOffset),
-fSDigitsOffset(qadm.fSDigitsOffset),
-fHitsOffset(qadm.fHitsOffset)
+fGenOffset(qadm.fGenOffset)
 {
   //copy ctor 
   fAliITSQADataMakerSim->SetName((const char*)qadm.fAliITSQADataMakerSim->GetName()) ; 
@@ -104,8 +100,7 @@ void AliITSQASPDDataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TO
 void AliITSQASPDDataMakerSim::InitDigits()
 { 
   // Initialization for DIGIT data - SPD -
-
-  fDigitsOffset = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();
+  fGenOffset = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();
   //fSPDhDigits must be incremented by one unit every time a histogram is ADDED to the QA List
 
   Char_t name[50];
@@ -114,7 +109,7 @@ void AliITSQASPDDataMakerSim::InitDigits()
   TH1F *hlayer = new TH1F("LayPattern_SPD","Layer map - SPD",6,0.,6.);
   hlayer->GetXaxis()->SetTitle("Layer number");
   hlayer->GetYaxis()->SetTitle("Entries");
-  fAliITSQADataMakerSim->Add2DigitsList(hlayer,1+fDigitsOffset);
+  fAliITSQADataMakerSim->Add2DigitsList(hlayer,fGenOffset);
   fSPDhDigits++;
   
   TH1F **hmod = new TH1F*[2];
@@ -124,20 +119,20 @@ void AliITSQASPDDataMakerSim::InitDigits()
     hmod[iLay]=new TH1F(name,title,240,0,240);
     hmod[iLay]->GetXaxis()->SetTitle("Module number");
     hmod[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerSim->Add2DigitsList(hmod[iLay],2+iLay+fDigitsOffset);
+    fAliITSQADataMakerSim->Add2DigitsList(hmod[iLay],1+iLay+fGenOffset);
     fSPDhDigits++;
   }
   
   TH1F *hcolumns = new TH1F("Columns_SPD","Columns - SPD",160,0.,160.);
   hcolumns->GetXaxis()->SetTitle("Column number");
   hcolumns->GetYaxis()->SetTitle("Entries");
-  fAliITSQADataMakerSim->Add2DigitsList(hcolumns,4+fDigitsOffset);
+  fAliITSQADataMakerSim->Add2DigitsList(hcolumns,3+fGenOffset);
   fSPDhDigits++;
 
   TH1F *hrows = new TH1F("Rows_SPD","Rows - SPD",256,0.,256.);
   hrows->GetXaxis()->SetTitle("Row number");
   hrows->GetYaxis()->SetTitle("Entries");
-  fAliITSQADataMakerSim->Add2DigitsList(hrows,5+fDigitsOffset);
+  fAliITSQADataMakerSim->Add2DigitsList(hrows,4+fGenOffset);
   fSPDhDigits++;
 
   TH1F** hMultSPDdigits = new TH1F*[2];
@@ -147,14 +142,14 @@ void AliITSQASPDDataMakerSim::InitDigits()
     hMultSPDdigits[iLay]=new TH1F(name,title,200,0.,200.);
     hMultSPDdigits[iLay]->GetXaxis()->SetTitle("Digit multiplicity");
     hMultSPDdigits[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerSim->Add2DigitsList(hMultSPDdigits[iLay], 6+iLay+fDigitsOffset);
+    fAliITSQADataMakerSim->Add2DigitsList(hMultSPDdigits[iLay], 5+iLay+fGenOffset);
     fSPDhDigits++;
   }
 
   TH2F *hMultSPDdig2MultSPDdig1 = new TH2F("DigitMultCorrelation_SPD","Digit multiplicity correlation - SPD",200,0.,200.,200,0.,200.);
   hMultSPDdig2MultSPDdig1->GetXaxis()->SetTitle("Digit multiplicity (Layer 1)");
   hMultSPDdig2MultSPDdig1->GetYaxis()->SetTitle("Digit multiplicity (Layer 2)");
-  fAliITSQADataMakerSim->Add2DigitsList(hMultSPDdig2MultSPDdig1,8+fDigitsOffset);
+  fAliITSQADataMakerSim->Add2DigitsList(hMultSPDdig2MultSPDdig1,7+fGenOffset);
   fSPDhDigits++;
 
   AliDebug(1,Form("%d SPD Digits histograms booked\n",fSPDhDigits));
@@ -176,42 +171,43 @@ void AliITSQASPDDataMakerSim::MakeDigits(TTree *digits)
     digits->GetEvent(imod);
     Int_t ndigits = iITSdigits->GetEntries();
     if (imod<80) {
-      fAliITSQADataMakerSim->GetDigitsData(1+fDigitsOffset)->Fill(0.5,ndigits);
-      fAliITSQADataMakerSim->GetDigitsData(2+fDigitsOffset)->Fill(imod,ndigits);
+      fAliITSQADataMakerSim->GetDigitsData(0+fGenOffset)->Fill(0.5,ndigits);
+      fAliITSQADataMakerSim->GetDigitsData(1+fGenOffset)->Fill(imod,ndigits);
       nDigitsL1+=ndigits;
     }
     else {
-      fAliITSQADataMakerSim->GetDigitsData(1+fDigitsOffset)->Fill(1,ndigits);
-      fAliITSQADataMakerSim->GetDigitsData(3+fDigitsOffset)->Fill(imod,ndigits);
+      fAliITSQADataMakerSim->GetDigitsData(0+fGenOffset)->Fill(1,ndigits);
+      fAliITSQADataMakerSim->GetDigitsData(2+fGenOffset)->Fill(imod,ndigits);
       nDigitsL2+=ndigits;
     }
     for (Int_t idig=0; idig<ndigits; ++idig) {
       AliITSdigit *dig=(AliITSdigit*)iITSdigits->UncheckedAt(idig);
       Int_t col=dig->GetCoord1();  // cell number z
       Int_t row=dig->GetCoord2();  // cell number x
-      fAliITSQADataMakerSim->GetDigitsData(4+fDigitsOffset)->Fill(col);
-      fAliITSQADataMakerSim->GetDigitsData(5+fDigitsOffset)->Fill(row);
+      fAliITSQADataMakerSim->GetDigitsData(3+fGenOffset)->Fill(col);
+      fAliITSQADataMakerSim->GetDigitsData(4+fGenOffset)->Fill(row);
     }
   }
-  fAliITSQADataMakerSim->GetDigitsData(6+fDigitsOffset)->Fill(nDigitsL1);
-  fAliITSQADataMakerSim->GetDigitsData(7+fDigitsOffset)->Fill(nDigitsL2);
-  fAliITSQADataMakerSim->GetDigitsData(8+fDigitsOffset)->Fill(nDigitsL1,nDigitsL2);
+  fAliITSQADataMakerSim->GetDigitsData(5+fGenOffset)->Fill(nDigitsL1);
+  fAliITSQADataMakerSim->GetDigitsData(6+fGenOffset)->Fill(nDigitsL2);
+  fAliITSQADataMakerSim->GetDigitsData(7+fGenOffset)->Fill(nDigitsL1,nDigitsL2);
 }
 
 //____________________________________________________________________________ 
 void AliITSQASPDDataMakerSim::InitSDigits()
 { 
   // Initialization for SDIGIT data - SPD -
-  fSDigitsOffset = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();
-
+  fGenOffset = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();
+  //printf("--W-- AliITSQASPDDataMakerSim::InitSDigits()  fGenOffset= %d \n",fGenOffset);
   //fSPDhSDigits must be incremented by one unit every time a histogram is ADDED to the QA List
+  
   Char_t name[50];
   Char_t title[50];
 
   TH1F *hlayer = new TH1F("LayPattern_SPD","Layer map - SPD",6,0.,6.);
   hlayer->GetXaxis()->SetTitle("Layer number");
   hlayer->GetYaxis()->SetTitle("Entries");
-  fAliITSQADataMakerSim->Add2SDigitsList(hlayer,1+fSDigitsOffset);
+  fAliITSQADataMakerSim->Add2SDigitsList(hlayer,fGenOffset);
   fSPDhSDigits++;
 
   TH1F **hmod = new TH1F*[2];
@@ -221,7 +217,7 @@ void AliITSQASPDDataMakerSim::InitSDigits()
     hmod[iLay]=new TH1F(name,title,240,0,240);
     hmod[iLay]->GetXaxis()->SetTitle("Module number");
     hmod[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerSim->Add2SDigitsList(hmod[iLay],2+iLay+fSDigitsOffset);
+    fAliITSQADataMakerSim->Add2SDigitsList(hmod[iLay],1+iLay+fGenOffset);
     fSPDhSDigits++;
   }
   
@@ -241,12 +237,12 @@ void AliITSQASPDDataMakerSim::MakeSDigits(TTree *sdigits)
     brchSDigits->GetEvent(imod);
     Int_t nsdig=sdig->GetEntries();
     if (imod<80) {
-      fAliITSQADataMakerSim->GetSDigitsData(1+fSDigitsOffset)->Fill(0.5,nsdig);
-      fAliITSQADataMakerSim->GetSDigitsData(2+fSDigitsOffset)->Fill(imod,nsdig);
+      fAliITSQADataMakerSim->GetSDigitsData(0+fGenOffset)->Fill(0.5,nsdig);
+      fAliITSQADataMakerSim->GetSDigitsData(1+fGenOffset)->Fill(imod,nsdig);
     }
     else {
-      fAliITSQADataMakerSim->GetSDigitsData(1+fSDigitsOffset)->Fill(1,nsdig);
-      fAliITSQADataMakerSim->GetSDigitsData(3+fSDigitsOffset)->Fill(imod,nsdig);
+      fAliITSQADataMakerSim->GetSDigitsData(0+fGenOffset)->Fill(1,nsdig);
+      fAliITSQADataMakerSim->GetSDigitsData(2+fGenOffset)->Fill(imod,nsdig);
     }
     delete sdig;
   }
@@ -257,8 +253,8 @@ void AliITSQASPDDataMakerSim::MakeSDigits(TTree *sdigits)
 void AliITSQASPDDataMakerSim::InitHits()
 { 
   // Initialization for HITS data - SPD -
-  fHitsOffset = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();
-
+  fGenOffset = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();
+  //printf("--W-- AliITSQASPDDataMakerSim::InitHits()  fGenOffset= %d \n",fGenOffset);
   //fSPDhHits must be incremented by one unit every time a histogram is ADDED to the QA List
   Char_t name[50];
   Char_t title[50];
@@ -266,7 +262,7 @@ void AliITSQASPDDataMakerSim::InitHits()
   TH1F *hlayer = new TH1F("LayPattern_SPD","Layer map - SPD",6,0.,6.);
   hlayer->GetXaxis()->SetTitle("Layer number");
   hlayer->GetYaxis()->SetTitle("Entries");
-  fAliITSQADataMakerSim->Add2HitsList(hlayer,1+fHitsOffset);
+  fAliITSQADataMakerSim->Add2HitsList(hlayer,fGenOffset);
   fSPDhHits++;
 
   TH1F **hmod = new TH1F*[2];
@@ -276,20 +272,20 @@ void AliITSQASPDDataMakerSim::InitHits()
     hmod[iLay]=new TH1F(name,title,240,0,240);
     hmod[iLay]->GetXaxis()->SetTitle("Module number");
     hmod[iLay]->GetYaxis()->SetTitle("Entries");
-    fAliITSQADataMakerSim->Add2HitsList(hmod[iLay],2+iLay+fHitsOffset);
+    fAliITSQADataMakerSim->Add2HitsList(hmod[iLay],1+iLay+fGenOffset);
     fSPDhHits++;
   }
 
   TH1F *hhitlenght = new TH1F("Lenght_SPD","Hit lenght along y_{loc} coord",210,0.,210.);
   hhitlenght->GetXaxis()->SetTitle("Hit lenght [#mum]");
   hhitlenght->GetYaxis()->SetTitle("# hits");
-  fAliITSQADataMakerSim->Add2HitsList(hhitlenght,4+fHitsOffset);
+  fAliITSQADataMakerSim->Add2HitsList(hhitlenght,3+fGenOffset);
   fSPDhHits++;
 
   TH1F *hEdepos = new TH1F("EnergyDeposit_SPD","Deposited energy distribution (y_{loc}>180 #mum)",150,0.,300.); 
   hEdepos->GetXaxis()->SetTitle("Deposited energy [keV]"); 
   hEdepos->GetYaxis()->SetTitle("# hits");
-  fAliITSQADataMakerSim->Add2HitsList(hEdepos,5+fHitsOffset);
+  fAliITSQADataMakerSim->Add2HitsList(hEdepos,4+fGenOffset);
   fSPDhHits++;
 
   AliDebug(1,Form("%d SPD Hits histograms booked\n",fSPDhHits));
@@ -313,13 +309,12 @@ void AliITSQASPDDataMakerSim::MakeHits(TTree *hits)
     TObjArray *arrHits = module->GetHits();
     Int_t nhits = arrHits->GetEntriesFast();
     if (imod<80) {
-      fAliITSQADataMakerSim->GetHitsData(1+fHitsOffset)->Fill(0.5,nhits);
-      fAliITSQADataMakerSim->GetHitsData(2+fHitsOffset)->Fill(imod,nhits);
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset)->Fill(0.5,nhits);
+      fAliITSQADataMakerSim->GetHitsData(1+fGenOffset)->Fill(imod,nhits);
     } else {
-      fAliITSQADataMakerSim->GetHitsData(1+fHitsOffset)->Fill(1,nhits);
-      fAliITSQADataMakerSim->GetHitsData(3+fHitsOffset)->Fill(imod,nhits);
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset)->Fill(1,nhits);
+      fAliITSQADataMakerSim->GetHitsData(2+fGenOffset)->Fill(imod,nhits);
     }
-    //printf("--w--AliITSQASPDDataMakerSim::MakeHits  nhits = %d\n",nhits);
     for (Int_t iHit=0; iHit<nhits; ++iHit) {
       AliITShit *hit = (AliITShit*) arrHits->At(iHit);
       Double_t xl,yl,zl,xl0,yl0,zl0;
@@ -327,10 +322,10 @@ void AliITSQASPDDataMakerSim::MakeHits(TTree *hits)
       hit->GetPositionL(xl,yl,zl,tof);
       hit->GetPositionL0(xl0,yl0,zl0,tof0);
       Float_t dyloc=TMath::Abs(yl-yl0)*10000.;
-      fAliITSQADataMakerSim->GetHitsData(4+fHitsOffset)->Fill(dyloc);
+      fAliITSQADataMakerSim->GetHitsData(3+fGenOffset)->Fill(dyloc);
       Float_t edep=hit->GetIonization()*1000000;
       if(dyloc>180.){
-        fAliITSQADataMakerSim->GetHitsData(5+fHitsOffset)->Fill(edep);
+        fAliITSQADataMakerSim->GetHitsData(4+fGenOffset)->Fill(edep);
       }
     }
   }
index a4bc3e9..949f908 100644 (file)
@@ -43,6 +43,7 @@ public:
   const Int_t Digits() { return fSPDhDigits; }
   const Int_t SDigits() { return fSPDhSDigits; }
   const Int_t Hits() { return fSPDhHits; }
+  Int_t GetOffset() { return fGenOffset; }
 
 private:
 
@@ -50,9 +51,7 @@ private:
   Int_t   fSPDhDigits;                        //number of booked SPD Digits histograms;
   Int_t   fSPDhSDigits;                       //number of booked SPD SDigits histograms;
   Int_t   fSPDhHits;                          //number of booked SPD Hits histograms;
-  Int_t   fDigitsOffset;                      // number of histo booked when SPD start
-  Int_t   fSDigitsOffset;                     // number of histo booked when SPD start
-  Int_t   fHitsOffset;                        // number of histo booked when SPD start
+  Int_t   fGenOffset;                         // qachecking offset       
   ClassDef(AliITSQASPDDataMakerSim,1)      // description 
 
 };
index 9daebf1..6eb84f2 100644 (file)
 //  INFN Torino
 
 // --- ROOT system ---
+#include "TH1.h"
+#include "TString.h"
+#include "Riostream.h"
 
 // --- AliRoot header files ---
 #include "AliITSQASSDChecker.h"
+#include "AliLog.h"
 
 ClassImp(AliITSQASSDChecker)
 
@@ -38,13 +42,12 @@ AliITSQASSDChecker& AliITSQASSDChecker::operator = (const AliITSQASSDChecker& qa
 }
 
 //__________________________________________________________________
-const Double_t AliITSQASSDChecker::Check(AliQA::ALITASK_t /*index*/) 
-{
-/*
-  TObjArray * list
+const Double_t AliITSQASSDChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray * list, Int_t SubDetOffset) 
+{  
+  AliDebug(1,Form("AliITSQASSDChecker called with offset: %d\n", SubDetOffset));
+  /*
   Double_t test = 0.0  ;
   Int_t count = 0 ;
-
   if (list->GetEntries() == 0){
     test = 1. ; // nothing to check
   }
@@ -54,16 +57,18 @@ const Double_t AliITSQASSDChecker::Check(AliQA::ALITASK_t /*index*/)
     count = 0 ;
     while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
       if (hdata) {
+       TString histname = hdata->GetName();
+       if(!histname.Contains("fHistSSD")) continue;
         Double_t rv = 0.;
-        if(hdata->GetEntries()>0)rv=1;
-        AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
+        if(hdata->GetEntries()>0) rv = 1;
+        //AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ;
+       //cout<<hdata->GetName()<<" - "<<rv<<endl;
         count++ ;
         test += rv ;
       }
       else{
         AliError("Data type cannot be processed") ;
       }
-
     }
     if (count != 0) {
       if (test==0) {
@@ -75,11 +80,14 @@ const Double_t AliITSQASSDChecker::Check(AliQA::ALITASK_t /*index*/)
       }
     }
   }
+  
+  //AliInfo(Form("Test Result = %f", test)) ;
+  //cout<<"Test result: "<<test<<endl;
 
-  AliInfo(Form("Test Result = %f", test)) ;
   return test ;
-*/
-  return 0.;   
+
+  //return 0.;
+  */
 }
 
  
index f9ecfe4..0a42ef0 100644 (file)
@@ -30,11 +30,11 @@ public:
   AliITSQASSDChecker() {;}          // ctor
   AliITSQASSDChecker& operator = (const AliITSQASSDChecker& qac) ; //operator =
   virtual ~AliITSQASSDChecker() {;} // dtor
-  const Double_t Check(AliQA::ALITASK_t index);
+  const Double_t Check(AliQA::ALITASK_t /*index*/, TObjArray * /*list*/, Int_t SubDetOffset);
 
 private:
   
-  AliITSQASSDChecker(const AliITSQASSDChecker& qac){;} // cpy ctor   
+  AliITSQASSDChecker(const AliITSQASSDChecker& /*qac*/):TObject(){;} // cpy ctor   
   ClassDef(AliITSQASSDChecker,1)  // description 
 
 };
index 5436a12..c952aae 100644 (file)
@@ -45,6 +45,8 @@
 
 #include "AliCDBManager.h"
 #include "AliCDBEntry.h"
+#include "AliESDEvent.h"
+#include "AliESDtrack.h"
 
 ClassImp(AliITSQASSDDataMakerRec)
 
@@ -57,8 +59,8 @@ fLDC(ldc),
 fSSDRawsOffset(0),
 fSSDhRaws(0),
 fSSDhRecs(0),
-fRawsOffset(0),
-fRecsOffset(0) {
+fSSDhESDs(0),
+fGenOffset(0) {
   // Default constructor   
   //initilize the raw signal vs strip number histograms
   Int_t fLayer = 0,fLadder = 0, fModule = 0;
@@ -100,8 +102,8 @@ fLDC(qadm.fLDC),
 fSSDRawsOffset(qadm.fSSDRawsOffset),
 fSSDhRaws(qadm.fSSDhRaws),
 fSSDhRecs(qadm.fSSDhRecs),
-fRawsOffset(qadm.fRawsOffset),
-fRecsOffset(qadm.fRecsOffset) {
+fSSDhESDs(qadm.fSSDhESDs),
+fGenOffset(qadm.fGenOffset) {
   //copy ctor 
   fAliITSQADataMakerRec->SetName((const char*)qadm.fAliITSQADataMakerRec->GetName()) ; 
   fAliITSQADataMakerRec->SetTitle((const char*)qadm.fAliITSQADataMakerRec->GetTitle());
@@ -139,8 +141,8 @@ void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TO
   //scaling SSD occupancy plots
   if(fkOnline) {
     if(fSSDEvent != 0) {
-      ((TH2F *)fAliITSQADataMakerRec->GetRawsData(fRawsOffset+28))->Scale(1./fSSDEvent);
-      ((TH2F *)fAliITSQADataMakerRec->GetRawsData(fRawsOffset+29))->Scale(1./fSSDEvent);
+      ((TH2F *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+28))->Scale(1./fSSDEvent);
+      ((TH2F *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+29))->Scale(1./fSSDEvent);
     }
     Int_t fLayer = 0, fLadder = 0;
     Int_t fOccPosition = 0; 
@@ -149,9 +151,9 @@ void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TO
        fOccPosition  = (fLayer == 5) ? fLadder : fLadder + fgkSSDLADDERSLAYER5;
        if(fSSDEvent != 0) {
          //P-SIDE OCCUPANCY - scaling
-         fAliITSQADataMakerRec->GetRawsData(fRawsOffset + fSSDRawsOffset - 1 + 2*fOccPosition - 1)->Scale(1./fSSDEvent);
+         fAliITSQADataMakerRec->GetRawsData(fGenOffset + fSSDRawsOffset - 1 + 2*fOccPosition - 1)->Scale(1./fSSDEvent);
          //N-SIDE OCCUPANCY - scaling
-         fAliITSQADataMakerRec->GetRawsData(fRawsOffset + fSSDRawsOffset - 1 + 2*fOccPosition)->Scale(1./fSSDEvent);
+         fAliITSQADataMakerRec->GetRawsData(fGenOffset + fSSDRawsOffset - 1 + 2*fOccPosition)->Scale(1./fSSDEvent);
        }//ssd events != 0
       }//ladder loop
     }//layer loop
@@ -163,7 +165,7 @@ void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TO
 void AliITSQASSDDataMakerRec::InitRaws() {  
 
   // Initialization for RAW data - SSD -
-  fRawsOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
+  fGenOffset = (fAliITSQADataMakerRec->fRawsQAList)->GetEntries();
 
   if(fkOnline) {
     AliInfo("Book Online Histograms for SSD\n");
@@ -171,38 +173,37 @@ void AliITSQASSDDataMakerRec::InitRaws() {
   else {
     AliInfo("Book Offline Histograms for SSD\n ");
   }
-  AliInfo(Form("Number of histograms (SPD+SDD): %d\n",fRawsOffset));
+  AliInfo(Form("Number of histograms (SPD+SDD): %d\n",fGenOffset));
   TString fTitle = 0;
   //book online QA histos
-  if(fkOnline) {
     TH1F *fHistSSDEventType = new TH1F("fHistSSDEventType",
                                       ";Event type;Events",
                                       31,-1,30);
     fAliITSQADataMakerRec->Add2RawsList(fHistSSDEventType, 
-                                       fRawsOffset+fSSDRawsOffset);
+                                       fGenOffset+fSSDRawsOffset);
     fSSDRawsOffset += 1;
     TH1F *fHistSSDDataSize = new TH1F("fHistSSDDataSize",
                                      ";log(SSD data size) [Bytes];Events",
                                      100,3,8);
     fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSize, 
-                                       fRawsOffset+fSSDRawsOffset);
+                                       fGenOffset+fSSDRawsOffset);
     fSSDRawsOffset += 1;
     TH1F *fHistSSDDataSizePercentage = new TH1F("fHistSSDDataSizePercentage",
                                                ";SSD data size [%];Events",
                                                100,0,100);
     fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePercentage, 
-                                       fRawsOffset+fSSDRawsOffset);
+                                       fGenOffset+fSSDRawsOffset);
     fSSDRawsOffset += 1;
     TH1F *fHistSSDDDLId = new TH1F("fHistSSDDDLId",
                                   ";DDL id;Events",20,510.5,530.5);
     fAliITSQADataMakerRec->Add2RawsList(fHistSSDDDLId, 
-                                       fRawsOffset+fSSDRawsOffset);
+                                       fGenOffset+fSSDRawsOffset);
     fSSDRawsOffset += 1;
     TH1F *fHistSSDDataSizePerDDL = new TH1F("fHistSSDDataSizePerDDL",
                                            ";DDL id;<SSD data size> [MB]",
                                            20,510.5,530.5);
     fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerDDL, 
-                                       fRawsOffset+fSSDRawsOffset);
+                                       fGenOffset+fSSDRawsOffset);
     fSSDRawsOffset += 1;
     TH1F *fHistSSDDataSizeDDL[fgkNumOfDDLs];
     for(Int_t i = 1; i < fgkNumOfDDLs+1; i++) {
@@ -211,19 +212,19 @@ void AliITSQASSDDataMakerRec::InitRaws() {
                                          ";log(SSD data size) [Bytes];Events",
                                          100,1,8);
       fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeDDL[i-1], 
-                                         fRawsOffset+fSSDRawsOffset);
+                                         fGenOffset+fSSDRawsOffset);
       fSSDRawsOffset += 1;
     }
     
     TH1F *fHistSSDLDCId = new TH1F("fHistSSDLDCId",";LDC id;Events",10,0.5,10.5);
     fAliITSQADataMakerRec->Add2RawsList(fHistSSDLDCId, 
-                                       fRawsOffset+fSSDRawsOffset);
+                                       fGenOffset+fSSDRawsOffset);
     fSSDRawsOffset += 1;
     TH1F *fHistSSDDataSizePerLDC = new TH1F("fHistSSDDataSizePerLDC",
                                            ";LDC id;<SSD data size> [MB]",
                                            100,0,20);
     fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizePerLDC, 
-                                       fRawsOffset+fSSDRawsOffset);
+                                       fGenOffset+fSSDRawsOffset);
     fSSDRawsOffset += 1;
     TH1F *fHistSSDDataSizeLDC[fgkNumOfLDCs];
     for(Int_t i = 1; i < fgkNumOfLDCs+1; i++) {
@@ -232,10 +233,10 @@ void AliITSQASSDDataMakerRec::InitRaws() {
                                          ";log(SSD data size) [Bytes];Events",
                                          100,1,8);
       fAliITSQADataMakerRec->Add2RawsList(fHistSSDDataSizeLDC[i-1], 
-                                         fRawsOffset+fSSDRawsOffset);
+                                         fGenOffset+fSSDRawsOffset);
       fSSDRawsOffset += 1;
     }
-
+  if(fkOnline) {
     //top level occupancy plots
     TH2D *fHistSSDOccupancyLayer5 = new TH2D("fHistSSDOccupancyLayer5",
                                             ";N_{modules};N_{Ladders}",
@@ -248,7 +249,7 @@ void AliITSQASSDDataMakerRec::InitRaws() {
       sprintf(fLabel,"%d",iBin);
       fHistSSDOccupancyLayer5->GetXaxis()->SetBinLabel(iBin,fLabel);
     }
-    fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer5, fRawsOffset+fSSDRawsOffset);
+    fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer5, fGenOffset+fSSDRawsOffset);
     fSSDRawsOffset += 1;
     TH2D *fHistSSDOccupancyLayer6 = new TH2D("fHistSSDOccupancyLayer6",
                                             ";N_{modules};N_{Ladders}",
@@ -260,7 +261,7 @@ void AliITSQASSDDataMakerRec::InitRaws() {
       sprintf(fLabel,"%d",iBin);
       fHistSSDOccupancyLayer6->GetXaxis()->SetBinLabel(iBin,fLabel);
     }
-    fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer6, fRawsOffset+fSSDRawsOffset);
+    fAliITSQADataMakerRec->Add2RawsList(fHistSSDOccupancyLayer6, fGenOffset+fSSDRawsOffset);
     fSSDRawsOffset += 1;
 
     //Occupancy per ladder
@@ -280,7 +281,7 @@ void AliITSQASSDDataMakerRec::InitRaws() {
        fHistOccupancyLadder[fSSDhRaws]->GetXaxis()->SetTitle("Module number");
        fHistOccupancyLadder[fSSDhRaws]->GetYaxis()->SetTitle("Occupancy [%]");
        fAliITSQADataMakerRec->Add2RawsList(fHistOccupancyLadder[fSSDhRaws], 
-                                           fRawsOffset+fSSDhRaws);     
+                                           fGenOffset+fSSDhRaws);      
        fSSDhRaws++;
        //N-side occupancy plots
        fTitle = "fHistSSD_Occupancy_Layer"; fTitle += iLayer;
@@ -294,15 +295,16 @@ void AliITSQASSDDataMakerRec::InitRaws() {
        fHistOccupancyLadder[fSSDhRaws]->GetXaxis()->SetTitle("Module number");
        fHistOccupancyLadder[fSSDhRaws]->GetYaxis()->SetTitle("Occupancy [%]");
        fAliITSQADataMakerRec->Add2RawsList(fHistOccupancyLadder[fSSDhRaws], 
-                                           fRawsOffset+fSSDhRaws);     
+                                           fGenOffset+fSSDhRaws);      
        fSSDhRaws++;
       }//ladder loop
     }//layer loop
   }//online flag
   AliDebug(1,Form("%d SSD Raws histograms booked\n",fSSDhRaws));
-  AliInfo(Form("Number of histograms (SPD+SDD+SSD): %d\n",fRawsOffset+fSSDhRaws));  
+  AliInfo(Form("Number of histograms (SPD+SDD+SSD): %d\n",fGenOffset+fSSDhRaws));  
 }
 
+
 //____________________________________________________________________________
 void AliITSQASSDDataMakerRec::MakeRaws(AliRawReader* rawReader) { 
   // Fill QA for RAW - SSD -
@@ -319,52 +321,53 @@ void AliITSQASSDDataMakerRec::MakeRaws(AliRawReader* rawReader) {
     //reset the signal vs strip number histograms
     for(Int_t i = 0; i < fgkSSDMODULES; i++) 
       fHistSSDRawSignalModule[i]->Reset();
+  }
+  rawReader->Select("ITSSSD",-1,-1);  
+  rawReader->Reset(); //rawReader->NextEvent();   
+  (fAliITSQADataMakerRec->GetRawsData(fGenOffset))->Fill(rawReader->GetType());
+  if(rawReader->GetType() == 7)
+    fSSDEvent += 1;
   
-    rawReader->Select("ITSSSD",-1,-1);  
-    rawReader->Reset(); //rawReader->NextEvent();   
-    (fAliITSQADataMakerRec->GetRawsData(fRawsOffset))->Fill(rawReader->GetType());
-    if(rawReader->GetType() == 7)
-      fSSDEvent += 1;
-
-    AliITSRawStreamSSD fSSDStream(rawReader);    
-    AliRawReaderRoot *rootReader = (AliRawReaderRoot *)rawReader;
-    if(rootReader) {
-      const AliRawEventHeaderBase *header = rootReader->GetEventHeader();
-      if(header)
-       eventSize = header->GetEventSize();
-    }
-    while (fSSDStream.Next()) {
-      if(fSSDStream.GetModuleID() < 0) continue;
-      fSizePerDDL[rawReader->GetDDLID()] = rawReader->GetDataSize();
-      fSizePerLDC[rawReader->GetLDCId()-6] = rawReader->GetDataSize();
-      AliITSgeomTGeo::GetModuleId(fSSDStream.GetModuleID(),fLayer,fLadder,fModule);
-      fStripNumber = (fSSDStream.GetSideFlag() == 0) ? fSSDStream.GetStrip() : fSSDStream.GetStrip() + fgkNumberOfPSideStrips;
-      fHistPosition = (fLayer == 5) ? ((fLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + fModule - 1) : ((fLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + fModule + fgkSSDMODULESLAYER5 - 1);
-      //AliInfo(Form("ModulePosition: %d - Layer: %d - Ladder: %d - Module: %d\n",fHistPosition,fLayer,fLadder,fModule));
+  AliITSRawStreamSSD fSSDStream(rawReader);    
+  AliRawReaderRoot *rootReader = (AliRawReaderRoot *)rawReader;
+  if(rootReader) {
+    const AliRawEventHeaderBase *header = rootReader->GetEventHeader();
+    if(header)
+      eventSize = header->GetEventSize();
+  }
+  while (fSSDStream.Next()) {
+    if(fSSDStream.GetModuleID() < 0) continue;
+    fSizePerDDL[rawReader->GetDDLID()] = rawReader->GetDataSize();
+    fSizePerLDC[rawReader->GetLDCId()-6] = rawReader->GetDataSize();
+    AliITSgeomTGeo::GetModuleId(fSSDStream.GetModuleID(),fLayer,fLadder,fModule);
+    fStripNumber = (fSSDStream.GetSideFlag() == 0) ? fSSDStream.GetStrip() : fSSDStream.GetStrip() + fgkNumberOfPSideStrips;
+    fHistPosition = (fLayer == 5) ? ((fLadder - 1)*fgkSSDMODULESPERLADDERLAYER5 + fModule - 1) : ((fLadder - 1)*fgkSSDMODULESPERLADDERLAYER6 + fModule + fgkSSDMODULESLAYER5 - 1);
+    //AliInfo(Form("ModulePosition: %d - Layer: %d - Ladder: %d - Module: %d\n",fHistPosition,fLayer,fLadder,fModule));
+    if(fkOnline)
       fHistSSDRawSignalModule[fHistPosition]->Fill(fStripNumber,fSSDStream.GetSignal());
-    }//streamer loop   
-
-    
-    for(Int_t i = 0; i < fgkNumOfDDLs; i++) {
-      sumSSDDataSize += fSizePerDDL[i];
-      if(fSizePerDDL[i] > 0) {
-       (fAliITSQADataMakerRec->GetRawsData(fRawsOffset+3))->Fill(i+512);
-       (fAliITSQADataMakerRec->GetRawsData(fRawsOffset+5+i))->Fill(TMath::Log10(fSizePerDDL[i]));
-      }
-      (fAliITSQADataMakerRec->GetRawsData(fRawsOffset+4))->Fill(i+512,fSizePerDDL[i]/1e+06);
+  }//streamer loop   
+  
+  
+  for(Int_t i = 0; i < fgkNumOfDDLs; i++) {
+    sumSSDDataSize += fSizePerDDL[i];
+    if(fSizePerDDL[i] > 0) {
+      (fAliITSQADataMakerRec->GetRawsData(fGenOffset+3))->Fill(i+512);
+      (fAliITSQADataMakerRec->GetRawsData(fGenOffset+5+i))->Fill(TMath::Log10(fSizePerDDL[i]));
     }
-    for(Int_t i = 0; i < fgkNumOfLDCs; i++) {
-      if(fSizePerLDC[i] > 0) {
-       (fAliITSQADataMakerRec->GetRawsData(fRawsOffset+21))->Fill(i+6);
-       (fAliITSQADataMakerRec->GetRawsData(fRawsOffset+23+i))->Fill(TMath::Log10(fSizePerLDC[0]));
-      }
-      (fAliITSQADataMakerRec->GetRawsData(fRawsOffset+22))->Fill(i+6,fSizePerLDC[i]/1e+06);
+    (fAliITSQADataMakerRec->GetRawsData(fGenOffset+4))->Fill(i+512,fSizePerDDL[i]/1e+06);
+  }
+  for(Int_t i = 0; i < fgkNumOfLDCs; i++) {
+    if(fSizePerLDC[i] > 0) {
+      (fAliITSQADataMakerRec->GetRawsData(fGenOffset+21))->Fill(i+6);
+      (fAliITSQADataMakerRec->GetRawsData(fGenOffset+23+i))->Fill(TMath::Log10(fSizePerLDC[0]));
     }
-    if(sumSSDDataSize) 
-      (fAliITSQADataMakerRec->GetRawsData(fRawsOffset+1))->Fill(TMath::Log10(sumSSDDataSize));
-    if(eventSize)
-      (fAliITSQADataMakerRec->GetRawsData(fRawsOffset+2))->Fill(100.*sumSSDDataSize/eventSize);
+    (fAliITSQADataMakerRec->GetRawsData(fGenOffset+22))->Fill(i+6,fSizePerLDC[i]/1e+06);
+  }
+  if(sumSSDDataSize) 
+    (fAliITSQADataMakerRec->GetRawsData(fGenOffset+1))->Fill(TMath::Log10(sumSSDDataSize));
+  if(eventSize)
+    (fAliITSQADataMakerRec->GetRawsData(fGenOffset+2))->Fill(100.*sumSSDDataSize/eventSize);
+  if(fkOnline) {
     //AliInfo(Form("EVENT: %d\n",fSSDEvent));
     Double_t occupancy = 0.0;
     Int_t lLadderLocationY = 0;    
@@ -374,23 +377,26 @@ void AliITSQASSDDataMakerRec::MakeRaws(AliRawReader* rawReader) {
       fOccPosition  = (fLayer == 5) ? fLadder : fLadder + fgkSSDLADDERSLAYER5;
       //P-SIDE OCCUPANCY
       occupancy = GetSSDOccupancyRaws(fHistSSDRawSignalModule[i],0);
-      fAliITSQADataMakerRec->GetRawsData(fRawsOffset + fSSDRawsOffset - 1 + 2*fOccPosition - 1)->Fill(fModule,occupancy);
+      fAliITSQADataMakerRec->GetRawsData(fGenOffset + fSSDRawsOffset - 1 + 2*fOccPosition - 1)->Fill(fModule,occupancy);
       lLadderLocationY = 3*fLadder; // sideP=1 sideN=0
       if(fLayer == 5)
-       ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fRawsOffset+28))->SetBinContent(fModule,lLadderLocationY,occupancy);
+       ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+28))->SetBinContent(fModule,lLadderLocationY,occupancy);
       else if(fLayer == 6)
-       ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fRawsOffset+29))->SetBinContent(fModule,lLadderLocationY,occupancy);
+       ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+29))->SetBinContent(fModule,lLadderLocationY,occupancy);
       //N-SIDE OCCUPANCY
       occupancy = GetSSDOccupancyRaws(fHistSSDRawSignalModule[i],1);
-      fAliITSQADataMakerRec->GetRawsData(fRawsOffset + fSSDRawsOffset - 1 + 2*fOccPosition)->Fill(fModule,occupancy);
+      fAliITSQADataMakerRec->GetRawsData(fGenOffset + fSSDRawsOffset - 1 + 2*fOccPosition)->Fill(fModule,occupancy);
       if(fLayer == 5)
-       ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fRawsOffset+28))->SetBinContent(fModule,lLadderLocationY-1,occupancy);
+       ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+28))->SetBinContent(fModule,lLadderLocationY-1,occupancy);
       else if(fLayer == 6)
-       ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fRawsOffset+29))->SetBinContent(fModule,lLadderLocationY-1,occupancy);
+       ((TH2D *)fAliITSQADataMakerRec->GetRawsData(fGenOffset+29))->SetBinContent(fModule,lLadderLocationY-1,occupancy);
     }
   }//online flag for SSD
 }
 
+
+
+
 //____________________________________________________________________________ 
 Double_t AliITSQASSDDataMakerRec::GetSSDOccupancyRaws(TH1 *lHisto, Int_t stripside) { 
   // bo: TDC >0 or # of sigmas wrt noise ?
@@ -413,7 +419,7 @@ Double_t AliITSQASSDDataMakerRec::GetSSDOccupancyRaws(TH1 *lHisto, Int_t stripsi
 void AliITSQASSDDataMakerRec::InitRecPoints()
 {
   // Initialization for RECPOINTS - SSD -
-  fRecsOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
+  fGenOffset = (fAliITSQADataMakerRec->fRecPointsQAList)->GetEntries();
   Int_t nModuleOffset = 500;
   Int_t nITSTotalModules = AliITSgeomTGeo::GetNModules();
 
@@ -423,7 +429,7 @@ void AliITSQASSDDataMakerRec::InitRecPoints()
                                       nModuleOffset - 0.5,
                                       nITSTotalModules-fgkSSDMODULESLAYER6+0.5);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistModuleIdLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistModuleIdLayer6 = new TH1F("fHistModuleIdLayer6",
                                       "Module Id - Layer 6;Module Id;Entries",
@@ -431,151 +437,151 @@ void AliITSQASSDDataMakerRec::InitRecPoints()
                                       nModuleOffset+fgkSSDMODULESLAYER5 - 0.5,
                                       nITSTotalModules + 0.5);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistModuleIdLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistLocalXLayer5 = new TH1F("fHistLocalXLayer5",
                                     "Local x coord.- Layer 5;x [cm];Entries;",
                                     100,-4.,4.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistLocalXLayer5,
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistLocalXLayer6 = new TH1F("fHistLocalXLayer6",
                                     "Local x coord.- Layer 6;x [cm];Entries;",
                                     100,-4.,4.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistLocalXLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistLocalZLayer5 = new TH1F("fHistLocalZLayer5",
                                     "Local z coord.- Layer 5;z [cm];Entries;",
                                     100,-4.,4.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistLocalZLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistLocalZLayer6 = new TH1F("fHistLocalZLayer6",
                                     "Local z coord.- Layer 6;z [cm];Entries;",
                                     100,-4.,4.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistLocalZLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistGlobalXLayer5 = new TH1F("fHistGlobalXLayer5",
                                      "Global x - Layer 5;x [cm];Entries;",
                                      100,-40.,40.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalXLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistGlobalXLayer6 = new TH1F("fHistGlobalXLayer6",
                                      "Global x - Layer 6;x [cm];Entries;",
                                      100,-45.,45.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalXLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistGlobalYLayer5 = new TH1F("fHistGlobalYLayer5",
                                      "Global y - Layer 5;y [cm];Entries;",
                                      100,-40.,40);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalYLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistGlobalYLayer6 = new TH1F("fHistGlobalYLayer6",
                                      "Global y - Layer 6;y [cm];Entries;",
                                      100,-45.,45.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalYLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistGlobalZLayer5 = new TH1F("fHistGlobalZLayer5",
                                      "Global z - Layer 5;z [cm];Entries;",
                                      100,-45.,45);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalZLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistGlobalZLayer6 = new TH1F("fHistGlobalZLayer6",
                                      "Global z - Layer 6;z [cm];Entries;",
                                      100,-55.,55.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalZLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistPhiLayer5 = new TH1F("fHistPhiLayer5",
                                  "#phi - Layer 5;#phi [rad];Entries;",
                                  100,-TMath::Pi(),TMath::Pi());
   fAliITSQADataMakerRec->Add2RecPointsList(fHistPhiLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistPhiLayer6 = new TH1F("fHistPhiLayer6",
                                  "#phi - Layer 6;#phi [rad];Entries;",
                                  100,-TMath::Pi(),TMath::Pi());
   fAliITSQADataMakerRec->Add2RecPointsList(fHistPhiLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistThetaLayer5 = new TH1F("fHistThetaLayer5",
                                    "#theta - Layer 5;#theta [rad];Entries;",
                                    100,-TMath::Pi(),TMath::Pi());
   fAliITSQADataMakerRec->Add2RecPointsList(fHistThetaLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistThetaLayer6 = new TH1F("fHistThetaLayer6",
                                    "#theta - Layer 6;#theta [rad];Entries;",
                                    100,-TMath::Pi(),TMath::Pi());
   fAliITSQADataMakerRec->Add2RecPointsList(fHistThetaLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistRadiusLayer5 = new TH1F("fHistRadiusLayer5",
                                     "r - Layer 5;r [cm];Entries;",
                                     100,35.,50.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistRadiusLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistRadiusLayer6 = new TH1F("fHistRadiusLayer6",
                                     "r - Layer 6;r [cm];Entries;",
                                     100,35.,50.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistRadiusLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistClusterTypeLayer5 = new TH1F("fHistClusterTypeLayer5",
                                          "CL type - Layer 5;Cluster type;Entries;",
                                          150,0,150);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistClusterTypeLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistClusterTypeLayer6 = new TH1F("fHistClusterTypeLayer6",
                                          "CL type - Layer 6;Cluster type;Entries;",
                                          150,0,150);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistClusterTypeLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistChargeRatioLayer5 = new TH1F("fHistChargeRatioLayer5",
                                          "Charge ratio - Layer 5;q_{ratio};Entries;",
                                          100,-2.0,2.0);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeRatioLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistChargeRatioLayer6 = new TH1F("fHistChargeRatioLayer6",
                                          "Charge ratio - Layer 6;q_{ratio};Entries;",
                                          100,-2.0,2.0);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeRatioLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistChargekeVLayer5 = new TH1F("fHistChargekeVLayer5",
                                        "Charge - Layer 5;q [keV];Entries;",
                                        100,0.,300.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistChargekeVLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistChargekeVLayer6 = new TH1F("fHistChargekeVLayer6",
                                        "Charge - Layer 6;q [keV];Entries;",
                                        100,0.,300.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistChargekeVLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistChargeADCLayer5 = new TH1F("fHistChargeADCLayer5",
                                        "Charge - Layer 5;q [ADC];Entries;",
                                        100,0.,300.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeADCLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH1F *fHistChargeADCLayer6 = new TH1F("fHistChargeADCLayer6",
                                        "Charge - Layer 6;q [ADC];Entries;",
                                        100,0.,300.);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeADCLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH2F *fHistChargeMapLayer5 = new TH2F("fHistChargeMapLayer5",
                                        "Charge map;N_{modules};N_{Ladders}",
@@ -584,7 +590,7 @@ void AliITSQASSDDataMakerRec::InitRecPoints()
                                        3*fgkSSDLADDERSLAYER5,
                                        -0.5,fgkSSDLADDERSLAYER5+0.5);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeMapLayer5, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
   TH2F *fHistChargeMapLayer6 = new TH2F("fHistChargeMapLayer6",
                                        "Charge map;N_{modules};N_{Ladders}",
@@ -593,7 +599,7 @@ void AliITSQASSDDataMakerRec::InitRecPoints()
                                        3*fgkSSDLADDERSLAYER6,
                                        -0.5,fgkSSDLADDERSLAYER6+0.5);
   fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeMapLayer6, 
-                                          fRecsOffset + fSSDhRecs);
+                                          fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
 
 // custom code here
@@ -631,34 +637,34 @@ void AliITSQASSDDataMakerRec::MakeRecPoints(TTree *clustersTree)
       Float_t phi = TMath::ATan2(cluglo[1],cluglo[0]);
       Float_t theta = TMath::ATan2(radius,cluglo[2]);
       if(layer == 4) {
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 0)->Fill(module);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 2)->Fill(recp->GetDetLocalX());
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 4)->Fill(recp->GetDetLocalZ());
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 6)->Fill(cluglo[0]);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 8)->Fill(cluglo[1]);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 10)->Fill(cluglo[2]);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 12)->Fill(phi);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 14)->Fill(theta);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 16)->Fill(radius);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 18)->Fill(recp->GetType());
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 20)->Fill(recp->GetChargeRatio());
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 22)->Fill(recp->GetQ());
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 26)->SetBinContent(fModule,lLadderLocationY,recp->GetQ());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 0)->Fill(module);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 2)->Fill(recp->GetDetLocalX());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 4)->Fill(recp->GetDetLocalZ());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 6)->Fill(cluglo[0]);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 8)->Fill(cluglo[1]);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 10)->Fill(cluglo[2]);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 12)->Fill(phi);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 14)->Fill(theta);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 16)->Fill(radius);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 18)->Fill(recp->GetType());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 20)->Fill(recp->GetChargeRatio());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 22)->Fill(recp->GetQ());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 26)->SetBinContent(fModule,lLadderLocationY,recp->GetQ());
       }//layer 5 histograms
       if(layer == 5) {
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 1)->Fill(module);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 3)->Fill(recp->GetDetLocalX());
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 5)->Fill(recp->GetDetLocalZ());
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 7)->Fill(cluglo[0]);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 9)->Fill(cluglo[1]);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 11)->Fill(cluglo[2]);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 13)->Fill(phi);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 15)->Fill(theta);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 17)->Fill(radius);
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 19)->Fill(recp->GetType());
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 21)->Fill(recp->GetChargeRatio());
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 23)->Fill(recp->GetQ());
-       fAliITSQADataMakerRec->GetRecPointsData(fRecsOffset + 27)->SetBinContent(fModule,lLadderLocationY,recp->GetQ());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 1)->Fill(module);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 3)->Fill(recp->GetDetLocalX());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 5)->Fill(recp->GetDetLocalZ());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 7)->Fill(cluglo[0]);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 9)->Fill(cluglo[1]);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 11)->Fill(cluglo[2]);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 13)->Fill(phi);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 15)->Fill(theta);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 17)->Fill(radius);
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 19)->Fill(recp->GetType());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 21)->Fill(recp->GetChargeRatio());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 23)->Fill(recp->GetQ());
+       fAliITSQADataMakerRec->GetRecPointsData(fGenOffset + 27)->SetBinContent(fModule,lLadderLocationY,recp->GetQ());
       }//layer 6 histograms
     }//rec. points loop
   }//module loop
@@ -666,3 +672,49 @@ void AliITSQASSDDataMakerRec::MakeRecPoints(TTree *clustersTree)
   recpoints->Delete();
   delete recpoints;
 }
+
+//____________________________________________________________________________ 
+/*void AliITSQASSDDataMakerRec::InitESDs() {  
+  // Initialization for ESD - SSD -
+  fESDsOffset = (fAliITSQADataMakerRec->fESDsQAList)->GetEntries();
+  AliDebug(1,Form("Number of ESD histograms (SPD+SDD): %d\n",fRawsOffset));
+  
+  TH1F *fHistSSDTrackPt = new TH1F("fHistSSDTrackPt",
+                                  ";P_{T} [GeV/c];dN/dP_{T}",
+                                  100,0.1,10.1);
+  fAliITSQADataMakerRec->Add2ESDPointsList(fHistSSDTrackPt, 
+                                          fESDsOffset + fSSDhESDs);
+  fSSDhESDs += 1;
+  TH1F *fHistSSDTrackEta = new TH1F("fHistSSDTrackEta",
+                                  ";#eta;dN/d#eta",
+                                  40,-2.,2.);
+  fAliITSQADataMakerRec->Add2ESDPointsList(fHistSSDTrackEta,
+                                          fESDsOffset + fSSDhESDs);
+  fSSDhESDs += 1;
+  TH1F *fHistSSDTrackPhi = new TH1F("fHistSSDTrackPhi",
+                                  ";#phi;dN/d#phi",
+                                  100,0,2.*TMath::Pi());
+  fAliITSQADataMakerRec->Add2ESDPointsList(fHistSSDTrackPhi,
+                                          fESDsOffset + fSSDhESDs);
+  fSSDhESDs += 1;
+  
+  AliDebug(1,Form("%d SSD ESDs histograms booked\n",fSSDhESDs));
+  AliInfo(Form("Number of histograms (ITS): %d\n",fESDsOffset+fSSDhESDs));  
+}
+
+//____________________________________________________________________________
+void AliITSQASSDDataMakerRec::MakeESDs(AliESDEvent * esd) {
+  // make QA data from ESDs
+  Int_t clusters[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+  for(Int_t j = 0; j < esd->GetNumberOfTracks(); j++) {
+    AliESDtrack *track = esd->GetTrack(j);
+    if ((track->GetStatus() & AliESDtrack::kITSrefit)==0) continue;
+    Int_t nClustersITS = track->GetITSclusters(clusters);
+
+   (fAliITSQADataMakerRec->GetESDsData(fESDsOffset+0))->Fill(track->Pt());
+   (fAliITSQADataMakerRec->GetESDsData(fESDsOffset+1))->Fill(track->Eta());
+   (fAliITSQADataMakerRec->GetESDsData(fESDsOffset+2))->Fill(track->Phi());
+  }//track loop
+}
+*/
+
index 32c4673..51d4b7b 100644 (file)
@@ -20,7 +20,7 @@
 class TObjArray;
 class TH1D;
 class AliRawReader;
-
+class AliESDEvent;
 class AliITSQADataMakerRec;
 
 class AliITSQASSDDataMakerRec: public TObject {
@@ -31,13 +31,17 @@ public:
   AliITSQASSDDataMakerRec& operator = (const AliITSQASSDDataMakerRec& qac);
   virtual void InitRaws();
   virtual void InitRecPoints();
+  //virtual void InitESDs();
   virtual void MakeRaws(AliRawReader *rawReader);
   virtual void MakeRecPoints(TTree *clustersTree);
+  //virtual void MakeESDs(AliESDEvent *esd);
   virtual void StartOfDetectorCycle();
   virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list);
   virtual ~AliITSQASSDDataMakerRec(); // dtor
-  inline Int_t Raws() { return fSSDhRaws; }
-  inline Int_t Recs() { return fSSDhRecs; }
+  Int_t Raws() { return fSSDhRaws; }
+  Int_t Recs() { return fSSDhRecs; }
+  Int_t ESDs() { return fSSDhESDs; }
+  Int_t GetOffset() { return fGenOffset; }
 
  private:
 
@@ -58,12 +62,11 @@ public:
   Int_t fSSDEvent;                              //event counter
   Bool_t  fkOnline;                             //online (1) or offline (0) use
   Int_t   fLDC;                                 //LDC number (0 for offline, 1 to 4 for online) 
-  Int_t   fSSDRawsOffset;               // SSD raw data plot offset
+  Int_t   fSSDRawsOffset;                       // SSD raw data plot offset
   Int_t   fSSDhRaws;                            // number of histo booked for Raws SSD
   Int_t   fSSDhRecs;                            // number of histo booked for Recs SSD
-  Int_t   fRawsOffset;                          // number of histo booked when SSD start
-  Int_t   fRecsOffset;                          // number of histo booked when SSD start
+  Int_t   fSSDhESDs;                            // number of histo booked for ESDs SSD
+  Int_t   fGenOffset;                           // qachecking offset       
   TH1D *fHistSSDRawSignalModule[fgkSSDMODULES]; //raw signal vs strip number - SSD
   ClassDef(AliITSQASSDDataMakerRec,2)           // description 
 
index a834ab8..8698f9c 100644 (file)
@@ -54,9 +54,7 @@ fAliITSQADataMakerSim(aliITSQADataMakerSim),
 fSSDhDigits(0),\r
 fSSDhSDigits(0),\r
 fSSDhHits(0),\r
-fDigitsOffset(0),\r
-fSDigitsOffset(0),\r
-fHitsOffset(0) {\r
+fGenOffset(0) {\r
   //ctor used to discriminate OnLine-Offline analysis   \r
 }\r
 \r
@@ -67,9 +65,7 @@ fAliITSQADataMakerSim(qadm.fAliITSQADataMakerSim),
 fSSDhDigits(qadm.fSSDhDigits),\r
 fSSDhSDigits(qadm.fSSDhSDigits),\r
 fSSDhHits(qadm.fSSDhHits),\r
-fDigitsOffset(qadm.fDigitsOffset),\r
-fSDigitsOffset(qadm.fSDigitsOffset),\r
-fHitsOffset(qadm.fHitsOffset) {\r
+fGenOffset(qadm.fGenOffset) {\r
   //copy ctor \r
   fAliITSQADataMakerSim->SetName((const char*)qadm.fAliITSQADataMakerSim->GetName()) ; \r
   fAliITSQADataMakerSim->SetTitle((const char*)qadm.fAliITSQADataMakerSim->GetTitle());\r
@@ -100,20 +96,20 @@ void AliITSQASSDDataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TO
 //____________________________________________________________________________ \r
 void AliITSQASSDDataMakerSim::InitDigits() { \r
   // Initialization for DIGIT data - SSD -\r
-  fDigitsOffset = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();\r
+  fGenOffset = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();\r
 \r
   // custom code here\r
   TH1F *fHistSSDModule = new TH1F("fHistSSDDigitsModule",\r
                                  ";SSD Module Number;N_{DIGITS}",\r
                                  1698,499.5,2197.5);  \r
   fAliITSQADataMakerSim->Add2DigitsList(fHistSSDModule,\r
-                                       fDigitsOffset + fSSDhDigits);\r
+                                       fGenOffset + fSSDhDigits);\r
   fSSDhDigits += 1;\r
   TH2F *fHistSSDModuleStrip = new TH2F("fHistSSDDigitsModuleStrip",\r
                                       ";N_{Strip};N_{Module}",\r
                                       1540,0,1540,1698,499.5,2197.5);  \r
   fAliITSQADataMakerSim->Add2DigitsList(fHistSSDModuleStrip,\r
-                                       fDigitsOffset + fSSDhDigits);\r
+                                       fGenOffset + fSSDhDigits);\r
   fSSDhDigits += 1;\r
 \r
   AliDebug(1,Form("%d SSD Digits histograms booked\n",fSSDhDigits));\r
@@ -130,14 +126,14 @@ void AliITSQASSDDataMakerSim::MakeDigits(TTree *digits) {
     iSSDdigits->Clear();\r
     digits->GetEvent(iModule);    \r
     Int_t ndigits = iSSDdigits->GetEntries();\r
-    fAliITSQADataMakerSim->GetDigitsData(fDigitsOffset + 0)->Fill(iModule,ndigits);\r
+    fAliITSQADataMakerSim->GetDigitsData(fGenOffset + 0)->Fill(iModule,ndigits);\r
     if(ndigits != 0)\r
       AliDebug(1,Form("Module: %d - Digits: %d",iModule,ndigits));\r
  \r
     for (Int_t iDigit = 0; iDigit < ndigits; iDigit++) {\r
       AliITSdigit *dig = (AliITSdigit*)iSSDdigits->UncheckedAt(iDigit);\r
       Int_t fStripNumber = (dig->GetCoord1() == 0) ? dig->GetCoord2() : dig->GetCoord2() + fgkNumberOfPSideStrips;\r
-      ((TH2F *)fAliITSQADataMakerSim->GetDigitsData(fDigitsOffset + 1))->Fill(fStripNumber,iModule,dig->GetSignal());\r
+      ((TH2F *)fAliITSQADataMakerSim->GetDigitsData(fGenOffset + 1))->Fill(fStripNumber,iModule,dig->GetSignal());\r
     }//digit loop\r
   }//module loop\r
 }\r
@@ -145,14 +141,14 @@ void AliITSQASSDDataMakerSim::MakeDigits(TTree *digits) {
 //____________________________________________________________________________ \r
 void AliITSQASSDDataMakerSim::InitSDigits() { \r
   // Initialization for SDIGIT data - SSD -\r
-  fSDigitsOffset = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();\r
+  fGenOffset = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();\r
 \r
   // custom code here\r
   TH1F *fHistSSDModule = new TH1F("fHistSSDSDigitsModule",\r
                                  ";SSD Module Number;N_{SDIGITS}",\r
                                  1698,499.5,2197.5);  \r
   fAliITSQADataMakerSim->Add2SDigitsList(fHistSSDModule,\r
-                                        fSDigitsOffset + fSSDhSDigits);\r
+                                        fGenOffset + fSSDhSDigits);\r
   fSSDhSDigits += 1;  \r
 \r
   AliDebug(1,Form("%d SSD SDigits histograms booked\n",fSSDhSDigits));\r
@@ -168,12 +164,13 @@ void AliITSQASSDDataMakerSim::MakeSDigits(TTree *sdigits) {
     iSSDsdigits->Clear();\r
     sdigits->GetEvent(iModule);    \r
     Int_t ndigits = iSSDsdigits->GetEntries();\r
-    fAliITSQADataMakerSim->GetSDigitsData(fSDigitsOffset + 0)->Fill(iModule,ndigits);\r
+    fAliITSQADataMakerSim->GetSDigitsData(fGenOffset + 0)->Fill(iModule,ndigits);\r
     if(ndigits != 0)\r
       AliDebug(1,Form("Module: %d - Digits: %d",iModule,ndigits));\r
 \r
     for (Int_t iDigit = 0; iDigit < ndigits; iDigit++) {\r
       AliITSpListItem *dig=(AliITSpListItem*)iSSDsdigits->At(iDigit);\r
+      dig=0;\r
     }//digit loop\r
   }//module loop\r
 }\r
@@ -181,63 +178,63 @@ void AliITSQASSDDataMakerSim::MakeSDigits(TTree *sdigits) {
 //____________________________________________________________________________ \r
 void AliITSQASSDDataMakerSim::InitHits() { \r
   // Initialization for HITS data - SSD -\r
-  fHitsOffset = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();\r
+  fGenOffset = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();\r
 \r
   // custom code here\r
   TH1F *fHistSSDModule = new TH1F("fHistSSDHitsModule",\r
                                  ";SDD Module Number;N_{HITS}",\r
                                  1698,499.5,2197.5); \r
   fAliITSQADataMakerSim->Add2HitsList(fHistSSDModule,\r
-                                     fHitsOffset + fSSDhHits);\r
+                                     fGenOffset + fSSDhHits);\r
   fSSDhHits += 1;\r
   TH1F *fHistSSDGlobalX = new TH1F("fHistSSDHitsGlobalX",\r
                                   ";x [cm];Entries",\r
                                   1000,-50.,50.);\r
   fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalX,\r
-                                     fHitsOffset + fSSDhHits);\r
+                                     fGenOffset + fSSDhHits);\r
   fSSDhHits += 1;\r
   TH1F *fHistSSDGlobalY = new TH1F("fHistSSDHitsGlobalY",\r
                                   ";y [cm];Entries",\r
                                   1000,-50.,50.);\r
   fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalY,\r
-                                     fHitsOffset + fSSDhHits);\r
+                                     fGenOffset + fSSDhHits);\r
   fSSDhHits += 1;\r
   TH1F *fHistSSDGlobalZ = new TH1F("fHistSSDHitsGlobalZ",\r
                                   ";z [cm];Entries",\r
                                   1000,-60.,60.);\r
   fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalZ,\r
-                                     fHitsOffset + fSSDhHits);\r
+                                     fGenOffset + fSSDhHits);\r
   fSSDhHits += 1;\r
   TH1F *fHistSSDLocalX = new TH1F("fHistSSDHitsLocalX",\r
                                  ";x [cm];Entries",\r
                                  1000,-4.,4.);\r
   fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalX,\r
-                                     fHitsOffset + fSSDhHits);\r
+                                     fGenOffset + fSSDhHits);\r
   fSSDhHits += 1;\r
   TH1F *fHistSSDLocalY = new TH1F("fHistSSDHitsLocalY",\r
                                  ";y [cm];Entries",\r
                                  1000,-0.1,0.1);\r
   fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalY,\r
-                                     fHitsOffset + fSSDhHits);\r
+                                     fGenOffset + fSSDhHits);\r
   fSSDhHits += 1;\r
   TH1F *fHistSSDLocalZ = new TH1F("fHistSSDHitsLocalZ",\r
                                  ";z [cm];Entries",\r
                                  1000,-4.,4.);\r
   fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalZ,\r
-                                     fHitsOffset + fSSDhHits);\r
+                                     fGenOffset + fSSDhHits);\r
   fSSDhHits += 1;\r
   TH1F *fHistSSDIonization = new TH1F("fHistSSDHitsIonization",\r
                                      ";log(dE/dx) [KeV];N_{Hits}",\r
                                      100,-7,-2);\r
   fAliITSQADataMakerSim->Add2HitsList(fHistSSDIonization,\r
-                                     fHitsOffset + fSSDhHits);\r
+                                     fGenOffset + fSSDhHits);\r
   fSSDhHits += 1;\r
   TH2F *fHistSSDGlobalXY = new TH2F("fHistSSDHitsGlobalXY",\r
                                    ";x [cm];y [cm]",\r
                                    1000,-50.,50.,\r
                                    1000,-50.,50.);\r
   fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalXY,\r
-                                     fHitsOffset + fSSDhHits);\r
+                                     fGenOffset + fSSDhHits);\r
   fSSDhHits += 1;\r
  \r
   AliDebug(1,Form("%d SSD Hits histograms booked\n",fSSDhHits));\r
@@ -261,16 +258,16 @@ void AliITSQASSDDataMakerSim::MakeHits(TTree *hits) {
     for (Int_t iHit = 0; iHit < nhits; iHit++) {\r
       AliITShit *hit = (AliITShit*) arrHits->At(iHit);\r
       \r
-      fAliITSQADataMakerSim->GetHitsData(fHitsOffset + 0)->Fill(iModule);\r
-      fAliITSQADataMakerSim->GetHitsData(fHitsOffset + 1)->Fill(hit->GetXG());\r
-      fAliITSQADataMakerSim->GetHitsData(fHitsOffset + 2)->Fill(hit->GetYG());\r
-      fAliITSQADataMakerSim->GetHitsData(fHitsOffset + 3)->Fill(hit->GetZG());\r
-      fAliITSQADataMakerSim->GetHitsData(fHitsOffset + 4)->Fill(hit->GetXL());\r
-      fAliITSQADataMakerSim->GetHitsData(fHitsOffset + 5)->Fill(hit->GetYL());\r
-      fAliITSQADataMakerSim->GetHitsData(fHitsOffset + 6)->Fill(hit->GetZL());\r
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 0)->Fill(iModule);\r
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 1)->Fill(hit->GetXG());\r
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 2)->Fill(hit->GetYG());\r
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 3)->Fill(hit->GetZG());\r
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 4)->Fill(hit->GetXL());\r
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 5)->Fill(hit->GetYL());\r
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 6)->Fill(hit->GetZL());\r
       if(hit->GetIonization())\r
-       fAliITSQADataMakerSim->GetHitsData(fHitsOffset + 7)->Fill(TMath::Log10(hit->GetIonization()));\r
-      fAliITSQADataMakerSim->GetHitsData(fHitsOffset + 8)->Fill(hit->GetXG(),hit->GetYG());\r
+       fAliITSQADataMakerSim->GetHitsData(fGenOffset + 7)->Fill(TMath::Log10(hit->GetIonization()));\r
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 8)->Fill(hit->GetXG(),hit->GetYG());\r
     }//hit loop\r
   }//module loop  \r
 }\r
index ecab88f..0b17cb4 100644 (file)
@@ -41,6 +41,7 @@ public:
   const Int_t Digits() { return fSSDhDigits; }\r
   const Int_t SDigits() { return fSSDhSDigits; }\r
   const Int_t Hits() { return fSSDhHits; }\r
+  Int_t GetOffset() { return fGenOffset; }\r
 \r
 private:\r
 \r
@@ -48,9 +49,7 @@ private:
   Int_t   fSSDhDigits;    //number of booked SSD Digits histograms;\r
   Int_t   fSSDhSDigits;   //number of booked SSD SDigits histograms;\r
   Int_t   fSSDhHits;      //number of booked SSD Hits histograms;\r
-  Int_t   fDigitsOffset;  //number of histo booked when SSD start\r
-  Int_t   fSDigitsOffset; //number of histo booked when SSD start\r
-  Int_t   fHitsOffset;    //number of histo booked when SSD start  \r
+  Int_t   fGenOffset;                         // qachecking offset\r
 \r
   static const Int_t fgkNumberOfPSideStrips = 768; //number of P-side strips\r
 \r