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 ENERGY calibration //
19 // -> values for energy calibration //
21 ///////////////////////////////////////////////////////////////////////////////
23 #include "AliZDCEnCalib.h"
25 ClassImp(AliZDCEnCalib)
27 //________________________________________________________________
28 AliZDCEnCalib::AliZDCEnCalib():
32 for(Int_t i=0; i<6; i++) fEnCalibration[i] = 0.;
35 //________________________________________________________________
36 AliZDCEnCalib::AliZDCEnCalib(const char* name):
40 TString namst = "Calib_";
42 SetName(namst.Data());
43 SetTitle(namst.Data());
45 for(Int_t i=0; i<6; i++){
46 fEnCalibration[i] = 0.;
50 //________________________________________________________________
51 AliZDCEnCalib::AliZDCEnCalib(const AliZDCEnCalib& calibda) :
55 SetName(calibda.GetName());
56 SetTitle(calibda.GetName());
58 for(int i=0; i<6; i++){
59 fEnCalibration[i] = calibda.GetEnCalib(i);
63 //________________________________________________________________
64 AliZDCEnCalib &AliZDCEnCalib::operator =(const AliZDCEnCalib& calibda)
66 // assignment operator
67 SetName(calibda.GetName());
68 SetTitle(calibda.GetName());
70 for(int i=0; i<6; i++){
71 fEnCalibration[i] = calibda.GetEnCalib(i);
77 //________________________________________________________________
78 AliZDCEnCalib::~AliZDCEnCalib()
82 //________________________________________________________________
83 void AliZDCEnCalib::Reset()
89 //________________________________________________________________
90 void AliZDCEnCalib::Print(Option_t *) const
92 // Printing of calibration object
93 printf("\n\n ####### Energy calibration coefficients ####### \n");
94 printf(" ZN1 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[0]);
95 printf(" ZP1 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[1]);
96 printf(" ZN2 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[2]);
97 printf(" ZP2 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[3]);
98 printf(" ZEM1 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[4]);
99 printf(" ZEM2 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[5]);
103 //________________________________________________________________
104 void AliZDCEnCalib::SetEnCalib(Float_t* EnCalib)
106 // Set energy calibration coefficients
107 if(EnCalib) for(int t=0; t<6; t++) fEnCalibration[t] = EnCalib[t];
108 else for(int t=0; t<6; t++) fEnCalibration[t] = 0.;