]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ZDC/AliZDCEnCalib.cxx
Print commented
[u/mrichter/AliRoot.git] / ZDC / AliZDCEnCalib.cxx
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 ENERGY calibration                             //
19 //              -> values for energy calibration                             //
20 //                                                                           //
21 ///////////////////////////////////////////////////////////////////////////////
22
23 #include "AliZDCEnCalib.h"
24
25 ClassImp(AliZDCEnCalib)
26
27 //________________________________________________________________
28 AliZDCEnCalib::AliZDCEnCalib():
29 TNamed()
30 {
31   Reset();
32 }
33
34 //________________________________________________________________
35 AliZDCEnCalib::AliZDCEnCalib(const char* name):
36 TNamed()
37 {
38   // Constructor
39   TString namst = "Calib_";
40   namst += name;
41   SetName(namst.Data());
42   SetTitle(namst.Data());
43   Reset();
44   for(Int_t i=0; i<6; i++){
45     fEnCalibration[i] = 0.;
46   }
47 }
48
49 //________________________________________________________________
50 AliZDCEnCalib::AliZDCEnCalib(const AliZDCEnCalib& calibda) :
51   TNamed(calibda)
52 {
53   // Copy constructor
54   SetName(calibda.GetName());
55   SetTitle(calibda.GetName());
56   Reset();
57   for(int i=0; i<6; i++){
58     fEnCalibration[i] = calibda.GetEnCalib(i);
59   }
60 }
61
62 //________________________________________________________________
63 AliZDCEnCalib &AliZDCEnCalib::operator =(const AliZDCEnCalib& calibda)
64 {
65 // assignment operator
66   SetName(calibda.GetName());
67   SetTitle(calibda.GetName());
68   Reset();
69   for(int i=0; i<6; i++){
70      fEnCalibration[i] = calibda.GetEnCalib(i);
71   }
72   
73   return *this;
74 }
75
76 //________________________________________________________________
77 AliZDCEnCalib::~AliZDCEnCalib()
78 {
79 }
80
81 //________________________________________________________________
82 void AliZDCEnCalib::Reset()
83 {
84   // Reset
85 }                                                                                       
86
87
88 //________________________________________________________________
89 void  AliZDCEnCalib::Print(Option_t *) const
90 {
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]);
99
100
101
102 //________________________________________________________________
103 void AliZDCEnCalib::SetEnCalib(Float_t* EnCalib) 
104 {
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.;
108 }