Static TClonesarray cleared at each cycle (Panos)
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 16 May 2008 17:04:03 +0000 (17:04 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 16 May 2008 17:04:03 +0000 (17:04 +0000)
ITS/AliITSQASSDChecker.cxx
ITS/AliITSQASSDDataMakerRec.cxx
ITS/AliITSQASSDDataMakerSim.cxx

index 6eb84f2..5d0c7a2 100644 (file)
@@ -42,10 +42,9 @@ AliITSQASSDChecker& AliITSQASSDChecker::operator = (const AliITSQASSDChecker& qa
 }
 
 //__________________________________________________________________
-const Double_t AliITSQASSDChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray * list, Int_t SubDetOffset) 
-{  
+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){
@@ -87,7 +86,7 @@ const Double_t AliITSQASSDChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray *
   return test ;
 
   //return 0.;
-  */
+  
 }
 
  
index c952aae..d31e540 100644 (file)
@@ -133,7 +133,7 @@ void AliITSQASSDDataMakerRec::StartOfDetectorCycle()
 }
 
 //____________________________________________________________________________ 
-void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TObjArray* /*list*/)
+void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
 {
   // launch the QA checking
   AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n"); 
@@ -158,7 +158,7 @@ void AliITSQASSDDataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TO
       }//ladder loop
     }//layer loop
   }//online flag for SSD
-  //AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
+  AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
 }
 
 //____________________________________________________________________________ 
@@ -394,9 +394,6 @@ void AliITSQASSDDataMakerRec::MakeRaws(AliRawReader* rawReader) {
   }//online flag for SSD
 }
 
-
-
-
 //____________________________________________________________________________ 
 Double_t AliITSQASSDDataMakerRec::GetSSDOccupancyRaws(TH1 *lHisto, Int_t stripside) { 
   // bo: TDC >0 or # of sigmas wrt noise ?
@@ -423,182 +420,182 @@ void AliITSQASSDDataMakerRec::InitRecPoints()
   Int_t nModuleOffset = 500;
   Int_t nITSTotalModules = AliITSgeomTGeo::GetNModules();
 
-  TH1F *fHistModuleIdLayer5 = new TH1F("fHistModuleIdLayer5",
-                                      "Module Id - Layer 5;Module Id;Entries",
-                                      fgkSSDMODULESLAYER5,
-                                      nModuleOffset - 0.5,
-                                      nITSTotalModules-fgkSSDMODULESLAYER6+0.5);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistModuleIdLayer5, 
+  TH1F *fHistSSDModuleIdLayer5 = new TH1F("fHistSSDModuleIdLayer5",
+                                         "Module Id - Layer 5;Module Id;Entries",
+                                         fgkSSDMODULESLAYER5,
+                                         nModuleOffset - 0.5,
+                                         nITSTotalModules-fgkSSDMODULESLAYER6+0.5);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDModuleIdLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistModuleIdLayer6 = new TH1F("fHistModuleIdLayer6",
-                                      "Module Id - Layer 6;Module Id;Entries",
-                                      fgkSSDMODULESLAYER6,
-                                      nModuleOffset+fgkSSDMODULESLAYER5 - 0.5,
-                                      nITSTotalModules + 0.5);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistModuleIdLayer6, 
+  TH1F *fHistSSDModuleIdLayer6 = new TH1F("fHistSSDModuleIdLayer6",
+                                         "Module Id - Layer 6;Module Id;Entries",
+                                         fgkSSDMODULESLAYER6,
+                                         nModuleOffset+fgkSSDMODULESLAYER5 - 0.5,
+                                         nITSTotalModules + 0.5);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDModuleIdLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistLocalXLayer5 = new TH1F("fHistLocalXLayer5",
-                                    "Local x coord.- Layer 5;x [cm];Entries;",
-                                    100,-4.,4.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistLocalXLayer5,
+  TH1F *fHistSSDLocalXLayer5 = new TH1F("fHistSSDLocalXLayer5",
+                                       "Local x coord.- Layer 5;x [cm];Entries;",
+                                       100,-4.,4.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalXLayer5,
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistLocalXLayer6 = new TH1F("fHistLocalXLayer6",
-                                    "Local x coord.- Layer 6;x [cm];Entries;",
-                                    100,-4.,4.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistLocalXLayer6, 
+  TH1F *fHistSSDLocalXLayer6 = new TH1F("fHistSSDLocalXLayer6",
+                                       "Local x coord.- Layer 6;x [cm];Entries;",
+                                       100,-4.,4.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalXLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistLocalZLayer5 = new TH1F("fHistLocalZLayer5",
-                                    "Local z coord.- Layer 5;z [cm];Entries;",
-                                    100,-4.,4.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistLocalZLayer5, 
+  TH1F *fHistSSDLocalZLayer5 = new TH1F("fHistSSDLocalZLayer5",
+                                       "Local z coord.- Layer 5;z [cm];Entries;",
+                                       100,-4.,4.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalZLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistLocalZLayer6 = new TH1F("fHistLocalZLayer6",
-                                    "Local z coord.- Layer 6;z [cm];Entries;",
-                                    100,-4.,4.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistLocalZLayer6, 
+  TH1F *fHistSSDLocalZLayer6 = new TH1F("fHistSSDLocalZLayer6",
+                                       "Local z coord.- Layer 6;z [cm];Entries;",
+                                       100,-4.,4.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDLocalZLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistGlobalXLayer5 = new TH1F("fHistGlobalXLayer5",
-                                     "Global x - Layer 5;x [cm];Entries;",
-                                     100,-40.,40.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalXLayer5, 
+  TH1F *fHistSSDGlobalXLayer5 = new TH1F("fHistSSDGlobalXLayer5",
+                                        "Global x - Layer 5;x [cm];Entries;",
+                                        100,-40.,40.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalXLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistGlobalXLayer6 = new TH1F("fHistGlobalXLayer6",
-                                     "Global x - Layer 6;x [cm];Entries;",
-                                     100,-45.,45.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalXLayer6, 
+  TH1F *fHistSSDGlobalXLayer6 = new TH1F("fHistSSDGlobalXLayer6",
+                                        "Global x - Layer 6;x [cm];Entries;",
+                                        100,-45.,45.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalXLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistGlobalYLayer5 = new TH1F("fHistGlobalYLayer5",
-                                     "Global y - Layer 5;y [cm];Entries;",
-                                     100,-40.,40);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalYLayer5, 
+  TH1F *fHistSSDGlobalYLayer5 = new TH1F("fHistSSDGlobalYLayer5",
+                                        "Global y - Layer 5;y [cm];Entries;",
+                                        100,-40.,40);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalYLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistGlobalYLayer6 = new TH1F("fHistGlobalYLayer6",
-                                     "Global y - Layer 6;y [cm];Entries;",
-                                     100,-45.,45.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalYLayer6, 
+  TH1F *fHistSSDGlobalYLayer6 = new TH1F("fHistSSDGlobalYLayer6",
+                                        "Global y - Layer 6;y [cm];Entries;",
+                                        100,-45.,45.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalYLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistGlobalZLayer5 = new TH1F("fHistGlobalZLayer5",
-                                     "Global z - Layer 5;z [cm];Entries;",
-                                     100,-45.,45);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalZLayer5, 
+  TH1F *fHistSSDGlobalZLayer5 = new TH1F("fHistSSDGlobalZLayer5",
+                                        "Global z - Layer 5;z [cm];Entries;",
+                                        100,-45.,45);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalZLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistGlobalZLayer6 = new TH1F("fHistGlobalZLayer6",
-                                     "Global z - Layer 6;z [cm];Entries;",
-                                     100,-55.,55.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistGlobalZLayer6, 
+  TH1F *fHistSSDGlobalZLayer6 = new TH1F("fHistSSDGlobalZLayer6",
+                                        "Global z - Layer 6;z [cm];Entries;",
+                                        100,-55.,55.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDGlobalZLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistPhiLayer5 = new TH1F("fHistPhiLayer5",
-                                 "#phi - Layer 5;#phi [rad];Entries;",
-                                 100,-TMath::Pi(),TMath::Pi());
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistPhiLayer5, 
+  TH1F *fHistSSDPhiLayer5 = new TH1F("fHistSSDPhiLayer5",
+                                    "#phi - Layer 5;#phi [rad];Entries;",
+                                    100,-TMath::Pi(),TMath::Pi());
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDPhiLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistPhiLayer6 = new TH1F("fHistPhiLayer6",
-                                 "#phi - Layer 6;#phi [rad];Entries;",
-                                 100,-TMath::Pi(),TMath::Pi());
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistPhiLayer6, 
+  TH1F *fHistSSDPhiLayer6 = new TH1F("fHistSSDPhiLayer6",
+                                    "#phi - Layer 6;#phi [rad];Entries;",
+                                    100,-TMath::Pi(),TMath::Pi());
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDPhiLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistThetaLayer5 = new TH1F("fHistThetaLayer5",
-                                   "#theta - Layer 5;#theta [rad];Entries;",
-                                   100,-TMath::Pi(),TMath::Pi());
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistThetaLayer5, 
+  TH1F *fHistSSDThetaLayer5 = new TH1F("fHistSSDThetaLayer5",
+                                      "#theta - Layer 5;#theta [rad];Entries;",
+                                      100,-TMath::Pi(),TMath::Pi());
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDThetaLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistThetaLayer6 = new TH1F("fHistThetaLayer6",
-                                   "#theta - Layer 6;#theta [rad];Entries;",
-                                   100,-TMath::Pi(),TMath::Pi());
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistThetaLayer6, 
+  TH1F *fHistSSDThetaLayer6 = new TH1F("fHistSSDThetaLayer6",
+                                      "#theta - Layer 6;#theta [rad];Entries;",
+                                      100,-TMath::Pi(),TMath::Pi());
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDThetaLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistRadiusLayer5 = new TH1F("fHistRadiusLayer5",
-                                    "r - Layer 5;r [cm];Entries;",
-                                    100,35.,50.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistRadiusLayer5, 
+  TH1F *fHistSSDRadiusLayer5 = new TH1F("fHistSSDRadiusLayer5",
+                                       "r - Layer 5;r [cm];Entries;",
+                                       100,35.,50.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDRadiusLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistRadiusLayer6 = new TH1F("fHistRadiusLayer6",
-                                    "r - Layer 6;r [cm];Entries;",
-                                    100,35.,50.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistRadiusLayer6, 
+  TH1F *fHistSSDRadiusLayer6 = new TH1F("fHistSSDRadiusLayer6",
+                                       "r - Layer 6;r [cm];Entries;",
+                                       100,35.,50.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDRadiusLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistClusterTypeLayer5 = new TH1F("fHistClusterTypeLayer5",
-                                         "CL type - Layer 5;Cluster type;Entries;",
-                                         150,0,150);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistClusterTypeLayer5, 
+  TH1F *fHistSSDClusterTypeLayer5 = new TH1F("fHistSSDClusterTypeLayer5",
+                                            "CL type - Layer 5;Cluster type;Entries;",
+                                            150,0,150);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterTypeLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistClusterTypeLayer6 = new TH1F("fHistClusterTypeLayer6",
-                                         "CL type - Layer 6;Cluster type;Entries;",
-                                         150,0,150);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistClusterTypeLayer6, 
+  TH1F *fHistSSDClusterTypeLayer6 = new TH1F("fHistSSDClusterTypeLayer6",
+                                            "CL type - Layer 6;Cluster type;Entries;",
+                                            150,0,150);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDClusterTypeLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistChargeRatioLayer5 = new TH1F("fHistChargeRatioLayer5",
-                                         "Charge ratio - Layer 5;q_{ratio};Entries;",
-                                         100,-2.0,2.0);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeRatioLayer5, 
+  TH1F *fHistSSDChargeRatioLayer5 = new TH1F("fHistSSDChargeRatioLayer5",
+                                            "Charge ratio - Layer 5;q_{ratio};Entries;",
+                                            100,-2.0,2.0);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatioLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistChargeRatioLayer6 = new TH1F("fHistChargeRatioLayer6",
-                                         "Charge ratio - Layer 6;q_{ratio};Entries;",
-                                         100,-2.0,2.0);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeRatioLayer6, 
+  TH1F *fHistSSDChargeRatioLayer6 = new TH1F("fHistSSDChargeRatioLayer6",
+                                            "Charge ratio - Layer 6;q_{ratio};Entries;",
+                                            100,-2.0,2.0);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeRatioLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistChargekeVLayer5 = new TH1F("fHistChargekeVLayer5",
-                                       "Charge - Layer 5;q [keV];Entries;",
-                                       100,0.,300.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargekeVLayer5, 
+  TH1F *fHistSSDChargekeVLayer5 = new TH1F("fHistSSDChargekeVLayer5",
+                                          "Charge - Layer 5;q [keV];Entries;",
+                                          100,0.,300.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargekeVLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistChargekeVLayer6 = new TH1F("fHistChargekeVLayer6",
-                                       "Charge - Layer 6;q [keV];Entries;",
-                                       100,0.,300.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargekeVLayer6, 
+  TH1F *fHistSSDChargekeVLayer6 = new TH1F("fHistSSDChargekeVLayer6",
+                                          "Charge - Layer 6;q [keV];Entries;",
+                                          100,0.,300.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargekeVLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistChargeADCLayer5 = new TH1F("fHistChargeADCLayer5",
-                                       "Charge - Layer 5;q [ADC];Entries;",
-                                       100,0.,300.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeADCLayer5, 
+  TH1F *fHistSSDChargeADCLayer5 = new TH1F("fHistSSDChargeADCLayer5",
+                                          "Charge - Layer 5;q [ADC];Entries;",
+                                          100,0.,300.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeADCLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH1F *fHistChargeADCLayer6 = new TH1F("fHistChargeADCLayer6",
-                                       "Charge - Layer 6;q [ADC];Entries;",
-                                       100,0.,300.);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeADCLayer6, 
+  TH1F *fHistSSDChargeADCLayer6 = new TH1F("fHistSSDChargeADCLayer6",
+                                          "Charge - Layer 6;q [ADC];Entries;",
+                                          100,0.,300.);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeADCLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH2F *fHistChargeMapLayer5 = new TH2F("fHistChargeMapLayer5",
-                                       "Charge map;N_{modules};N_{Ladders}",
-                                       fgkSSDMODULESPERLADDERLAYER5,
-                                       -0.5,fgkSSDMODULESPERLADDERLAYER5+0.5,
-                                       3*fgkSSDLADDERSLAYER5,
-                                       -0.5,fgkSSDLADDERSLAYER5+0.5);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeMapLayer5, 
+  TH2F *fHistSSDChargeMapLayer5 = new TH2F("fHistSSDChargeMapLayer5",
+                                          "Charge map;N_{modules};N_{Ladders}",
+                                          fgkSSDMODULESPERLADDERLAYER5,
+                                          -0.5,fgkSSDMODULESPERLADDERLAYER5+0.5,
+                                          3*fgkSSDLADDERSLAYER5,
+                                          -0.5,fgkSSDLADDERSLAYER5+0.5);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeMapLayer5, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
-  TH2F *fHistChargeMapLayer6 = new TH2F("fHistChargeMapLayer6",
-                                       "Charge map;N_{modules};N_{Ladders}",
-                                       fgkSSDMODULESPERLADDERLAYER6,
-                                       -0.5,fgkSSDMODULESPERLADDERLAYER6+0.5,
-                                       3*fgkSSDLADDERSLAYER6,
-                                       -0.5,fgkSSDLADDERSLAYER6+0.5);
-  fAliITSQADataMakerRec->Add2RecPointsList(fHistChargeMapLayer6, 
+  TH2F *fHistSSDChargeMapLayer6 = new TH2F("fHistSSDChargeMapLayer6",
+                                          "Charge map;N_{modules};N_{Ladders}",
+                                          fgkSSDMODULESPERLADDERLAYER6,
+                                          -0.5,fgkSSDMODULESPERLADDERLAYER6+0.5,
+                                          3*fgkSSDLADDERSLAYER6,
+                                          -0.5,fgkSSDLADDERSLAYER6+0.5);
+  fAliITSQADataMakerRec->Add2RecPointsList(fHistSSDChargeMapLayer6, 
                                           fGenOffset + fSSDhRecs);
   fSSDhRecs += 1;
 
@@ -619,7 +616,9 @@ void AliITSQASSDDataMakerRec::MakeRecPoints(TTree *clustersTree)
     AliError("can't get the branch with the ITS clusters !");
     return;
   }
-  TClonesArray * recpoints = new TClonesArray("AliITSRecPoint") ;
+  static TClonesArray recEmpty("AliITSRecPoint",1000);
+  recEmpty.Clear();
+  TClonesArray *recpoints = &recEmpty;
   branchRecP->SetAddress(&recpoints);
   Int_t npoints = 0;      
   Float_t cluglo[3]={0.,0.,0.}; 
@@ -668,9 +667,6 @@ void AliITSQASSDDataMakerRec::MakeRecPoints(TTree *clustersTree)
       }//layer 6 histograms
     }//rec. points loop
   }//module loop
-
-  recpoints->Delete();
-  delete recpoints;
 }
 
 //____________________________________________________________________________ 
index 8698f9c..1a91eb2 100644 (file)
-/**************************************************************************\r
- * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *\r
- *                                                                        *\r
- * Author: The ALICE Off-line Project.                                    *\r
- * Contributors are mentioned in the code where appropriate.              *\r
- *                                                                        *\r
- * Permission to use, copy, modify and distribute this software and its   *\r
- * documentation strictly for non-commercial purposes is hereby granted   *\r
- * without fee, provided that the above copyright notice appears in all   *\r
- * copies and that both the copyright notice and this permission notice   *\r
- * appear in the supporting documentation. The authors make no claims     *\r
- * about the suitability of this software for any purpose. It is          *\r
- * provided "as is" without express or implied warranty.                  *\r
- **************************************************************************/\r
-\r
-/* $Id$   */\r
-\r
-//  *************************************************************\r
-//  Checks the quality assurance \r
-//  by comparing with reference data\r
-//  contained in a DB\r
-//  -------------------------------------------------------------\r
-//  W. Ferrarese + P. Cerello Feb 2008\r
-//  INFN Torino\r
-//  SSD QA part: P. Christakoglou - NIKHEF/UU\r
-\r
-// --- ROOT system ---\r
-#include <TTree.h>\r
-#include <TH1.h>\r
-#include <TH2.h>\r
-#include <TMath.h>\r
-// --- Standard library ---\r
-\r
-// --- AliRoot header files ---\r
-#include "AliITS.h"\r
-#include "AliITSmodule.h"\r
-#include "AliITShit.h"\r
-#include "AliITSdigit.h"\r
-#include "AliITSpListItem.h"\r
-#include "AliRun.h"\r
-#include "AliITSQADataMakerSim.h"\r
-#include "AliITSQASSDDataMakerSim.h"\r
-#include "AliLog.h"\r
-#include "AliQA.h"\r
-#include "AliQAChecker.h"\r
-#include "AliRawReader.h"\r
-\r
-ClassImp(AliITSQASSDDataMakerSim)\r
-\r
-//____________________________________________________________________________ \r
-AliITSQASSDDataMakerSim::AliITSQASSDDataMakerSim(AliITSQADataMakerSim *aliITSQADataMakerSim) :\r
-TObject(),\r
-fAliITSQADataMakerSim(aliITSQADataMakerSim),\r
-fSSDhDigits(0),\r
-fSSDhSDigits(0),\r
-fSSDhHits(0),\r
-fGenOffset(0) {\r
-  //ctor used to discriminate OnLine-Offline analysis   \r
-}\r
-\r
-//____________________________________________________________________________ \r
-AliITSQASSDDataMakerSim::AliITSQASSDDataMakerSim(const AliITSQASSDDataMakerSim& qadm) :\r
-TObject(),\r
-fAliITSQADataMakerSim(qadm.fAliITSQADataMakerSim),\r
-fSSDhDigits(qadm.fSSDhDigits),\r
-fSSDhSDigits(qadm.fSSDhSDigits),\r
-fSSDhHits(qadm.fSSDhHits),\r
-fGenOffset(qadm.fGenOffset) {\r
-  //copy ctor \r
-  fAliITSQADataMakerSim->SetName((const char*)qadm.fAliITSQADataMakerSim->GetName()) ; \r
-  fAliITSQADataMakerSim->SetTitle((const char*)qadm.fAliITSQADataMakerSim->GetTitle());\r
-  }\r
-\r
-//__________________________________________________________________\r
-AliITSQASSDDataMakerSim& AliITSQASSDDataMakerSim::operator = (const AliITSQASSDDataMakerSim& qac ) {\r
-  // Equal operator.\r
-  this->~AliITSQASSDDataMakerSim();\r
-  new(this) AliITSQASSDDataMakerSim(qac);\r
-  return *this;\r
-}\r
-\r
-//____________________________________________________________________________ \r
-void AliITSQASSDDataMakerSim::StartOfDetectorCycle() {\r
-  //Detector specific actions at start of cycle\r
-  AliDebug(1,"AliITSQADM::Start of SSD Cycle\n");\r
-}\r
-\r
-//____________________________________________________________________________ \r
-void AliITSQASSDDataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t /*task*/, TObjArray* /*list*/) {\r
-  // launch the QA checking\r
-  AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n"); \r
-  \r
-  //AliQAChecker::Instance()->Run( AliQA::kITS , task, list);\r
-}\r
-\r
-//____________________________________________________________________________ \r
-void AliITSQASSDDataMakerSim::InitDigits() { \r
-  // Initialization for DIGIT data - SSD -\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
-                                       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
-                                       fGenOffset + fSSDhDigits);\r
-  fSSDhDigits += 1;\r
-\r
-  AliDebug(1,Form("%d SSD Digits histograms booked\n",fSSDhDigits));\r
-\r
-}\r
-\r
-//____________________________________________________________________________\r
-void AliITSQASSDDataMakerSim::MakeDigits(TTree *digits) { \r
-  // Fill QA for DIGIT - SSD -\r
-  AliITS *fITS  = (AliITS*)gAlice->GetModule("ITS");\r
-  fITS->SetTreeAddress();\r
-  TClonesArray *iSSDdigits  = fITS->DigitsAddress(2);\r
-  for(Int_t iModule = 500; iModule < 2198; iModule++) {\r
-    iSSDdigits->Clear();\r
-    digits->GetEvent(iModule);    \r
-    Int_t ndigits = iSSDdigits->GetEntries();\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(fGenOffset + 1))->Fill(fStripNumber,iModule,dig->GetSignal());\r
-    }//digit loop\r
-  }//module loop\r
-}\r
-\r
-//____________________________________________________________________________ \r
-void AliITSQASSDDataMakerSim::InitSDigits() { \r
-  // Initialization for SDIGIT data - SSD -\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
-                                        fGenOffset + fSSDhSDigits);\r
-  fSSDhSDigits += 1;  \r
-\r
-  AliDebug(1,Form("%d SSD SDigits histograms booked\n",fSSDhSDigits));\r
-}\r
-\r
-//____________________________________________________________________________\r
-void AliITSQASSDDataMakerSim::MakeSDigits(TTree *sdigits) { \r
-  // Fill QA for SDIGIT - SSD -\r
-  TClonesArray *iSSDsdigits = new TClonesArray("AliITSpListItem",10000);\r
-  TBranch *brchSDigits = sdigits->GetBranch("ITS");\r
-  brchSDigits->SetAddress(&iSSDsdigits);\r
-  for(Int_t iModule = 500; iModule < 2198; iModule++) {\r
-    iSSDsdigits->Clear();\r
-    sdigits->GetEvent(iModule);    \r
-    Int_t ndigits = iSSDsdigits->GetEntries();\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
-\r
-//____________________________________________________________________________ \r
-void AliITSQASSDDataMakerSim::InitHits() { \r
-  // Initialization for HITS data - SSD -\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
-                                     fGenOffset + fSSDhHits);\r
-  fSSDhHits += 1;\r
-  TH1F *fHistSSDGlobalX = new TH1F("fHistSSDHitsGlobalX",\r
-                                  ";x [cm];Entries",\r
-                                  1000,-50.,50.);\r
-  fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalX,\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
-                                     fGenOffset + fSSDhHits);\r
-  fSSDhHits += 1;\r
-  TH1F *fHistSSDGlobalZ = new TH1F("fHistSSDHitsGlobalZ",\r
-                                  ";z [cm];Entries",\r
-                                  1000,-60.,60.);\r
-  fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalZ,\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
-                                     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
-                                     fGenOffset + fSSDhHits);\r
-  fSSDhHits += 1;\r
-  TH1F *fHistSSDLocalZ = new TH1F("fHistSSDHitsLocalZ",\r
-                                 ";z [cm];Entries",\r
-                                 1000,-4.,4.);\r
-  fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalZ,\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
-                                     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
-                                     fGenOffset + fSSDhHits);\r
-  fSSDhHits += 1;\r
\r
-  AliDebug(1,Form("%d SSD Hits histograms booked\n",fSSDhHits));\r
-}\r
-\r
-\r
-//____________________________________________________________________________\r
-void AliITSQASSDDataMakerSim::MakeHits(TTree *hits) { \r
-  // Fill QA for HITS - SSD -\r
-  AliITS *fITS  = (AliITS*)gAlice->GetModule("ITS");\r
-  fITS->SetTreeAddress();\r
-  Int_t nmodules;\r
-  fITS->InitModules(-1,nmodules);\r
-  fITS->FillModules(hits,0);\r
-  for(Int_t iModule = 500; iModule < 2198; iModule++) {\r
-    AliITSmodule *module = fITS->GetModule(iModule);\r
-    TObjArray *arrHits = module->GetHits();\r
-    Int_t nhits = arrHits->GetEntriesFast();\r
-    if(nhits != 0)\r
-      AliDebug(1,Form("Module: %d - Hits: %d",iModule,nhits));\r
-    for (Int_t iHit = 0; iHit < nhits; iHit++) {\r
-      AliITShit *hit = (AliITShit*) arrHits->At(iHit);\r
-      \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(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
+/**************************************************************************
+ * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$   */
+
+//  *************************************************************
+//  Checks the quality assurance 
+//  by comparing with reference data
+//  contained in a DB
+//  -------------------------------------------------------------
+//  W. Ferrarese + P. Cerello Feb 2008
+//  INFN Torino
+//  SSD QA part: P. Christakoglou - NIKHEF/UU
+
+// --- ROOT system ---
+#include <TTree.h>
+#include <TH1.h>
+#include <TH2.h>
+#include <TMath.h>
+// --- Standard library ---
+
+// --- AliRoot header files ---
+#include "AliITS.h"
+#include "AliITSmodule.h"
+#include "AliITShit.h"
+#include "AliITSdigit.h"
+#include "AliITSpListItem.h"
+#include "AliRun.h"
+#include "AliITSQADataMakerSim.h"
+#include "AliITSQASSDDataMakerSim.h"
+#include "AliLog.h"
+#include "AliQA.h"
+#include "AliQAChecker.h"
+#include "AliRawReader.h"
+
+ClassImp(AliITSQASSDDataMakerSim)
+
+//____________________________________________________________________________ 
+AliITSQASSDDataMakerSim::AliITSQASSDDataMakerSim(AliITSQADataMakerSim *aliITSQADataMakerSim) :
+TObject(),
+fAliITSQADataMakerSim(aliITSQADataMakerSim),
+fSSDhDigits(0),
+fSSDhSDigits(0),
+fSSDhHits(0),
+fGenOffset(0) {
+  //ctor used to discriminate OnLine-Offline analysis   
+}
+
+//____________________________________________________________________________ 
+AliITSQASSDDataMakerSim::AliITSQASSDDataMakerSim(const AliITSQASSDDataMakerSim& qadm) :
+TObject(),
+fAliITSQADataMakerSim(qadm.fAliITSQADataMakerSim),
+fSSDhDigits(qadm.fSSDhDigits),
+fSSDhSDigits(qadm.fSSDhSDigits),
+fSSDhHits(qadm.fSSDhHits),
+fGenOffset(qadm.fGenOffset) {
+  //copy ctor 
+  fAliITSQADataMakerSim->SetName((const char*)qadm.fAliITSQADataMakerSim->GetName()) ; 
+  fAliITSQADataMakerSim->SetTitle((const char*)qadm.fAliITSQADataMakerSim->GetTitle());
+  }
+
+//__________________________________________________________________
+AliITSQASSDDataMakerSim& AliITSQASSDDataMakerSim::operator = (const AliITSQASSDDataMakerSim& qac ) {
+  // Equal operator.
+  this->~AliITSQASSDDataMakerSim();
+  new(this) AliITSQASSDDataMakerSim(qac);
+  return *this;
+}
+
+//____________________________________________________________________________ 
+void AliITSQASSDDataMakerSim::StartOfDetectorCycle() {
+  //Detector specific actions at start of cycle
+  AliDebug(1,"AliITSQADM::Start of SSD Cycle\n");
+}
+
+//____________________________________________________________________________ 
+void AliITSQASSDDataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list) {
+  // launch the QA checking
+  AliDebug(1,"AliITSDM instantiates checker with Run(AliQA::kITS, task, list)\n"); 
+  
+  AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
+}
+
+//____________________________________________________________________________ 
+void AliITSQASSDDataMakerSim::InitDigits() { 
+  // Initialization for DIGIT data - SSD -
+  fGenOffset = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();
+
+  // custom code here
+  TH1F *fHistSSDModule = new TH1F("fHistSSDDigitsModule",
+                                 ";SSD Module Number;N_{DIGITS}",
+                                 1698,499.5,2197.5);  
+  fAliITSQADataMakerSim->Add2DigitsList(fHistSSDModule,
+                                       fGenOffset + fSSDhDigits);
+  fSSDhDigits += 1;
+  TH2F *fHistSSDModuleStrip = new TH2F("fHistSSDDigitsModuleStrip",
+                                      ";N_{Strip};N_{Module}",
+                                      1540,0,1540,1698,499.5,2197.5);  
+  fAliITSQADataMakerSim->Add2DigitsList(fHistSSDModuleStrip,
+                                       fGenOffset + fSSDhDigits);
+  fSSDhDigits += 1;
+
+  AliDebug(1,Form("%d SSD Digits histograms booked\n",fSSDhDigits));
+
+}
+
+//____________________________________________________________________________
+void AliITSQASSDDataMakerSim::MakeDigits(TTree *digits) { 
+  // Fill QA for DIGIT - SSD -
+  AliITS *fITS  = (AliITS*)gAlice->GetModule("ITS");
+  fITS->SetTreeAddress();
+  TClonesArray *iSSDdigits  = fITS->DigitsAddress(2);
+  for(Int_t iModule = 500; iModule < 2198; iModule++) {
+    iSSDdigits->Clear();
+    digits->GetEvent(iModule);    
+    Int_t ndigits = iSSDdigits->GetEntries();
+    fAliITSQADataMakerSim->GetDigitsData(fGenOffset + 0)->Fill(iModule,ndigits);
+    if(ndigits != 0)
+      AliDebug(1,Form("Module: %d - Digits: %d",iModule,ndigits));
+    for (Int_t iDigit = 0; iDigit < ndigits; iDigit++) {
+      AliITSdigit *dig = (AliITSdigit*)iSSDdigits->UncheckedAt(iDigit);
+      Int_t fStripNumber = (dig->GetCoord1() == 0) ? dig->GetCoord2() : dig->GetCoord2() + fgkNumberOfPSideStrips;
+      ((TH2F *)fAliITSQADataMakerSim->GetDigitsData(fGenOffset + 1))->Fill(fStripNumber,iModule,dig->GetSignal());
+    }//digit loop
+  }//module loop
+}
+
+//____________________________________________________________________________ 
+void AliITSQASSDDataMakerSim::InitSDigits() { 
+  // Initialization for SDIGIT data - SSD -
+  fGenOffset = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();
+
+  // custom code here
+  TH1F *fHistSSDModule = new TH1F("fHistSSDSDigitsModule",
+                                 ";SSD Module Number;N_{SDIGITS}",
+                                 1698,499.5,2197.5);  
+  fAliITSQADataMakerSim->Add2SDigitsList(fHistSSDModule,
+                                        fGenOffset + fSSDhSDigits);
+  fSSDhSDigits += 1;  
+
+  AliDebug(1,Form("%d SSD SDigits histograms booked\n",fSSDhSDigits));
+}
+
+//____________________________________________________________________________
+void AliITSQASSDDataMakerSim::MakeSDigits(TTree *sdigits) { 
+  // Fill QA for SDIGIT - SSD -
+  static TClonesArray iSSDEmpty("AliITSpListItem",10000);
+  iSSDEmpty.Clear();
+  TClonesArray *iSSDsdigits = &iSSDEmpty;
+
+  TBranch *brchSDigits = sdigits->GetBranch("ITS");
+  brchSDigits->SetAddress(&iSSDsdigits);
+  for(Int_t iModule = 500; iModule < 2198; iModule++) {
+    iSSDsdigits->Clear();
+    sdigits->GetEvent(iModule);    
+    Int_t ndigits = iSSDsdigits->GetEntries();
+    fAliITSQADataMakerSim->GetSDigitsData(fGenOffset + 0)->Fill(iModule,ndigits);
+    if(ndigits != 0)
+      AliDebug(1,Form("Module: %d - Digits: %d",iModule,ndigits));
+
+    for (Int_t iDigit = 0; iDigit < ndigits; iDigit++) {
+      AliITSpListItem *dig=(AliITSpListItem*)iSSDsdigits->At(iDigit);
+      dig=0;
+    }//digit loop
+  }//module loop
+}
+
+//____________________________________________________________________________ 
+void AliITSQASSDDataMakerSim::InitHits() { 
+  // Initialization for HITS data - SSD -
+  fGenOffset = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();
+
+  // custom code here
+  TH1F *fHistSSDModule = new TH1F("fHistSSDHitsModule",
+                                 ";SDD Module Number;N_{HITS}",
+                                 1698,499.5,2197.5); 
+  fAliITSQADataMakerSim->Add2HitsList(fHistSSDModule,
+                                     fGenOffset + fSSDhHits);
+  fSSDhHits += 1;
+  TH1F *fHistSSDGlobalX = new TH1F("fHistSSDHitsGlobalX",
+                                  ";x [cm];Entries",
+                                  1000,-50.,50.);
+  fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalX,
+                                     fGenOffset + fSSDhHits);
+  fSSDhHits += 1;
+  TH1F *fHistSSDGlobalY = new TH1F("fHistSSDHitsGlobalY",
+                                  ";y [cm];Entries",
+                                  1000,-50.,50.);
+  fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalY,
+                                     fGenOffset + fSSDhHits);
+  fSSDhHits += 1;
+  TH1F *fHistSSDGlobalZ = new TH1F("fHistSSDHitsGlobalZ",
+                                  ";z [cm];Entries",
+                                  1000,-60.,60.);
+  fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalZ,
+                                     fGenOffset + fSSDhHits);
+  fSSDhHits += 1;
+  TH1F *fHistSSDLocalX = new TH1F("fHistSSDHitsLocalX",
+                                 ";x [cm];Entries",
+                                 1000,-4.,4.);
+  fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalX,
+                                     fGenOffset + fSSDhHits);
+  fSSDhHits += 1;
+  TH1F *fHistSSDLocalY = new TH1F("fHistSSDHitsLocalY",
+                                 ";y [cm];Entries",
+                                 1000,-0.1,0.1);
+  fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalY,
+                                     fGenOffset + fSSDhHits);
+  fSSDhHits += 1;
+  TH1F *fHistSSDLocalZ = new TH1F("fHistSSDHitsLocalZ",
+                                 ";z [cm];Entries",
+                                 1000,-4.,4.);
+  fAliITSQADataMakerSim->Add2HitsList(fHistSSDLocalZ,
+                                     fGenOffset + fSSDhHits);
+  fSSDhHits += 1;
+  TH1F *fHistSSDIonization = new TH1F("fHistSSDHitsIonization",
+                                     ";log(dE/dx) [KeV];N_{Hits}",
+                                     100,-7,-2);
+  fAliITSQADataMakerSim->Add2HitsList(fHistSSDIonization,
+                                     fGenOffset + fSSDhHits);
+  fSSDhHits += 1;
+  TH2F *fHistSSDGlobalXY = new TH2F("fHistSSDHitsGlobalXY",
+                                   ";x [cm];y [cm]",
+                                   1000,-50.,50.,
+                                   1000,-50.,50.);
+  fAliITSQADataMakerSim->Add2HitsList(fHistSSDGlobalXY,
+                                     fGenOffset + fSSDhHits);
+  fSSDhHits += 1;
+  AliDebug(1,Form("%d SSD Hits histograms booked\n",fSSDhHits));
+}
+
+
+//____________________________________________________________________________
+void AliITSQASSDDataMakerSim::MakeHits(TTree *hits) { 
+  // Fill QA for HITS - SSD -
+  AliITS *fITS  = (AliITS*)gAlice->GetModule("ITS");
+  fITS->SetTreeAddress();
+  Int_t nmodules;
+  fITS->InitModules(-1,nmodules);
+  fITS->FillModules(hits,0);
+  for(Int_t iModule = 500; iModule < 2198; iModule++) {
+    AliITSmodule *module = fITS->GetModule(iModule);
+    TObjArray *arrHits = module->GetHits();
+    Int_t nhits = arrHits->GetEntriesFast();
+    if(nhits != 0)
+      AliDebug(1,Form("Module: %d - Hits: %d",iModule,nhits));
+    for (Int_t iHit = 0; iHit < nhits; iHit++) {
+      AliITShit *hit = (AliITShit*) arrHits->At(iHit);
+      
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 0)->Fill(iModule);
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 1)->Fill(hit->GetXG());
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 2)->Fill(hit->GetYG());
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 3)->Fill(hit->GetZG());
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 4)->Fill(hit->GetXL());
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 5)->Fill(hit->GetYL());
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 6)->Fill(hit->GetZL());
+      if(hit->GetIonization())
+       fAliITSQADataMakerSim->GetHitsData(fGenOffset + 7)->Fill(TMath::Log10(hit->GetIonization()));
+      fAliITSQADataMakerSim->GetHitsData(fGenOffset + 8)->Fill(hit->GetXG(),hit->GetYG());
+    }//hit loop
+  }//module loop  
+}