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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // TPC calibration class for parameters which saved per pad //
22 ///////////////////////////////////////////////////////////////////////////////
24 #include "AliTPCCalPad.h"
25 #include "AliTPCCalROC.h"
26 #include <TObjArray.h>
29 ClassImp(AliTPCCalPad)
31 //_____________________________________________________________________________
32 AliTPCCalPad::AliTPCCalPad():TNamed()
35 // AliTPCCalPad default constructor
38 for (Int_t isec = 0; isec < kNsec; isec++) {
44 //_____________________________________________________________________________
45 AliTPCCalPad::AliTPCCalPad(const Text_t *name, const Text_t *title)
49 // AliTPCCalPad constructor
51 for (Int_t isec = 0; isec < kNsec; isec++) {
52 fROC[isec] = new AliTPCCalROC(isec);
57 //_____________________________________________________________________________
58 AliTPCCalPad::AliTPCCalPad(const AliTPCCalPad &c):TNamed(c)
61 // AliTPCCalPad copy constructor
64 ((AliTPCCalPad &) c).Copy(*this);
68 //_____________________________________________________________________________
69 AliTPCCalPad::AliTPCCalPad(TObjArray * array):TNamed()
72 // AliTPCCalPad default constructor
75 for (Int_t isec = 0; isec < kNsec; isec++) {
76 fROC[isec] = (AliTPCCalROC *)array->At(isec);
82 ///_____________________________________________________________________________
83 AliTPCCalPad::~AliTPCCalPad()
86 // AliTPCCalPad destructor
89 for (Int_t isec = 0; isec < kNsec; isec++) {
98 //_____________________________________________________________________________
99 AliTPCCalPad &AliTPCCalPad::operator=(const AliTPCCalPad &c)
102 // Assignment operator
105 if (this != &c) ((AliTPCCalPad &) c).Copy(*this);
110 //_____________________________________________________________________________
111 void AliTPCCalPad::Copy(TObject &c) const
117 for (Int_t isec = 0; isec < kNsec; isec++) {
119 fROC[isec]->Copy(*((AliTPCCalPad &) c).fROC[isec]);
125 TGraph * AliTPCCalPad::MakeGraph(Int_t type, Float_t ratio){
131 for (Int_t i=0;i<72;i++) if (fROC[i]) npoints++;
132 TGraph * graph = new TGraph(npoints);
134 for (Int_t isec=0;isec<72;isec++){
135 if (!fROC[isec]) continue;
136 if (type==0) graph->SetPoint(npoints,isec,fROC[isec]->GetMean());
137 if (type==1) graph->SetPoint(npoints,isec,fROC[isec]->GetMedian());
138 if (type==2) graph->SetPoint(npoints,isec,fROC[isec]->GetLTM(0,ratio));
142 graph->GetXaxis()->SetTitle("Sector");
144 graph->GetYaxis()->SetTitle("Mean");
145 graph->SetMarkerStyle(22);
148 graph->GetYaxis()->SetTitle("Median");
149 graph->SetMarkerStyle(22);
152 graph->GetYaxis()->SetTitle(Form("Mean%f",ratio));
153 graph->SetMarkerStyle(24);