]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/Cal/AliTRDCalROC.h
Be sure to load mapping when needed
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalROC.h
CommitLineData
7754cd1f 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
4c87f26e 6/* $Id$ */
7754cd1f 7
8//////////////////////////////////////////////////
9// //
10// TRD calibration base class for one ROC //
11// //
12//////////////////////////////////////////////////
13
14#include <TObject.h>
4c87f26e 15
16class TArrayI;
17class TArrayF;
18class TH2F;
19class TH1F;
20class TGraph2D;
21class TH2D;
7754cd1f 22
23//_____________________________________________________________________________
4c87f26e 24class AliTRDCalROC : public TObject
25{
7754cd1f 26
27 public:
28
29 AliTRDCalROC();
30 AliTRDCalROC(Int_t p, Int_t c);
31 AliTRDCalROC(const AliTRDCalROC &c);
2745a409 32 virtual ~AliTRDCalROC();
33 AliTRDCalROC &operator=(const AliTRDCalROC &c);
34 virtual void Copy(TObject &c) const;
7754cd1f 35
c893147d 36 Int_t GetNrows() const { return fNrows; };
37 Int_t GetNcols() const { return fNcols; };
7754cd1f 38
c893147d 39 Int_t GetChannel(Int_t c, Int_t r) const { return r+c*fNrows; };
40 Int_t GetNchannels() const { return fNchannels; };
7754cd1f 41
c893147d 42 Float_t GetValue(Int_t ich) const { return (Float_t) fData[ich] / 10000; };
43 Float_t GetValue(Int_t col, Int_t row) { return GetValue(GetChannel(col,row)); };
7754cd1f 44
c893147d 45 void SetValue(Int_t ich, Float_t value) { fData[ich] = (UShort_t) (value * 10000); };
2745a409 46 void SetValue(Int_t col, Int_t row, Float_t value)
c893147d 47 { SetValue(GetChannel(col,row), value); };
7754cd1f 48
4c87f26e 49 // statistic
50 //
c893147d 51 Double_t GetMean(AliTRDCalROC * const outlierROC=0) const;
52 Double_t GetRMS(AliTRDCalROC * const outlierROC=0) const;
53 Double_t GetMedian(AliTRDCalROC * const outlierROC=0) const;
54 Double_t GetLTM(Double_t *sigma=0, Double_t fraction=0.9, AliTRDCalROC * const outlierROC=0);
4c87f26e 55
56 // algebra
57 Bool_t Add(Float_t c1);
58 Bool_t Multiply(Float_t c1);
59 Bool_t Add(const AliTRDCalROC * roc, Double_t c1 = 1);
60 Bool_t Multiply(const AliTRDCalROC * roc);
61 Bool_t Divide(const AliTRDCalROC * roc);
37b0cf5e 62
63 // noise
64 Bool_t Unfold();
4c87f26e 65
66 //Plots
7dcf6933 67 TH2F * MakeHisto2D(Float_t min, Float_t max,Int_t type, Float_t mu = 1.0);
68 TH1F * MakeHisto1D(Float_t min, Float_t max,Int_t type, Float_t mu = 1.0);
4c87f26e 69
7754cd1f 70 protected:
71
2745a409 72 Int_t fPla; // Plane number
73 Int_t fCha; // Chamber number
7754cd1f 74
2745a409 75 Int_t fNrows; // Number of rows
76 Int_t fNcols; // Number of columns
7754cd1f 77
2745a409 78 Int_t fNchannels; // Number of channels
79 UShort_t *fData; //[fNchannels] Data
7754cd1f 80
81 ClassDef(AliTRDCalROC, 2) // TRD ROC calibration class
82
83};
84
85#endif