]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCCalibSignal.h
Made the fEquipmentID variable constant
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibSignal.h
CommitLineData
7e684c91 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 */
5
6class TObjArray;
7class TH2S;
8class TTreeSRedirector;
9class AliTPCCalPad;
10class AliTPCROC;
11class AliTPCParam;
12class AliRawReader;
13
14
15class AliTPCCalibSignal : public TObject {
16
17public:
18 AliTPCCalibSignal();
19 AliTPCCalibSignal(const AliTPCCalibSignal &sig);
20 virtual ~AliTPCCalibSignal();
21
22 AliTPCCalibSignal& operator = (const AliTPCCalibSignal &source);
23
24
25 Bool_t ProcessEvent(AliRawReader *rawReader); //center of gravity approach event by event
26
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);
29 void Analyse();
30 //
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
35
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
40
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
44
45 Short_t GetDebugLevel() const { return fDebugLevel; }
46 //
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;}
50
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; }
55
56 void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
57
58private:
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
63
64 Int_t fLastSector; //! Last sector processed
65
66 AliTPCROC *fROC; //! ROC information
67 AliTPCParam *fParam; //! TPC information
68
69 AliTPCCalPad *fPedestalTPC; //! Pedestal Information
70 Bool_t fBpedestal; //! are we running with pedestal substraction
71
72
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
77
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
81
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
86
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
93
94 TVectorF fVTime0Offset1; //! Time0 Offset from preprocessing for each sector;
95 TVectorF fVTime0Offset1Counter; //! Time0 Offset from preprocessing for each sector;
96
97 //debugging
98 Int_t fEvent;
99 TTreeSRedirector *fDebugStreamer; //! debug streamer
100
101 Short_t fDebugLevel;
102 //! debugging
103
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);
107
108
109 AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
110
111 TVectorF* GetPadTimesEvent(Int_t sector, Bool_t force=kFALSE);
112
113 void ResetEvent();
114 void ResetPad();
115 void ProcessPad();
116 void EndEvent();
117
118
119 //debug
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);
124
125
126public:
127
128
129 ClassDef(AliTPCCalibSignal,1)
130};
131
132
133
134#endif
135