1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 ///////////////////////////////////////////////////////////////////////////////
18 // class for ZDC calibration //
19 // -> values for calibration //
21 ///////////////////////////////////////////////////////////////////////////////
23 #include "AliZDCSaturationCalib.h"
25 ClassImp(AliZDCSaturationCalib)
27 //________________________________________________________________
28 AliZDCSaturationCalib::AliZDCSaturationCalib():
32 for(Int_t i=0; i<4; i++){
33 fZNASatCalibration[i] = 0.;
34 fZNCSatCalibration[i] = 0.;
38 //________________________________________________________________
39 AliZDCSaturationCalib::AliZDCSaturationCalib(const char* name):
43 TString namst = "Calib_";
45 SetName(namst.Data());
46 SetTitle(namst.Data());
48 for(Int_t i=0; i<4; i++){
49 fZNASatCalibration[i] = 0.;
50 fZNCSatCalibration[i] = 0.;
54 //________________________________________________________________
55 AliZDCSaturationCalib::AliZDCSaturationCalib(const AliZDCSaturationCalib& calibda) :
59 SetName(calibda.GetName());
60 SetTitle(calibda.GetName());
62 for(int i=0; i<4; i++){
63 fZNASatCalibration[i] = calibda.GetZNASatCalib(i);
64 fZNCSatCalibration[i] = calibda.GetZNCSatCalib(i);
68 //________________________________________________________________
69 AliZDCSaturationCalib &AliZDCSaturationCalib::operator =(const AliZDCSaturationCalib& calibda)
71 // assignment operator
72 SetName(calibda.GetName());
73 SetTitle(calibda.GetName());
75 for(int i=0; i<4; i++){
76 fZNASatCalibration[i] = calibda.GetZNASatCalib(i);
77 fZNCSatCalibration[i] = calibda.GetZNCSatCalib(i);
83 //________________________________________________________________
84 AliZDCSaturationCalib::~AliZDCSaturationCalib()
88 //________________________________________________________________
89 void AliZDCSaturationCalib::Reset()
95 //________________________________________________________________
96 void AliZDCSaturationCalib::Print(Option_t *) const
98 // Printing of calibration object
99 printf("\n\n ####### Parameters for ZN knee saturation coeffieicients ####### \n");
100 printf(" ZNA => %e %e %e %e \n",fZNASatCalibration[0],fZNASatCalibration[1],fZNASatCalibration[2],fZNASatCalibration[3]);
101 printf(" ZNC => %e %e %e %e \n",fZNCSatCalibration[0],fZNCSatCalibration[1],fZNCSatCalibration[2],fZNCSatCalibration[3]);
105 //________________________________________________________________
106 void AliZDCSaturationCalib::SetZNASatCalib(Float_t* satCalib)
108 // Set energy calibration coefficients
109 if(satCalib) for(int t=0; t<4; t++) fZNASatCalibration[t] = satCalib[t];
110 else for(int t=0; t<4; t++) fZNASatCalibration[t] = 0.;
113 //________________________________________________________________
114 void AliZDCSaturationCalib::SetZNCSatCalib(Float_t* satCalib)
116 // Set energy calibration coefficients
117 if(satCalib) for(int t=0; t<4; t++) fZNCSatCalibration[t] = satCalib[t];
118 else for(int t=0; t<4; t++) fZNCSatCalibration[t] = 0.;