]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ACORDE/AliACORDECalibData.cxx
No overlpas with L3 magnet
[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 25TH1D *fHits;
26 TH1D *fTHits;
27 TH1D *fMultiHits;
28 TH1D *fTMultiHits;
29
30
31
19f796ed 32//________________________________________________________________
68f6519c 33AliACORDECalibData::AliACORDECalibData():
34fHits(0),
35fTHits(0),
36fMultiHits(0),
37fTMultiHits(0)
19f796ed 38{
39
40}
41
42//________________________________________________________________
43void AliACORDECalibData::Reset()
44{
45
46}
47
48//________________________________________________________________
c61a7285 49AliACORDECalibData::AliACORDECalibData(const char* name) :
50 TNamed(),
51 fHits(0),
52 fTHits(0),
53 fMultiHits(0),
54 fTMultiHits(0)
19f796ed 55{
56 TString namst = "Calib_";
57 namst += name;
58 SetName(namst.Data());
59 SetTitle(namst.Data());
60
61}
62
63//________________________________________________________________
64AliACORDECalibData::AliACORDECalibData(const AliACORDECalibData& calibda) :
c61a7285 65 TNamed(calibda),
66 fHits(0),
67 fTHits(0),
68 fMultiHits(0),
69 fTMultiHits(0)
19f796ed 70{
71// copy constructor
72
73 SetName(calibda.GetName());
74 SetTitle(calibda.GetName());
75
76 // there are 60 modules. Note that number of first module is 1 (one)
77 for(int t=0; t<60; t++)
78 {
79 fEfficiencies[t] =calibda.GetEfficiency(t+1);
80 fRates[t] = calibda.GetRate(t+1);
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 {
117 fEfficiencies[t] =calibda.GetEfficiency(t+1);
118 fRates[t] = calibda.GetRate(t+1);
119 }
120 return *this;
121}
68f6519c 122//_______________________________________________________________
123/*void AliACORDECalibData::AddHisto(TH1D *fHist)
124{
125
126
127
128 = (TH1D*)fHist->Clone("hnew");
129
130
131
132
133}
134*/
19f796ed 135
136//________________________________________________________________
137AliACORDECalibData::~AliACORDECalibData()
138{
139
140}
141
142
143
144//________________________________________________________________
145void AliACORDECalibData::SetEfficiencies(Float_t* Eff)
146{
147 // there are 60 modules. Note that number of first module is 1 (one)
148 if(Eff) for(int t=0; t<60; t++) fEfficiencies[t] = Eff[t];
149 else for(int t=0; t<60; t++) fEfficiencies[t] = 0.0;
150}
151
152void AliACORDECalibData::SetRates(Float_t* Rt)
153{
154 if(Rt) for (int t=0;t<60; t++) fRates[t] = Rt[t];
155else for (int t=0;t<60; t++) fRates[t] = 0.0;
156}