Line data Source code
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 344434 : 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 0 : { return fData[AliTRDgeometry::GetDetector(p,c,s)]; };
38 :
39 205200 : 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 0 : { 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 GetRMSRobust(Double_t robust=0.92) const;
47 : Double_t GetMedian(AliTRDCalDet * const outlierDet=0) const;
48 : Double_t GetLTM(Double_t * sigma=0, Double_t fraction=0.9, AliTRDCalDet * const outlierDet=0);
49 : Double_t CalcMean(Bool_t wghtPads=kFALSE);
50 : Double_t CalcMean(Bool_t wghtPads, Int_t &calib);
51 : Double_t CalcRMS(Bool_t wghtPads=kFALSE);
52 : Double_t CalcRMS(Bool_t wghtPads, Int_t &calib);
53 : Double_t GetMeanSM(Bool_t wghtPads, Int_t sector) const;
54 :
55 : // Plot functions
56 : TH1F * MakeHisto1Distribution(Float_t min=4, Float_t max=-4, Int_t type=0);
57 : TH1F * MakeHisto1DAsFunctionOfDet(Float_t min=4, Float_t max=-4, Int_t type=0);
58 : TH2F * MakeHisto2DCh(Int_t ch, Float_t min=4, Float_t max=-4, Int_t type=0);
59 : TH2F * MakeHisto2DSmPl(Int_t sm, Int_t pl, Float_t min=4, Float_t max=-4, Int_t type=0);
60 :
61 : // algebra functions
62 : void Add(Float_t c1);
63 : void Multiply(Float_t c1);
64 : void Add(const AliTRDCalDet * calDet, Double_t c1 = 1);
65 : void Multiply(const AliTRDCalDet * calDet);
66 : void Divide(const AliTRDCalDet * calDet);
67 :
68 : protected:
69 :
70 : Float_t fData[kNdet]; //[kNdet] Data
71 :
72 138 : ClassDef(AliTRDCalDet,1) // TRD calibration class for parameters which are saved per detector
73 :
74 : };
75 :
76 : #endif
|