Modification for DA (Christian Lippmann)
[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;
aa983e4f 17class AliRawReader;
fee88714 18class AliTPCAltroMapping;
8bc7e885 19
bdf99a93 20struct eventHeaderStruct;
8bc7e885 21
22class AliTPCCalibPedestal : public TObject {
23
24public:
25 AliTPCCalibPedestal();
bc331d5b 26 AliTPCCalibPedestal(const AliTPCCalibPedestal &ped);
8bc7e885 27 virtual ~AliTPCCalibPedestal();
bc331d5b 28
29 AliTPCCalibPedestal& operator = (const AliTPCCalibPedestal &source);
30
31 Bool_t ProcessEvent(AliTPCRawStream *rawStream);
32 Bool_t ProcessEvent(AliRawReader *rawReader);
33 Bool_t ProcessEvent(eventHeaderStruct *event);
34
bdf99a93 35 Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
36 const Int_t iTimeBin, const Float_t signal);
37 void Analyse();
8bc7e885 38 //
fee88714 39 AliTPCAltroMapping **GetAltroMapping() { return fMapping; };
40 void SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; };
41 //
bc331d5b 42 AliTPCCalROC* GetCalRocPedestal (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
43 AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
44 const TObjArray* GetCalPadPedestal (){return &fCalRocArrayPedestal;} // get calibration object
45 const TObjArray* GetCalPadRMS(){return &fCalRocArrayRMS;} // get calibration object
aa983e4f 46
bc331d5b 47 TH2F* GetHistoPedestal (Int_t sector, Bool_t force=kFALSE); // get refernce histogram
48 void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
8bc7e885 49 //
bdf99a93 50 void SetTimeAnalysis(Bool_t time = kTRUE); // Use ONLY in TPCPEDESTALda on LDC for one sector!
51 void AnalyseTime(Int_t nevents); // Makes sense only in TPCPEDESTALda on LDC!
52 TArrayF **GetTimePedestals() const { return fTimeSignal; } // Get array with time dependent pedestals (for one sector!)
53 //
aa983e4f 54 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
55 Int_t GetLastTimeBin() const { return fLastTimeBin; }
56 Int_t GetAdcMin() const { return fAdcMin; }
57 Int_t GetAdcMax() const { return fAdcMax; }
bc331d5b 58
aa983e4f 59 void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax; } // Set time bin range that is used for the pedestal calibration
60 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
8bc7e885 61
bdf99a93 62 void SetOldRCUformat(Bool_t format=kTRUE) { fOldRCUformat = format; }
aa983e4f 63
bdf99a93 64 void Merge(AliTPCCalibPedestal *ped);
8bc7e885 65
bdf99a93 66 Bool_t TestEvent(); // Test the fast approach to fill histogram - used for test purposes
8bc7e885 67
68private:
bdf99a93 69
8bc7e885 70 Int_t fFirstTimeBin; // First Time bin needed for analysis
71 Int_t fLastTimeBin; // Last Time bin needed for analysis
bdf99a93 72
8bc7e885 73 Int_t fAdcMin; // min adc channel of pedestal value
74 Int_t fAdcMax; // max adc channel of pedestal value
bdf99a93 75
aa983e4f 76 Bool_t fOldRCUformat; //! Should we use the old RCU format for data reading
bdf99a93 77 Bool_t fTimeAnalysis; //! Should we use the time dependent analysis? ONLY ON LDC!
a7dce0bc 78
8bc7e885 79 AliTPCROC *fROC; //! ROC information
fee88714 80 AliTPCAltroMapping **fMapping; //! Altro Mapping
bdf99a93 81
8bc7e885 82 TObjArray fCalRocArrayPedestal; // Array of AliTPCCalROC class for Time0 calibration
83 TObjArray fCalRocArrayRMS; // Array of AliTPCCalROC class for signal width calibration
bdf99a93 84
8bc7e885 85 TObjArray fHistoPedestalArray; // Calibration histograms for Pedestal distribution
bdf99a93 86
87 TArrayF **fTimeSignal; //! Arrays which hold time dependent signals
88
bc331d5b 89 TH2F* GetHisto(Int_t sector, TObjArray *arr,
8bc7e885 90 Int_t nbinsY, Float_t ymin, Float_t ymax,
91 Char_t *type, Bool_t force);
bdf99a93 92
8bc7e885 93 AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
94
95public:
fee88714 96 ClassDef(AliTPCCalibPedestal, 3) // Implementation of the TPC pedestal and noise calibration
8bc7e885 97};
98
99
100
101#endif
102