]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ACORDE/AliACORDECalibData.cxx
changes by Astrid commited
[u/mrichter/AliRoot.git] / ACORDE / AliACORDECalibData.cxx
CommitLineData
19f796ed 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/* $Id: AliACORDECalibData.cxx, */
17
18
19#include "AliACORDECalibData.h"
68f6519c 20#include "TList.h"
21#include "TCanvas.h"
19f796ed 22
23ClassImp(AliACORDECalibData)
24
68f6519c 25
19f796ed 26//________________________________________________________________
68f6519c 27AliACORDECalibData::AliACORDECalibData():
28fHits(0),
29fTHits(0),
30fMultiHits(0),
31fTMultiHits(0)
19f796ed 32{
81f0f392 33 for (Int_t imod = 0; imod < 60; imod++)
34 {
35 fEfficiencies[imod]=0.;
36 fRates[imod]=0.;
37 fModulesActivity[imod]=0.;
38 }
19f796ed 39}
40
41//________________________________________________________________
42void AliACORDECalibData::Reset()
43{
44
45}
46
47//________________________________________________________________
c61a7285 48AliACORDECalibData::AliACORDECalibData(const char* name) :
49 TNamed(),
50 fHits(0),
51 fTHits(0),
52 fMultiHits(0),
53 fTMultiHits(0)
19f796ed 54{
55 TString namst = "Calib_";
56 namst += name;
57 SetName(namst.Data());
58 SetTitle(namst.Data());
59
60}
61
62//________________________________________________________________
63AliACORDECalibData::AliACORDECalibData(const AliACORDECalibData& calibda) :
c61a7285 64 TNamed(calibda),
65 fHits(0),
66 fTHits(0),
67 fMultiHits(0),
68 fTMultiHits(0)
19f796ed 69{
70// copy constructor
71
72 SetName(calibda.GetName());
73 SetTitle(calibda.GetName());
74
75 // there are 60 modules. Note that number of first module is 1 (one)
76 for(int t=0; t<60; t++)
77 {
fcdfb1ff 78 fEfficiencies[t] =calibda.GetEfficiency(t+1);
79 fRates[t] = calibda.GetRate(t+1);
80 fModulesActivity[t] = calibda.GetModuleActivity(t+1);
19f796ed 81 }
82}
68f6519c 83//_______________________________________________________________
c61a7285 84void AliACORDECalibData::Draw(Option_t *)
68f6519c 85{
86
87
88 //fHits->Draw();
89
90
19f796ed 91
68f6519c 92 TCanvas *ch;
93 TString canvasHistoName="Histos";
94 ch=new TCanvas(canvasHistoName,canvasHistoName,20,20,600,600);
95 ch->Divide(2,2);
96 ch->cd(1);
97 fHits->Draw();
98 ch->cd(2);
99 fTHits->Draw();
100 ch->cd(3);
101 fMultiHits->Draw();
102 ch->cd(4);
103 fTMultiHits->Draw();
104
105
106}
19f796ed 107//________________________________________________________________
108AliACORDECalibData &AliACORDECalibData::operator =(const AliACORDECalibData& calibda)
109{
110// assignment operator
111
112 SetName(calibda.GetName());
113 SetTitle(calibda.GetName());
114 // there are 60 modules. Note that number of first module is 1 (one)
115 for(int t=0; t<60; t++)
116 {
fcdfb1ff 117 fEfficiencies[t] =calibda.GetEfficiency(t+1);
118 fRates[t] = calibda.GetRate(t+1);
119 fModulesActivity[t] = calibda.GetModuleActivity(t+1);
19f796ed 120 }
121 return *this;
122}
68f6519c 123//_______________________________________________________________
124/*void AliACORDECalibData::AddHisto(TH1D *fHist)
125{
126
127
128
129 = (TH1D*)fHist->Clone("hnew");
130
131
132
133
134}
135*/
19f796ed 136
137//________________________________________________________________
138AliACORDECalibData::~AliACORDECalibData()
139{
140
141}
142
143
144
145//________________________________________________________________
146void AliACORDECalibData::SetEfficiencies(Float_t* Eff)
147{
148 // there are 60 modules. Note that number of first module is 1 (one)
149 if(Eff) for(int t=0; t<60; t++) fEfficiencies[t] = Eff[t];
150 else for(int t=0; t<60; t++) fEfficiencies[t] = 0.0;
151}
152
153void AliACORDECalibData::SetRates(Float_t* Rt)
154{
155 if(Rt) for (int t=0;t<60; t++) fRates[t] = Rt[t];
156else for (int t=0;t<60; t++) fRates[t] = 0.0;
157}
fcdfb1ff 158
159void AliACORDECalibData::SetModulesActivity(Float_t* Mac)
160{
161 if(Mac) for (int t=0;t<60;t++) fModulesActivity[t] = Mac[t];
162 else for (int t=0;t<60;t++) fModulesActivity[t] = 0.0;
163}
164