ESD and RAW QA revisited for DQM
authorcheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 23 Oct 2008 15:05:49 +0000 (15:05 +0000)
committercheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 23 Oct 2008 15:05:49 +0000 (15:05 +0000)
VZERO/AliVZEROQADataMakerRec.cxx
VZERO/AliVZEROQADataMakerRec.h

index dc32bc8..9c384ac 100644 (file)
@@ -25,6 +25,8 @@
 #include <TH1F.h> 
 #include <TH1I.h> 
 #include <TH2I.h> 
+#include <TH2D.h> 
+#include <TGraph.h> 
 #include <TParameter.h>
 
 // --- Standard library ---
 #include "AliRawReader.h"
 #include "AliVZERORawStream.h"
 #include "AliVZEROReconstructor.h"
+#include "event.h"
 
 
 ClassImp(AliVZEROQADataMakerRec)
            
 //____________________________________________________________________________ 
   AliVZEROQADataMakerRec::AliVZEROQADataMakerRec() : 
-    AliQADataMakerRec(AliQA::GetDetName(AliQA::kVZERO), "VZERO Quality Assurance Data Maker"),
-    fCalibData(GetCalibData()),
+       AliQADataMakerRec(AliQA::GetDetName(AliQA::kVZERO), "VZERO Quality Assurance Data Maker"),
+       fCalibData(0x0),
     fEvent(0)
     
 {
+               AliInfo("Construct VZERO QA Object");
   // constructor
   
    for(Int_t i=0; i<64; i++){  
@@ -64,7 +68,7 @@ ClassImp(AliVZEROQADataMakerRec)
 //____________________________________________________________________________ 
   AliVZEROQADataMakerRec::AliVZEROQADataMakerRec(const AliVZEROQADataMakerRec& qadm) :
   AliQADataMakerRec(),
-    fCalibData(GetCalibData()),
+       fCalibData(0x0),
     fEvent(0)
   
 {
@@ -87,10 +91,12 @@ AliVZEROCalibData* AliVZEROQADataMakerRec::GetCalibData() const
 
 {
   AliCDBManager *man = AliCDBManager::Instance();
+  
+  //man->SetDefaultStorage("local://$ALICE_ROOT");
 
   AliCDBEntry *entry=0;
-
-  entry = man->Get("VZERO/Calib/Data");
+  
+  entry = man->Get("VZERO/Calib/Data",fRun);
 
   // Retrieval of data in directory VZERO/Calib/Data:
 
@@ -108,136 +114,361 @@ void AliVZEROQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArr
   //Detector specific actions at end of cycle
   // do the QA checking
   AliQAChecker::Instance()->Run(AliQA::kVZERO, task, list) ;
+  
+  if(task == AliQA::kRAWS){
+         int NMaxBin = GetRawsData(kPedestal_Time_Int0)->GetNbinsY();
+         if(fCurrentCycle%NMaxBin==0) {
+               GetRawsData(kPedestal_Time_Int0)->Reset();
+               GetRawsData(kPedestal_Time_Int1)->Reset();
+               GetRawsData(kChargeEoI_Time_Int0)->Reset();
+               GetRawsData(kChargeEoI_Time_Int1)->Reset();
+         }
+         TH1D* hProj;
+         char Name[50];
+         for(size_t iChannel=0; iChannel<64; iChannel++) {
+               for(size_t integrator=0;integrator<2;integrator++){
+                       sprintf(Name,"Ped_%d_%d",iChannel,integrator);
+                       hProj = ((TH2I*)GetRawsData((integrator == 0 ? kPedestal_Cycle_Int0 : kPedestal_Cycle_Int1)))->ProjectionY(Name,iChannel+1,iChannel+1);
+                       ((TH2D*)GetRawsData((integrator == 0 ? kPedestal_Time_Int0 : kPedestal_Time_Int1)))->Fill((double)iChannel,(double)(fCurrentCycle%NMaxBin),(double)hProj->GetMean());
+                       delete hProj;
+
+                       sprintf(Name,"Charge_%d_%d",iChannel,integrator);
+                       hProj = ((TH2I*)GetRawsData((integrator == 0 ? kChargeEoI_Cycle_Int0 : kChargeEoI_Cycle_Int1)))->ProjectionY(Name,iChannel+1,iChannel+1);
+                       ((TH2D*)GetRawsData((integrator == 0 ? kChargeEoI_Time_Int0 : kChargeEoI_Time_Int1)))->Fill((double)iChannel,(double)(fCurrentCycle%NMaxBin),hProj->GetMean());
+                       delete hProj;
+               }
+         }
+  } else if (task == AliQA::kESDS) {
+  }
+  
 }
 
 //____________________________________________________________________________ 
 void AliVZEROQADataMakerRec::InitESDs()
 {
   //Create histograms to control ESD
-  TH1I * h1 = new TH1I("hVZERONbPMA", "Number of PMs fired in V0A", 80, 0, 80); 
-  h1->Sumw2() ;
-  Add2ESDsList(h1, 0)  ;  
+       Bool_t expert   = kTRUE ; 
+       
+       TH2D * h2d;
+       TH1I * h1i;
+       TH1D * h1d;
+               
+  h1i = new TH1I("H1I_Cell_Multiplicity_V0A", "Cell Multiplicity in V0A", 35, 0, 35) ;  
+  Add2ESDsList(h1i, kCellMultiV0A, !expert)  ;  
+  h1i->GetXaxis()->SetTitle("Multiplicity (Nb of Cell)");
                                                                                                         
-  TH1I * h2 = new TH1I("hVZERONbPMC", "Number of PMs fired in V0C", 80, 0, 80); 
-  h2->Sumw2() ;
-  Add2ESDsList(h2, 1) ;
-  TH1I * h3 = new TH1I("hVZEROMultA", "Multiplicity in V0A", 50, 0, 50) ; 
-  h3->Sumw2() ;
-  Add2ESDsList(h3, 2) ;
-  TH1I * h4 = new TH1I("hVZEROMultC", "Multiplicity in V0C", 50, 0, 50) ; 
-  h4->Sumw2() ;
-  Add2ESDsList(h4, 3) ;
-
-  TH2F * h5 = new TH2F("fVzeroMult", "Vzero multiplicity",
-                        64, -0.5, 63.5,1000, -0.5, 99.5);
-  h5->GetXaxis()->SetTitle("Vzero PMT");
-  h5->GetYaxis()->SetTitle("Multiplicity");
-  h5->Sumw2() ;
-  Add2ESDsList(h5, 4) ;
-  TH1F * h6 = new TH1F("fBBA","BB Vzero A", 32, -0.5,31.5);
-  h6->Sumw2();
-  Add2ESDsList(h6, 5) ;
-  TH1F * h7 = new TH1F("fBGA","BG Vzero A", 32, -0.5,31.5);
-  h7->Sumw2();
-  Add2ESDsList(h7, 6) ;
-  TH1F * h8 = new TH1F("fBBC","BB Vzero C", 32, -0.5,31.5);
-  h8->Sumw2();
-  Add2ESDsList(h8, 7) ;
-  TH1F * h9 = new TH1F("fBGC","BG Vzero C", 32, -0.5,31.5);
-  h9->Sumw2();
-  Add2ESDsList(h9, 8) ;
-
-  TH2F *h10 = new TH2F("fVzeroAdc", "Vzero Adc",
-                        64, -0.5, 63.5,1024, -0.5, 1023.5);
-  h10->GetXaxis()->SetTitle("Vzero PMT");
-  h10->GetYaxis()->SetTitle("Adc counts");
-  h10->Sumw2() ;
-  Add2ESDsList(h10, 9);
-
-  TH2F *h11 = new TH2F("fVzeroTime", "Vzero Time",
-                        64, -0.5, 63.5,300, -0.5, 149.5);
-  h11->GetXaxis()->SetTitle("Vzero PMT");
-  h11->GetYaxis()->SetTitle("Time [100 ps]");
-  h11->Sumw2() ;
-  Add2ESDsList(h11,10);
+  h1i = new TH1I("H1I_Cell_Multiplicity_V0C", "Cell Multiplicity in V0C", 35, 0, 35) ;  
+  Add2ESDsList(h1i, kCellMultiV0C, !expert)  ;  
+  h1i->GetXaxis()->SetTitle("Multiplicity (Nb of Cell)");
+   
+  h1d = new TH1D("H1D_MIP_Multiplicity_V0A", "MIP Multiplicity in V0A", 1000, 0, 1000) ;  
+  Add2ESDsList(h1d, kMIPMultiV0A, !expert)  ;  
+  h1d->GetXaxis()->SetTitle("Multiplicity (Nb of MIP)");
+  
+  h1d = new TH1D("H1D_MIP_Multiplicity_V0C", "MIP Multiplicity in V0C", 1000, 0, 1000) ;  
+  Add2ESDsList(h1d, kMIPMultiV0C, !expert)  ;  
+  h1d->GetXaxis()->SetTitle("Multiplicity (Nb of MIP)");
 
+  h2d = new TH2D("H2D_MIP_Multiplicity_Channel", "MIP Multiplicity per Channel",64, 0, 64, 100, 0, 100) ;  
+  h2d->GetXaxis()->SetTitle("Channel");
+  h2d->GetYaxis()->SetTitle("Multiplicity (Nb of MIP)");
+  Add2ESDsList(h2d, kMIPMultiChannel, !expert)  ;  
+  
+  h1d = new TH1D("H1D_BBFlag_Counters", "BB Flag Counters",64, 0, 64) ;  
+  h1d->GetXaxis()->SetTitle("Channel");
+  Add2ESDsList(h1d, kBBFlag, !expert)  ;  
+  
+  h1d = new TH1D("H1D_BGFlag_Counters", "BG Flag Counters",64, 0, 64) ;  
+  h1d->GetXaxis()->SetTitle("Channel");
+  Add2ESDsList(h1d, kBGFlag, !expert)  ;  
+  
+  h2d = new TH2D("H2D_Charge_Channel", "ADC Charge per channel",64, 0, 64, 1024, 0, 1024) ;  
+  h2d->GetXaxis()->SetTitle("Channel");
+  h2d->GetYaxis()->SetTitle("Charge (ADC counts)");
+  Add2ESDsList(h2d, kChargeChannel, !expert)  ;  
+  
+  h2d = new TH2D("H2D_Time_Channel", "Time per channel",64, 0, 64, 820, 0, 410) ;  
+  h2d->GetXaxis()->SetTitle("Channel");
+  h2d->GetYaxis()->SetTitle("Time (ns)");
+  Add2ESDsList(h2d, kTimeChannel, !expert)  ;  
+  
+  h1d = new TH1D("H1D_V0A_Time", "Mean V0A Time",2048, 0., 409.6);
+  h1d->GetXaxis()->SetTitle("Time (ns)");
+  Add2ESDsList(h1d,kESDV0ATime, !expert); 
+  
+  h1d = new TH1D("H1D_V0C_Time", "Mean V0C Time",2048, 0., 409.6);
+  h1d->GetXaxis()->SetTitle("Time (ns)");
+  Add2ESDsList(h1d,kESDV0CTime, !expert); 
+  
+  h1d = new TH1D("H1D_Diff_Time", "Diff Time V0A - V0C",2*2048, -409.6, 409.6);
+  h1d->GetXaxis()->SetTitle("Diff Time V0A - V0C (ns)");
+  Add2ESDsList(h1d,kESDDiffTime, !expert); 
+       
 }
 
 //____________________________________________________________________________ 
  void AliVZEROQADataMakerRec::InitRaws()
  {
    // create Raws histograms in Raws subdir
+        fCalibData = GetCalibData();
 
-  char ADCname[12]; 
-  char texte[40]; 
-  TH1I *hRawADC0[64]; 
-  TH1I *hRawADC1[64];
-  
   Bool_t expert   = kTRUE ; 
   Bool_t saveCorr = kTRUE ; 
+
+ char Name[50] , Title[100];
+ const size_t kNintegrator  =    2;
+ const Int_t kNTdcTimeBins  = 2048;
+ const Int_t kTdcTimeMin    =    0;
+ const Int_t kTdcTimeMax    = 4096;
+ const Int_t kNTdcWidthBins =  128;
+ const Int_t kTdcWidthMin   =    0;
+ const Int_t kTdcWidthMax   =  128;
+ const Int_t kNChargeBins   = 1024;
+ const Int_t kChargeMin     =    0;
+ const Int_t kChargeMax     = 1024;
+ const Int_t kNChannelBins  =   64;
+ const Int_t kChannelMin    =    0;
+ const Int_t kChannelMax       =   64;
+ const Int_t kNPedestalBins =  200;
+ const Int_t kPedestalMin   =    0;
+ const Int_t kPedestalMax   =  200;
+ const Int_t kTimeMin =   0;
+ const Int_t kTimeMax = 100;
+ const Int_t kNMIPBins = 200;
+ const Int_t kMIPMin   =   0;
+ const Int_t kMIPMax   = 200;
+
+
+ TH2I * h2i;
+ TH2D * h2d;
+ TH1I * h1i;
+ TH1D * h1d;
+
+ int iHisto =0;
+  // Creation Cell Multiplicity Histograms
+  h1i = new TH1I("H1I_Multiplicity_V0A", "Cell Multiplicity in V0A", 35, 0, 35) ;  
+  Add2RawsList(h1i,kMultiV0A, !expert, saveCorr);   iHisto++;
+  h1i = new TH1I("H1I_Multiplicity_V0C", "Cell Multiplicity in V0C", 35, 0, 35) ;  
+  Add2RawsList(h1i,kMultiV0C, !expert, saveCorr);   iHisto++;
+  // Creation Total Charge Histograms
+  h1d = new TH1D("H1D_Charge_V0A", "Total Charge in V0A", 2048, 0, 32768) ;  
+  Add2RawsList(h1d,kChargeV0A, !expert, saveCorr);   iHisto++;
+  h1d = new TH1D("H1D_Charge_V0C", "Total Charge in V0C", 2048, 0, 32768) ;  
+  Add2RawsList(h1d,kChargeV0C, !expert, saveCorr);   iHisto++;
+  h1d = new TH1D("H1D_Charge_V0", "Total Charge in V0", 2048, 0, 65536) ;  
+  Add2RawsList(h1d,kChargeV0, !expert, saveCorr);   iHisto++;
+  
+  // Creation of MIP Histograms
+  h1d = new TH1D("H1D_MIP_V0A", "Total MIP in V0A", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ;  
+  Add2RawsList(h1d,kRawMIPV0A, !expert, saveCorr);   iHisto++;
+  h1d = new TH1D("H1D_MIP_V0C", "Total MIP in V0C", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ;  
+  Add2RawsList(h1d,kRawMIPV0C, !expert, saveCorr);   iHisto++;
+  h1d = new TH1D("H1D_MIP_V0", "Total MIP in V0", 2*kNMIPBins,kMIPMin ,32*kMIPMax) ;  
+  Add2RawsList(h1d,kRawMIPV0, !expert, saveCorr);   iHisto++;
+  h2d = new TH2D("H2D_MIP_Channel", "Nb of MIP per channel", kNChannelBins, kChannelMin, kChannelMax,kNMIPBins,kMIPMin ,kMIPMax) ;  
+  Add2RawsList(h2d,kRawMIPChannel, expert, !saveCorr);   iHisto++;
+  
+ for(size_t iInt=0;iInt<kNintegrator;iInt++){
+    // Creation of Pedestal histograms 
+    sprintf(Name,"H2I_Pedestal_Int%d",iInt);
+    sprintf(Title,"Pedestal (Int%d)",iInt);
+       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax,kNPedestalBins,kPedestalMin ,kPedestalMax );
+       Add2RawsList(h2i,(iInt == 0 ? kPedestal_Int0 : kPedestal_Int1), expert, !saveCorr); iHisto++;
+       
+       // Creation of temporary Pedestal histo used for the mean versus time histogram. This histogram will be reset at the end of each cycle
+    sprintf(Name,"H2I_Pedestal_Cycle_Int%d",iInt);
+    sprintf(Title,"One Cycle Pedestal (Int%d)",iInt);
+       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax,kNPedestalBins,kPedestalMin ,kPedestalMax );
+       Add2RawsList(h2i,(iInt == 0 ? kPedestal_Cycle_Int0 : kPedestal_Cycle_Int1), expert, !saveCorr); iHisto++;
+               
+       // Creation of Pedestal versus time graph.
+    sprintf(Name,"H2D_Pedestal_Time_Int%d",iInt);
+    sprintf(Title,"Pedestal Versus Time (Int%d)",iInt);
+       h2d = new TH2D(Name, Title,kNChannelBins, kChannelMin, kChannelMax,kTimeMax,kTimeMin ,kTimeMax );
+       Add2RawsList(h2d,(iInt == 0 ? kPedestal_Time_Int0 : kPedestal_Time_Int1), expert, !saveCorr); iHisto++;
+
+   // Creation of Charge EoI histograms 
+    sprintf(Name,"H2I_ChargeEoI_Int%d",iInt);
+    sprintf(Title,"Charge EoI (Int%d)",iInt);
+       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
+       Add2RawsList(h2i,(iInt == 0 ? kChargeEoI_Int0 : kChargeEoI_Int1), !expert, !saveCorr); iHisto++;
+
+   // Creation of temporary Charge EoI histograms used for the mean versus time histogram. This histogram will be reset at the end of each cycle
+    sprintf(Name,"H2I_ChargeEoI_Cycle_Int%d",iInt);
+    sprintf(Title,"One Cycle Charge EoI (Int%d)",iInt);
+       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
+       Add2RawsList(h2i,(iInt == 0 ? kChargeEoI_Cycle_Int0 : kChargeEoI_Cycle_Int1), expert, !saveCorr); iHisto++;
+               
+       // Creation of Chercge EoI versus time graph.
+    sprintf(Name,"H2D_ChargeEoI_Time_Int%d",iInt);
+    sprintf(Title,"Charge EoI Versus Time (Int%d)",iInt);
+       h2d = new TH2D(Name, Title,kNChannelBins, kChannelMin, kChannelMax,kTimeMax,kTimeMin ,kTimeMax );
+       Add2RawsList(h2d,(iInt == 0 ? kChargeEoI_Time_Int0 : kChargeEoI_Time_Int1), expert, !saveCorr); iHisto++;
     
-  TH2I *h0 = new TH2I("hCellADCMap0","ADC vs Cell for EVEN Integrator", 70, 0, 70, 512, 0, 1024);
-  h0->Sumw2(); 
-  Add2RawsList(h0,0, !expert, !saveCorr) ;
-  TH2I *h1 = new TH2I("hCellADCMap1","ADC vs Cell for ODD Integrator", 70, 0, 70, 512, 0, 1024);
-  h1->Sumw2();
-  Add2RawsList(h1,1, !expert, !saveCorr) ;
-
-  TH2F *hMeanADC0 = new TH2F("hCellMeanADCMap0","Mean ADC vs cell for EVEN integrator",70,-0.5,69.5,512,-0.5,511.5);       
-  Add2RawsList(hMeanADC0,2, !expert, !saveCorr); 
-  TH2F *hMeanADC1 = new TH2F("hCellMeanADCMap1","Mean ADC vs cell for ODD integrator",70,-0.5,69.5,512,-0.5,511.5);       
-  Add2RawsList(hMeanADC1,3, !expert, !saveCorr);  
+    sprintf(Name,"H2I_ChargeEoI_BB_Int%d",iInt);
+    sprintf(Title,"Charge EoI w/ BB Flag (Int%d)",iInt);
+       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
+       Add2RawsList(h2i,(iInt == 0 ? kChargeEoI_BB_Int0 : kChargeEoI_BB_Int1), expert, !saveCorr); iHisto++;
     
-  TH1I *hMulV0A = new TH1I("hMulV0A", "Multiplicity in V0A", 40, 0, 40) ;  
-  Add2RawsList(hMulV0A,4, !expert, saveCorr);  
-  TH1I *hMulV0C = new TH1I("hMulV0C", "Multiplicity in V0C", 40, 0, 40) ;  
-  Add2RawsList(hMulV0C,5, !expert, saveCorr);  
-                          
-  for (Int_t i=0; i<64; i++)
-    {
-       sprintf(ADCname,"hRaw0ADC%d",i);
-       sprintf(texte,"Raw ADC in cell %d for even integrator",i);
-       hRawADC0[i]= new TH1I(ADCname,texte,1024,0,1024);       
-       Add2RawsList(hRawADC0[i],i+6, expert, !saveCorr);
-                    
-       sprintf(ADCname,"hRaw1ADC%d",i);
-       sprintf(texte,"Raw ADC in cell %d for odd integrator",i);
-       hRawADC1[i]= new TH1I(ADCname,texte,1024,0,1024);       
-       Add2RawsList(hRawADC1[i],i+6+64, expert, !saveCorr);                     
-     }  
+    sprintf(Name,"H2I_ChargeEoI_BG_Int%d",iInt);
+    sprintf(Title,"Charge EoI w/ BG Flag (Int%d)",iInt);
+       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax, kNChargeBins, kChargeMin, kChargeMax);
+       Add2RawsList(h2i,(iInt == 0 ?  kChargeEoI_BG_Int0: kChargeEoI_BG_Int1), expert, !saveCorr); iHisto++;
+
+    // Creation of Charge versus LHC Clock histograms 
+    sprintf(Name,"H2D_ChargeVsClock_Int%d",iInt);
+    sprintf(Title,"Charge Versus LHC-Clock (Int%d)",iInt);
+       h2d = new TH2D(Name, Title,kNChannelBins, kChannelMin, kChannelMax,21, -10.5, 10.5 );
+       Add2RawsList(h2d,(iInt == 0 ? kChargeVsClock_Int0 : kChargeVsClock_Int1 ), expert, !saveCorr); iHisto++;
+       
+       // Creation of Minimum Bias Charge histograms 
+       for(size_t iBB=0;iBB<2;iBB++){
+               for(size_t iBG=0;iBG<2;iBG++){
+                       sprintf(Name,"H2I_ChargeMB_BB%d_BG%d_Int%d",iBB,iBG,iInt);
+                       sprintf(Title,"MB Charge (BB=%d, BG=%d, Int=%d)",iBB,iBG,iInt);
+                       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax,kNChargeBins, kChargeMin, kChargeMax);
+                       int idx;
+                       if(iInt==0){
+                               if(iBB==0){
+                                       if(iBG==0) idx = kChargeMB_BB0_BG0_Int0;
+                                       else idx = kChargeMB_BB0_BG1_Int0;
+                               } else {
+                                       if(iBG==0) idx = kChargeMB_BB1_BG0_Int0;
+                                       else idx = kChargeMB_BB1_BG1_Int0;
+                               }
+                       } else {
+                               if(iBB==0){
+                                       if(iBG==0) idx = kChargeMB_BB0_BG0_Int1;
+                                       else idx = kChargeMB_BB0_BG1_Int1;
+                               } else {
+                                       if(iBG==0) idx = kChargeMB_BB1_BG0_Int1;
+                                       else idx = kChargeMB_BB1_BG1_Int1;
+                               }
+                       }
+                       Add2RawsList(h2i,idx, expert, !saveCorr); iHisto++;
+               }
+       }
+       
+ }
+// Creation of Time histograms 
+       sprintf(Name,"H2I_Width");
+       sprintf(Title,"HPTDC Width");
+       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax, kNTdcWidthBins, kTdcWidthMin, kTdcWidthMax);
+       Add2RawsList(h2i,kWidth, expert, !saveCorr); iHisto++;
+
+       sprintf(Name,"H2I_Width_BB");
+       sprintf(Title,"HPTDC Width w/ BB Flag condition");
+       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax, kNTdcWidthBins, kTdcWidthMin, kTdcWidthMax);
+       Add2RawsList(h2i,kWidth_BB, expert, !saveCorr); iHisto++;
+
+       sprintf(Name,"H2I_Width_BG");
+       sprintf(Title,"HPTDC Width w/ BG Flag condition");
+       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax, kNTdcWidthBins, kTdcWidthMin, kTdcWidthMax);
+       Add2RawsList(h2i,kWidth_BG, expert, !saveCorr); iHisto++;
+
+       sprintf(Name,"H2I_HPTDCTime");
+       sprintf(Title,"HPTDC Time");
+       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax, kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
+       Add2RawsList(h2i,kHPTDCTime, !expert, !saveCorr); iHisto++;
+
+       sprintf(Name,"H2I_HPTDCTime_BB");
+       sprintf(Title,"HPTDC Time w/ BB Flag condition");
+       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax, kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
+       Add2RawsList(h2i,kHPTDCTime_BB, expert, !saveCorr); iHisto++;
+
+       sprintf(Name,"H2I_HPTDCTime_BG");
+       sprintf(Title,"HPTDC Time w/ BG Flag condition");
+       h2i = new TH2I(Name, Title,kNChannelBins, kChannelMin, kChannelMax, kNTdcTimeBins, kTdcTimeMin, kTdcTimeMax);
+       Add2RawsList(h2i,kHPTDCTime_BG, expert, !saveCorr); iHisto++;
+       
+       sprintf(Name,"H1D_V0A_Time");
+       sprintf(Title,"V0A Time");
+       h1d = new TH1D(Name, Title,kNTdcTimeBins, kTdcTimeMin/10, kTdcTimeMax/10);
+       Add2RawsList(h1d,kV0ATime, !expert, saveCorr); iHisto++;
+       
+       sprintf(Name,"H1D_V0C_Time");
+       sprintf(Title,"V0C Time");
+       h1d = new TH1D(Name, Title,kNTdcTimeBins, kTdcTimeMin/10, kTdcTimeMax/10);
+       Add2RawsList(h1d,kV0CTime, !expert, saveCorr); iHisto++;
+       
+       sprintf(Name,"H1D_Diff_Time");
+       sprintf(Title,"Diff V0A-V0C Time");
+       h1d = new TH1D(Name, Title,2*kNTdcTimeBins, -kTdcTimeMax/10, kTdcTimeMax/10);
+       Add2RawsList(h1d,kDiffTime, !expert, saveCorr); iHisto++;
+       
+       // Creation of Flag versus LHC Clock histograms 
+       sprintf(Name,"H2D_BBFlagVsClock");
+       sprintf(Title,"BB-Flags Versus LHC-Clock");
+       h2d = new TH2D(Name, Title,kNChannelBins, kChannelMin, kChannelMax,21, -10.5, 10.5 );
+       Add2RawsList(h2d,kBBFlagVsClock, expert, !saveCorr); iHisto++;
+       
+       sprintf(Name,"H2D_BGFlagVsClock");
+       sprintf(Title,"BG-Flags Versus LHC-Clock");
+       h2d = new TH2D(Name, Title,kNChannelBins, kChannelMin, kChannelMax,21, -10.5, 10.5 );
+       Add2RawsList(h2d,kBGFlagVsClock, expert, !saveCorr); iHisto++;
+        
+       AliInfo(Form("%d Histograms has been added to the Raws List",iHisto));
  }
 
 //____________________________________________________________________________
 void AliVZEROQADataMakerRec::MakeESDs(AliESDEvent * esd)
 {
   // make QA data from ESDs
+  UInt_t EventType = esd->GetEventType();
 
-  AliESDVZERO *esdVZERO=esd->GetVZEROData();
+  switch (EventType){
+       case PHYSICS_EVENT:
+               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());  
-      for(Int_t i=0;i<64;i++) {
-        GetESDsData(4)->Fill((Float_t) i,(Float_t) esdVZERO->GetMultiplicity(i));
-        GetESDsData(9)->Fill((Float_t) i,(Float_t) esdVZERO->GetAdc(i));
-        GetESDsData(10)->Fill((Float_t) i,(Float_t) esdVZERO->GetTime(i));
-      }
-      for(Int_t i=0;i<32;i++) { 
-       if(esdVZERO->BBTriggerV0A(i)) 
-          GetESDsData(5)->Fill((Float_t) i);
-       if(esdVZERO->BGTriggerV0A(i)) 
-          GetESDsData(6)->Fill((Float_t) i);
-       if(esdVZERO->BBTriggerV0C(i)) 
-          GetESDsData(7)->Fill((Float_t) i);
-       if(esdVZERO->BGTriggerV0C(i)) 
-          GetESDsData(8)->Fill((Float_t) i);
-      }
-  }
+               if (!esdVZERO) break;
+                 
+       GetESDsData(kCellMultiV0A)->Fill(esdVZERO->GetNbPMV0A());
+       GetESDsData(kCellMultiV0C)->Fill(esdVZERO->GetNbPMV0C());  
+       GetESDsData(kMIPMultiV0A)->Fill(esdVZERO->GetMTotV0A());
+       GetESDsData(kMIPMultiV0C)->Fill(esdVZERO->GetMTotV0C());  
+       
+               Float_t TimeV0A = 0., TimeV0C =0., DiffTime;
+               Int_t iTimeV0A=0, iTimeV0C=0;
+               
+               for(Int_t i=0;i<64;i++) {
+                       GetESDsData(kMIPMultiChannel)->Fill((Float_t) i,(Float_t) esdVZERO->GetMultiplicity(i));
+                       GetESDsData(kChargeChannel)->Fill((Float_t) i,(Float_t) esdVZERO->GetAdc(i));
+                       if(esdVZERO->GetBBFlag(i)) GetESDsData(kBBFlag)->Fill((Float_t) i);
+                       if(esdVZERO->GetBGFlag(i)) GetESDsData(kBGFlag)->Fill((Float_t) i);
+
+                       Float_t Time = (Float_t) esdVZERO->GetTime(i)/10.; //Convert in ns:  1 TDC channel = 100ps 
+                       GetESDsData(kTimeChannel)->Fill((Float_t) i,Time);
+
+                       if(Time>0.){
+                               if (i<32) {
+                                       iTimeV0C++;
+                                       TimeV0C += Time;
+                               }else{
+                                       iTimeV0A++;
+                                       TimeV0A += Time;
+                               }
+                       }
+       }
+               if(iTimeV0A>0) TimeV0A /= iTimeV0A; 
+               else TimeV0A = -1.;
+               if(iTimeV0C>0) TimeV0C /= iTimeV0C;
+               else TimeV0C = -1.;
+               if(TimeV0A<0. || TimeV0C<0.) DiffTime = -10000.;
+               else DiffTime = TimeV0A - TimeV0C;
+                               
+               GetESDsData(kESDV0ATime)->Fill(TimeV0A);
+               GetESDsData(kESDV0CTime)->Fill(TimeV0C);
+               GetESDsData(kESDDiffTime)->Fill(DiffTime);
+               
+               break;
+       }  
   
 }
 
@@ -250,62 +481,234 @@ void AliVZEROQADataMakerRec::MakeESDs(AliESDEvent * esd)
   AliVZERORawStream* rawStream  = new AliVZERORawStream(rawReader); 
   rawStream->Next();
   
-  Float_t ChargeEoI, Threshold;  // for pedestal subtraction 
-                              
-//  for(Int_t i=0; i<128; i++) { printf(" i = %d pedestal = %f sigma = %f \n\n", 
-//                                        i,  fCalibData->GetPedestal(i),fCalibData->GetSigma(i) );} 
-             
-  GetRawsData(2)->Reset();      // to keep only the last value of the ADC average
-  GetRawsData(3)->Reset();
-
-  Int_t mulV0A = 0 ; 
-  Int_t mulV0C = 0 ; 
-   
-  Int_t thresholV0A = 50 ; 
-  Int_t thresholV0C = 50 ; 
-   
-  for(Int_t j=0; j<64; j++) {
-      Int_t i =  rawStream->GetOfflineChannel(j);  // Convert Online to Offline channel number 
-      if(!rawStream->GetIntegratorFlag(i,10)) 
-           { 
-           // even integrator - fills index6 to 69 
-           GetRawsData(0)->Fill(i,rawStream->GetADC(i)) ; 
-      GetRawsData(i+6)->Fill(rawStream->GetADC(i)) ; 
-           ChargeEoI  = (float)rawStream->GetADC(i) - fCalibData->GetPedestal(i); 
-           Threshold  = 3.0 * fCalibData->GetSigma(i);   
-           if(rawStream->GetADC(i)<1023 && ChargeEoI > Threshold) {
-              fADC_Mean[i] = ((fADC_Mean[i]*fEven[i]) + rawStream->GetADC(i)) / (fEven[i]+1); 
-              GetRawsData(2)->Fill((Float_t) i, fADC_Mean[i]);
-              fEven[i]+=1; }
-          }
-      else if(rawStream->GetIntegratorFlag(i,10)) 
-           { 
-           // odd integrator  - fills index 70 to 133  
-      GetRawsData(1)->Fill(i,rawStream->GetADC(i)) ; 
-      GetRawsData(i+6+64)->Fill(rawStream->GetADC(i)) ;
-           ChargeEoI  = (float)rawStream->GetADC(i) - fCalibData->GetPedestal(i+64) ; 
-           Threshold  = 3.0 * fCalibData->GetSigma(i+64);  
-           if(rawStream->GetADC(i)<1023 && ChargeEoI > Threshold) { 
-              fADC_Mean[i+64] = ((fADC_Mean[i+64]*fOdd[i]) + rawStream->GetADC(i)) / (fOdd[i]+1);
-              GetRawsData(3)->Fill((Float_t) i, fADC_Mean[i+64]);
-              fOdd[i]+=1; }
-          }    
-     if( i < 32 ){
-       if (rawStream->GetADC(i) > thresholV0C) 
-           mulV0C++ ;     
-     }else{
-       if (rawStream->GetADC(i) > thresholV0A) 
-           mulV0A++ ; 
-     }
-  }   
-   
-  fEvent++; 
-  GetRawsData(4)->Fill(mulV0A) ; 
-  TParameter<double> * p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(4)->GetName()))) ; 
-  p->SetVal(mulV0A) ; 
-  GetRawsData(5)->Fill(mulV0C) ; 
-  p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(5)->GetName()))) ; 
-  p->SetVal(mulV0C) ;                     
+  eventTypeType EventType = rawReader->GetType();
+
+
+       Int_t mulV0A = 0 ; 
+       Int_t mulV0C = 0 ; 
+       Double_t TimeV0A =0., TimeV0C = 0.;
+       UInt_t iTimeV0A=0, iTimeV0C=0;
+       Double_t ChargeV0A=0., ChargeV0C=0.;
+       Double_t MIPV0A=0., MIPV0C=0.;
+
+       Double_t DiffTime=-100000.;
+
+  
+  switch (EventType){
+       case PHYSICS_EVENT:
+       int iFlag=0;
+          int pedestal;
+          int integrator;
+          Bool_t BBFlag;        
+       Bool_t BGFlag;   
+       uint32_t Time, Width;
+          Int_t MBCharge, Charge;
+          Int_t OfflineCh;
+          TH1D * hProj;
+
+          //printf("----------------------------------------\n");
+       for(size_t iChannel=0; iChannel<64; iChannel++) { // BEGIN : Loop over channels
+                  
+                  OfflineCh = rawStream->GetOfflineChannel(iChannel);
+                  
+                  // Fill Pedestal histograms
+                  //-------------------------
+
+              for(size_t j=15; j<21; j++) {
+                      if((rawStream->GetBGFlag(iChannel,j) || rawStream->GetBBFlag(iChannel,j))) iFlag++;
+              }
+
+              if(iFlag == 0){ //No Flag found
+                      for(size_t j=15; j<21; j++){
+                              pedestal=rawStream->GetPedestal(iChannel, j);
+                              integrator = rawStream->GetIntegratorFlag(iChannel, j);
+
+                              GetRawsData((integrator == 0 ? kPedestal_Int0 : kPedestal_Int1))->Fill(OfflineCh,pedestal);
+                              GetRawsData((integrator == 0 ? kPedestal_Cycle_Int0 : kPedestal_Cycle_Int1))->Fill(OfflineCh,pedestal);
+                      }
+              }
+
+                  // Fill Charge EoI histograms
+                  //---------------------------
+                  // Look for the maximum in the LHC clock train
+           Charge = 0;
+           Int_t iClock  = 0;
+           Int_t iCharge = 0;
+           for(size_t iEvent=0; iEvent<21; iEvent++){
+               iCharge = rawStream->GetPedestal(iChannel,iEvent);
+               if(iCharge>Charge)  {
+                          Charge = iCharge;
+                      iClock = iEvent;
+                  }
+           }   // End of maximum searching procedure
+
+           integrator   = rawStream->GetIntegratorFlag(iChannel,iClock);
+           BBFlag       = rawStream->GetBBFlag(iChannel, iClock);
+           BGFlag       = rawStream->GetBGFlag(iChannel,iClock );
+
+           GetRawsData((integrator == 0 ? kChargeEoI_Int0 : kChargeEoI_Int1))->Fill(OfflineCh,Charge);
+                  if(BBFlag) GetRawsData((integrator == 0 ? kChargeEoI_BB_Int0 : kChargeEoI_BB_Int1))->Fill(OfflineCh,Charge);
+           if(BGFlag) GetRawsData((integrator == 0 ? kChargeEoI_BG_Int0 : kChargeEoI_BG_Int1))->Fill(OfflineCh,Charge);
+
+                  hProj = ((TH2I*)GetRawsData((integrator == 0 ? kPedestal_Int0 : kPedestal_Int1)))->ProjectionY("",OfflineCh+1,OfflineCh+1);
+                  Double_t ped   = hProj->GetMean();
+                  Double_t sigma = hProj->GetRMS();
+                  delete hProj;
+
+                  Double_t ChargeEoI = Charge - ped;
+                  
+                  // Calculation of the number of MIP
+                  Double_t MIPEoI = ChargeEoI * fCalibData->GetMIPperADC(OfflineCh);
+
+                  
+                  if(Charge<1023 && ChargeEoI > 5.*sigma){ 
+                          ((TH2I*)GetRawsData((integrator == 0 ? kChargeEoI_Cycle_Int0 : kChargeEoI_Cycle_Int1)))->Fill(OfflineCh,ChargeEoI);
+                          ((TH2D*)GetRawsData(kRawMIPChannel))->Fill(OfflineCh,MIPEoI);
+                          if(OfflineCh<32) {
+                                  mulV0C++;
+                                  ChargeV0C += ChargeEoI;
+                                  MIPV0C += MIPEoI;
+                          } else {
+                                  mulV0A++;
+                                  ChargeV0A += ChargeEoI;
+                                  MIPV0A += MIPEoI;
+                          }
+                  }
+
+                  // Fill Charge Minimum Bias Histograms
+                  //------------------------------------
+                  int idx;
+                  for(size_t iBunch=0; iBunch<10; iBunch++){
+                          integrator = rawStream->GetIntMBFlag(iChannel, iBunch);
+                          BBFlag          = rawStream->GetBBMBFlag(iChannel, iBunch);
+                          BGFlag          = rawStream->GetBGMBFlag(iChannel, iBunch);
+                          MBCharge   = rawStream->GetChargeMB(iChannel, iBunch);
+
+                          if(integrator==0){
+                                  if(BBFlag==0){
+                                          if(BGFlag==0) idx = kChargeMB_BB0_BG0_Int0;
+                                          else idx = kChargeMB_BB0_BG1_Int0;
+                                  } else {
+                                          if(BGFlag==0) idx = kChargeMB_BB1_BG0_Int0;
+                                          else idx = kChargeMB_BB1_BG1_Int0;
+                                  }
+                          } else {
+                                  if(BBFlag==0){
+                                          if(BGFlag==0) idx = kChargeMB_BB0_BG0_Int1;
+                                          else idx = kChargeMB_BB0_BG1_Int1;
+                                  } else {
+                                          if(BGFlag==0) idx = kChargeMB_BB1_BG0_Int1;
+                                          else idx = kChargeMB_BB1_BG1_Int1;
+                                  }
+                          }
+                          GetRawsData(idx)->Fill(OfflineCh,MBCharge);
+                   }   
+
+                  // Fill HPTDC Time Histograms
+                  //---------------------------
+
+                  BBFlag        = rawStream->GetBBFlag(iChannel, 10);
+           BGFlag       = rawStream->GetBGFlag(iChannel, 10);
+           Time  = rawStream->GetTime(iChannel);
+           Width = rawStream->GetWidth(iChannel);
+
+                  if(Time>0.){
+                          if (OfflineCh<32) {
+                                  iTimeV0C++;
+                                  TimeV0C += Time;
+                          }else{
+                                  iTimeV0A++;
+                                  TimeV0A += Time;
+                          }
+                  }
+           GetRawsData(kHPTDCTime)->Fill(OfflineCh,Time);
+           GetRawsData(kWidth)->Fill(OfflineCh,Width);
+           if(BBFlag) {
+                          GetRawsData(kHPTDCTime_BB)->Fill(OfflineCh,Time);
+                          GetRawsData(kWidth_BB)->Fill(OfflineCh,Width);
+           }
+                  if(BGFlag) {
+                          GetRawsData(kHPTDCTime_BG)->Fill(OfflineCh,Time);
+                          GetRawsData(kWidth_BG)->Fill(OfflineCh,Width);
+           }
+
+                  // Fill Flag and Charge Versus LHC-Clock histograms
+                  //-------------------------------------------------
+
+          for(size_t iEvent=0; iEvent<21; iEvent++){
+               Charge = rawStream->GetPedestal(iChannel,iEvent);
+               integrator   = rawStream->GetIntegratorFlag(iChannel,iEvent);
+               BBFlag   = rawStream->GetBBFlag(iChannel, iEvent);
+               BGFlag   = rawStream->GetBGFlag(iChannel,iEvent );
+
+               ((TH2*) GetRawsData((integrator == 0 ? kChargeVsClock_Int0 : kChargeVsClock_Int1 )))->Fill(OfflineCh,(float)iEvent-10,(float)Charge);
+               ((TH2*) GetRawsData(kBBFlagVsClock))->Fill(OfflineCh,(float)iEvent-10,(float)BBFlag);
+               ((TH2*) GetRawsData(kBGFlagVsClock))->Fill(OfflineCh,(float)iEvent-10,(float)BGFlag);
+           }
+
+       }// END : Loop over channels
+
+               if(iTimeV0A>0) TimeV0A /= (iTimeV0A * 10); // iTimeV0A Channels and divide by 10 to have the result in ns because 1 TDC Channel = 100 ps
+               else TimeV0A = -1.;
+           if(iTimeV0C>0) TimeV0C /= (iTimeV0C * 10);
+               else TimeV0C = -1.;
+               if(TimeV0A<0. || TimeV0C<0.) DiffTime = -10000.;
+               else DiffTime = TimeV0A - TimeV0C;
+               
+               GetRawsData(kV0ATime)->Fill(TimeV0A);
+               GetRawsData(kV0CTime)->Fill(TimeV0C);
+               GetRawsData(kDiffTime)->Fill(DiffTime);
+               
+               GetRawsData(kMultiV0A)->Fill(mulV0A);
+               GetRawsData(kMultiV0C)->Fill(mulV0C);
+
+               GetRawsData(kChargeV0A)->Fill(ChargeV0A);
+               GetRawsData(kChargeV0C)->Fill(ChargeV0C);
+               GetRawsData(kChargeV0)->Fill(ChargeV0A + ChargeV0C);
+               
+               GetRawsData(kRawMIPV0A)->Fill(MIPV0A);
+               GetRawsData(kRawMIPV0C)->Fill(MIPV0C);
+               GetRawsData(kRawMIPV0)->Fill(MIPV0A + MIPV0C);
+               break;
+       } //---------> END : SWITCH EVENT TYPE
+       
+       fEvent++; 
+       TParameter<double> * p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kMultiV0A)->GetName()))) ; 
+       p->SetVal((double)mulV0A) ; 
+
+       p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kMultiV0C)->GetName()))) ; 
+       p->SetVal((double)mulV0C) ;                     
+
+       p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kChargeV0A)->GetName()))) ; 
+       p->SetVal((double)ChargeV0A) ; 
+
+       p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kChargeV0C)->GetName()))) ; 
+       p->SetVal((double)ChargeV0C) ;                     
+
+       p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kChargeV0)->GetName()))) ; 
+       p->SetVal((double)(ChargeV0A + ChargeV0C)) ;                     
+       
+       p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kRawMIPV0A)->GetName()))) ; 
+       p->SetVal((double)MIPV0A) ; 
+       
+       p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kRawMIPV0C)->GetName()))) ; 
+       p->SetVal((double)MIPV0C) ;                     
+       
+       p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kRawMIPV0)->GetName()))) ; 
+       p->SetVal((double)(MIPV0A + MIPV0C)) ;                     
+       
+       p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kV0ATime)->GetName()))) ; 
+       p->SetVal((double)TimeV0A) ; 
+       
+       p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kV0CTime)->GetName()))) ; 
+       p->SetVal((double)TimeV0C) ;                     
+       
+       p = dynamic_cast<TParameter<double>*>(GetParameterList()->FindObject(Form("%s_%s_%s", GetName(), AliQA::GetTaskName(AliQA::kRAWS).Data(), GetRawsData(kDiffTime)->GetName()))) ; 
+       p->SetVal((double)DiffTime) ;                     
+       
+       delete rawStream; rawStream = 0x0;      
+
+
  }
 
 //____________________________________________________________________________ 
@@ -313,4 +716,15 @@ void AliVZEROQADataMakerRec::StartOfDetectorCycle()
 {
   // Detector specific actions at start of cycle
   
+  // Resetting the histogram used to have the trend versus time.
+  TH1* h;
+  h = GetRawsData(kPedestal_Cycle_Int0);
+  if(h) h->Reset();
+  h = GetRawsData(kPedestal_Cycle_Int1); 
+  if(h) h->Reset();
+  h = GetRawsData(kChargeEoI_Cycle_Int0);
+  if(h) h->Reset();
+  h = GetRawsData(kChargeEoI_Cycle_Int1);
+  if(h) h->Reset();
+
 }
index cdb911f..7367eb0 100644 (file)
@@ -26,6 +26,22 @@ class AliVZEROCalibData;
 class AliVZEROQADataMakerRec: public AliQADataMakerRec {
 
 public:
+  //Histograms for Raw data control
+  enum HRawType_t {kPedestal_Int0,kPedestal_Int1,kPedestal_Cycle_Int0,kPedestal_Cycle_Int1,kPedestal_Time_Int0,kPedestal_Time_Int1
+                       ,kChargeEoI_Int0,kChargeEoI_Int1,kChargeEoI_Time_Int0,kChargeEoI_Time_Int1,kChargeEoI_Cycle_Int0,kChargeEoI_Cycle_Int1
+                       ,kChargeEoI_BB_Int0,kChargeEoI_BB_Int1,kChargeEoI_BG_Int0,kChargeEoI_BG_Int1,kChargeVsClock_Int0,kChargeVsClock_Int1
+                       ,kChargeMB_BB0_BG0_Int0,kChargeMB_BB0_BG1_Int0,kChargeMB_BB1_BG0_Int0,kChargeMB_BB1_BG1_Int0
+                       ,kChargeMB_BB0_BG0_Int1,kChargeMB_BB0_BG1_Int1,kChargeMB_BB1_BG0_Int1,kChargeMB_BB1_BG1_Int1
+                       ,kWidth,kWidth_BB,kWidth_BG,kHPTDCTime,kHPTDCTime_BB,kHPTDCTime_BG,kBBFlagVsClock,kBGFlagVsClock
+                       ,kMultiV0A,kMultiV0C,kChargeV0A,kChargeV0C,kChargeV0 
+                       ,kV0ATime,kV0CTime,kDiffTime
+                       ,kRawMIPV0A,kRawMIPV0C,kRawMIPV0,kRawMIPChannel} ;
+       
+       enum HESDType_t {kCellMultiV0A,kCellMultiV0C,kMIPMultiV0A,kMIPMultiV0C,kMIPMultiChannel
+                       ,kBBFlag,kBGFlag,kChargeChannel,kTimeChannel
+                       ,kESDV0ATime,kESDV0CTime,kESDDiffTime};
+
+public:
   AliVZEROQADataMakerRec() ;           // constructor
   AliVZEROQADataMakerRec(const AliVZEROQADataMakerRec& qadm) ;   
   AliVZEROQADataMakerRec& operator = (const AliVZEROQADataMakerRec& qadm) ;
@@ -33,7 +49,7 @@ public:
   AliVZEROCalibData *GetCalibData() const;
   
 protected: 
-   AliVZEROCalibData *fCalibData;  //! calibration data
+  AliVZEROCalibData *fCalibData;  //! calibration data
    
 private:
   virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;