/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
+/////////////////////////////////////////////////////////////////////////////////////////
+// //
+// Implementation of the TPC pedestal calibration //
+// //
+/////////////////////////////////////////////////////////////////////////////////////////
+#include <TObjArray.h>
+#include "AliTPCCalibRawBase.h"
-
-
-class TObjArray;
+class TArrayF;
class TH2F;
-class TH2S;
-class TH1S;
-class TH1F;
-class TH1D;
-class TF1;
class TTreeSRedirector;
class AliTPCROC;
+class AliTPCCalROC;
+class AliTPCRawStream;
+class AliTPCRawStreamFast;
class AliRawReader;
+class TMap;
+struct eventHeaderStruct;
-class AliTPCCalibPedestal : public TObject {
+class AliTPCCalibPedestal : public AliTPCCalibRawBase {
public:
AliTPCCalibPedestal();
+ AliTPCCalibPedestal(const AliTPCCalibPedestal &ped);
+ AliTPCCalibPedestal(const TMap *config);
virtual ~AliTPCCalibPedestal();
-
- Bool_t ProcessEvent(AliRawReader *rawReader);
- 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();
+
+ AliTPCCalibPedestal& operator = (const AliTPCCalibPedestal &source);
+
+ virtual Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
+ const Int_t iTimeBin, const Float_t signal);
+ virtual 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
- const TObjArray* GetCalPadPedestal (){return &fCalRocArrayPedestal;}//get calibration object
- const TObjArray* GetCalPadRMS(){return &fCalRocArrayRMS;} //get calibration object
+ AliTPCCalROC* GetCalRocPedestal (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
+ AliTPCCalROC* GetCalRocSigma(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
+ const TObjArray* GetCalPadPedestal() const {return &fCalRocArrayPedestal;} // get calibration object
+ const TObjArray* GetCalPadSigma() const {return &fCalRocArraySigma;} // get calibration object
+
+ AliTPCCalROC* GetCalRocMean (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
+ AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
+ const TObjArray* GetCalPadMean() const {return &fCalRocArrayMean;} // get calibration object
+ const TObjArray* GetCalPadRMS() const {return &fCalRocArrayRMS;} // get calibration object
- TH2S* 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);
+ TH2F* GetHistoPedestal (Int_t sector, Bool_t force=kFALSE); // get refernce histogram
//
- Short_t GetDebugLevel(){ return fDebugLevel; }
- void SetDebugLevel(Short_t debug=1){ fDebugLevel = debug;}
-
+ 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 GetAdcMin() const { return fAdcMin; }
+ Int_t GetAdcMax() const { return fAdcMax; }
+ Float_t GetAnaMeanDown() const { return fAnaMeanDown; }
+ Float_t GetAnaMeanUp() const { return fAnaMeanUp; }
+
+ void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
+ void SetAnalysisTruncationRange(Float_t down, Float_t up) {fAnaMeanDown=down; fAnaMeanUp=up;} //Set range for truncated mean analysis of the channel information
- Bool_t TestEvent(); //test the fast approach to fill histogram - used for test purposes
+ void Merge(AliTPCCalibPedestal * const ped);
+ virtual Long64_t Merge(TCollection * const list);
+
+ 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
+
+ Float_t fAnaMeanDown; // Truncated mean channel analysis - lower cut
+ Float_t fAnaMeanUp; // Truncated mean channel analysis - upper cut
- AliTPCROC *fROC; //! ROC information
-
- TObjArray fCalRocArrayPedestal; // Array of AliTPCCalROC class for Time0 calibration
- TObjArray fCalRocArrayRMS; // Array of AliTPCCalROC class for signal width calibration
-
+ Bool_t fTimeAnalysis; //! Should we use the time dependent analysis? ONLY ON LDC!
+
+ TObjArray fCalRocArrayPedestal; // Array of AliTPCCalROC class for pedestal values from gaus fit
+ TObjArray fCalRocArraySigma; // Array of AliTPCCalROC class for noise values from gaus fit
+
TObjArray fHistoPedestalArray; // Calibration histograms for Pedestal distribution
+
+ TArrayF **fTimeSignal; //! Arrays which hold time dependent signals
- TTreeSRedirector *fDebugStreamer; //! debug streamer
-
- Short_t fDebugLevel;
- //! debugging
-
- TH2S* 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);
+ TObjArray fCalRocArrayMean; // Array of AliTPCCalROC class for pedestal values, simple mean
+ TObjArray fCalRocArrayRMS; // Array of AliTPCCalROC class for noise values, simple rms
-public:
+ TH2F* GetHisto(Int_t sector, TObjArray *arr,
+ Int_t nbinsY, Float_t ymin, Float_t ymax,
+ const Char_t *type, Bool_t force);
+ AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
- ClassDef(AliTPCCalibPedestal,1)
+ ClassDef(AliTPCCalibPedestal, 7) // Implementation of the TPC pedestal and noise calibration
};