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 */
7 #include "AliTPCCalibRawBase.h"
11 class TTreeSRedirector;
14 class AliTPCRawStream;
15 class AliTPCRawStreamFast;
19 struct eventHeaderStruct;
21 class AliTPCCalibPedestal : public AliTPCCalibRawBase {
24 AliTPCCalibPedestal();
25 AliTPCCalibPedestal(const AliTPCCalibPedestal &ped);
26 AliTPCCalibPedestal(const TMap *config);
27 virtual ~AliTPCCalibPedestal();
29 AliTPCCalibPedestal& operator = (const AliTPCCalibPedestal &source);
31 virtual Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
32 const Int_t iTimeBin, const Float_t signal);
33 virtual void Analyse();
35 AliTPCCalROC* GetCalRocPedestal (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
36 AliTPCCalROC* GetCalRocSigma(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
37 const TObjArray* GetCalPadPedestal (){return &fCalRocArrayPedestal;} // get calibration object
38 const TObjArray* GetCalPadSigma(){return &fCalRocArraySigma;} // get calibration object
40 AliTPCCalROC* GetCalRocMean (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
41 AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
42 const TObjArray* GetCalPadMean (){return &fCalRocArrayMean;} // get calibration object
43 const TObjArray* GetCalPadRMS(){return &fCalRocArrayRMS;} // get calibration object
45 TH2F* GetHistoPedestal (Int_t sector, Bool_t force=kFALSE); // get refernce histogram
47 void SetTimeAnalysis(Bool_t time = kTRUE); // Use ONLY in TPCPEDESTALda on LDC for one sector!
48 void AnalyseTime(Int_t nevents); // Makes sense only in TPCPEDESTALda on LDC!
49 TArrayF **GetTimePedestals() const { return fTimeSignal; } // Get array with time dependent pedestals (for one sector!)
51 Int_t GetAdcMin() const { return fAdcMin; }
52 Int_t GetAdcMax() const { return fAdcMax; }
53 Float_t GetAnaMeanDown() const { return fAnaMeanDown; }
54 Float_t GetAnaMeanUp() const { return fAnaMeanUp; }
56 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
57 void SetAnalysisTruncationRange(Float_t down, Float_t up) {fAnaMeanDown=down; fAnaMeanUp=up;} //Set range for truncated mean analysis of the channel information
59 void Merge(AliTPCCalibPedestal *ped);
61 Bool_t TestEvent(); // Test the fast approach to fill histogram - used for test purposes
64 Int_t fAdcMin; // min adc channel of pedestal value
65 Int_t fAdcMax; // max adc channel of pedestal value
67 Float_t fAnaMeanDown; // Truncated mean channel analysis - lower cut
68 Float_t fAnaMeanUp; // Truncated mean channel analysis - upper cut
70 Bool_t fTimeAnalysis; //! Should we use the time dependent analysis? ONLY ON LDC!
72 TObjArray fCalRocArrayPedestal; // Array of AliTPCCalROC class for pedestal values from gaus fit
73 TObjArray fCalRocArraySigma; // Array of AliTPCCalROC class for noise values from gaus fit
75 TObjArray fHistoPedestalArray; // Calibration histograms for Pedestal distribution
77 TArrayF **fTimeSignal; //! Arrays which hold time dependent signals
79 TObjArray fCalRocArrayMean; // Array of AliTPCCalROC class for pedestal values, simple mean
80 TObjArray fCalRocArrayRMS; // Array of AliTPCCalROC class for noise values, simple rms
82 TH2F* GetHisto(Int_t sector, TObjArray *arr,
83 Int_t nbinsY, Float_t ymin, Float_t ymax,
84 const Char_t *type, Bool_t force);
86 AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
89 ClassDef(AliTPCCalibPedestal, 7) // Implementation of the TPC pedestal and noise calibration