a/ AliTRDCalibTask.cxx .h: one histo more to quantify the event selection if any...
[u/mrichter/AliRoot.git] / TRD / Cal / 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
4c87f26e 16#include "../AliTRDgeometry.h"
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);
4c87f26e 49
50 // Plot functions
51 TH1F * MakeHisto1Distribution(Float_t min=4, Float_t max=-4, Int_t type=0);
52 TH1F * MakeHisto1DAsFunctionOfDet(Float_t min=4, Float_t max=-4, Int_t type=0);
53 TH2F * MakeHisto2DCh(Int_t ch, Float_t min=4, Float_t max=-4, Int_t type=0);
54 TH2F * MakeHisto2DSmPl(Int_t sm, Int_t pl, Float_t min=4, Float_t max=-4, Int_t type=0);
55
56 // algebra functions
57 void Add(Float_t c1);
58 void Multiply(Float_t c1);
59 void Add(const AliTRDCalDet * calDet, Double_t c1 = 1);
60 void Multiply(const AliTRDCalDet * calDet);
61 void Divide(const AliTRDCalDet * calDet);
62
2745a409 63 protected:
7754cd1f 64
2745a409 65 Float_t fData[kNdet]; //[kNdet] Data
7754cd1f 66
2745a409 67 ClassDef(AliTRDCalDet,1) // TRD calibration class for parameters which are saved per detector
7754cd1f 68
69};
70
71#endif
a5dcf618 72