ALIROOT-5420 Changes for CDH v3
[u/mrichter/AliRoot.git] / ZDC / AliZDCSaturationCalib.cxx
CommitLineData
960c5431 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16///////////////////////////////////////////////////////////////////////////////
17// //
18// class for ZDC calibration //
19// -> values for calibration //
20// //
21///////////////////////////////////////////////////////////////////////////////
22
23#include "AliZDCSaturationCalib.h"
24
25ClassImp(AliZDCSaturationCalib)
26
27//________________________________________________________________
28AliZDCSaturationCalib::AliZDCSaturationCalib():
29TNamed()
30{
31 Reset();
32 for(Int_t i=0; i<4; i++){
33 fZNASatCalibration[i] = 0.;
34 fZNCSatCalibration[i] = 0.;
35 }
36}
37
38//________________________________________________________________
39AliZDCSaturationCalib::AliZDCSaturationCalib(const char* name):
40TNamed()
41{
42 // Constructor
43 TString namst = "Calib_";
44 namst += name;
45 SetName(namst.Data());
46 SetTitle(namst.Data());
47 Reset();
48 for(Int_t i=0; i<4; i++){
49 fZNASatCalibration[i] = 0.;
50 fZNCSatCalibration[i] = 0.;
51 }
52}
53
54//________________________________________________________________
55AliZDCSaturationCalib::AliZDCSaturationCalib(const AliZDCSaturationCalib& calibda) :
56 TNamed(calibda)
57{
58 // Copy constructor
59 SetName(calibda.GetName());
60 SetTitle(calibda.GetName());
61 Reset();
62 for(int i=0; i<4; i++){
63 fZNASatCalibration[i] = calibda.GetZNASatCalib(i);
64 fZNCSatCalibration[i] = calibda.GetZNCSatCalib(i);
65 }
66}
67
68//________________________________________________________________
69AliZDCSaturationCalib &AliZDCSaturationCalib::operator =(const AliZDCSaturationCalib& calibda)
70{
71// assignment operator
72 SetName(calibda.GetName());
73 SetTitle(calibda.GetName());
74 Reset();
75 for(int i=0; i<4; i++){
76 fZNASatCalibration[i] = calibda.GetZNASatCalib(i);
77 fZNCSatCalibration[i] = calibda.GetZNCSatCalib(i);
78 }
79
80 return *this;
81}
82
83//________________________________________________________________
84AliZDCSaturationCalib::~AliZDCSaturationCalib()
85{
86}
87
88//________________________________________________________________
89void AliZDCSaturationCalib::Reset()
90{
91 // Reset
92}
93
94
95//________________________________________________________________
96void AliZDCSaturationCalib::Print(Option_t *) const
97{
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]);
102
103}
104
105//________________________________________________________________
106void AliZDCSaturationCalib::SetZNASatCalib(Float_t* satCalib)
107{
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.;
111}
112
113//________________________________________________________________
114void AliZDCSaturationCalib::SetZNCSatCalib(Float_t* satCalib)
115{
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.;
119}