+#include <TObject.h>
+#include <TObjArray.h>
-
-class TObjArray;
+class TArrayF;
class TH2F;
class TTreeSRedirector;
class AliTPCROC;
class AliTPCCalROC;
+class AliTPCRawStream;
class AliRawReader;
-struct eventHeaderStruct;
+struct eventHeaderStruct;
class AliTPCCalibPedestal : public TObject {
Bool_t ProcessEvent(AliRawReader *rawReader);
Bool_t ProcessEvent(eventHeaderStruct *event);
- Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
- const Int_t iTimeBin, const Float_t signal);
- void Analyse();
+ Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
+ const Int_t iTimeBin, const Float_t signal);
+ void Analyse();
//
AliTPCCalROC* GetCalRocPedestal (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
TH2F* GetHistoPedestal (Int_t sector, Bool_t force=kFALSE); // get refernce histogram
void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
//
- Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
- Int_t GetLastTimeBin() const { return fLastTimeBin; }
- Int_t GetAdcMin() const { return fAdcMin; }
- Int_t GetAdcMax() const { return fAdcMax; }
+ void SetTimeAnalysis(Bool_t time = kTRUE); // Use ONLY in TPCPEDESTALda on LDC for one sector!
+ void AnalyseTime(Int_t nevents); // Makes sense only in TPCPEDESTALda on LDC!
+ TArrayF **GetTimePedestals() const { return fTimeSignal; } // Get array with time dependent pedestals (for one sector!)
+ //
+ Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
+ Int_t GetLastTimeBin() const { return fLastTimeBin; }
+ Int_t GetAdcMin() const { return fAdcMin; }
+ Int_t GetAdcMax() const { return fAdcMax; }
+
+ void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax; } // Set time bin range that is used for the pedestal calibration
+ void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
- void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax; } // Set time bin range that is used for the pedestal calibration
- void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
+ void SetOldRCUformat(Bool_t format=kTRUE) { fOldRCUformat = format; }
+ void Merge(AliTPCCalibPedestal *ped);
- Bool_t TestEvent(); //test the fast approach to fill histogram - used for test purposes
+ Bool_t TestEvent(); // Test the fast approach to fill histogram - used for test purposes
private:
+
Int_t fFirstTimeBin; // First Time bin needed for analysis
Int_t fLastTimeBin; // Last Time bin needed for analysis
-
+
Int_t fAdcMin; // min adc channel of pedestal value
Int_t fAdcMax; // max adc channel of pedestal value
-
+
+ Bool_t fOldRCUformat; //! Should we use the old RCU format for data reading
+ Bool_t fTimeAnalysis; //! Should we use the time dependent analysis? ONLY ON LDC!
+
AliTPCROC *fROC; //! ROC information
-
+
TObjArray fCalRocArrayPedestal; // Array of AliTPCCalROC class for Time0 calibration
TObjArray fCalRocArrayRMS; // Array of AliTPCCalROC class for signal width calibration
-
+
TObjArray fHistoPedestalArray; // Calibration histograms for Pedestal distribution
-
-
-
+
+ TArrayF **fTimeSignal; //! Arrays which hold time dependent signals
+
TH2F* GetHisto(Int_t sector, TObjArray *arr,
Int_t nbinsY, Float_t ymin, Float_t ymax,
Char_t *type, Bool_t force);
-
+
AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
public:
-
-
- ClassDef(AliTPCCalibPedestal,1)
+ ClassDef(AliTPCCalibPedestal, 2) // Implementation of the TPC pedestal and noise calibration
};