]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ACORDE/AliACORDECalibData.cxx
Specifying which run types we are interested in
[u/mrichter/AliRoot.git] / ACORDE / AliACORDECalibData.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 /* $Id: AliACORDECalibData.cxx,                                            */
17
18
19 #include "AliACORDECalibData.h"
20 #include "TList.h"
21 #include "TCanvas.h"
22
23 ClassImp(AliACORDECalibData)
24
25 TH1D *fHits;
26   TH1D *fTHits;
27   TH1D *fMultiHits;
28   TH1D *fTMultiHits;
29
30
31
32 //________________________________________________________________
33 AliACORDECalibData::AliACORDECalibData():
34 fHits(0),
35 fTHits(0),
36 fMultiHits(0),
37 fTMultiHits(0)
38 {
39   
40 }
41
42 //________________________________________________________________
43 void AliACORDECalibData::Reset()
44 {
45   
46 }
47
48 //________________________________________________________________
49 AliACORDECalibData::AliACORDECalibData(const char* name) :
50   TNamed(),
51   fHits(0),
52   fTHits(0),
53   fMultiHits(0),
54   fTMultiHits(0)
55 {
56   TString namst = "Calib_";
57   namst += name;
58   SetName(namst.Data());
59   SetTitle(namst.Data());
60
61 }
62
63 //________________________________________________________________
64 AliACORDECalibData::AliACORDECalibData(const AliACORDECalibData& calibda) :
65   TNamed(calibda),
66   fHits(0),
67   fTHits(0),
68   fMultiHits(0),
69   fTMultiHits(0)
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 }
83 //_______________________________________________________________
84 void AliACORDECalibData::Draw(Option_t *)
85 {
86  
87
88   //fHits->Draw();
89
90
91
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 }
107 //________________________________________________________________
108 AliACORDECalibData &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 }
122 //_______________________________________________________________
123 /*void AliACORDECalibData::AddHisto(TH1D *fHist)
124 {
125     
126
127
128  = (TH1D*)fHist->Clone("hnew");
129
130      
131    
132  
133 }
134 */
135
136 //________________________________________________________________
137 AliACORDECalibData::~AliACORDECalibData()
138 {
139   
140 }
141
142                                                                                    
143
144 //________________________________________________________________
145 void 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
152 void AliACORDECalibData::SetRates(Float_t* Rt)
153 {
154    if(Rt) for (int t=0;t<60; t++) fRates[t] = Rt[t];
155 else for (int t=0;t<60; t++) fRates[t] = 0.0;
156 }