Calibration object updated
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Feb 2006 14:16:22 +0000 (14:16 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Feb 2006 14:16:22 +0000 (14:16 +0000)
ZDC/AliZDCCalibData.cxx
ZDC/AliZDCCalibData.h
ZDC/Calib/Data/Run0_100_v0_s0.root

index db01b00..3b3a43c 100644 (file)
@@ -28,7 +28,7 @@ ClassImp(AliZDCCalibData)
 //________________________________________________________________
 AliZDCCalibData::AliZDCCalibData()
 {
-  fHistMeanPed=0;
+//  fHistMeanPed=0;
   Reset();
 }
 
@@ -39,7 +39,7 @@ AliZDCCalibData::AliZDCCalibData(const char* name)
   namst += name;
   SetName(namst.Data());
   SetTitle(namst.Data());
-  fHistMeanPed=0;
+//  fHistMeanPed=0;
   Reset();
 }
 
@@ -51,10 +51,18 @@ AliZDCCalibData::AliZDCCalibData(const AliZDCCalibData& calibda) :
   SetName(calibda.GetName());
   SetTitle(calibda.GetName());
   Reset();
-  for(int t=0; t<47; t++) fMeanPedestal[t]  = calibda.GetMeanPed(t);
-  for(int t=0; t<44; t++) fOOTPedestal[t]   = calibda.GetOOTPed(t);
+  for(int t=0; t<47; t++){
+     fMeanPedestal[t] = calibda.GetMeanPed(t);
+     fMeanPedWidth[t] = calibda.GetMeanPedWidth(t);
+  }
+  for(int t=0; t<44; t++){
+     fOOTPedestal[t]  = calibda.GetOOTPed(t);
+     fOOTPedWidth[t]  = calibda.GetOOTPedWidth(t);
+     fPedCorrCoeff[0][t] = calibda.GetPedCorrCoeff0(t);
+     fPedCorrCoeff[1][t] = calibda.GetPedCorrCoeff1(t);
+  }
   for(int t=0; t<6; t++)  fEnCalibration[t] = calibda.GetEnCalib(t);
-  PrepHistos();
+//  PrepHistos();
 }
 
 //________________________________________________________________
@@ -64,27 +72,38 @@ AliZDCCalibData &AliZDCCalibData::operator =(const AliZDCCalibData& calibda)
   SetName(calibda.GetName());
   SetTitle(calibda.GetName());
   Reset();
-  for(int t=0; t<47; t++) fMeanPedestal[t] = calibda.GetMeanPed(t);
-  for(int t=0; t<44; t++) fOOTPedestal[t]  = calibda.GetOOTPed(t);
+  for(int t=0; t<47; t++){
+     fMeanPedestal[t] = calibda.GetMeanPed(t);
+     fMeanPedWidth[t] = calibda.GetMeanPedWidth(t);
+  }
+  for(int t=0; t<44; t++){
+     fOOTPedestal[t]  = calibda.GetOOTPed(t);
+     fOOTPedWidth[t]  = calibda.GetOOTPedWidth(t);
+     fPedCorrCoeff[0][t] = calibda.GetPedCorrCoeff0(t);
+     fPedCorrCoeff[1][t] = calibda.GetPedCorrCoeff1(t);
+  }
   for(int t=0; t<6; t++) fEnCalibration[t] = calibda.GetEnCalib(t);
-  PrepHistos();
+//  PrepHistos();
   return *this;
 }
 
 //________________________________________________________________
 AliZDCCalibData::~AliZDCCalibData()
 {
-  CleanHistos();
+//  CleanHistos();
 }
 
 //________________________________________________________________
 void AliZDCCalibData::Reset()
 {
   memset(fMeanPedestal,0,47*sizeof(Float_t));
+  memset(fMeanPedWidth,0,47*sizeof(Float_t));
   memset(fOOTPedestal,0,44*sizeof(Float_t));
+  memset(fOOTPedWidth,0,44*sizeof(Float_t));
   memset(fEnCalibration,0,6*sizeof(Float_t));
 }                                                                                       
 
+/*
 //________________________________________________________________
 void AliZDCCalibData::CleanHistos()
 {
@@ -101,6 +120,7 @@ void AliZDCCalibData::PrepHistos()
   fHistMeanPed = new TH1F(hname.Data(),hname.Data(),kNChannels,0.,kMaxPedVal);
   for(int i=0; i<47; i++)  fHistMeanPed->SetBinContent(i+1,GetMeanPed(i));
 }
+*/
 
 //________________________________________________________________
 void  AliZDCCalibData::Print(Option_t *) const
@@ -115,7 +135,7 @@ void  AliZDCCalibData::Print(Option_t *) const
      else if(t==21) printf("\n\t -------- ZEM1 LowRes -------- ");
      else if(t==22) printf("\n\t -------- ZEM2 HighRes -------- ");
      else if(t==23) printf("\n\t -------- ZEM2 LowRes -------- ");
-     printf("    MeanPed[ADC%d] = %.1f \t",t,fMeanPedestal[t]);
+     printf("   MeanPed[ADC%d] = %.1f   ",t,fMeanPedestal[t]);
    }
    
    printf("\n\n\n      ####### Out Of Time pedestal values     ####### \n");
@@ -128,7 +148,7 @@ void  AliZDCCalibData::Print(Option_t *) const
      else if(t==21) printf("\n\t -------- ZEM1 LowRes -------- ");
      else if(t==22) printf("\n\t -------- ZEM2 HighRes -------- ");
      else if(t==23) printf("\n\t -------- ZEM2 LowRes -------- ");
-     printf("    OOTPed[ADC%d] = %.1f \t",t,fOOTPedestal[t]);
+     printf("   OOTPed[ADC%d] = %.1f   ",t,fOOTPedestal[t]);
    }
  
    printf("\n\n\n      ####### Energy calibration coefficients ####### \n");
@@ -146,6 +166,12 @@ void AliZDCCalibData::SetMeanPed(Float_t* MeanPed)
   if(MeanPed) for(int t=0; t<47; t++) fMeanPedestal[t] = MeanPed[t];
   else for(int t=0; t<47; t++) fMeanPedestal[t] = 0.;
 }
+//________________________________________________________________
+void AliZDCCalibData::SetMeanPedWidth(Float_t* MeanPedWidth)
+{
+  if(MeanPedWidth) for(int t=0; t<47; t++) fMeanPedWidth[t] = MeanPedWidth[t];
+  else for(int t=0; t<47; t++) fMeanPedWidth[t] = 0.;
+}
 
 //________________________________________________________________
 void AliZDCCalibData::SetOOTPed(Float_t* OOTPed)
@@ -155,6 +181,20 @@ void AliZDCCalibData::SetOOTPed(Float_t* OOTPed)
 }
 
 //________________________________________________________________
+void AliZDCCalibData:: SetPedCorrCoeff(Float_t* PedCorrCoeff0, 
+       Float_t* PedCorrCoeff1)
+{
+  if(PedCorrCoeff0 && PedCorrCoeff1) for(int t=0; t<44; t++){
+    fPedCorrCoeff[0][t] = PedCorrCoeff0[t];
+    fPedCorrCoeff[1][t] = PedCorrCoeff1[t];
+  }
+  else for(int t=0; t<44; t++){
+    fPedCorrCoeff[0][t] = 0.;
+    fPedCorrCoeff[1][t] = 0.;
+  }
+}
+
+//________________________________________________________________
 void AliZDCCalibData::SetEnCalib(Float_t* EnCalib) 
 {
   if(EnCalib) for(int t=0; t<6; t++) fEnCalibration[t] = EnCalib[t];
index b973b4f..117a557 100644 (file)
@@ -24,31 +24,52 @@ class AliZDCCalibData: public TNamed {
   void Reset();
   virtual void  Print(Option_t *) const; 
   //
-  Float_t  GetMeanPed(Int_t channel)           const {return fMeanPedestal[channel];}
-  Float_t* GetMeanPed()   const {return (float*)fMeanPedestal;}
-  Float_t  GetOOTPed(Int_t channel)    const {return fOOTPedestal[channel];}
-  Float_t* GetOOTPed()   const {return (float*)fOOTPedestal;}
+  Float_t  GetMeanPed(Int_t channel)              const {return fMeanPedestal[channel];}
+  Float_t* GetMeanPed()                   const {return (float*)fMeanPedestal;}
+  Float_t  GetMeanPedWidth(Int_t channel)  const {return fMeanPedWidth[channel];}
+  Float_t* GetMeanPedWidth()                      const {return (float*)fMeanPedWidth;}
+  Float_t  GetOOTPed(Int_t channel)       const {return fOOTPedestal[channel];}
+  Float_t* GetOOTPed()                    const {return (float*)fOOTPedestal;}
+  Float_t  GetOOTPedWidth(Int_t channel)   const {return fOOTPedWidth[channel];}
+  Float_t* GetOOTPedWidth()               const {return (float*)fOOTPedWidth;}
+  Float_t  GetPedCorrCoeff0(Int_t channel) const {return fPedCorrCoeff[0][channel];}
+  Float_t  GetPedCorrCoeff1(Int_t channel) const {return fPedCorrCoeff[1][channel];}
+  Float_t* GetPedCorrCoeff()              const {return (float*)fPedCorrCoeff;}
+  //
   Float_t  GetEnCalib(Int_t channel)   const {return fEnCalibration[channel];}
-  Float_t* GetEnCalib()   const {return (float*)fEnCalibration;}
+  Float_t* GetEnCalib()                const {return (float*)fEnCalibration;}
+  //
+  void  SetMeanPed(Int_t channel, Float_t val) {fMeanPedestal[channel]=val;}
+  void  SetMeanPed(Float_t* MeanPed);
+  void  SetMeanPedWidth(Int_t channel, Float_t val) {fMeanPedWidth[channel]=val;}
+  void  SetMeanPedWidth(Float_t* MeanPedWidth);
+  void  SetOOTPed(Int_t channel, Float_t val) {fOOTPedestal[channel]=val;}
+  void  SetOOTPed(Float_t* OOTPed);
+  void  SetOOTPedWidth(Int_t channel, Float_t val) {fOOTPedWidth[channel]=val;}
+  void  SetOOTPedWidth(Float_t* OOTPedWidth);
+  void  SetPedCorrCoeff(Int_t channel, Float_t valCoeff0, Float_t valCoeff1)
+       {fPedCorrCoeff[0][channel]=valCoeff0; fPedCorrCoeff[1][channel]=valCoeff1;}
+  void  SetPedCorrCoeff(Float_t* PedCorrCoeff0, Float_t* PedCorrCoeff1);
   //
-  void     SetMeanPed(Int_t channel, Float_t val) {fMeanPedestal[channel]=val;}
-  void     SetMeanPed(Float_t* MeanPed);
-  void     SetOOTPed(Int_t channel, Float_t val) {fOOTPedestal[channel]=val;}
-  void     SetOOTPed(Float_t* OOTPed);
-  void            SetEnCalib(Int_t channel, Float_t val) {fEnCalibration[channel]=val;}
-  void            SetEnCalib(Float_t* EnCalib);
+  void         SetEnCalib(Int_t channel, Float_t val) {fEnCalibration[channel]=val;}
+  void         SetEnCalib(Float_t* EnCalib);
   //
-  void     PrepHistos();
-  TH1F*    GetHistMeanPed() const {return fHistMeanPed;}
-  void     CleanHistos();
+//  void     PrepHistos();
+//  TH1F*    GetHistMeanPed() const {return fHistMeanPed;}
+//  void     CleanHistos();
 
  protected:
-  Float_t  fMeanPedestal[47];  // Mean pedestal values (0 = high gain, 1 = low gain)
-  Float_t  fOOTPedestal[44];   // "Out of Time" pedestal values
-  Float_t  fEnCalibration[6];  // Coeff. for energy calibration
-  TH1F*    fHistMeanPed;        //! histos for drawing mean pedestals
+  // --- Pedestals
+  Float_t  fMeanPedestal[47];   // Mean pedestal values 
+  Float_t  fMeanPedWidth[47];   // Mean pedestal values 
+  Float_t  fOOTPedestal[44];    // "Out of Time" pedestal values
+  Float_t  fOOTPedWidth[44];    // "Out of Time" pedestal values
+  Float_t  fPedCorrCoeff[2][44]; // Fit of correlation in-time vs. out-of-time
+  // --- E calibration
+  Float_t  fEnCalibration[6];   // Coeff. for energy calibration
+  //TH1F*    fHistMeanPed;        //! histos for drawing mean pedestals
   //
-  ClassDef(AliZDCCalibData,2)    // ZDC  Calibration data
+  ClassDef(AliZDCCalibData,3)    // ZDC  Calibration data
 };
 
 #endif
index 46b5aad..c80b90b 100644 (file)
Binary files a/ZDC/Calib/Data/Run0_100_v0_s0.root and b/ZDC/Calib/Data/Run0_100_v0_s0.root differ