LCOV - code coverage report
Current view: top level - TRD/TRDbase - AliTRDCalROC.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 7 9 77.8 %
Date: 2016-06-14 17:26:59 Functions: 8 13 61.5 %

          Line data    Source code
       1             : #ifndef ALITRDCALROC_H
       2             : #define ALITRDCALROC_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /* $Id$ */
       7             : 
       8             : //////////////////////////////////////////////////
       9             : //                                              //
      10             : //  TRD calibration base class for one ROC      //
      11             : //                                              //
      12             : //////////////////////////////////////////////////
      13             : 
      14             : #include <TObject.h>
      15             : 
      16             : class TArrayI;
      17             : class TArrayF;
      18             : class TH2F;
      19             : class TH1F;
      20             : class TGraph2D;
      21             : class TH2D;
      22             : 
      23             : //_____________________________________________________________________________
      24             : class AliTRDCalROC : public TObject 
      25             : {
      26             : 
      27             :  public:
      28             : 
      29             :   AliTRDCalROC();
      30             :   AliTRDCalROC(Int_t p, Int_t c);
      31             :   AliTRDCalROC(const AliTRDCalROC &c);
      32             :   virtual      ~AliTRDCalROC();
      33             :   AliTRDCalROC &operator=(const AliTRDCalROC &c);
      34             :   virtual void  Copy(TObject &c) const;
      35             : 
      36       99864 :   Int_t         GetNrows() const                   { return fNrows; };
      37       99864 :   Int_t         GetNcols() const                   { return fNcols; };
      38             : 
      39     3956182 :   Int_t         GetChannel(Int_t c, Int_t r) const { return r+c*fNrows; };
      40     1393004 :   Int_t         GetNchannels() const               { return fNchannels; };
      41             : 
      42     5347798 :   Float_t       GetValue(Int_t ich) const          { return (Float_t) fData[ich] / 10000;  };
      43     3956182 :   Float_t       GetValue(Int_t col, Int_t row)     { return GetValue(GetChannel(col,row)); };
      44             : 
      45           0 :   void          SetValue(Int_t ich, Float_t value) { fData[ich] = (UShort_t) (value * 10000); };
      46             :   void          SetValue(Int_t col, Int_t row, Float_t value) 
      47           0 :                                                    { SetValue(GetChannel(col,row), value);    };
      48             : 
      49             :   // statistic
      50             :   //
      51             :   Double_t GetMean(AliTRDCalROC * const outlierROC=0) const;
      52             :   Double_t GetMeanNotNull() const;
      53             :   Double_t GetRMS(AliTRDCalROC * const outlierROC=0) const;
      54             :   Double_t GetRMSNotNull() const;
      55             :   Double_t GetMedian(AliTRDCalROC * const outlierROC=0) const;
      56             :   Double_t GetLTM(Double_t *sigma=0, Double_t fraction=0.9, AliTRDCalROC * const outlierROC=0);
      57             : 
      58             :   // algebra
      59             :   Bool_t Add(Float_t c1);
      60             :   Bool_t Multiply(Float_t c1);
      61             :   Bool_t Add(const AliTRDCalROC * roc, Double_t c1 = 1);
      62             :   Bool_t Multiply(const AliTRDCalROC * roc);   
      63             :   Bool_t Divide(const AliTRDCalROC * roc);   
      64             : 
      65             :   // noise
      66             :   Bool_t Unfold();
      67             :   
      68             :   //Plots
      69             :   TH2F *   MakeHisto2D(Float_t min, Float_t max,Int_t type, Float_t mu = 1.0);
      70             :   TH1F *   MakeHisto1D(Float_t min, Float_t max,Int_t type, Float_t mu = 1.0);
      71             :   
      72             :  protected:
      73             : 
      74             :   Int_t     fPla;              //  Plane number
      75             :   Int_t     fCha;              //  Chamber number
      76             : 
      77             :   Int_t     fNrows;            //  Number of rows
      78             :   Int_t     fNcols;            //  Number of columns
      79             : 
      80             :   Int_t     fNchannels;        //  Number of channels
      81             :   UShort_t *fData;             //[fNchannels] Data
      82             : 
      83       14094 :   ClassDef(AliTRDCalROC, 2)    //  TRD ROC calibration class
      84             : 
      85             : };
      86             : 
      87             : #endif

Generated by: LCOV version 1.11