Committ for backward compatibility (bug# 74500)
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Nov 2010 10:07:16 +0000 (10:07 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Nov 2010 10:07:16 +0000 (10:07 +0000)
OCDB/ZDC/Calib/Calib/Run0_999999999_v0_s0.root [new file with mode: 0644]
ZDC/AliZDCCalib.cxx [new file with mode: 0644]
ZDC/AliZDCCalib.h [new file with mode: 0644]
ZDC/ZDCbaseLinkDef.h
ZDC/libZDCbase.pkg

diff --git a/OCDB/ZDC/Calib/Calib/Run0_999999999_v0_s0.root b/OCDB/ZDC/Calib/Calib/Run0_999999999_v0_s0.root
new file mode 100644 (file)
index 0000000..7f22622
Binary files /dev/null and b/OCDB/ZDC/Calib/Calib/Run0_999999999_v0_s0.root differ
diff --git a/ZDC/AliZDCCalib.cxx b/ZDC/AliZDCCalib.cxx
new file mode 100644 (file)
index 0000000..8aadfe4
--- /dev/null
@@ -0,0 +1,175 @@
+/**************************************************************************
+ * 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$ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+// class for ZDC calibration                                                //
+// -> values for energy calibration and relative sector calibration          //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliZDCCalib.h"
+
+ClassImp(AliZDCCalib)
+
+//________________________________________________________________
+AliZDCCalib::AliZDCCalib():
+TNamed()
+{
+  Reset();
+}
+
+//________________________________________________________________
+AliZDCCalib::AliZDCCalib(const char* name):
+TNamed()
+{
+  // Constructor
+  TString namst = "Calib_";
+  namst += name;
+  SetName(namst.Data());
+  SetTitle(namst.Data());
+  Reset();
+  for(Int_t i=0; i<6; i++){
+    fEnCalibration[i] = 0.;
+    if(i<5){
+      fZN1EqualCoeff[i] = 0.;
+      fZP1EqualCoeff[i] = 0.;
+      fZN2EqualCoeff[i] = 0.;
+      fZP2EqualCoeff[i] = 0.;
+    }
+  }
+}
+
+//________________________________________________________________
+AliZDCCalib::AliZDCCalib(const AliZDCCalib& calibda) :
+  TNamed(calibda)
+{
+  // Copy constructor
+  SetName(calibda.GetName());
+  SetTitle(calibda.GetName());
+  Reset();
+  for(int i=0; i<6; i++){
+    fEnCalibration[i] = calibda.GetEnCalib(i);
+    if(i<5){
+      fZN1EqualCoeff[i] =  calibda.GetZN1EqualCoeff(i);
+      fZP1EqualCoeff[i] =  calibda.GetZP1EqualCoeff(i);
+      fZN2EqualCoeff[i] =  calibda.GetZN2EqualCoeff(i);
+      fZP2EqualCoeff[i] =  calibda.GetZP2EqualCoeff(i);
+    }
+  }
+}
+
+//________________________________________________________________
+AliZDCCalib &AliZDCCalib::operator =(const AliZDCCalib& calibda)
+{
+// assignment operator
+  SetName(calibda.GetName());
+  SetTitle(calibda.GetName());
+  Reset();
+  for(int i=0; i<6; i++){
+     fEnCalibration[i] = calibda.GetEnCalib(i);
+     if(i<5){
+      fZN1EqualCoeff[i] =  calibda.GetZN1EqualCoeff(i);
+      fZP1EqualCoeff[i] =  calibda.GetZP1EqualCoeff(i);
+      fZN2EqualCoeff[i] =  calibda.GetZN2EqualCoeff(i);
+      fZP2EqualCoeff[i] =  calibda.GetZP2EqualCoeff(i);
+     }
+  }
+  
+  return *this;
+}
+
+//________________________________________________________________
+AliZDCCalib::~AliZDCCalib()
+{
+}
+
+//________________________________________________________________
+void AliZDCCalib::Reset()
+{
+  // Reset
+  memset(fEnCalibration,0,6*sizeof(Float_t));
+  memset(fZN1EqualCoeff,0,5*sizeof(Float_t));
+  memset(fZP1EqualCoeff,0,5*sizeof(Float_t));
+  memset(fZN2EqualCoeff,0,5*sizeof(Float_t));
+  memset(fZP2EqualCoeff,0,5*sizeof(Float_t));
+}                                                                                       
+
+
+//________________________________________________________________
+void  AliZDCCalib::Print(Option_t *) const
+{
+   // Printing of calibration object
+   printf("\n\n ####### Energy calibration coefficients #######        \n");
+   printf("  ZN1 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[0]);
+   printf("  ZP1 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[1]);
+   printf("  ZN2 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[2]);
+   printf("  ZP2 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[3]);
+   printf("  ZEM1 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[4]);
+   printf("  ZEM2 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[5]);
+   printf("\n\n ####### Equalization coefficients ####### \n");
+   printf("  ZN1 -> %1.2f %1.2f %1.2f %1.2f %1.2f  \n",
+    fZN1EqualCoeff[0],fZN1EqualCoeff[1],fZN1EqualCoeff[2],fZN1EqualCoeff[3],fZN1EqualCoeff[4]);
+   printf("  ZP1 -> %1.2f %1.2f %1.2f %1.2f %1.2f  \n",
+    fZP1EqualCoeff[0],fZP1EqualCoeff[1],fZP1EqualCoeff[2],fZP1EqualCoeff[3],fZP1EqualCoeff[4]);
+   printf("  ZN2 -> %1.2f %1.2f %1.2f %1.2f %1.2f  \n",
+    fZN2EqualCoeff[0],fZN2EqualCoeff[1],fZN2EqualCoeff[2],fZN2EqualCoeff[3],fZN2EqualCoeff[4]);
+   printf("  ZP2 -> %1.2f %1.2f %1.2f %1.2f %1.2f  \n",
+    fZP2EqualCoeff[0],fZP2EqualCoeff[1],fZP2EqualCoeff[2],fZP2EqualCoeff[3],fZP2EqualCoeff[4]);
+
+} 
+
+//________________________________________________________________
+void AliZDCCalib::SetEnCalib(Float_t* EnCalib) 
+{
+  // Set energy calibration coefficients
+  if(EnCalib) for(int t=0; t<6; t++) fEnCalibration[t] = EnCalib[t];
+  else for(int t=0; t<6; t++) fEnCalibration[t] = 0.;
+}
+
+//________________________________________________________________
+void AliZDCCalib::SetZN1EqualCoeff(Float_t* EqualCoeff)
+{
+  // Set ZN1 equalization coefficients
+  if(EqualCoeff) for(int t=0; t<5; t++) fZN1EqualCoeff[t] = EqualCoeff[t];
+  else for(int t=0; t<5; t++) fZN1EqualCoeff[t] = 1.;
+}
+//________________________________________________________________
+void AliZDCCalib::SetZP1EqualCoeff(Float_t* EqualCoeff)
+{
+  // Set ZP1 equalization coefficients
+  if(EqualCoeff) for(int t=0; t<5; t++) fZP1EqualCoeff[t] = EqualCoeff[t];
+  else for(int t=0; t<5; t++) fZP1EqualCoeff[t] = 1.;
+}
+//________________________________________________________________
+void AliZDCCalib::SetZN2EqualCoeff(Float_t* EqualCoeff)
+{
+  // Set ZN2 equalization coefficients
+  if(EqualCoeff) for(int t=0; t<5; t++) fZN2EqualCoeff[t] = EqualCoeff[t];
+  else for(int t=0; t<5; t++) fZN2EqualCoeff[t] = 1.;
+}
+//________________________________________________________________
+void AliZDCCalib::SetZP2EqualCoeff(Float_t* EqualCoeff)
+{
+  // Set ZN1 equalization coefficients
+  if(EqualCoeff) for(int t=0; t<5; t++) fZP2EqualCoeff[t] = EqualCoeff[t];
+  else for(int t=0; t<5; t++) fZP2EqualCoeff[t] = 1.;
+}
diff --git a/ZDC/AliZDCCalib.h b/ZDC/AliZDCCalib.h
new file mode 100644 (file)
index 0000000..a42c40b
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef ALIZDCCALIB_H
+#define ALIZDCCALIB_H
+
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+////////////////////////////////////////////////
+//  class for ZDC calibration -> CALIBCOEFF   //
+////////////////////////////////////////////////
+
+#include "TNamed.h"
+#include "TH1.h"
+#include "AliCDBEntry.h"
+
+class AliZDC;
+
+class AliZDCCalib: public TNamed {
+
+ public:
+  AliZDCCalib();
+  AliZDCCalib(const char* name);
+  AliZDCCalib(const AliZDCCalib &calibda);
+  AliZDCCalib& operator= (const AliZDCCalib &calibda);
+  virtual ~AliZDCCalib();
+  void Reset();
+  virtual void  Print(Option_t *) const; 
+  //
+  Float_t  GetEnCalib(Int_t channel)   const {return fEnCalibration[channel];}
+  Float_t* GetEnCalib()                const {return (float*)fEnCalibration;}
+  //
+  Float_t  GetZN1EqualCoeff(Int_t channel) const {return fZN1EqualCoeff[channel];}
+  Float_t* GetZN1EqualCoeffs()            const {return (float*)fZN1EqualCoeff;}
+  Float_t  GetZP1EqualCoeff(Int_t channel) const {return fZP1EqualCoeff[channel];}
+  Float_t* GetZP1EqualCoeffs()            const {return (float*)fZP1EqualCoeff;}
+  Float_t  GetZN2EqualCoeff(Int_t channel) const {return fZN2EqualCoeff[channel];}
+  Float_t* GetZN2EqualCoeffs()            const {return (float*)fZN2EqualCoeff;}
+  Float_t  GetZP2EqualCoeff(Int_t channel) const {return fZP2EqualCoeff[channel];}
+  Float_t* GetZP2EqualCoeffs()            const {return (float*)fZP2EqualCoeff;}
+
+  void         SetEnCalib(Int_t channel, Float_t val) {fEnCalibration[channel]=val;}
+  void         SetEnCalib(Float_t* EnCalib);
+  //
+  void         SetZN1EqualCoeff(Int_t channel, Float_t val) {fZN1EqualCoeff[channel]=val;}
+  void         SetZN1EqualCoeff(Float_t* EqualCoeff);
+  void         SetZP1EqualCoeff(Int_t channel, Float_t val) {fZP1EqualCoeff[channel]=val;}
+  void         SetZP1EqualCoeff(Float_t* EqualCoeff);
+  void         SetZN2EqualCoeff(Int_t channel, Float_t val) {fZN2EqualCoeff[channel]=val;}
+  void         SetZN2EqualCoeff(Float_t* EqualCoeff);
+  void         SetZP2EqualCoeff(Int_t channel, Float_t val) {fZP2EqualCoeff[channel]=val;}
+  void         SetZP2EqualCoeff(Float_t* EqualCoeff);
+  
+ protected:
+  // --- E calibration
+  Float_t  fEnCalibration[6];   // Coeff. for energy calibration
+  // --- Coefficients for tower calibration
+  Float_t  fZN1EqualCoeff[5];   // Equalization coefficients for ZN1 PTMs
+  Float_t  fZP1EqualCoeff[5];   // Equalization coefficients for ZN1 PTMs
+  Float_t  fZN2EqualCoeff[5];   // Equalization coefficients for ZN1 PTMs
+  Float_t  fZP2EqualCoeff[5];   // Equalization coefficients for ZN1 PTMs
+  //
+  ClassDef(AliZDCCalib,1)    // ZDC pedestal calibration data
+};
+
+#endif
index ae1165c..5266a7c 100644 (file)
@@ -10,6 +10,7 @@
  
 #pragma link C++ class  AliZDCDigit+;
 #pragma link C++ class  AliZDCRawStream+;
+#pragma link C++ class  AliZDCCalib+;
 #pragma link C++ class  AliZDCPedestals+;
 #pragma link C++ class  AliZDCLaserCalib+;
 #pragma link C++ class  AliZDCEnCalib+;
index 5b0f190..f2e95fe 100644 (file)
@@ -1,7 +1,7 @@
 #-*- Mode: Makefile -*-
 # $Id$
 
-SRCS= AliZDCDigit.cxx AliZDCRawStream.cxx AliZDCPedestals.cxx\
+SRCS= AliZDCDigit.cxx AliZDCRawStream.cxx AliZDCCalib.cxx AliZDCPedestals.cxx\
       AliZDCLaserCalib.cxx AliZDCEnCalib.cxx AliZDCTowerCalib.cxx \
       AliZDCMBCalib.cxx AliZDCChMap.cxx AliZDCMisAligner.cxx \
       AliZDCDataDCS.cxx AliZDCPreprocessor.cxx AliZDCQAChecker.cxx