QA classes for simulation. (P. Cerello, W. Ferrarese)
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 9 Apr 2008 08:29:50 +0000 (08:29 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 9 Apr 2008 08:29:50 +0000 (08:29 +0000)
ITS/AliITSQADataMakerSim.cxx
ITS/AliITSQADataMakerSim.h
ITS/AliITSQASDDDataMakerSim.cxx [new file with mode: 0644]
ITS/AliITSQASDDDataMakerSim.h [new file with mode: 0644]
ITS/AliITSQASPDDataMakerSim.cxx [new file with mode: 0644]
ITS/AliITSQASPDDataMakerSim.h [new file with mode: 0644]
ITS/AliITSQASSDDataMakerSim.cxx [new file with mode: 0644]
ITS/AliITSQASSDDataMakerSim.h [new file with mode: 0644]
ITS/ITSsimLinkDef.h
ITS/libITSsim.pkg

index 5764c0d..4413f12 100644 (file)
 //  by comparing with reference data
 //  contained in a DB
 //  -------------------------------------------------------------
-//  W. Ferrarese Nov 2007
+//  W. Ferrarese + P. Cerello Feb 2008
 //  INFN Torino
 
 // --- ROOT system ---
-#include <TH2D.h>
 #include <TTree.h>
-
 // --- Standard library ---
 
 // --- AliRoot header files ---
 #include "AliITSQADataMakerSim.h"
+#include "AliITSQASPDDataMakerSim.h"
+#include "AliITSQASDDDataMakerSim.h"
+#include "AliITSQASSDDataMakerSim.h"
 #include "AliLog.h"
+#include "AliQA.h"
 #include "AliQAChecker.h"
-
+#include "AliRawReader.h"
 
 ClassImp(AliITSQADataMakerSim)
 
 //____________________________________________________________________________ 
-AliITSQADataMakerSim::AliITSQADataMakerSim() : 
-  AliQADataMakerSim(AliQA::GetDetName(AliQA::kITS), "SDD Quality Assurance Data Maker")
-{ 
-  // ctor 
+AliITSQADataMakerSim::AliITSQADataMakerSim(Short_t subDet) :
+AliQADataMakerSim(AliQA::GetDetName(AliQA::kITS), "ITS Quality Assurance Data Maker"),
+fSubDetector(subDet),
+fSPDDataMaker(NULL),
+fSDDDataMaker(NULL),
+fSSDDataMaker(NULL)
+{
+  //ctor used to discriminate OnLine-Offline analysis
+  if(fSubDetector < 0 || fSubDetector > 3) {
+       AliError("Error: fSubDetector number out of range; return\n");
+  }
+
+  // Initialization for RAW data 
+  if(fSubDetector == 0 || fSubDetector == 1) {
+    AliDebug(1,"AliITSQADM::Create SPD DataMakerSim\n");
+       fSPDDataMaker = new AliITSQASPDDataMakerSim(this);
+  }
+  if(fSubDetector == 0 || fSubDetector == 2) {
+       AliDebug(1,"AliITSQADM::Create SDD DataMakerSim\n");
+       //printf("AliITSQADM::Create SDD DataMakerSim\n");                  
+       fSDDDataMaker = new AliITSQASDDDataMakerSim(this);
+  }
+  if(fSubDetector == 0 || fSubDetector == 3) {
+       AliDebug(1,"AliITSQADM::Create SSD DataMakerSim\n");
+       fSSDDataMaker = new AliITSQASSDDataMakerSim(this);
+  }
 }
 
 //____________________________________________________________________________ 
-AliITSQADataMakerSim::AliITSQADataMakerSim(Int_t /*ldc */, Bool_t /*kMode */) :
-  AliQADataMakerSim(AliQA::GetDetName(AliQA::kITS), "SDD Quality Assurance Data Maker")
-{
-  //ctor used to discriminate OnLine-Offline analysis
+AliITSQADataMakerSim::~AliITSQADataMakerSim(){
+  // destructor
+  if(fSPDDataMaker)delete fSPDDataMaker;
+  if(fSDDDataMaker)delete fSDDDataMaker;
+  if(fSSDDataMaker)delete fSSDDataMaker;
 }
 
 //____________________________________________________________________________ 
 AliITSQADataMakerSim::AliITSQADataMakerSim(const AliITSQADataMakerSim& qadm) :
-  AliQADataMakerSim()
+AliQADataMakerSim(),
+fSubDetector(qadm.fSubDetector),
+fSPDDataMaker(NULL),
+fSDDDataMaker(NULL),
+fSSDDataMaker(NULL)
 {
   //copy ctor 
+  //printf("AliITSQADataMakerSim::AliITSQADataMakerSim   using copy ctor \n");
   SetName((const char*)qadm.GetName()) ; 
-  SetTitle((const char*)qadm.GetTitle()); 
+  SetTitle((const char*)qadm.GetTitle());
 }
 
 //__________________________________________________________________
@@ -74,14 +104,139 @@ void AliITSQADataMakerSim::StartOfDetectorCycle()
 {
   //Detector specific actions at start of cycle
   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();
 }
 
 //____________________________________________________________________________ 
-void AliITSQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray *list)
+void AliITSQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray* list)
 {
   // 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 == 2) fSDDDataMaker->EndOfDetectorCycle(task, list);
+  if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->EndOfDetectorCycle(task, list);
   
-  AliQAChecker::Instance()->Run( AliQA::kITS , task, list);
+  //AliQAChecker::Instance()->Run( AliQA::kITS , task, list);  //temporary skipping the checking
 }
 
+//____________________________________________________________________________ 
+void AliITSQADataMakerSim::InitDigits()
+{  
+  // Initialization for RAW data 
+       if(fSubDetector == 0 || fSubDetector == 1) {
+         AliDebug(1,"AliITSQADM:: SPD InitDigits\n");
+         fSPDDataMaker->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) {
+         AliDebug(1,"AliITSQADM:: SSD InitDigits\n");
+         fSSDDataMaker->InitDigits();
+       }
+}
+
+//____________________________________________________________________________
+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);
+}
+
+//____________________________________________________________________________
+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);
+}
+
+//____________________________________________________________________________ 
+void AliITSQADataMakerSim::InitSDigits()
+{
+  // Initialization for RECPOINTS
+  if(fSubDetector == 0 || fSubDetector == 1) {
+       AliDebug(1,"AliITSQADM:: SPD InitSDigits\n");
+    fSPDDataMaker->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) {
+       AliDebug(1,"AliITSQADM:: SSD InitSDigits\n");
+       fSSDDataMaker->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 == 2) fSDDDataMaker->MakeSDigits(sdigits);
+  if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeSDigits(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 == 2) fSDDDataMaker->MakeSDigits(sdigits);
+  if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeSDigits(sdigits);
+}
+
+//____________________________________________________________________________ 
+void AliITSQADataMakerSim::InitHits()
+{
+  // Initialization for RECPOINTS
+  if(fSubDetector == 0 || fSubDetector == 1) {
+       AliDebug(1,"AliITSQADM:: SPD InitHits\n");
+    fSPDDataMaker->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) {
+       AliDebug(1,"AliITSQADM:: SSD InitHits\n");
+       fSSDDataMaker->InitHits();
+  }
+}
+
+//____________________________________________________________________________ 
+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);
+}
+
+//____________________________________________________________________________ 
+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 5548ad3..9698278 100644 (file)
@@ -3,7 +3,6 @@
 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-
 /* $Id$ */
 
 //
 //  contained in a DB
 //
 //
-//  W. Ferrarese Nov 2007
-
-
-
+//  W. Ferrarese + P. Cerello Feb 2008
 
 #include "AliQADataMakerSim.h"
-class TObjArray;
-class TH1F;
-class TH2D;
+
+class AliITSQASPDDataMakerSim;
+class AliITSQASDDDataMakerSim;
+class AliITSQASSDDataMakerSim;
 class AliRawReader;
-class AliITSgeomTGeo;
 
 class AliITSQADataMakerSim: public AliQADataMakerSim {
 
+friend class AliITSQASPDDataMakerSim;
+friend class AliITSQASDDDataMakerSim;
+friend class AliITSQASSDDataMakerSim;
+
 public:
-  AliITSQADataMakerSim();          // ctor
-  AliITSQADataMakerSim(Int_t /* ldc */, Bool_t /* kMode =  kFALSE */);
+  AliITSQADataMakerSim(Short_t subDet = 0); // subDet = 0 (ALL), 1 (SPD), 2 (SDD), 3 (SSD)
   AliITSQADataMakerSim(const AliITSQADataMakerSim& qadm);
   AliITSQADataMakerSim& operator = (const AliITSQADataMakerSim& qac);
   virtual void StartOfDetectorCycle();
   virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list);
-   virtual ~AliITSQADataMakerSim() {;} // dtor
+  virtual void InitDigits();
+  virtual void InitSDigits();
+  virtual void InitHits();
+  virtual void MakeDigits(TClonesArray * digits);
+  virtual void MakeSDigits(TClonesArray * sdigits);
+  virtual void MakeHits(TClonesArray * hits);
+  virtual void MakeDigits(TTree * digits);
+  virtual void MakeSDigits(TTree * sdigits);
+  virtual void MakeHits(TTree * hits);
+  virtual ~AliITSQADataMakerSim(); // dtor
 
 private:
 
-  ClassDef(AliITSQADataMakerSim,1)  // description 
+  Short_t fSubDetector;                    // subDetector: 0 (ALL), 1 (SPD), 2 (SDD), 3 (SSD)
+
+  AliITSQASPDDataMakerSim *fSPDDataMaker;  // SPD Data Maker 
+  AliITSQASDDDataMakerSim *fSDDDataMaker;  // SDD Data Maker 
+  AliITSQASSDDataMakerSim *fSSDDataMaker;  // SSD Data Maker 
+
+  ClassDef(AliITSQADataMakerSim,2)         // description 
 
 };
 
 #endif
 
-
diff --git a/ITS/AliITSQASDDDataMakerSim.cxx b/ITS/AliITSQASDDDataMakerSim.cxx
new file mode 100644 (file)
index 0000000..274d02f
--- /dev/null
@@ -0,0 +1,295 @@
+/**************************************************************************\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
+//  *************************************************************\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
+\r
+// --- ROOT system ---\r
+#include <TTree.h>\r
+// --- Standard library ---\r
+\r
+// --- AliRoot header files ---\r
+#include "AliITSQASDDDataMakerSim.h"\r
+#include "AliLog.h"\r
+#include "AliQA.h"\r
+#include "AliQAChecker.h"\r
+#include "AliQADataMakerSim.h"\r
+#include "AliITSQADataMakerSim.h"\r
+#include "AliRawReader.h"\r
+#include "AliITSdigit.h"\r
+#include "AliITS.h"\r
+#include "AliITSmodule.h"\r
+#include "AliITShit.h"\r
+#include "AliITSLoader.h"\r
+#include "AliRunLoader.h"\r
+#include "AliRun.h"\r
+#include "AliITSsegmentationSDD.h"\r
+#include "AliITSpList.h"\r
+\r
+ClassImp(AliITSQASDDDataMakerSim)\r
+\r
+//____________________________________________________________________________ \r
+AliITSQASDDDataMakerSim::AliITSQASDDDataMakerSim(AliITSQADataMakerSim *aliITSQADataMakerSim) :\r
+TObject(),\r
+fAliITSQADataMakerSim(aliITSQADataMakerSim),\r
+fSDDhDigits(0),\r
+fSDDhSDigits(0),\r
+fSDDhHits(0),\r
+fDigitsOffset(0),\r
+fSDigitsOffset(0),\r
+fHitsOffset(0)\r
+{\r
+  //ctor used to discriminate OnLine-Offline analysis   \r
+}\r
+\r
+//____________________________________________________________________________ \r
+AliITSQASDDDataMakerSim::AliITSQASDDDataMakerSim(const AliITSQASDDDataMakerSim& qadm) :\r
+TObject(),\r
+fAliITSQADataMakerSim(qadm.fAliITSQADataMakerSim),\r
+fSDDhDigits(qadm.fSDDhDigits),\r
+fSDDhSDigits(qadm.fSDDhSDigits),\r
+fSDDhHits(qadm.fSDDhHits),\r
+fDigitsOffset(qadm.fDigitsOffset),\r
+fSDigitsOffset(qadm.fSDigitsOffset),\r
+fHitsOffset(qadm.fHitsOffset)\r
+{\r
+  //copy ctor \r
+  fAliITSQADataMakerSim->SetName((const char*)qadm.fAliITSQADataMakerSim->GetName()) ; \r
+  fAliITSQADataMakerSim->SetTitle((const char*)qadm.fAliITSQADataMakerSim->GetTitle());\r
+  }\r
+\r
+//__________________________________________________________________\r
+AliITSQASDDDataMakerSim& AliITSQASDDDataMakerSim::operator = (const AliITSQASDDDataMakerSim& qac )\r
+{\r
+  // Equal operator.\r
+  this->~AliITSQASDDDataMakerSim();\r
+  new(this) AliITSQASDDDataMakerSim(qac);\r
+  return *this;\r
+}\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASDDDataMakerSim::StartOfDetectorCycle()\r
+{\r
+  //Detector specific actions at start of cycle\r
+  AliDebug(1,"AliITSQADM::Start of SDD Cycle\n");\r
+}\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASDDDataMakerSim::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
+  //AliQAChecker::Instance()->Run( AliQA::kITS , task, list);\r
+}\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASDDDataMakerSim::InitDigits()\r
+{ \r
+  // Initialization for DIGIT data - SDD -\r
+  fDigitsOffset = (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
+  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
+  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
+  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
+  fSDDhDigits ++;\r
+  AliDebug(1,Form("%d SDD Digits histograms booked\n",fSDDhDigits));\r
+}\r
+\r
+//____________________________________________________________________________\r
+void AliITSQASDDDataMakerSim::MakeDigits(TTree * digits)\r
+{ \r
+  // Fill QA for DIGIT - SDD -\r
+  //printf("AliITSQASDDDataMakerSim::MakeDigits called \n");\r
+  AliITS *fITS  = (AliITS*)gAlice->GetModule("ITS");\r
+  fITS->SetTreeAddress();\r
+  TClonesArray *iITSdigits  = fITS->DigitsAddress(1);\r
+  for(Int_t i=0; i<260; i++){\r
+    Int_t nmod=i+240;\r
+    digits->GetEvent(nmod);\r
+    Int_t ndigits = iITSdigits->GetEntries();\r
+    fAliITSQADataMakerSim->GetDigitsData(1+fDigitsOffset)->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
+    }\r
+  }\r
+}\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASDDDataMakerSim::InitSDigits()\r
+{ \r
+  // Initialization for SDIGIT data - SDD -\r
+  fSDigitsOffset = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();\r
+  //printf("AliITSQASDDDataMakerSim::InitSDigits called \n");\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
+  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
+  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
+  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
+  fSDDhSDigits ++;\r
+\r
+  AliDebug(1,Form("%d SDD SDigits histograms booked\n",fSDDhSDigits));\r
+}\r
+\r
+//____________________________________________________________________________\r
+void AliITSQASDDDataMakerSim::MakeSDigits(TTree * sdigits)\r
+{ \r
+  // Fill QA for SDIGIT - SDD -\r
+  //printf("AliITSQASDDDataMakerSim::MakeSDigits called \n");\r
+  AliITSsegmentationSDD* seg = new AliITSsegmentationSDD();\r
+  Int_t nan=seg->Npz();\r
+  Int_t ntb=seg->Npx();\r
+  Int_t scaleSize=4;\r
+  AliITSpList* list=new AliITSpList(nan,ntb*scaleSize);\r
+\r
+  //AliITS *fITS  = (AliITS*)gAlice->GetModule("ITS");\r
+  //fITS->SetTreeAddress();\r
+  //TClonesArray *ITSdigits  = fITS->DigitsAddress(1);\r
+  //TFile *sper = new TFile("sper.root","CREATE"); //agginto a mano x prova\r
+  //digits->Write();\r
+  //sper->Close();\r
+\r
+\r
+  TBranch *brchSDigits = sdigits->GetBranch("ITS");\r
+  for(Int_t id=0; id<260; id++){\r
+    Int_t nmod=id+240;\r
+    TClonesArray * sdig = new TClonesArray( "AliITSpListItem",1000 );\r
+    brchSDigits->SetAddress( &sdig );\r
+    brchSDigits->GetEvent(nmod);\r
+    Int_t nsdig=sdig->GetEntries();\r
+    fAliITSQADataMakerSim->GetSDigitsData(1+fSDigitsOffset)->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
+    }\r
+    delete sdig;\r
+  }\r
+}\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASDDDataMakerSim::InitHits()\r
+{ \r
+  // Initialization for HITS data - SDD -\r
+  fHitsOffset = (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
+  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
+  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
+  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
+  fSDDhHits ++;\r
+  //printf("%d SDD Hits histograms booked\n",fSDDhHits);\r
+  AliDebug(1,Form("%d SDD Hits histograms booked\n",fSDDhHits));\r
+}\r
+\r
+//____________________________________________________________________________\r
+void AliITSQASDDDataMakerSim::MakeHits(TTree * hits)\r
+{ \r
+  // Fill QA for HITS - SDD -\r
+  //printf("AliITSQASDDDataMakerSim::MakeHits called \n");\r
+  AliITS *fITS  = (AliITS*)gAlice->GetModule("ITS");\r
+  fITS->SetTreeAddress();\r
+  Int_t nmodules;\r
+  fITS->InitModules(-1,nmodules);\r
+  //fITS->FillModules(0,0,nmodules," "," ");\r
\r
+  fITS->FillModules(hits,0);\r
+\r
+  for(Int_t i=0; i<260; i++){\r
+    Int_t nmod=i+240;\r
+    AliITSmodule *modu = fITS->GetModule(nmod);\r
+    TObjArray *arrHits = modu->GetHits();\r
+    Int_t nhits = arrHits->GetEntriesFast();\r
+    //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
+      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
+      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
+      }\r
+    }\r
+  }\r
+}\r
diff --git a/ITS/AliITSQASDDDataMakerSim.h b/ITS/AliITSQASDDDataMakerSim.h
new file mode 100644 (file)
index 0000000..f12057e
--- /dev/null
@@ -0,0 +1,62 @@
+#ifndef AliITSQASDDDataMakerSim_H\r
+#define AliITSQASDDDataMakerSim_H\r
+/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *\r
+ * See cxx source for full Copyright notice                               */\r
+\r
+\r
+//\r
+//  Checks the quality assurance. \r
+//  By comparing with reference data\r
+//  contained in a DB\r
+//\r
+//\r
+//  W. Ferrarese + P. Cerello Feb 2008\r
+\r
+/* $Id$ */\r
+\r
+#include "AliQA.h"\r
+class AliITSQADataMakerSim;\r
+class AliRunLoader;\r
+class AliRun;\r
+class TObjArray;\r
+class TClonesArray;\r
+\r
+class AliITSQASDDDataMakerSim : public TObject {\r
+\r
+public:\r
+  AliITSQASDDDataMakerSim(AliITSQADataMakerSim *aliITSQADataMakerSim); //ctor\r
+  AliITSQASDDDataMakerSim(const AliITSQASDDDataMakerSim& qadm);\r
+  AliITSQASDDDataMakerSim& operator = (const AliITSQASDDDataMakerSim& qac);\r
+\r
+  virtual void StartOfDetectorCycle();\r
+  virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list);\r
+  virtual ~AliITSQASDDDataMakerSim() {;}   // dtor\r
+  virtual void InitDigits();\r
+  virtual void InitSDigits();\r
+  virtual void InitHits();\r
+  virtual void MakeDigits(TClonesArray * /*digits*/){;}\r
+  virtual void MakeSDigits(TClonesArray * /*sdigits*/){;}\r
+  virtual void MakeHits(TClonesArray * /*hits*/){;}\r
+  virtual void MakeDigits(TTree * digits);\r
+  virtual void MakeSDigits(TTree * sdigits);\r
+  virtual void MakeHits(TTree * hits);\r
+  const Int_t Digits() { return fSDDhDigits; }\r
+  const Int_t SDigits() { return fSDDhSDigits; }\r
+  const Int_t Hits() { return fSDDhHits; }\r
+\r
+private:\r
+\r
+  AliITSQADataMakerSim *fAliITSQADataMakerSim;//pointer to the main ctor\r
+  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
+  ClassDef(AliITSQASDDDataMakerSim,1)      // description \r
+\r
+};\r
+\r
+#endif\r
+\r
+\r
diff --git a/ITS/AliITSQASPDDataMakerSim.cxx b/ITS/AliITSQASPDDataMakerSim.cxx
new file mode 100644 (file)
index 0000000..2fc0824
--- /dev/null
@@ -0,0 +1,162 @@
+/**************************************************************************\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
+//  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
+\r
+// --- ROOT system ---\r
+#include <TTree.h>\r
+// --- Standard library ---\r
+\r
+// --- AliRoot header files ---\r
+#include "AliITSQADataMakerSim.h"\r
+#include "AliITSQASPDDataMakerSim.h"\r
+#include "AliLog.h"\r
+#include "AliQA.h"\r
+#include "AliQAChecker.h"\r
+#include "AliRawReader.h"\r
+\r
+ClassImp(AliITSQASPDDataMakerSim)\r
+\r
+//____________________________________________________________________________ \r
+AliITSQASPDDataMakerSim::AliITSQASPDDataMakerSim(AliITSQADataMakerSim *aliITSQADataMakerSim) :\r
+TObject(),\r
+fAliITSQADataMakerSim(aliITSQADataMakerSim),\r
+fSPDhDigits(0),\r
+fSPDhSDigits(0),\r
+fSPDhHits(0),\r
+fDigitsOffset(0),\r
+fSDigitsOffset(0),\r
+fHitsOffset(0)\r
+{\r
+  //ctor used to discriminate OnLine-Offline analysis   \r
+}\r
+\r
+//____________________________________________________________________________ \r
+AliITSQASPDDataMakerSim::AliITSQASPDDataMakerSim(const AliITSQASPDDataMakerSim& qadm) :\r
+TObject(),\r
+fAliITSQADataMakerSim(qadm.fAliITSQADataMakerSim),\r
+fSPDhDigits(qadm.fSPDhDigits),\r
+fSPDhSDigits(qadm.fSPDhSDigits),\r
+fSPDhHits(qadm.fSPDhHits),\r
+fDigitsOffset(qadm.fDigitsOffset),\r
+fSDigitsOffset(qadm.fSDigitsOffset),\r
+fHitsOffset(qadm.fHitsOffset)\r
+{\r
+  //copy ctor \r
+  fAliITSQADataMakerSim->SetName((const char*)qadm.fAliITSQADataMakerSim->GetName()) ; \r
+  fAliITSQADataMakerSim->SetTitle((const char*)qadm.fAliITSQADataMakerSim->GetTitle());\r
+  }\r
+\r
+//__________________________________________________________________\r
+AliITSQASPDDataMakerSim& AliITSQASPDDataMakerSim::operator = (const AliITSQASPDDataMakerSim& qac )\r
+{\r
+  // Equal operator.\r
+  this->~AliITSQASPDDataMakerSim();\r
+  new(this) AliITSQASPDDataMakerSim(qac);\r
+  return *this;\r
+}\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASPDDataMakerSim::StartOfDetectorCycle()\r
+{\r
+  //Detector specific actions at start of cycle\r
+  AliDebug(1,"AliITSQADM::Start of SPD Cycle\n");\r
+}\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASPDDataMakerSim::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
+  \r
+  //AliQAChecker::Instance()->Run( AliQA::kITS , task, list);\r
+}\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASPDDataMakerSim::InitDigits()\r
+{ \r
+  // Initialization for DIGIT data - SPD -\r
+  fDigitsOffset = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();\r
+\r
+  // custom code here\r
+\r
+  //fSPDhDigits must be incremented by one unit every time a histogram is ADDED to the QA List\r
+\r
+  AliDebug(1,Form("%d SPD Digits histograms booked\n",fSPDhDigits));\r
+\r
+}\r
+\r
+\r
+//____________________________________________________________________________\r
+void AliITSQASPDDataMakerSim::MakeDigits(TTree * /*digits*/)\r
+{ \r
+  // Fill QA for DIGIT - SPD -\r
+}\r
+\r
+\r
+\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASPDDataMakerSim::InitSDigits()\r
+{ \r
+  // Initialization for SDIGIT data - SPD -\r
+  fSDigitsOffset = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();\r
+\r
+  // custom code here\r
+\r
+  //fSPDhSDigits must be incremented by one unit every time a histogram is ADDED to the QA List\r
+\r
+  AliDebug(1,Form("%d SPD SDigits histograms booked\n",fSPDhSDigits));\r
+\r
+}\r
+\r
+\r
+//____________________________________________________________________________\r
+void AliITSQASPDDataMakerSim::MakeSDigits(TTree * /*sdigits*/)\r
+{ \r
+  // Fill QA for SDIGIT - SPD -\r
+}\r
+\r
+\r
+\r
+\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASPDDataMakerSim::InitHits()\r
+{ \r
+  // Initialization for HITS data - SPD -\r
+  fHitsOffset = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();\r
+\r
+  // custom code here\r
+\r
+  //fSPDhHits must be incremented by one unit every time a histogram is ADDED to the QA List\r
+\r
+  AliDebug(1,Form("%d SPD Hits histograms booked\n",fSPDhHits));\r
+\r
+}\r
+\r
+\r
+//____________________________________________________________________________\r
+void AliITSQASPDDataMakerSim::MakeHits(TTree * /*hits*/)\r
+{ \r
+  // Fill QA for HITS - SPD -\r
+}\r
diff --git a/ITS/AliITSQASPDDataMakerSim.h b/ITS/AliITSQASPDDataMakerSim.h
new file mode 100644 (file)
index 0000000..137079c
--- /dev/null
@@ -0,0 +1,60 @@
+#ifndef AliITSQASPDDataMakerSim_H\r
+#define AliITSQASPDDataMakerSim_H\r
+/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *\r
+ * See cxx source for full Copyright notice                               */\r
+\r
+\r
+//\r
+//  Checks the quality assurance. \r
+//  By comparing with reference data\r
+//  contained in a DB\r
+//\r
+//\r
+//  W. Ferrarese + P. Cerello Feb 2008\r
+\r
+/* $Id$ */\r
+\r
+#include "AliQA.h"\r
+class AliITSQADataMakerSim;\r
+class TObjArray;\r
+class TClonesArray;\r
+\r
+class AliITSQASPDDataMakerSim : public TObject {\r
+\r
+public:\r
+  AliITSQASPDDataMakerSim(AliITSQADataMakerSim *aliITSQADataMakerSim); //ctor\r
+  AliITSQASPDDataMakerSim(const AliITSQASPDDataMakerSim& qadm);\r
+  AliITSQASPDDataMakerSim& operator = (const AliITSQASPDDataMakerSim& qac);\r
+\r
+  virtual void StartOfDetectorCycle();\r
+  virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list);\r
+  virtual ~AliITSQASPDDataMakerSim() {;}   // dtor\r
+  virtual void InitDigits();\r
+  virtual void InitSDigits();\r
+  virtual void InitHits();\r
+  virtual void MakeDigits(TClonesArray * /*digits*/){;}\r
+  virtual void MakeSDigits(TClonesArray * /*sdigits*/){;}\r
+  virtual void MakeHits(TClonesArray * /*hits*/){;}\r
+  virtual void MakeDigits(TTree * digits);\r
+  virtual void MakeSDigits(TTree * sdigits);\r
+  virtual void MakeHits(TTree * hits);\r
+  const Int_t Digits() { return fSPDhDigits; }\r
+  const Int_t SDigits() { return fSPDhSDigits; }\r
+  const Int_t Hits() { return fSPDhHits; }\r
+\r
+private:\r
+\r
+  AliITSQADataMakerSim *fAliITSQADataMakerSim;//pointer to the main ctor\r
+  Int_t   fSPDhDigits;                        //number of booked SPD Digits histograms;\r
+  Int_t   fSPDhSDigits;                       //number of booked SPD SDigits histograms;\r
+  Int_t   fSPDhHits;                          //number of booked SPD Hits histograms;\r
+  Int_t   fDigitsOffset;                      // number of histo booked when SPD start\r
+  Int_t   fSDigitsOffset;                     // number of histo booked when SPD start\r
+  Int_t   fHitsOffset;                        // number of histo booked when SPD start\r
+  ClassDef(AliITSQASPDDataMakerSim,1)      // description \r
+\r
+};\r
+\r
+#endif\r
+\r
+\r
diff --git a/ITS/AliITSQASSDDataMakerSim.cxx b/ITS/AliITSQASSDDataMakerSim.cxx
new file mode 100644 (file)
index 0000000..d94635e
--- /dev/null
@@ -0,0 +1,163 @@
+/**************************************************************************\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
+\r
+// --- ROOT system ---\r
+#include <TTree.h>\r
+// --- Standard library ---\r
+\r
+// --- AliRoot header files ---\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
+fDigitsOffset(0),\r
+fSDigitsOffset(0),\r
+fHitsOffset(0)\r
+{\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
+fDigitsOffset(qadm.fDigitsOffset),\r
+fSDigitsOffset(qadm.fSDigitsOffset),\r
+fHitsOffset(qadm.fHitsOffset)\r
+{\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
+{\r
+  // Equal operator.\r
+  this->~AliITSQASSDDataMakerSim();\r
+  new(this) AliITSQASSDDataMakerSim(qac);\r
+  return *this;\r
+}\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASSDDataMakerSim::StartOfDetectorCycle()\r
+{\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
+{\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
+{ \r
+  // Initialization for DIGIT data - SSD -\r
+  fDigitsOffset = (fAliITSQADataMakerSim->fDigitsQAList)->GetEntries();\r
+\r
+  // custom code here\r
+\r
+  //fSSDhDigits must be incremented by one unit every time a histogram is ADDED to the QA List\r
+\r
+  AliDebug(1,Form("%d SSD Digits histograms booked\n",fSSDhDigits));\r
+\r
+}\r
+\r
+\r
+//____________________________________________________________________________\r
+void AliITSQASSDDataMakerSim::MakeDigits(TTree * /*digits*/)\r
+{ \r
+  // Fill QA for DIGIT - SSD -\r
+}\r
+\r
+\r
+\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASSDDataMakerSim::InitSDigits()\r
+{ \r
+  // Initialization for SDIGIT data - SSD -\r
+  fSDigitsOffset = (fAliITSQADataMakerSim->fSDigitsQAList)->GetEntries();\r
+\r
+  // custom code here\r
+\r
+  //fSSDhSDigits must be incremented by one unit every time a histogram is ADDED to the QA List\r
+\r
+  AliDebug(1,Form("%d SSD SDigits histograms booked\n",fSSDhSDigits));\r
+\r
+}\r
+\r
+\r
+//____________________________________________________________________________\r
+void AliITSQASSDDataMakerSim::MakeSDigits(TTree * /*sdigits*/)\r
+{ \r
+  // Fill QA for SDIGIT - SSD -\r
+}\r
+\r
+\r
+\r
+\r
+\r
+//____________________________________________________________________________ \r
+void AliITSQASSDDataMakerSim::InitHits()\r
+{ \r
+  // Initialization for HITS data - SSD -\r
+  fHitsOffset = (fAliITSQADataMakerSim->fHitsQAList)->GetEntries();\r
+\r
+  // custom code here\r
+\r
+  //fSSDhHits must be incremented by one unit every time a histogram is ADDED to the QA List\r
+\r
+  AliDebug(1,Form("%d SSD Hits histograms booked\n",fSSDhHits));\r
+\r
+}\r
+\r
+\r
+//____________________________________________________________________________\r
+void AliITSQASSDDataMakerSim::MakeHits(TTree * /*hits*/)\r
+{ \r
+  // Fill QA for HITS - SSD -\r
+}\r
diff --git a/ITS/AliITSQASSDDataMakerSim.h b/ITS/AliITSQASSDDataMakerSim.h
new file mode 100644 (file)
index 0000000..0728406
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef AliITSQASSDDataMakerSim_H\r
+#define AliITSQASSDDataMakerSim_H\r
+/* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *\r
+ * See cxx source for full Copyright notice                               */\r
+\r
+/* $Id$ */\r
+\r
+//\r
+//  Checks the quality assurance. \r
+//  By comparing with reference data\r
+//  contained in a DB\r
+//\r
+//\r
+//  W. Ferrarese + P. Cerello Feb 2008\r
+\r
+#include "AliQA.h"\r
+class AliITSQADataMakerSim;\r
+class TObjArray;\r
+class TClonesArray;\r
+\r
+class AliITSQASSDDataMakerSim : public TObject {\r
+\r
+public:\r
+  AliITSQASSDDataMakerSim(AliITSQADataMakerSim *aliITSQADataMakerSim); //ctor\r
+  AliITSQASSDDataMakerSim(const AliITSQASSDDataMakerSim& qadm);\r
+  AliITSQASSDDataMakerSim& operator = (const AliITSQASSDDataMakerSim& qac);\r
+\r
+  virtual void StartOfDetectorCycle();\r
+  virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list);\r
+  virtual ~AliITSQASSDDataMakerSim() {;}   // dtor\r
+  virtual void InitDigits();\r
+  virtual void InitSDigits();\r
+  virtual void InitHits();\r
+  virtual void MakeDigits(TClonesArray * /*digits*/){;}\r
+  virtual void MakeSDigits(TClonesArray * /*sdigits*/){;}\r
+  virtual void MakeHits (TClonesArray * /*hits*/){;}\r
+  virtual void MakeDigits(TTree * digits);\r
+  virtual void MakeSDigits(TTree * sdigits);\r
+  virtual void MakeHits(TTree * hits);\r
+  const Int_t Digits() { return fSSDhDigits; }\r
+  const Int_t SDigits() { return fSSDhSDigits; }\r
+  const Int_t Hits() { return fSSDhHits; }\r
+\r
+private:\r
+\r
+  AliITSQADataMakerSim *fAliITSQADataMakerSim;//pointer to the main ctor\r
+  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
+  ClassDef(AliITSQASSDDataMakerSim,1)      // description \r
+\r
+};\r
+\r
+#endif\r
+\r
+\r
index 1cd1909..3db40d3 100644 (file)
@@ -59,6 +59,9 @@
 
 #pragma link C++ class AliITSTrigger+;
 #pragma link C++ class AliITSQADataMakerSim+;
+#pragma link C++ class AliITSQASPDDataMakerSim+;
+#pragma link C++ class AliITSQASDDDataMakerSim+;
+#pragma link C++ class AliITSQASSDDataMakerSim+;
 
 
 
index 7981150..ff74be5 100644 (file)
@@ -37,7 +37,11 @@ SRCS =       AliITS.cxx \
                AliITSv11GeometrySPD.cxx \
                AliITSv11Hybrid.cxx \
                AliITSv11GeometrySupport.cxx \
-               AliITSQADataMakerSim.cxx 
+               AliITSQADataMakerSim.cxx \
+                AliITSQASPDDataMakerSim.cxx \
+                AliITSQASDDDataMakerSim.cxx \
+                AliITSQASSDDataMakerSim.cxx
 
 
 HDRS:=  $(SRCS:.cxx=.h)