3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 /* $Id: AliTPCCalROC.h,v */
8 //////////////////////////////////////////////////
10 // TPC calibration base class for one ROC //
12 //////////////////////////////////////////////////
16 #include <AliTPCROC.h>
19 //_____________________________________________________________________________
20 class AliTPCCalROC : public TObject {
25 AliTPCCalROC(UInt_t sector);
26 AliTPCCalROC(const AliTPCCalROC &c);
27 AliTPCCalROC &operator = (const AliTPCCalROC & param);
28 virtual ~AliTPCCalROC();
29 UInt_t GetNrows() const { return fNRows;};
30 UInt_t GetNchannels() const { return fNChannels;};
31 UInt_t GetNPads(UInt_t row) const { return (row<fNRows)? AliTPCROC::Instance()->GetNPads(fSector,row):0;};
32 Float_t GetValue(UInt_t row, UInt_t pad) const { return ( (row<fNRows) && (fIndexes[row]+pad)<fNChannels)? fData[fIndexes[row]+pad]: 0; };
33 Float_t GetValue(UInt_t channel) const { return fData[channel]; };
34 void SetValue(UInt_t row, UInt_t pad, Float_t vd) { if ( row<fNRows && (fIndexes[row]+pad)<fNChannels)fData[fIndexes[row]+pad]= vd; };
35 void SetValue(UInt_t channel, Float_t vd) {fData[channel]= vd; };
36 virtual void Draw(Option_t* option = "");
40 void Multiply(Float_t c1);
41 void Add(const AliTPCCalROC * roc, Double_t c1 = 1);
42 void Multiply(const AliTPCCalROC * roc);
43 void Divide(const AliTPCCalROC * roc);
46 Double_t GetMean(){return TMath::Mean(fNChannels, fData);}
47 Double_t GetRMS() {return TMath::RMS(fNChannels, fData);}
48 Double_t GetMedian() {return TMath::Median(fNChannels, fData);}
49 Double_t GetLTM(Double_t *sigma=0, Double_t fraction=0.9);
50 TH1F * MakeHisto1D(Float_t min=4, Float_t max=-4, Int_t type=0);
51 TH2F * MakeHisto2D(Float_t min=4, Float_t max=-4, Int_t type=0);
52 TH2F * MakeHistoOutliers(Float_t delta=4, Float_t fraction=0.7, Int_t mode=0);
55 UInt_t fSector; // sector number
56 UInt_t fNChannels; // number of channels
57 UInt_t fNRows; // number of rows
58 const UInt_t* fIndexes; //!indexes
59 Float_t *fData; //[fNChannels] Data
60 ClassDef(AliTPCCalROC,1) // TPC ROC calibration class