]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/Cal/AliTRDCalDet.h
Coding rules
[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;
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);
4c87f26e 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
2745a409 62 protected:
7754cd1f 63
2745a409 64 Float_t fData[kNdet]; //[kNdet] Data
7754cd1f 65
2745a409 66 ClassDef(AliTRDCalDet,1) // TRD calibration class for parameters which are saved per detector
7754cd1f 67
68};
69
70#endif