introducing QA
authorcheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Mar 2008 16:07:28 +0000 (16:07 +0000)
committercheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Mar 2008 16:07:28 +0000 (16:07 +0000)
VZERO/AliVZEROQAChecker.cxx [new file with mode: 0644]
VZERO/AliVZEROQAChecker.h [new file with mode: 0644]
VZERO/AliVZEROQADataMakerRec.cxx [new file with mode: 0644]
VZERO/AliVZEROQADataMakerRec.h [new file with mode: 0644]
VZERO/AliVZEROQADataMakerSim.cxx [new file with mode: 0644]
VZERO/AliVZEROQADataMakerSim.h [new file with mode: 0644]
VZERO/VZEROrecLinkDef.h
VZERO/VZEROsimLinkDef.h
VZERO/libVZEROrec.pkg
VZERO/libVZEROsim.pkg

diff --git a/VZERO/AliVZEROQAChecker.cxx b/VZERO/AliVZEROQAChecker.cxx
new file mode 100644 (file)
index 0000000..68edaaa
--- /dev/null
@@ -0,0 +1,49 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, 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.                  *
+ **************************************************************************/
+
+
+/*
+  Checks the quality assurance. 
+  By comparing with reference data
+
+*/
+
+// --- ROOT system ---
+#include <TClass.h>
+#include <TH1F.h> 
+#include <TH1I.h> 
+#include <TIterator.h> 
+#include <TKey.h> 
+#include <TFile.h> 
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+#include "AliLog.h"
+#include "AliQA.h"
+#include "AliQAChecker.h"
+#include "AliVZEROQAChecker.h"
+
+ClassImp(AliVZEROQAChecker)
+
+//__________________________________________________________________
+AliVZEROQAChecker& AliVZEROQAChecker::operator = (const AliVZEROQAChecker& qac )
+{
+  // Equal operator.
+  this->~AliVZEROQAChecker();
+  new(this) AliVZEROQAChecker(qac);
+  return *this;
+}
+
diff --git a/VZERO/AliVZEROQAChecker.h b/VZERO/AliVZEROQAChecker.h
new file mode 100644 (file)
index 0000000..62e28c4
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef ALIVZEROQACHECKER_H
+#define ALIVZEROQACHECKER_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+
+/*
+  Checks the quality assurance. 
+  By comparing with reference data
+*/
+
+
+// --- ROOT system ---
+class TFile ; 
+class TH1F ; 
+class TH1I ; 
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+#include "AliQACheckerBase.h"
+
+class AliVZEROLoader ; 
+
+class AliVZEROQAChecker: public AliQACheckerBase {
+
+public:
+  AliVZEROQAChecker() : AliQACheckerBase("VZERO","VZERO Quality Assurance Data Maker") {;}          // ctor
+  AliVZEROQAChecker(const AliVZEROQAChecker& qac) : AliQACheckerBase(qac.GetName(), qac.GetTitle()) {;} // cpy ctor   
+  AliVZEROQAChecker& operator = (const AliVZEROQAChecker& qac) ;
+  virtual ~AliVZEROQAChecker() {;} // dtor
+
+private:
+  
+  ClassDef(AliVZEROQAChecker,1)  // description 
+
+};
+
+#endif // AliVZEROQAChecker_H
diff --git a/VZERO/AliVZEROQADataMakerRec.cxx b/VZERO/AliVZEROQADataMakerRec.cxx
new file mode 100644 (file)
index 0000000..c4bcf55
--- /dev/null
@@ -0,0 +1,248 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, 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.                  *
+ **************************************************************************/
+
+
+/*
+  Produces the data needed to calculate the quality assurance. 
+  All data must be mergeable objects.
+*/
+
+// --- ROOT system ---
+#include <TClonesArray.h>
+#include <TFile.h> 
+#include <TH1F.h> 
+#include <TH1I.h> 
+#include <TH2F.h> 
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+#include "AliESDEvent.h"
+#include "AliLog.h"
+#include "AliVZEROQADataMakerRec.h"
+#include "AliQAChecker.h"
+#include "AliVZERORawStream.h"
+#include "AliVZEROReconstructor.h"
+
+
+ClassImp(AliVZEROQADataMakerRec)
+           
+//____________________________________________________________________________ 
+  AliVZEROQADataMakerRec::AliVZEROQADataMakerRec() : 
+  AliQADataMakerRec(AliQA::GetDetName(AliQA::kVZERO), "VZERO Quality Assurance Data Maker")
+{
+  // constructor
+}
+
+//____________________________________________________________________________ 
+AliVZEROQADataMakerRec::AliVZEROQADataMakerRec(const AliVZEROQADataMakerRec& qadm) :
+  AliQADataMakerRec()
+{
+  //copy constructor 
+  SetName((const char*)qadm.GetName()) ; 
+  SetTitle((const char*)qadm.GetTitle()); 
+}
+
+//__________________________________________________________________
+AliVZEROQADataMakerRec& AliVZEROQADataMakerRec::operator = (const AliVZEROQADataMakerRec& qadm )
+{
+  // Equal operator
+  this->~AliVZEROQADataMakerRec();
+  new(this) AliVZEROQADataMakerRec(qadm);
+  return *this;
+}
+//____________________________________________________________________________ 
+void AliVZEROQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+{
+  //Detector specific actions at end of cycle
+  // do the QA checking
+  AliQAChecker::Instance()->Run(AliQA::kVZERO, task, list) ;  
+}
+
+//____________________________________________________________________________ 
+void AliVZEROQADataMakerRec::InitESDs()
+{
+  //Create histograms to controll ESD
+  TH1I * h1 = new TH1I("hVZERONbPMA", "Number of PMs fired in V0A", 100, 0, 99); 
+  h1->Sumw2() ;
+  Add2ESDsList(h1, 0)  ;                                                                                                        
+  TH1I * h2 = new TH1I("hVZERONbPMC", "Number of PMs fired in V0C", 100, 0, 99); 
+  h2->Sumw2() ;
+  Add2ESDsList(h2, 1) ;
+  TH1I * h3 = new TH1I("hVZEROMultA", "Multiplicity in V0A", 50, 0, 49) ; 
+  h3->Sumw2() ;
+  Add2ESDsList(h3, 2) ;
+  TH1I * h4 = new TH1I("hVZEROMultC", "Multiplicity in V0A", 50, 0, 49) ; 
+  h4->Sumw2() ;
+  Add2ESDsList(h4, 3) ;
+       
+}
+
+
+//____________________________________________________________________________ 
+// void AliVZEROQADataMakerRec::InitRaws()
+// {
+//   // create Raws histograms in Raws subdir
+//   TH2I * h0 = new TH2I("hHighVZEROxyMod1","High Gain Rows x Columns for VZERO module 1", 64, 0, 64, 56, 0, 56) ;
+//   Add2RawsList(h0,kHGmod1) ;
+//   TH2I * h1 = new TH2I("hHighVZEROxyMod2","High Gain Rows x Columns for VZERO module 2", 64, 0, 64, 56, 0, 56) ;
+//   Add2RawsList(h1,kHGmod2) ;
+//   TH2I * h2 = new TH2I("hHighVZEROxyMod3","High Gain Rows x Columns for VZERO module 3", 64, 0, 64, 56, 0, 56) ;
+//   Add2RawsList(h2,kHGmod3) ;
+//   TH2I * h3 = new TH2I("hHighVZEROxyMod4","High Gain Rows x Columns for VZERO module 4", 64, 0, 64, 56, 0, 56) ;
+//   Add2RawsList(h3,kHGmod4) ;
+//   TH2I * h4 = new TH2I("hHighVZEROxyMod5","High Gain Rows x Columns for VZERO module 5", 64, 0, 64, 56, 0, 56) ;
+//   Add2RawsList(h4,kHGmod5) ;
+//   TH2I * h5 = new TH2I("hLowVZEROxyMod1","Low Gain Rows x Columns for VZERO module 1", 64, 0, 64, 56, 0, 56) ;
+//   Add2RawsList(h5,kLGmod1) ;
+//   TH2I * h6 = new TH2I("hLowVZEROxyMod2","Low Gain Rows x Columns for VZERO module 2", 64, 0, 64, 56, 0, 56) ;
+//   Add2RawsList(h6,kLGmod2) ;
+//   TH2I * h7 = new TH2I("hLowVZEROxyMod3","Low Gain Rows x Columns for VZERO module 3", 64, 0, 64, 56, 0, 56) ;
+//   Add2RawsList(h7,kLGmod3) ;
+//   TH2I * h8 = new TH2I("hLowVZEROxyMod4","Low Gain Rows x Columns for VZERO module 4", 64, 0, 64, 56, 0, 56) ;
+//   Add2RawsList(h8,kLGmod4) ;                                                                                                               
+//   TH2I * h9 = new TH2I("hLowVZEROxyMod5","Low Gain Rows x Columns for VZERO module 5", 64, 0, 64, 56, 0, 56) ;                               
+//   Add2RawsList(h9,kLGmod5) ;                                                                                                               
+//                                                                                                                                            
+//                                                                                                                                            
+//   TH1I * h10 = new TH1I("hLowVZEROModules",    "Low Gain Hits in EMCA VZERO modules",       6, 0, 6) ;                                       
+//   h10->Sumw2() ;                                                                                                                           
+//   Add2RawsList(h10, kNmodLG) ;                                                                                                             
+//   TH1I * h11 = new TH1I("hHighVZEROModules",   "High Gain Hits in EMCA VZERO modules",       6, 0, 6) ;                                      
+//   h11->Sumw2() ;                                                                                                                           
+//   Add2RawsList(h11, kNmodHG) ;                                                                                                             
+//                                                                                                                                            
+//   TH1F * h12 = new TH1F("hLowVZERORawtime", "Low Gain Time of raw hits in VZERO", 500, -50., 200.) ;                                            
+//   h12->Sumw2() ;                                                                                                                           
+//   Add2RawsList(h12, kLGtime) ;                                                                                                             
+//   TH1F * h13 = new TH1F("hHighVZERORawtime", "High Gain Time of raw hits in VZERO", 500, -50., 200.) ;                                          
+//   h13->Sumw2() ;                                                                                                                           
+//   Add2RawsList(h13, kHGtime) ;                                                                                                             
+//                                                                                                                                            
+//   TH1F * h14 = new TH1F("hLowVZERORawEnergy", "Low Gain Energy of raw hits in VZERO", 500, 0., 1000.) ;                                      
+//   h14->Sumw2() ;                                                                                                                           
+//   Add2RawsList(h14, kSpecLG) ;                                                                                                             
+//   TH1F * h15 = new TH1F("hHighVZERORawEnergy", "High Gain Energy of raw hits in VZERO",500,0., 1000.) ;                                      
+//   h15->Sumw2() ;                                                                                                                           
+//   Add2RawsList(h15, kSpecHG) ;                                                                                                             
+//                                                                                                                                            
+//   TH1F * h16 = new TH1F("hLowNtot", "Low Gain Total Number of raw hits in VZERO", 500, 0., 5000.) ;                                         
+//   h16->Sumw2() ;                                                                                                                           
+//   Add2RawsList(h16, kNtotLG) ;                                                                                                             
+//   TH1F * h17 = new TH1F("hHighNtot", "High Gain Total Number of raw hits in VZERO",500,0., 5000.) ;                                         
+//   h17->Sumw2() ;                                                                                                                           
+//   Add2RawsList(h17, kNtotHG) ;                                                                                                             
+//                                                                                                                                            
+//   TH1F * h18 = new TH1F("hLowEtot", "Low Gain Total Energy of raw hits in VZERO", 500, 0., 5000.) ;                                       
+//   h18->Sumw2() ;                                                                                                                           
+//   Add2RawsList(h18, kEtotLG) ;                                                                                                             
+//   TH1F * h19 = new TH1F("hHighEtot", "High Gain Total Energy of raw hits in VZERO",500,0., 100000.) ;                                       
+//   h19->Sumw2() ;                                                                                                                           
+//   Add2RawsList(h19, kEtotHG) ;                                                                                                             
+//   
+// }
+
+//____________________________________________________________________________
+void AliVZEROQADataMakerRec::MakeESDs(AliESDEvent * esd)
+{
+  // make QA data from ESDs
+
+
+  AliESDVZERO *esdVZERO=esd->GetVZEROData();
+   
+  if (esdVZERO) { 
+    GetESDsData(0)->Fill(esdVZERO->GetNbPMV0A());
+    GetESDsData(1)->Fill(esdVZERO->GetNbPMV0C());  
+    GetESDsData(2)->Fill(esdVZERO->GetMTotV0A());
+    GetESDsData(3)->Fill(esdVZERO->GetMTotV0C());  
+  }
+
+}
+
+//____________________________________________________________________________
+// void AliVZEROQADataMakerRec::MakeRaws(AliRawReader* rawReader)
+// {
+//   //Fill prepared histograms with Raw digit properties
+//   rawReader->Reset() ;
+//   AliVZERORawDecoder * decoder ;
+//   if(strcmp(AliVZEROReconstructor::GetRecoParamEmc()->DecoderVersion(),"v1")==0)
+//     decoder=new AliVZERORawDecoderv1(rawReader);
+//   else
+//     if(strcmp(AliVZEROReconstructor::GetRecoParamEmc()->DecoderVersion(),"v2")==0)
+//       decoder=new AliVZERORawDecoderv2(rawReader);
+//     else
+//       decoder=new AliVZERORawDecoder(rawReader);
+//   decoder->SetOldRCUFormat  (AliVZEROReconstructor::GetRecoParamEmc()->IsOldRCUFormat());
+//   decoder->SubtractPedestals(AliVZEROReconstructor::GetRecoParamEmc()->SubtractPedestals());
+//   Double_t lgEtot=0. ;
+//   Double_t hgEtot=0. ;
+//   Int_t lgNtot=0 ;
+//   Int_t hgNtot=0 ;
+// 
+//   while (decoder->NextDigit()) {
+//    Int_t module  = decoder->GetModule() ;
+//    Int_t row     = decoder->GetRow() ;
+//    Int_t col     = decoder->GetColumn() ;
+//    Double_t time = decoder->GetTime() ;
+//    Double_t energy  = decoder->GetEnergy() ;
+//    Bool_t lowGain = decoder->IsLowGain();
+//    if (lowGain) {
+//      if(energy<2.)
+//        continue ;
+//      switch(module){
+//         case 1: GetRawsData(kLGmod1)->Fill(row-0.5,col-0.5) ; break ;
+//         case 2: GetRawsData(kLGmod2)->Fill(row-0.5,col-0.5) ; break ;
+//         case 3: GetRawsData(kLGmod3)->Fill(row-0.5,col-0.5) ; break ;
+//         case 4: GetRawsData(kLGmod4)->Fill(row-0.5,col-0.5) ; break ;
+//         case 5: GetRawsData(kLGmod5)->Fill(row-0.5,col-0.5) ; break ;
+//      }                                  
+//      GetRawsData(kNmodLG)->Fill(module) ;
+//      GetRawsData(kLGtime)->Fill(time) ; 
+//      GetRawsData(kSpecLG)->Fill(energy) ;    
+//      lgEtot+=energy ;
+//      lgNtot++ ;   
+//    } else {        
+//      if(energy<8.)
+//        continue ;
+//      switch (module){
+//          case 1: GetRawsData(kHGmod1)->Fill(row-0.5,col-0.5) ; break ;
+//          case 2: GetRawsData(kHGmod2)->Fill(row-0.5,col-0.5) ; break ;
+//          case 3: GetRawsData(kHGmod3)->Fill(row-0.5,col-0.5) ; break ;
+//          case 4: GetRawsData(kHGmod4)->Fill(row-0.5,col-0.5) ; break ;
+//          case 5: GetRawsData(kHGmod5)->Fill(row-0.5,col-0.5) ; break ;
+//      }              
+//      GetRawsData(kNmodHG)->Fill(module) ; 
+//      GetRawsData(kHGtime)->Fill(time) ;  
+//      GetRawsData(kSpecHG)->Fill(energy) ;
+//      hgEtot+=energy ; 
+//      hgNtot++ ;  
+//    }                 
+//   }                    
+//   GetRawsData(kEtotLG)->Fill(lgEtot) ; 
+//   GetRawsData(kEtotHG)->Fill(hgEtot) ;  
+//   GetRawsData(kNtotLG)->Fill(lgNtot) ;
+//   GetRawsData(kNtotHG)->Fill(hgNtot) ;
+// }
+
+//____________________________________________________________________________ 
+void AliVZEROQADataMakerRec::StartOfDetectorCycle()
+{
+  // Detector specific actions at start of cycle
+  
+}
diff --git a/VZERO/AliVZEROQADataMakerRec.h b/VZERO/AliVZEROQADataMakerRec.h
new file mode 100644 (file)
index 0000000..6bdc5bf
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef ALIVZEROQADataMakerRec_H
+#define ALIVZEROQADataMakerRec_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/*
+  Produces the data needed to calculate the quality assurance. 
+  All data must be mergeable objects.
+*/
+
+
+// --- ROOT system ---
+class TH1F ; 
+class TH1I ; 
+class TObjArray ; 
+
+// --- Standard library ---
+
+// --- AliRoot header files ---
+#include "AliQADataMakerRec.h"
+
+
+class AliVZEROQADataMakerRec: public AliQADataMakerRec {
+
+public:
+  AliVZEROQADataMakerRec() ;           // constructor
+  AliVZEROQADataMakerRec(const AliVZEROQADataMakerRec& qadm) ;   
+  AliVZEROQADataMakerRec& operator = (const AliVZEROQADataMakerRec& qadm) ;
+  virtual ~AliVZEROQADataMakerRec() {;} // destructor
+  
+private:
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
+  virtual void   InitESDs() ; 
+//  virtual void   InitRaws() ; 
+  virtual void   MakeESDs(AliESDEvent * esd) ;
+//  virtual void   MakeRaws(AliRawReader* rawReader) ; 
+  virtual void   StartOfDetectorCycle() ; 
+
+  ClassDef(AliVZEROQADataMakerRec,1)  // description 
+
+};
+
+#endif // AliVZEROQADataMakerRec_H
diff --git a/VZERO/AliVZEROQADataMakerSim.cxx b/VZERO/AliVZEROQADataMakerSim.cxx
new file mode 100644 (file)
index 0000000..20493f8
--- /dev/null
@@ -0,0 +1,245 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, 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: AliVZEROQADataMakerSim.cxx 23123 2007-12-18 09:08:18Z hristov $ */
+
+//---
+//  Produces the data needed to calculate the quality assurance. 
+//  All data must be mergeable objects.
+//  Author : BC
+//---
+
+// --- ROOT system ---
+#include <TClonesArray.h>
+#include <TFile.h> 
+#include <TH1F.h> 
+#include <TDirectory.h>
+// --- Standard library ---
+
+// --- AliRoot header files ---
+#include "AliESDEvent.h"
+#include "AliLog.h"
+#include "AliVZEROdigit.h" 
+#include "AliVZEROhit.h"
+#include "AliVZEROQADataMakerSim.h"
+#include "AliQAChecker.h"
+
+ClassImp(AliVZEROQADataMakerSim)
+           
+//____________________________________________________________________________ 
+  AliVZEROQADataMakerSim::AliVZEROQADataMakerSim() : 
+  AliQADataMakerSim(AliQA::GetDetName(AliQA::kVZERO), "VZERO Quality Assurance Data Maker")
+
+{
+  // constructor
+
+  
+}
+
+//____________________________________________________________________________ 
+AliVZEROQADataMakerSim::AliVZEROQADataMakerSim(const AliVZEROQADataMakerSim& qadm) :
+  AliQADataMakerSim() 
+{
+  //copy constructor 
+
+  SetName((const char*)qadm.GetName()) ; 
+  SetTitle((const char*)qadm.GetTitle()); 
+}
+
+//__________________________________________________________________
+AliVZEROQADataMakerSim& AliVZEROQADataMakerSim::operator = (const AliVZEROQADataMakerSim& qadm )
+{
+  // Assign operator.
+  this->~AliVZEROQADataMakerSim();
+  new(this) AliVZEROQADataMakerSim(qadm);
+  return *this;
+}
+//____________________________________________________________________________
+void AliVZEROQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+{
+  //Detector specific actions at end of cycle
+  // do the QA checking
+  AliQAChecker::Instance()->Run(AliQA::kVZERO, task, list) ;
+}
+
+//____________________________________________________________________________ 
+void AliVZEROQADataMakerSim::InitHits()
+{
+  // create Hits histograms in Hits subdir
+  char  timename[10];
+  char  chargename[12];
+  TH1F  *fhHitTime[72];
+  TH1F  *fhHitCharge[72];
+  char  texte[25];
+  // create Hits histograms in Hits subdir
+  TH1F * h0 = new TH1F("hHitMultiplicity", "Hits multiplicity distribution in VZERO", 300, 0., 299.) ; 
+  h0->Sumw2() ;
+  Add2HitsList(h0, 0) ;  
+    
+  for (Int_t i=0; i<72; i++)
+    {
+       sprintf(timename,"hHitTime%d",i);
+       sprintf(texte,"Hit Time in VZERO cell %d",i);    
+       fhHitTime[i] = new TH1F(timename,texte,300,0.,149.);
+       
+       sprintf(chargename,"hHitCharge%d",i);
+       sprintf(texte,"Hit Charge in VZERO cell %d",i);
+       fhHitCharge[i]= new TH1F(chargename,texte,1024,0.,1023.);
+       
+       Add2HitsList( fhHitTime[i],i+1);
+       Add2HitsList( fhHitCharge[i],i+1+72);
+    }
+
+}
+
+//____________________________________________________________________________ 
+void AliVZEROQADataMakerSim::InitDigits()
+{
+  // create Digits histograms in Digits subdir
+
+  
+  char TDCname[10];
+  char ADCname[12];
+  TH1F *fhDigTDC[64]; 
+  TH1F *fhDigADC[64]; 
+  char texte[30];
+
+  // create Digits histograms in Digits subdir
+  TH1I * h0 = new TH1I("hDigitMultiplicity", "Digits multiplicity distribution in VZERO", 100, 0., 99.) ; 
+  h0->Sumw2() ;
+  Add2DigitsList(h0, 0) ;
+  
+  for (Int_t i=0; i<64; i++)
+    {
+       sprintf(TDCname, "hDigitTDC%d", i);
+       sprintf(texte,"Digit TDC in cell %d",i);    
+       fhDigTDC[i] = new TH1F(TDCname,texte,300,0.,149.);
+       
+       sprintf(ADCname,"hDigitADC%d",i);
+       sprintf(texte,"Digit ADC in cell %d",i);
+       fhDigADC[i]= new TH1F(ADCname,texte,1024,0.,1023.);
+       
+       Add2DigitsList(fhDigTDC[i],i+1);
+       Add2DigitsList(fhDigADC[i],i+1+64);  
+     }  
+}
+
+
+//____________________________________________________________________________
+void AliVZEROQADataMakerSim::MakeHits(TClonesArray * hits)
+{
+       //make QA data from Hits
+
+    GetHitsData(0)->Fill(hits->GetEntriesFast()) ;    // fills Hit multiplicity
+    Int_t nhits = hits->GetEntriesFast();
+    for (Int_t ihit=0;ihit<nhits;ihit++) 
+       {
+          AliVZEROhit  * VZEROHit   = (AliVZEROhit*) hits->UncheckedAt(ihit);
+          if (!VZEROHit) {
+             AliError("The unchecked hit doesn't exist");
+             break;
+          }
+          Int_t cell = VZEROHit->Cell();
+          GetHitsData(cell+1)->Fill(VZEROHit->Tof());
+          GetHitsData(cell+1+72)->Fill(VZEROHit->Charge());
+       }
+}
+
+
+//____________________________________________________________________________
+
+void AliVZEROQADataMakerSim::MakeHits(TTree *hitTree)
+{
+  //fills QA histos for Hits
+  TClonesArray * hits = new TClonesArray("AliVZEROhit", 1000);
+  
+  TBranch * branch = hitTree->GetBranch("VZERO") ;
+  if ( ! branch ) {
+    AliWarning("VZERO branch in Hit Tree not found") ;
+  } else {
+
+   if (branch) {
+      branch->SetAddress(&hits);
+    }else{
+      AliError("Branch VZERO hit not found");
+      exit(111);
+    } 
+    Int_t ntracks    = (Int_t) hitTree->GetEntries();
+    
+    if (ntracks<=0) return;
+    // Start loop on tracks in the hits containers
+    for (Int_t track=0; track<ntracks;track++) {
+      branch->GetEntry(track);
+      GetHitsData(0)->Fill(hits->GetEntriesFast()) ;    // fills Hit multiplicity
+      Int_t nhits = hits->GetEntriesFast();
+      for (Int_t ihit=0;ihit<nhits;ihit++) 
+       {
+         AliVZEROhit  * VZEROHit   = (AliVZEROhit*) hits->UncheckedAt(ihit);
+         if (!VZEROHit) {
+           AliError("The unchecked hit doesn't exist");
+           break;
+         }
+         Int_t cell = VZEROHit->Cell();
+         GetHitsData(cell+1)->Fill(VZEROHit->Tof());
+         GetHitsData(cell+1+72)->Fill(VZEROHit->Charge());
+       }
+    }
+  }
+}
+
+
+//____________________________________________________________________________
+void AliVZEROQADataMakerSim::MakeDigits(TClonesArray * digits)
+{
+  // makes data from Digits
+
+    GetDigitsData(0)->Fill(digits->GetEntriesFast()) ; 
+    TIter next(digits) ; 
+    AliVZEROdigit *VZERODigit ; 
+    while ( (VZERODigit = dynamic_cast<AliVZEROdigit *>(next())) ) {
+         Int_t   PMNumber  = VZERODigit->PMNumber();         
+         GetDigitsData(PMNumber +1)->Fill( VZERODigit->Time()) ;    // in 100 of picoseconds
+        GetDigitsData(PMNumber +1+64)->Fill( VZERODigit->ADC()) ;
+    }  
+}
+
+
+//____________________________________________________________________________
+void AliVZEROQADataMakerSim::MakeDigits(TTree *digitTree)
+{
+    // makes data from Digit Tree
+       
+    TClonesArray * digits = new TClonesArray("AliVZERODigit", 1000) ; 
+
+    TBranch * branch = digitTree->GetBranch("VZERO") ;
+    if ( ! branch ) {
+         AliWarning("VZERO branch in Digit Tree not found") ; 
+    } else {
+         branch->SetAddress(&digits) ;
+         branch->GetEntry(0) ; 
+         MakeDigits(digits) ; 
+    }  
+}
+
+
+//____________________________________________________________________________
+void AliVZEROQADataMakerSim::StartOfDetectorCycle()
+{
+  //Detector specific actions at start of cycle
+
+}
diff --git a/VZERO/AliVZEROQADataMakerSim.h b/VZERO/AliVZEROQADataMakerSim.h
new file mode 100644 (file)
index 0000000..6b106cd
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef ALIVZEROQADATAMAKERSIM_H
+#define ALIVZEROQADATAMAKERSIM_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
+ * reserved. 
+ *
+ * See cxx source for full Copyright notice                               
+ */
+
+#include "AliQADataMakerSim.h"
+
+class TH1F ; 
+class TH1I ; 
+class TList ; 
+
+//_____________________________________________________________________
+//
+// This class implements the AliQADataMakerSim for the VZERO. Some
+// functions are not implemented yet.
+// Author : BC
+//_____________________________________________________________________
+
+
+
+class AliVZEROQADataMakerSim: public AliQADataMakerSim {
+
+ public:
+  AliVZEROQADataMakerSim() ;          // ctor
+  AliVZEROQADataMakerSim(const AliVZEROQADataMakerSim& qadm) ; 
+  AliVZEROQADataMakerSim& operator = (const AliVZEROQADataMakerSim& qadm) ;  
+  virtual ~AliVZEROQADataMakerSim() {} // dtor
+  
+ private:
+  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list);
+  virtual void   InitHits(); 
+  virtual void   InitDigits();  
+  virtual void   MakeHits(TClonesArray* hits) ;
+  virtual void   MakeHits(TTree* hitTree) ;
+  virtual void   MakeDigits(TClonesArray* digits) ; 
+  virtual void   MakeDigits(TTree* digitTree) ; 
+  virtual void   StartOfDetectorCycle() ; 
+  
+  ClassDef(AliVZEROQADataMakerSim,0)  // description 
+    };
+
+#endif // AliVZEROQADataMakerSim_H
+//____________________________________________________________________
+//
+// Local Variables: 
+//  mode: c++
+// End:
+//
index bf4f02b..63da01f 100755 (executable)
@@ -8,5 +8,6 @@
  
 #pragma link C++ class  AliVZEROReconstructor+;
 #pragma link C++ class  AliVZERORawStream+;
+#pragma link C++ class  AliVZEROQADataMakerRec+;
 
 #endif
index a460cbc..5b58506 100755 (executable)
@@ -17,5 +17,6 @@
 #pragma link C++ class  AliVZERODigitizer+;
 #pragma link C++ class  AliVZEROBuffer+;
 #pragma link C++ class  AliVZEROTrigger+;
+#pragma link C++ class  AliVZEROQADataMakerSim+;
 
 #endif
index dc1010b..d813cce 100644 (file)
@@ -2,7 +2,8 @@
 # $Id$
 
 SRCS= AliVZEROReconstructor.cxx \
-      AliVZERORawStream.cxx
+      AliVZERORawStream.cxx \
+      AliVZEROQADataMakerRec.cxx
 
 HDRS:= $(SRCS:.cxx=.h)
 
@@ -10,9 +11,3 @@ DHDR:=VZEROrecLinkDef.h
 
 EINCLUDE:= STRUCT STEER RAW
 
-ifeq (win32gcc,$(ALICE_TARGET))
-PACKSOFLAGS:= $(SOFLAGS) -L$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET) \
-                         -lVZERObase -lSTEER -lCDB -lESD -lSTEERBase \
-                         -lRAWDatarec -lRAWDatabase
-endif
-
index 1430858..43bab21 100644 (file)
@@ -12,7 +12,8 @@ AliVZEROv7.cxx \
 AliVZEROhit.cxx \
 AliVZERODigitizer.cxx \
 AliVZEROBuffer.cxx \
-AliVZEROTrigger.cxx
+AliVZEROTrigger.cxx \
+AliVZEROQADataMakerSim.cxx
 
 HDRS:= $(SRCS:.cxx=.h)
 
@@ -20,10 +21,3 @@ DHDR:=VZEROsimLinkDef.h
 
 EINCLUDE:= STRUCT STEER RAW
 
-ifeq (win32gcc,$(ALICE_TARGET))
-PACKSOFLAGS:= $(SOFLAGS) -L$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET) \
-                         -lVZERObase -lVZEROrec -lSTEER -lCDB -lSTEERBase \
-                         -lRAWDatabase \
-                         -L$(shell root-config --libdir) -lVMC -lGeom
-endif
-