]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/Cal/AliTRDCalPad.h
- add protection against invalid sector/stack information in on-line track matching
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalPad.h
CommitLineData
7754cd1f 1#ifndef ALITRDCALPAD_H
2#define ALITRDCALPAD_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// //
4c87f26e 10// TRD calibration class for parameters which are saved per pad //
7754cd1f 11// //
12///////////////////////////////////////////////////////////////////////////////
13
14#include "TNamed.h"
15
16class AliTRDCalROC;
17class AliTRDCalDet;
4c87f26e 18class TH2F;
19class TH1F;
7754cd1f 20
4c87f26e 21class AliTRDCalPad : public TNamed
22{
7754cd1f 23
24 public:
25
26 enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
27
28 AliTRDCalPad();
29 AliTRDCalPad(const Text_t* name, const Text_t* title);
30 AliTRDCalPad(const AliTRDCalPad &c);
2745a409 31 virtual ~AliTRDCalPad();
32 AliTRDCalPad &operator=(const AliTRDCalPad &c);
7754cd1f 33
2745a409 34 virtual void Copy(TObject &c) const;
7754cd1f 35
0e09df31 36 static Int_t GetDet(Int_t p, Int_t c, Int_t s) { return p+c*kNplan+s*kNplan*kNcham; };
7754cd1f 37
2745a409 38 AliTRDCalROC *GetCalROC(Int_t d) const { return fROC[d]; };
39 AliTRDCalROC *GetCalROC(Int_t p, Int_t c, Int_t s) const
40 { return fROC[GetDet(p,c,s)]; };
7754cd1f 41
4c87f26e 42 Bool_t ScaleROCs(const AliTRDCalDet* values);
43
7dcf6933 44 void SetCalROC(Int_t det, AliTRDCalROC *calroc);
45
4c87f26e 46 // Statistic
47 Double_t GetMeanRMS(Double_t &rms, const AliTRDCalDet *calDet = 0, Int_t type = 0);
c893147d 48 Double_t GetMean(const AliTRDCalDet *calDet = 0, Int_t type = 0, AliTRDCalPad* const outlierPad = 0);
49 Double_t GetRMS(const AliTRDCalDet *calDet = 0, Int_t type = 0, AliTRDCalPad* const outlierPad = 0);
50 Double_t GetMedian(const AliTRDCalDet *calDet = 0, Int_t type = 0, AliTRDCalPad* const outlierPad = 0);
0e09df31 51 Double_t GetLTM(Double_t *sigma=0, Double_t fraction=0.9
c893147d 52 , const AliTRDCalDet *calDet = 0, Int_t type = 0, AliTRDCalPad* const outlierPad = 0);
4c87f26e 53
54 // Plot functions
55 TH1F *MakeHisto1D(const AliTRDCalDet *calDet = 0, Int_t typedet=0, Float_t min=4, Float_t max=-4,Int_t type=0);
56 TH2F *MakeHisto2DSmPl(Int_t sm, Int_t pl, const AliTRDCalDet *calDet = 0, Int_t typedet=0, Float_t min=4, Float_t max=-4,Int_t type=0);
57 TH2F *MakeHisto2DCh(Int_t ch, const AliTRDCalDet *calDet = 0, Int_t typedet=0, Float_t min=4, Float_t max=-4,Int_t type=0);
58
59 // Algebra functions
60 Bool_t Add(Float_t c1);
61 Bool_t Multiply(Float_t c1);
62 Bool_t Add(const AliTRDCalPad * pad, Double_t c1 = 1, const AliTRDCalDet * calDet1 = 0, const AliTRDCalDet *calDet2 = 0, Int_t type = 0);
63 Bool_t Multiply(const AliTRDCalPad * pad, const AliTRDCalDet * calDet1 = 0, const AliTRDCalDet *calDet2 = 0, Int_t type = 0);
64 Bool_t Divide(const AliTRDCalPad * pad, const AliTRDCalDet * calDet1 = 0, const AliTRDCalDet *calDet2 = 0, Int_t type = 0);
7754cd1f 65
66 protected:
67
2745a409 68 AliTRDCalROC *fROC[kNdet]; // Array of ROC objects which contain the values per pad
7754cd1f 69
2745a409 70 ClassDef(AliTRDCalPad,1) // TRD calibration class for parameters which are saved per pad
7754cd1f 71
72};
73
74#endif