]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCCalibPedestal.h
Added AddTrackParams() method for convenience + some comments
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibPedestal.h
1 #ifndef ALITPCCALIBPEDESTAL_H
2 #define ALITPCCALIBPEDESTAL_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 #include <TObjArray.h>
7 #include "AliTPCCalibRawBase.h"
8
9 class TArrayF;
10 class TH2F;
11 class TTreeSRedirector;
12 class AliTPCROC;
13 class AliTPCCalROC;
14 class AliTPCRawStream;
15 class AliTPCRawStreamFast;
16 class AliRawReader;
17 class AliTPCAltroMapping;
18 class TMap;
19
20 struct eventHeaderStruct;
21
22 class AliTPCCalibPedestal : public AliTPCCalibRawBase {
23
24 public:
25   AliTPCCalibPedestal();
26   AliTPCCalibPedestal(const AliTPCCalibPedestal &ped);
27   AliTPCCalibPedestal(const TMap *config);
28   virtual ~AliTPCCalibPedestal();
29
30   AliTPCCalibPedestal& operator = (const  AliTPCCalibPedestal &source);
31
32   virtual Int_t  Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
33                 const Int_t iTimeBin, const Float_t signal);
34   virtual void   Analyse();
35   //
36   AliTPCAltroMapping **GetAltroMapping() { return fMapping; };
37   void  SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; };
38   //
39   AliTPCCalROC* GetCalRocPedestal (Int_t sector, Bool_t force=kFALSE);  // get calibration object - sector
40   AliTPCCalROC* GetCalRocSigma(Int_t sector, Bool_t force=kFALSE);        // get calibration object - sector
41   const TObjArray* GetCalPadPedestal (){return &fCalRocArrayPedestal;}  // get calibration object
42   const TObjArray* GetCalPadSigma(){return &fCalRocArraySigma;}             // get calibration object
43
44   AliTPCCalROC* GetCalRocMean (Int_t sector, Bool_t force=kFALSE);      // get calibration object - sector
45   AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE);        // get calibration object - sector
46   const TObjArray* GetCalPadMean (){return &fCalRocArrayMean;}          // get calibration object
47   const TObjArray* GetCalPadRMS(){return &fCalRocArrayRMS;}             // get calibration object
48   
49   TH2F* GetHistoPedestal  (Int_t sector, Bool_t force=kFALSE);          // get refernce histogram
50   //
51   void  SetTimeAnalysis(Bool_t time = kTRUE);                  // Use ONLY in TPCPEDESTALda on LDC for one sector!
52   void  AnalyseTime(Int_t nevents);                            // Makes sense only in TPCPEDESTALda on LDC!
53   TArrayF **GetTimePedestals()  const { return fTimeSignal; }  // Get array with time dependent pedestals (for one sector!)
54   //
55   Int_t   GetAdcMin()       const { return fAdcMin;       }
56   Int_t   GetAdcMax()       const { return fAdcMax;       }
57   Float_t GetAnaMeanDown()  const { return fAnaMeanDown;  }
58   Float_t GetAnaMeanUp()    const { return fAnaMeanUp;    }
59   
60   void  SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; }  // Set adc range for the pedestal calibration
61   void  SetAnalysisTruncationRange(Float_t down, Float_t up) {fAnaMeanDown=down; fAnaMeanUp=up;}    //Set range for truncated mean analysis of the channel information
62
63   void  Merge(AliTPCCalibPedestal *ped);
64
65   Bool_t TestEvent();  // Test the fast approach to fill histogram - used for test purposes
66
67 private:
68   Int_t fAdcMin;                    //  min adc channel of pedestal value
69   Int_t fAdcMax;                    //  max adc channel of pedestal value
70
71   Float_t fAnaMeanDown;             // Truncated mean channel analysis - lower cut
72   Float_t fAnaMeanUp;               // Truncated mean channel analysis - upper cut
73   
74   Bool_t  fTimeAnalysis;            //! Should we use the time dependent analysis? ONLY ON LDC!
75
76   TObjArray fCalRocArrayPedestal;   //  Array of AliTPCCalROC class for pedestal values from gaus fit
77   TObjArray fCalRocArraySigma;      //  Array of AliTPCCalROC class for noise values from gaus fit
78
79   TObjArray fHistoPedestalArray;    //  Calibration histograms for Pedestal distribution
80
81   TArrayF **fTimeSignal;            //! Arrays which hold time dependent signals
82   
83   TObjArray fCalRocArrayMean;       //  Array of AliTPCCalROC class for pedestal values, simple mean
84   TObjArray fCalRocArrayRMS;        //  Array of AliTPCCalROC class for noise values, simple rms
85
86   TH2F* GetHisto(Int_t sector, TObjArray *arr,
87                  Int_t nbinsY, Float_t ymin, Float_t ymax,
88                  const Char_t *type, Bool_t force);
89
90   AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
91
92 public:
93   ClassDef(AliTPCCalibPedestal, 7)  // Implementation of the TPC pedestal and noise calibration
94 };
95
96
97
98 #endif
99