]>
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 | ////////////////////////////////////////////////// | |
13 | ||
14 | #include <TObject.h> | |
184bcc16 | 15 | #include <TMath.h> |
c5bbaa2c | 16 | #include <AliTPCROC.h> |
184bcc16 | 17 | class TH1F; |
18 | class TH2F; | |
07627591 | 19 | //_____________________________________________________________________________ |
20 | class AliTPCCalROC : public TObject { | |
21 | ||
22 | public: | |
23 | ||
24 | AliTPCCalROC(); | |
c5bbaa2c | 25 | AliTPCCalROC(UInt_t sector); |
07627591 | 26 | AliTPCCalROC(const AliTPCCalROC &c); |
179c6296 | 27 | AliTPCCalROC &operator = (const AliTPCCalROC & param); |
07627591 | 28 | virtual ~AliTPCCalROC(); |
c5bbaa2c | 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; }; | |
2e9bedc9 | 36 | virtual void Draw(Option_t* option = ""); |
184bcc16 | 37 | // |
38 | Double_t GetMean(){return TMath::Mean(fNChannels, fData);} | |
39 | Double_t GetRMS() {return TMath::RMS(fNChannels, fData);} | |
40 | Double_t GetMedian() {return TMath::Median(fNChannels, fData);} | |
41 | Double_t GetLTM(Double_t *sigma=0, Double_t fraction=0.9); | |
42 | TH1F * MakeHisto1D(Float_t min=4, Float_t max=-4, Int_t type=0); | |
43 | TH2F * MakeHisto2D(Float_t min=4, Float_t max=-4, Int_t type=0); | |
44 | TH2F * MakeHistoOutliers(Float_t delta=4, Float_t fraction=0.7, Int_t mode=0); | |
c5bbaa2c | 45 | static void Test(); |
46 | protected: | |
47 | UInt_t fSector; // sector number | |
48 | UInt_t fNChannels; // number of channels | |
49 | UInt_t fNRows; // number of rows | |
50 | const UInt_t* fIndexes; //!indexes | |
51 | Float_t *fData; //[fNChannels] Data | |
07627591 | 52 | ClassDef(AliTPCCalROC,1) // TPC ROC calibration class |
53 | ||
54 | }; | |
55 | ||
56 | #endif |