AliRoot Core  edcc906 (edcc906)
AliTPCCalibPulser.h
Go to the documentation of this file.
1 #ifndef ALITPCCALIBPULSER_H
2 #define ALITPCCALIBPULSER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
8 
9 #include <TVectorT.h>
10 #include "AliTPCCalibRawBase.h"
11 #include <TObjArray.h>
12 class TH2S;
13 class TH2F;
14 class TTreeSRedirector;
15 class AliTPCCalPad;
16 class AliTPCROC;
17 class AliTPCCalROC;
18 class AliTPCParam;
19 class AliRawReader;
20 class TMap;
21 
22 struct eventHeaderStruct;
23 
25 
26 public:
29  AliTPCCalibPulser(const TMap *config);
30  virtual ~AliTPCCalibPulser();
31 
32  void Reset();
33 
35 
36 
37  virtual Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
38  const Int_t iTimeBin, const Float_t signal);
39  virtual void Analyse();
40  //
41  AliTPCCalROC* GetCalRocT0 (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
42  AliTPCCalROC* GetCalRocQ (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  AliTPCCalROC* GetCalRocOutliers(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
45 
46  const TObjArray* GetCalPadT0() const { return &fCalRocArrayT0; } // get calibration object
47  const TObjArray* GetCalPadQ() const { return &fCalRocArrayQ; } // get calibration object
48  const TObjArray* GetCalPadRMS() const{ return &fCalRocArrayRMS;} // get calibration object
49  const TObjArray* GetCalPadOutliers() const { return &fCalRocArrayOutliers;} // get calibration object
50 
51  TH2S* GetHistoQ (Int_t sector, Bool_t force=kFALSE); // get refernce histogram
52  TH2S* GetHistoT0 (Int_t sector, Bool_t force=kFALSE); // get refernce histogram
53  TH2S* GetHistoRMS(Int_t sector, Bool_t force=kFALSE); // get refernce histogram
54 
55  TH2F* GetHistoTSec(); // mean abs time distribution histogram
56 
57  Float_t GetMeanTimeSector(Int_t sector) const {return fVMeanTimeSector[sector];}
58  const TVectorF* GetMeanTimeSectorArray() const {return &fVMeanTimeSector;}
59 
60  Short_t GetDebugLevel() const { return fDebugLevel; }
61  //
62  void SetRangeTime (Int_t firstTimeBin, Int_t lastTimeBin) { fFirstTimeBin=firstTimeBin; fLastTimeBin=lastTimeBin; } //Set range in which the pulser signal is expected
63  //
64  void SetRangeRefQ (Int_t nBins, Float_t xMin, Float_t xMax){ fNbinsQ = nBins; fXminQ = xMin; fXmaxQ = xMax; } //Set range for Q reference histograms
65  void SetRangeRefT0 (Int_t nBins, Float_t xMin, Float_t xMax){ fNbinsT0 = nBins; fXminT0 = xMin; fXmaxT0 = xMax; } //Set range for T0 reference histograms
66  void SetRangeRefRMS(Int_t nBins, Float_t xMin, Float_t xMax){ fNbinsRMS = nBins; fXminRMS = xMin; fXmaxRMS = xMax; } //Set range for T0 reference histograms
67  void SetRangePeakIntegral(Int_t minus, Int_t plus) { fPeakIntMinus=minus; fPeakIntPlus=plus;}
68 
69  void SetDebugLevel(Short_t debug=1){ fDebugLevel = debug;}
70 
71  void SetIsZeroSuppressed(Bool_t zs=kTRUE){ fIsZeroSuppressed=zs;}
72 
73  void SetPedestalDatabase(AliTPCCalPad * const pedestalTPC, AliTPCCalPad * const padNoiseTPC) {fPedestalTPC = pedestalTPC; fPadNoiseTPC = padNoiseTPC;}
74  void SetOutliers(AliTPCCalPad * const outliers) {fOutliers = outliers;}
75 
76  Bool_t GetIsZeroSupperssed() const { return fIsZeroSuppressed; }
77 
78  Float_t GetPeakIntegralMinus() const {return fPeakIntMinus;}
79  Float_t GetPeakIntegralPlus() const {return fPeakIntPlus;}
80 
81  void Merge(AliTPCCalibPulser * const sig);
82  virtual Long64_t Merge(TCollection * const list);
83 
84  //
85  // Test functions
87 
88 protected:
89  virtual void ResetEvent();
90  virtual void EndEvent();
91 
92 private:
93  // reference histogram ranges
94  Int_t fNbinsT0;
95  Float_t fXminT0;
96  Float_t fXmaxT0;
97  Int_t fNbinsQ;
98  Float_t fXminQ;
99  Float_t fXmaxQ;
100  Int_t fNbinsRMS;
101  Float_t fXminRMS;
102  Float_t fXmaxRMS;
104  Int_t fPeakIntPlus;
105 
107 
108  Int_t fLastSector;
109 
111 
117 
122 
126 
128  TVectorF fVMeanTimeSector;
129 
134 
137  Int_t fCurrentRow;
138  Int_t fCurrentPad;
139  Float_t fMaxPadSignal;
140  Int_t fMaxTimeBin;
141  TVectorF fPadSignal;
142  Float_t fPadPedestal;
143  Float_t fPadNoise;
144 
145  TVectorF fVTime0Offset;
147 
148 
149  void FindPedestal(Float_t part=.6);
150  void FindPulserSignal(TVectorD &param, Float_t &qSum);
151 
152  TH2S* GetHisto(Int_t sector, TObjArray *arr,
153  Int_t nbinsY, Float_t ymin, Float_t ymax,
154  const Char_t *type, Bool_t force);
155 
156 
157  AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force) const;
158 
159  TVectorF* GetPadTimesEvent(Int_t sector, Bool_t force=kFALSE);
160 
161  Bool_t IsEdgePad(Int_t sector, Int_t row, Int_t pad);
162 
163  void ResetPad();
164  void ProcessPad();
165 
166 
167  //debug
168  TVectorF* GetPadInfoEvent(Int_t sector, TObjArray *arr, Bool_t force=kFALSE);
169  TVectorF* GetPadQEvent(Int_t sector, Bool_t force=kFALSE);
170  TVectorF* GetPadRMSEvent(Int_t sector, Bool_t force=kFALSE);
171  TVectorF* GetPadPedestalEvent(Int_t sector, Bool_t force=kFALSE);
172 
173 
175  ClassDef(AliTPCCalibPulser,5) //Implementation of the TPC pulser calibration
177 };
178 
179 
180 
181 #endif
182 
Float_t fXmaxRMS
xmax of T0 reference histogram
Bool_t GetIsZeroSupperssed() const
Int_t fNbinsT0
Number of bins for T0 reference histogram.
AliTPCCalROC * GetCalRocRMS(Int_t sector, Bool_t force=kFALSE)
Bool_t fIsZeroSuppressed
if data is zero suppressed
Int_t fCurrentChannel
! current channel processed
AliTPCCalROC * GetCalRocOutliers(Int_t sector, Bool_t force=kFALSE)
void SetRangeRefRMS(Int_t nBins, Float_t xMin, Float_t xMax)
AliTPCCalROC * fPedestalROC
! Pedestal Information for current ROC
TH2F * fHMeanTimeSector
Timing distribution per sector.
Float_t fXmaxQ
xmax of T0 reference histogram
TVectorF * GetPadTimesEvent(Int_t sector, Bool_t force=kFALSE)
#define TObjArray
void SetRangeRefQ(Int_t nBins, Float_t xMin, Float_t xMax)
Float_t fPadPedestal
! Pedestal Value of current pad
TH2S * GetHisto(Int_t sector, TObjArray *arr, Int_t nbinsY, Float_t ymin, Float_t ymax, const Char_t *type, Bool_t force)
Manager and of geomety classes for set: TPC.
Definition: AliTPCParam.h:18
TObjArray fHistoQArray
Calibration histograms for Charge distribution.
Float_t GetMeanTimeSector(Int_t sector) const
Float_t fPadNoise
! Noise Value of current pad
Float_t fXminQ
xmin of T0 reference histogram
TObjArray fPadTimesArrayEvent
! Pad Times for the event, before mean Time0 corrections
TObjArray fPadPedestalArrayEvent
! Signal width for the event, only needed for debugging streamer
TH2S * GetHistoQ(Int_t sector, Bool_t force=kFALSE)
void SetIsZeroSuppressed(Bool_t zs=kTRUE)
AliTPCCalPad * fPadNoiseTPC
! Pad noise Information whole TPC
const TVectorF * GetMeanTimeSectorArray() const
Int_t fLastTimeBin
Last Time bin used for analysis.
Base class for the calibration algorithms using raw data as input.
AliTPCCalROC * fPadNoiseROC
! Pad noise Information for current ROC
void SetRangePeakIntegral(Int_t minus, Int_t plus)
AliTPCParam * fParam
! TPC information
const TObjArray * GetCalPadRMS() const
void SetDebugLevel(Short_t debug=1)
Float_t fMaxPadSignal
! maximum bin of current pad
Implementation of the TPC pulser calibration.
AliTPCCalPad * fPedestalTPC
! Pedestal Information
const TObjArray * GetCalPadOutliers() const
TObjArray fCalRocArrayT0
Array of AliTPCCalROC class for Time0 calibration.
TVectorF fPadSignal
! signal of current Pad
Int_t fFirstTimeBin
First Time bin used for analysis.
Float_t fXminRMS
xmin of T0 reference histogram
AliTPCCalROC * GetCalRocQ(Int_t sector, Bool_t force=kFALSE)
Int_t fCurrentRow
! current row processed
const TObjArray * GetCalPadT0() const
Geometry class for a single ROC.
Definition: AliTPCROC.h:14
AliTPCCalROC * GetCalRocT0(Int_t sector, Bool_t force=kFALSE)
Int_t fLastSector
! Last sector processed
virtual Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad, const Int_t iTimeBin, const Float_t signal)
TH2S * GetHistoT0(Int_t sector, Bool_t force=kFALSE)
Int_t fPeakIntMinus
Peak integral range for COG determination. Bins used before max bin.
Float_t fXmaxT0
xmax of T0 reference histogram
TObjArray fPadRMSArrayEvent
! Signal width for the event, only needed for debugging streamer
void SetRangeRefT0(Int_t nBins, Float_t xMin, Float_t xMax)
TPC calibration base class for one ROC.
Definition: AliTPCCalROC.h:20
void Merge(AliTPCCalibPulser *const sig)
TVectorF * GetPadRMSEvent(Int_t sector, Bool_t force=kFALSE)
AliTPCCalROC * GetCalRoc(Int_t sector, TObjArray *arr, Bool_t force) const
TVectorF * GetPadPedestalEvent(Int_t sector, Bool_t force=kFALSE)
Int_t nBins
TVectorF * GetPadQEvent(Int_t sector, Bool_t force=kFALSE)
TH2S * GetHistoRMS(Int_t sector, Bool_t force=kFALSE)
Float_t GetPeakIntegralPlus() const
TVectorF fVTime0Offset
! Time0 Offset from preprocessing for each sector;
Int_t fNbinsRMS
Number of bins for T0 reference histogram.
TObjArray fCalRocArrayRMS
Array of AliTPCCalROC class for signal width calibration.
void SetPedestalDatabase(AliTPCCalPad *const pedestalTPC, AliTPCCalPad *const padNoiseTPC)
AliTPCCalibPulser & operator=(const AliTPCCalibPulser &source)
void FindPedestal(Float_t part=.6)
TObjArray fCalRocArrayQ
Array of AliTPCCalROC class for Charge calibration.
TVectorF fVTime0OffsetCounter
! Time0 Offset from preprocessing for each sector;
Int_t fPeakIntPlus
Peak integral range for COG determination. Bins used after max bin.
virtual void EndEvent()
TObjArray fHistoT0Array
Calibration histograms for Time0 distribution.
Float_t GetPeakIntegralMinus() const
TVectorF fVMeanTimeSector
Mean time per sector from analysis of fHMeanTimeSector.
TVectorF * GetPadInfoEvent(Int_t sector, TObjArray *arr, Bool_t force=kFALSE)
Int_t fCurrentSector
! current sector processed
class TVectorT< Double_t > TVectorD
virtual void ResetEvent()
TObjArray fCalRocArrayOutliers
Array of AliTPCCalROC class for signal outliers.
Bool_t IsEdgePad(Int_t sector, Int_t row, Int_t pad)
Short_t GetDebugLevel() const
Int_t fNbinsQ
Number of bins for T0 reference histogram.
TObjArray fPadQArrayEvent
! Charge for the event, only needed for debugging streamer
void FindPulserSignal(TVectorD &param, Float_t &qSum)
const TObjArray * GetCalPadQ() const
Int_t debug
Float_t fXminT0
xmin of T0 reference histogram
Int_t fDebugLevel
! debug level
AliTPCCalPad * fOutliers
! Outlier information. Those will not be used for calculating the T0
TObjArray fHistoRMSArray
Calibration histograms for signal width distribution.
Int_t fCurrentPad
! current pad processed
void SetRangeTime(Int_t firstTimeBin, Int_t lastTimeBin)
void SetOutliers(AliTPCCalPad *const outliers)
Int_t fMaxTimeBin
! time bin with maximum value