]>
Commit | Line | Data |
---|---|---|
07627591 | 1 | #ifndef ALITPCCALROC_H |
2 | #define ALITPCCALROC_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id: AliTPCCalROC.h,v */ | |
7 | ||
8 | ////////////////////////////////////////////////// | |
9 | // // | |
10 | // TPC calibration base class for one ROC // | |
11 | // // | |
12 | ////////////////////////////////////////////////// | |
07627591 | 13 | #include <TObject.h> |
184bcc16 | 14 | #include <TMath.h> |
c5bbaa2c | 15 | #include <AliTPCROC.h> |
f116e22c | 16 | #include "TLinearFitter.h" |
17 | ||
184bcc16 | 18 | class TH1F; |
19 | class TH2F; | |
72fbbc82 | 20 | class TArrayI; |
07627591 | 21 | //_____________________________________________________________________________ |
22 | class AliTPCCalROC : public TObject { | |
23 | ||
24 | public: | |
25 | ||
26 | AliTPCCalROC(); | |
c5bbaa2c | 27 | AliTPCCalROC(UInt_t sector); |
07627591 | 28 | AliTPCCalROC(const AliTPCCalROC &c); |
179c6296 | 29 | AliTPCCalROC &operator = (const AliTPCCalROC & param); |
07627591 | 30 | virtual ~AliTPCCalROC(); |
e6c51e6e | 31 | UInt_t GetSector() const { return fSector;} |
c5bbaa2c | 32 | UInt_t GetNrows() const { return fNRows;}; |
33 | UInt_t GetNchannels() const { return fNChannels;}; | |
34 | UInt_t GetNPads(UInt_t row) const { return (row<fNRows)? AliTPCROC::Instance()->GetNPads(fSector,row):0;}; | |
35 | Float_t GetValue(UInt_t row, UInt_t pad) const { return ( (row<fNRows) && (fIndexes[row]+pad)<fNChannels)? fData[fIndexes[row]+pad]: 0; }; | |
36 | Float_t GetValue(UInt_t channel) const { return fData[channel]; }; | |
37 | void SetValue(UInt_t row, UInt_t pad, Float_t vd) { if ( row<fNRows && (fIndexes[row]+pad)<fNChannels)fData[fIndexes[row]+pad]= vd; }; | |
38 | void SetValue(UInt_t channel, Float_t vd) {fData[channel]= vd; }; | |
2e9bedc9 | 39 | virtual void Draw(Option_t* option = ""); |
184bcc16 | 40 | // |
43b569c6 | 41 | // algebra |
42 | void Add(Float_t c1); | |
43 | void Multiply(Float_t c1); | |
44 | void Add(const AliTPCCalROC * roc, Double_t c1 = 1); | |
45 | void Multiply(const AliTPCCalROC * roc); | |
46 | void Divide(const AliTPCCalROC * roc); | |
47 | // statistic | |
48 | // | |
ca5dca67 | 49 | Double_t GetMean(AliTPCCalROC* outlierROC = 0); |
50 | Double_t GetRMS(AliTPCCalROC* outlierROC = 0); | |
51 | Double_t GetMedian(AliTPCCalROC* outlierROC = 0) ; | |
52 | Double_t GetLTM(Double_t *sigma=0, Double_t fraction=0.9, AliTPCCalROC* outlierROC = 0); | |
184bcc16 | 53 | TH1F * MakeHisto1D(Float_t min=4, Float_t max=-4, Int_t type=0); |
54 | TH2F * MakeHisto2D(Float_t min=4, Float_t max=-4, Int_t type=0); | |
55 | TH2F * MakeHistoOutliers(Float_t delta=4, Float_t fraction=0.7, Int_t mode=0); | |
72fbbc82 | 56 | |
57 | AliTPCCalROC * LocalFit(Int_t rowRadius, Int_t padRadius, AliTPCCalROC* ROCoutliers = 0, Bool_t robust = kFALSE); | |
f116e22c | 58 | // |
59 | void GlobalFit(const AliTPCCalROC* ROCoutliers, Bool_t robust, TVectorD &fitParam, TMatrixD &covMatrix, Float_t & chi2, Int_t fitType = 1); | |
60 | // | |
61 | static AliTPCCalROC* CreateGlobalFitCalROC(TVectorD &fitParam, Int_t sector); | |
72fbbc82 | 62 | |
c5bbaa2c | 63 | static void Test(); |
64 | protected: | |
72fbbc82 | 65 | |
66 | Double_t GetNeighbourhoodValue(TLinearFitter* fitterQ, Int_t row, Int_t pad, Int_t rRadius, Int_t pRadius, AliTPCCalROC* ROCoutliers, Bool_t robust); | |
67 | void GetNeighbourhood(TArrayI* &rowArray, TArrayI* &padArray, Int_t row, Int_t pad, Int_t rRadius, Int_t pRadius); | |
68 | ||
c5bbaa2c | 69 | UInt_t fSector; // sector number |
70 | UInt_t fNChannels; // number of channels | |
71 | UInt_t fNRows; // number of rows | |
72 | const UInt_t* fIndexes; //!indexes | |
73 | Float_t *fData; //[fNChannels] Data | |
07627591 | 74 | ClassDef(AliTPCCalROC,1) // TPC ROC calibration class |
75 | ||
76 | }; | |
77 | ||
78 | #endif |