1 #ifndef ALITPCCALIBSIGNAL_H
2 #define ALITPCCALIBSIGNAL_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 class TTreeSRedirector;
15 class AliTPCCalibSignal : public TObject {
19 AliTPCCalibSignal(const AliTPCCalibSignal &sig);
20 virtual ~AliTPCCalibSignal();
22 AliTPCCalibSignal& operator = (const AliTPCCalibSignal &source);
25 Bool_t ProcessEvent(AliRawReader *rawReader); //center of gravity approach event by event
27 Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
28 const Int_t iTimeBin, const Float_t signal);
31 AliTPCCalROC* GetCalRocT0 (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
32 AliTPCCalROC* GetCalRocQ (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
33 AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
34 AliTPCCalROC* GetCalRocOutliers(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
36 const TObjArray* GetCalPadT0() { return &fCalRocArrayT0; } // get calibration object
37 const TObjArray* GetCalPadQ() { return &fCalRocArrayQ; } // get calibration object
38 const TObjArray* GetCalPadRMS(){ return &fCalRocArrayRMS;} // get calibration object
39 const TObjArray* GetCalPadOutliers(){ return &fCalRocArrayOutliers;} // get calibration object
41 TH2S* GetHistoQ (Int_t sector, Bool_t force=kFALSE); // get refernce histogram
42 TH2S* GetHistoT0 (Int_t sector, Bool_t force=kFALSE); // get refernce histogram
43 TH2S* GetHistoRMS(Int_t sector, Bool_t force=kFALSE); // get refernce histogram
45 Short_t GetDebugLevel() const { return fDebugLevel; }
47 void SetRangeTime (Int_t firstTimeBin, Int_t lastTimeBin) { fFirstTimeBin=firstTimeBin; fLastTimeBin=lastTimeBin; } //Set range in which the pulser signal is expected
48 void SetRangeTime0(Int_t firstTimeBin, Int_t lastTimeBin) { fFirstTimeBinT0=firstTimeBin; fLastTimeBinT0=lastTimeBin;} //Set range for analysis after T0 substraction. Should be smaller than the above and around 0
49 void SetDebugLevel(Short_t debug=1){ fDebugLevel = debug;}
51 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
52 Int_t GetLastTimeBin() const { return fLastTimeBin; }
53 Int_t GetFirstTimeBinT0() const { return fFirstTimeBinT0;}
54 Int_t GetLastTimeBinT0() const { return fLastTimeBinT0; }
56 void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
59 Int_t fFirstTimeBin; // First Time bin needed for analysis
60 Int_t fLastTimeBin; // Last Time bin needed for analysis
61 Int_t fFirstTimeBinT0; // First Time bin after T0 correction
62 Int_t fLastTimeBinT0; // Last Time bin after T0 correction
64 Int_t fLastSector; //! Last sector processed
66 AliTPCROC *fROC; //! ROC information
67 AliTPCParam *fParam; //! TPC information
69 AliTPCCalPad *fPedestalTPC; //! Pedestal Information
70 Bool_t fBpedestal; //! are we running with pedestal substraction
73 TObjArray fCalRocArrayT0; // Array of AliTPCCalROC class for Time0 calibration
74 TObjArray fCalRocArrayQ; // Array of AliTPCCalROC class for Charge calibration
75 TObjArray fCalRocArrayRMS; // Array of AliTPCCalROC class for signal width calibration
76 TObjArray fCalRocArrayOutliers; // Array of AliTPCCalROC class for signal outliers
78 TObjArray fHistoQArray; // Calibration histograms for Charge distribution
79 TObjArray fHistoT0Array; // Calibration histograms for Time0 distribution
80 TObjArray fHistoRMSArray; // Calibration histograms for signal width distribution
82 TObjArray fPadTimesArrayEvent; //! Pad Times for the event, before mean Time0 corrections
83 TObjArray fPadQArrayEvent; //! Charge for the event, only needed for debugging streamer
84 TObjArray fPadRMSArrayEvent; //! Signal width for the event, only needed for debugging streamer
85 TObjArray fPadPedestalArrayEvent; //! Signal width for the event, only needed for debugging streamer
87 Int_t fCurrentChannel; //! current channel processed
88 Int_t fCurrentSector; //! current sector processed
89 Int_t fCurrentRow; //! current row processed
90 Float_t fMaxPadSignal; //! maximum bin of current pad
91 Int_t fMaxTimeBin; //! time bin with maximum value
92 TVectorF fPadSignal; //! signal of current Pad
94 TVectorF fVTime0Offset1; //! Time0 Offset from preprocessing for each sector;
95 TVectorF fVTime0Offset1Counter; //! Time0 Offset from preprocessing for each sector;
99 TTreeSRedirector *fDebugStreamer; //! debug streamer
104 TH2S* GetHisto(Int_t sector, TObjArray *arr,
105 Int_t nbinsY, Float_t ymin, Float_t ymax,
106 Char_t *type, Bool_t force);
109 AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
111 TVectorF* GetPadTimesEvent(Int_t sector, Bool_t force=kFALSE);
120 TVectorF* GetPadInfoEvent(Int_t sector, TObjArray *arr, Bool_t force=kFALSE);
121 TVectorF* GetPadQEvent(Int_t sector, Bool_t force=kFALSE);
122 TVectorF* GetPadRMSEvent(Int_t sector, Bool_t force=kFALSE);
123 TVectorF* GetPadPedestalEvent(Int_t sector, Bool_t force=kFALSE);
129 ClassDef(AliTPCCalibSignal,1)