Adding the description of real data (Marian)
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibPedestal.h
CommitLineData
8bc7e885 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
7
f1b14fa2 8#include <TObject.h>
9#include <TObjArray.h>
8bc7e885 10
bdf99a93 11class TArrayF;
8bc7e885 12class TH2F;
8bc7e885 13class TTreeSRedirector;
14class AliTPCROC;
bc331d5b 15class AliTPCCalROC;
a7dce0bc 16class AliTPCRawStream;
08205ed7 17class AliTPCRawStreamFast;
aa983e4f 18class AliRawReader;
4958b652 19class AliTPCAltroMapping;
ac940b58 20class TMap;
8bc7e885 21
bdf99a93 22struct eventHeaderStruct;
8bc7e885 23
24class AliTPCCalibPedestal : public TObject {
25
26public:
27 AliTPCCalibPedestal();
bc331d5b 28 AliTPCCalibPedestal(const AliTPCCalibPedestal &ped);
ac940b58 29 AliTPCCalibPedestal(const TMap *config);
8bc7e885 30 virtual ~AliTPCCalibPedestal();
bc331d5b 31
32 AliTPCCalibPedestal& operator = (const AliTPCCalibPedestal &source);
33
08205ed7 34 Bool_t ProcessEventFast(AliTPCRawStreamFast *rawStreamFast);
4958b652 35 Bool_t ProcessEventFast(AliRawReader *rawReader);
08205ed7 36
bc331d5b 37 Bool_t ProcessEvent(AliTPCRawStream *rawStream);
38 Bool_t ProcessEvent(AliRawReader *rawReader);
39 Bool_t ProcessEvent(eventHeaderStruct *event);
40
bdf99a93 41 Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
42 const Int_t iTimeBin, const Float_t signal);
43 void Analyse();
8bc7e885 44 //
4958b652 45 AliTPCAltroMapping **GetAltroMapping() { return fMapping; };
46 void SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; };
47 //
bc331d5b 48 AliTPCCalROC* GetCalRocPedestal (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
1542c62d 49 AliTPCCalROC* GetCalRocSigma(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
bc331d5b 50 const TObjArray* GetCalPadPedestal (){return &fCalRocArrayPedestal;} // get calibration object
1542c62d 51 const TObjArray* GetCalPadSigma(){return &fCalRocArraySigma;} // get calibration object
52
53 AliTPCCalROC* GetCalRocMean (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
54 AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
55 const TObjArray* GetCalPadMean (){return &fCalRocArrayMean;} // get calibration object
bc331d5b 56 const TObjArray* GetCalPadRMS(){return &fCalRocArrayRMS;} // get calibration object
aa983e4f 57
bc331d5b 58 TH2F* GetHistoPedestal (Int_t sector, Bool_t force=kFALSE); // get refernce histogram
8368e0ee 59 void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
8bc7e885 60 //
bdf99a93 61 void SetTimeAnalysis(Bool_t time = kTRUE); // Use ONLY in TPCPEDESTALda on LDC for one sector!
62 void AnalyseTime(Int_t nevents); // Makes sense only in TPCPEDESTALda on LDC!
63 TArrayF **GetTimePedestals() const { return fTimeSignal; } // Get array with time dependent pedestals (for one sector!)
64 //
1542c62d 65 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
66 Int_t GetLastTimeBin() const { return fLastTimeBin; }
67 Int_t GetAdcMin() const { return fAdcMin; }
68 Int_t GetAdcMax() const { return fAdcMax; }
69 Float_t GetAnaMeanDown() const { return fAnaMeanDown; }
70 Float_t GetAnaMeanUp() const { return fAnaMeanUp; }
71
aa983e4f 72 void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax; } // Set time bin range that is used for the pedestal calibration
73 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
1542c62d 74 void SetAnalysisTruncationRange(Float_t down, Float_t up) {fAnaMeanDown=down; fAnaMeanUp=up;} //Set range for truncated mean analysis of the channel information
8bc7e885 75
bdf99a93 76 void Merge(AliTPCCalibPedestal *ped);
8bc7e885 77
bdf99a93 78 Bool_t TestEvent(); // Test the fast approach to fill histogram - used for test purposes
8bc7e885 79
80private:
bdf99a93 81
8bc7e885 82 Int_t fFirstTimeBin; // First Time bin needed for analysis
83 Int_t fLastTimeBin; // Last Time bin needed for analysis
bdf99a93 84
8bc7e885 85 Int_t fAdcMin; // min adc channel of pedestal value
86 Int_t fAdcMax; // max adc channel of pedestal value
bdf99a93 87
1542c62d 88 Float_t fAnaMeanDown; // Truncated mean channel analysis - lower cut
89 Float_t fAnaMeanUp; // Truncated mean channel analysis - upper cut
90
bdf99a93 91 Bool_t fTimeAnalysis; //! Should we use the time dependent analysis? ONLY ON LDC!
a7dce0bc 92
8bc7e885 93 AliTPCROC *fROC; //! ROC information
4958b652 94 AliTPCAltroMapping **fMapping; //! Altro Mapping object
bdf99a93 95
1542c62d 96 TObjArray fCalRocArrayPedestal; // Array of AliTPCCalROC class for pedestal values from gaus fit
97 TObjArray fCalRocArraySigma; // Array of AliTPCCalROC class for noise values from gaus fit
bdf99a93 98
8bc7e885 99 TObjArray fHistoPedestalArray; // Calibration histograms for Pedestal distribution
bdf99a93 100
101 TArrayF **fTimeSignal; //! Arrays which hold time dependent signals
1542c62d 102
103 TObjArray fCalRocArrayMean; // Array of AliTPCCalROC class for pedestal values, simple mean
104 TObjArray fCalRocArrayRMS; // Array of AliTPCCalROC class for noise values, simple rms
bdf99a93 105
bc331d5b 106 TH2F* GetHisto(Int_t sector, TObjArray *arr,
8bc7e885 107 Int_t nbinsY, Float_t ymin, Float_t ymax,
a6e0ebfe 108 const Char_t *type, Bool_t force);
bdf99a93 109
8bc7e885 110 AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
111
112public:
9a090ccd 113 ClassDef(AliTPCCalibPedestal, 6) // Implementation of the TPC pedestal and noise calibration
8bc7e885 114};
115
116
117
118#endif
119