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():
34 //________________________________________________________________
35 AliZDCEnCalib::AliZDCEnCalib(const char* name):
39 TString namst = "Calib_";
41 SetName(namst.Data());
42 SetTitle(namst.Data());
44 for(Int_t i=0; i<6; i++){
45 fEnCalibration[i] = 0.;
49 //________________________________________________________________
50 AliZDCEnCalib::AliZDCEnCalib(const AliZDCEnCalib& calibda) :
54 SetName(calibda.GetName());
55 SetTitle(calibda.GetName());
57 for(int i=0; i<6; i++){
58 fEnCalibration[i] = calibda.GetEnCalib(i);
62 //________________________________________________________________
63 AliZDCEnCalib &AliZDCEnCalib::operator =(const AliZDCEnCalib& calibda)
65 // assignment operator
66 SetName(calibda.GetName());
67 SetTitle(calibda.GetName());
69 for(int i=0; i<6; i++){
70 fEnCalibration[i] = calibda.GetEnCalib(i);
76 //________________________________________________________________
77 AliZDCEnCalib::~AliZDCEnCalib()
81 //________________________________________________________________
82 void AliZDCEnCalib::Reset()
88 //________________________________________________________________
89 void AliZDCEnCalib::Print(Option_t *) const
91 // Printing of calibration object
92 printf("\n\n ####### Energy calibration coefficients ####### \n");
93 printf(" ZN1 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[0]);
94 printf(" ZP1 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[1]);
95 printf(" ZN2 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[2]);
96 printf(" ZP2 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[3]);
97 printf(" ZEM1 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[4]);
98 printf(" ZEM2 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[5]);
102 //________________________________________________________________
103 void AliZDCEnCalib::SetEnCalib(Float_t* EnCalib)
105 // Set energy calibration coefficients
106 if(EnCalib) for(int t=0; t<6; t++) fEnCalibration[t] = EnCalib[t];
107 else for(int t=0; t<6; t++) fEnCalibration[t] = 0.;