]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/TRDbase/AliTRDCalDet.h
Adding Domenico Colella as responsible for SPD part in TRI pp
[u/mrichter/AliRoot.git] / TRD / TRDbase / AliTRDCalDet.h
CommitLineData
7754cd1f 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"
2e32a5ae 15
464611d8 16#include "AliTRDgeometry.h"
4c87f26e 17
18class TH1F;
19class TH2F;
7754cd1f 20
21class 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);
2745a409 30 virtual ~AliTRDCalDet();
7754cd1f 31 AliTRDCalDet &operator=(const AliTRDCalDet &c);
32
2745a409 33 virtual void Copy(TObject &c) const;
7754cd1f 34
2745a409 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)]; };
7754cd1f 38
2745a409 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; };
4c87f26e 42
43 // statistic
2e32a5ae 44 Double_t GetMean(AliTRDCalDet * const outlierDet=0) const;
45 Double_t GetRMS(AliTRDCalDet * const outlierDet=0) const;
a5dcf618 46 Double_t GetRMSRobust(Double_t robust=0.92) const;
2e32a5ae 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);
adaea377 49 Double_t CalcMean(Bool_t wghtPads=kFALSE);
ea392bfa 50 Double_t CalcMean(Bool_t wghtPads, Int_t &calib);
0f90de4e 51 Double_t CalcRMS(Bool_t wghtPads=kFALSE);
ea392bfa 52 Double_t CalcRMS(Bool_t wghtPads, Int_t &calib);
67abca5c 53 Double_t GetMeanSM(Bool_t wghtPads, Int_t sector) const;
54
4c87f26e 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
2745a409 68 protected:
7754cd1f 69
2745a409 70 Float_t fData[kNdet]; //[kNdet] Data
7754cd1f 71
2745a409 72 ClassDef(AliTRDCalDet,1) // TRD calibration class for parameters which are saved per detector
7754cd1f 73
74};
75
76#endif