Line data Source code
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 :
25 12 : ClassImp(AliZDCSaturationCalib)
26 :
27 : //________________________________________________________________
28 : AliZDCSaturationCalib::AliZDCSaturationCalib():
29 2 : TNamed()
30 10 : {
31 2 : Reset();
32 20 : for(Int_t i=0; i<4; i++){
33 8 : fZNASatCalibration[i] = 0.;
34 8 : fZNCSatCalibration[i] = 0.;
35 : }
36 4 : }
37 :
38 : //________________________________________________________________
39 : AliZDCSaturationCalib::AliZDCSaturationCalib(const char* name):
40 0 : TNamed()
41 0 : {
42 : // Constructor
43 0 : TString namst = "Calib_";
44 0 : namst += name;
45 0 : SetName(namst.Data());
46 0 : SetTitle(namst.Data());
47 0 : Reset();
48 0 : for(Int_t i=0; i<4; i++){
49 0 : fZNASatCalibration[i] = 0.;
50 0 : fZNCSatCalibration[i] = 0.;
51 : }
52 0 : }
53 :
54 : //________________________________________________________________
55 : AliZDCSaturationCalib::AliZDCSaturationCalib(const AliZDCSaturationCalib& calibda) :
56 0 : TNamed(calibda)
57 0 : {
58 : // Copy constructor
59 0 : SetName(calibda.GetName());
60 0 : SetTitle(calibda.GetName());
61 0 : Reset();
62 0 : for(int i=0; i<4; i++){
63 0 : fZNASatCalibration[i] = calibda.GetZNASatCalib(i);
64 0 : fZNCSatCalibration[i] = calibda.GetZNCSatCalib(i);
65 : }
66 0 : }
67 :
68 : //________________________________________________________________
69 : AliZDCSaturationCalib &AliZDCSaturationCalib::operator =(const AliZDCSaturationCalib& calibda)
70 : {
71 : // assignment operator
72 0 : SetName(calibda.GetName());
73 0 : SetTitle(calibda.GetName());
74 0 : Reset();
75 0 : for(int i=0; i<4; i++){
76 0 : fZNASatCalibration[i] = calibda.GetZNASatCalib(i);
77 0 : fZNCSatCalibration[i] = calibda.GetZNCSatCalib(i);
78 : }
79 :
80 0 : return *this;
81 : }
82 :
83 : //________________________________________________________________
84 : AliZDCSaturationCalib::~AliZDCSaturationCalib()
85 0 : {
86 0 : }
87 :
88 : //________________________________________________________________
89 : void AliZDCSaturationCalib::Reset()
90 : {
91 : // Reset
92 4 : }
93 :
94 :
95 : //________________________________________________________________
96 : void AliZDCSaturationCalib::Print(Option_t *) const
97 : {
98 : // Printing of calibration object
99 0 : printf("\n\n ####### Parameters for ZN knee saturation coeffieicients ####### \n");
100 0 : printf(" ZNA => %e %e %e %e \n",fZNASatCalibration[0],fZNASatCalibration[1],fZNASatCalibration[2],fZNASatCalibration[3]);
101 0 : printf(" ZNC => %e %e %e %e \n",fZNCSatCalibration[0],fZNCSatCalibration[1],fZNCSatCalibration[2],fZNCSatCalibration[3]);
102 :
103 0 : }
104 :
105 : //________________________________________________________________
106 : void AliZDCSaturationCalib::SetZNASatCalib(Float_t* satCalib)
107 : {
108 : // Set energy calibration coefficients
109 0 : if(satCalib) for(int t=0; t<4; t++) fZNASatCalibration[t] = satCalib[t];
110 0 : else for(int t=0; t<4; t++) fZNASatCalibration[t] = 0.;
111 0 : }
112 :
113 : //________________________________________________________________
114 : void AliZDCSaturationCalib::SetZNCSatCalib(Float_t* satCalib)
115 : {
116 : // Set energy calibration coefficients
117 0 : if(satCalib) for(int t=0; t<4; t++) fZNCSatCalibration[t] = satCalib[t];
118 0 : else for(int t=0; t<4; t++) fZNCSatCalibration[t] = 0.;
119 0 : }
|