]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/Cal/AliTRDCalDet.h
Update of the VZERO offline trigger: 1. New slewing correction with only 2 parameters...
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalDet.h
1 #ifndef ALITRDCALDET_H
2 #define ALITRDCALDET_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 class for parameters which are saved per detector        //
11 //                                                                           //
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include "TNamed.h"
15
16 #include "../AliTRDgeometry.h"
17
18 class TH1F;
19 class TH2F;
20
21 class AliTRDCalDet : public TNamed {
22
23  public:
24  
25   enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
26
27   AliTRDCalDet();
28   AliTRDCalDet(const Text_t* name, const Text_t* title);
29   AliTRDCalDet(const AliTRDCalDet &c);   
30   virtual      ~AliTRDCalDet();
31   AliTRDCalDet &operator=(const AliTRDCalDet &c);
32
33   virtual void  Copy(TObject &c) const;
34
35   Float_t       GetValue(Int_t d) const          { return fData[d];  };
36   Float_t       GetValue(Int_t p, Int_t c, Int_t s) const 
37                                                  { return fData[AliTRDgeometry::GetDetector(p,c,s)];  };
38
39   void          SetValue(Int_t d, Float_t value) { fData[d] = value; };
40   void          SetValue(Int_t p, Int_t c, Int_t s, Float_t value) 
41                                                  { fData[AliTRDgeometry::GetDetector(p,c,s)] = value; };
42
43   // statistic
44   Double_t GetMean(AliTRDCalDet * const outlierDet=0) const;
45   Double_t GetRMS(AliTRDCalDet * const outlierDet=0) const;
46   Double_t GetMedian(AliTRDCalDet * const outlierDet=0) const;
47   Double_t GetLTM(Double_t * sigma=0, Double_t fraction=0.9, AliTRDCalDet * const outlierDet=0);     
48
49   // Plot functions
50   TH1F * MakeHisto1Distribution(Float_t min=4, Float_t max=-4, Int_t type=0);     
51   TH1F * MakeHisto1DAsFunctionOfDet(Float_t min=4, Float_t max=-4, Int_t type=0);
52   TH2F * MakeHisto2DCh(Int_t ch, Float_t min=4, Float_t max=-4, Int_t type=0);  
53   TH2F * MakeHisto2DSmPl(Int_t sm, Int_t pl, Float_t min=4, Float_t max=-4, Int_t type=0); 
54
55   // algebra functions
56   void Add(Float_t c1);
57   void Multiply(Float_t c1);
58   void Add(const AliTRDCalDet * calDet, Double_t c1 = 1);
59   void Multiply(const AliTRDCalDet * calDet);
60   void Divide(const AliTRDCalDet * calDet);
61     
62  protected:
63
64   Float_t  fData[kNdet];       //[kNdet] Data
65
66   ClassDef(AliTRDCalDet,1)     //  TRD calibration class for parameters which are saved per detector
67
68 };
69
70 #endif