]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCCalPad.h
moved component registration to agent; added component configuration/initialization...
[u/mrichter/AliRoot.git] / TPC / AliTPCCalPad.h
CommitLineData
07627591 1#ifndef ALITPCCALPAD_H
2#define ALITPCCALPAD_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// TPC calibration class for parameters which are saved per pad //
11// //
12///////////////////////////////////////////////////////////////////////////////
13
14#include "TNamed.h"
a6d2bd0c 15//#include <TMath.h>
16//#include <AliTPCROC.h>
17#include "TLinearFitter.h"
18//#include <iostream>
19
20
07627591 21
22class AliTPCCalROC;
23class AliTPCCalDet;
184bcc16 24class TObjArray;
25class TGraph;
200be8a6 26class TH2F;
90127643 27class TH1F;
07627591 28
29class AliTPCCalPad : public TNamed {
07627591 30 public:
07627591 31 enum { kNsec = 72 };
07627591 32 AliTPCCalPad();
33 AliTPCCalPad(const Text_t* name, const Text_t* title);
34 AliTPCCalPad(const AliTPCCalPad &c);
184bcc16 35 AliTPCCalPad(TObjArray *arrayROC);
07627591 36 virtual ~AliTPCCalPad();
37 AliTPCCalPad &operator=(const AliTPCCalPad &c);
38 virtual void Copy(TObject &c) const;
a6d2bd0c 39 AliTPCCalROC *GetCalROC(Int_t sector) const {return fROC[sector]; };
40 void SetCalROC(AliTPCCalROC* roc, Int_t sector = -1);
184bcc16 41 //
90127643 42 // algebra
a6d2bd0c 43 void Add(Float_t c1); // add constant c1 to all channels of all ROCs
44 void Multiply(Float_t c1); // multiply each channel of all ROCs with c1
45 void Add(const AliTPCCalPad * roc, Double_t c1 = 1); // multiply AliTPCCalPad 'pad' by c1 and add each channel to the coresponing channel in all ROCs
46 void Multiply(const AliTPCCalPad * pad); // multiply each channel of all ROCs with the coresponding channel of 'pad'
47 void Divide(const AliTPCCalPad * pad); // divide each channel of all ROCs by the coresponding channel of 'pad'
184bcc16 48 //
a6d2bd0c 49 Double_t GetMeanRMS(Double_t &rms); // Calculates mean and RMS of all ROCs
50 Double_t GetMean(AliTPCCalPad* outlierPad = 0); // return mean of the mean of all ROCs
51 Double_t GetRMS(AliTPCCalPad* outlierPad = 0) ; // return mean of the RMS of all ROCs
52 Double_t GetMedian(AliTPCCalPad* outlierPad = 0) ; // return mean of the median of all ROCs
53 Double_t GetLTM(Double_t *sigma=0, Double_t fraction=0.9, AliTPCCalPad* outlierPad = 0); // return mean of the LTM and sigma of all ROCs
90127643 54 TGraph *MakeGraph(Int_t type=0, Float_t ratio=0.7);
55 TH2F *MakeHisto2D(Int_t side=0);
586007f3 56 TH1F *MakeHisto1D(Float_t min=4, Float_t max=-4, Int_t type=0);
a6d2bd0c 57
72d0ab7e 58 AliTPCCalPad* LocalFit(const char* padName, Int_t rowRadius, Int_t padRadius, AliTPCCalPad* Padoutliers = 0, Bool_t robust = kFALSE, Double_t chi2Threshold = 5, Double_t robustFraction = 0.7, Bool_t printCurrentSector = kFALSE) const;
a6d2bd0c 59 AliTPCCalPad* GlobalFit(const char* padName, AliTPCCalPad* Padoutliers = 0, Bool_t robust = kFALSE, Int_t fitType = 1, Double_t chi2Threshold = 5, Double_t robustFraction = 0.7);
60 void GlobalSidesFit(const AliTPCCalPad* PadOutliers, TVectorD &fitParamSideA, TVectorD &fitParamSideC, TMatrixD &covMatrixSideA, TMatrixD &covMatrixSideC, Float_t &chi2SideA, Float_t &chi2SideC, Int_t fitType = 1, Bool_t robust = kFALSE, Double_t chi2Threshold = 5, Double_t robustFraction = 0.7);
61
07627591 62 protected:
63 AliTPCCalROC *fROC[kNsec]; // Array of ROC objects which contain the values per pad
64 ClassDef(AliTPCCalPad,1) // TPC calibration class for parameters which are saved per pad
07627591 65};
66
67#endif