AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliTPCdataQA.h
Go to the documentation of this file.
1 
3 #ifndef ALITPCDATAQA_H
4 #define ALITPCDATAQA_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6  * See cxx source for full Copyright notice */
7 
8 #include <TBits.h>
9 #include <TH1F.h>
10 #include <TProfile.h>
11 #include <TProfile2D.h>
12 #include "AliRecoParam.h"
13 
14 #include <TArray.h>
15 
16 class TH2F;
17 class TTreeSRedirector;
18 class AliTPCROC;
19 class AliTPCCalROC;
20 class AliTPCRawStreamV3;
21 class AliRawReader;
22 class AliTPCAltroMapping;
23 class AliTPCCalPad;
24 class TMap;
25 class TObjArray;
26 struct eventHeaderStruct;
27 
28 class AliTPCdataQA : public TH1F {
29 
30 public:
31  AliTPCdataQA();
32  AliTPCdataQA(const AliTPCdataQA &ped);
33  AliTPCdataQA(const TMap *config);
34  virtual ~AliTPCdataQA();
35 
36  AliTPCdataQA& operator = (const AliTPCdataQA &source);
37  void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
38  void MakeTree(const char *fname="QApad.root") const;
39 
40  //
41  Bool_t ProcessEvent(AliTPCRawStreamV3 *const rawStreamV3);
42  Bool_t ProcessEvent(AliRawReader *const rawReader);
43  Bool_t ProcessEvent(eventHeaderStruct *const event);
44 
45  void Analyse();
46  //
47  //
48  void SetPedestal(AliTPCCalPad *const pedestalCal){ fPedestal = pedestalCal;}
49  void SetNoise(AliTPCCalPad *const noiseCal){ fNoise = noiseCal;}
50 
51  void SetMinQMax (Float_t minQmax ) { fMinQMax = minQmax; }
52  void SetRequireNeighbouringPad(Bool_t req=kTRUE) { fRequireNeighbouringPad = req; }
53 
54  // DQM methods
55  void FillOccupancyProfile();
56  void ResetProfiles();
57 
58 
60  AliTPCCalPad *GetMaxCharge() const { return fMaxCharge;}
66  AliTPCCalPad *GetNTimeBins() const { return fNTimeBins;}
67  AliTPCCalPad *GetNPads() const { return fNPads;}
69  TProfile* GetHistQVsTimeSideA() const {return fHistQVsTimeSideA;}
70  TProfile* GetHistQVsTimeSideC() const {return fHistQVsTimeSideC;}
71  TProfile* GetHistQMaxVsTimeSideA() const {return fHistQMaxVsTimeSideA;}
72  TProfile* GetHistQMaxVsTimeSideC() const {return fHistQMaxVsTimeSideC;}
77 
78  // DQM output
79  TProfile* GetHistOccVsSector() const { return fHistOccVsSector; }
80  TProfile2D* GetHistOcc2dVsSector() const { return fHistOcc2dVsSector; }
81  TProfile* GetHistQVsSector() const { return fHistQVsSector; }
82  TProfile* GetHistQmaxVsSector() const { return fHistQmaxVsSector; }
83 
84  //
86  void SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; };
87  //
88  //
89  Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
90  Int_t GetLastTimeBin() const { return fLastTimeBin; }
91  Int_t GetAdcMin() const { return fAdcMin; }
92  Int_t GetAdcMax() const { return fAdcMax; }
93  Int_t GetEventCounter() const { return fEventCounter; }
94  Bool_t GetIsAnalysed() const { return fIsAnalysed; }
95  Int_t GetMaxEvents() const { return fMaxEvents; }
96  Int_t GetEventsPerBin() const { return fEventsPerBin; }
97  Int_t GetSignalCounter() const { return fSignalCounter; }
98  Int_t GetClusterCounter() const { return fClusterCounter;}
99 
100  Float_t GetMinQMax() const { return fMinQMax; }
102 
103  // DQM getter
104  Bool_t GetIsDQM() const { return fIsDQM; }
105 
106  void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax;} // Set time bin range that is used for the pedestal calibration
107  void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
108  void SetMaxEvents (Int_t value) { fMaxEvents = value; }
109  void SetEventsPerBin(Int_t value) { fEventsPerBin = value; }
110 
111  // DQM setter
112  void SetIsDQM(Bool_t value) { fIsDQM = value; }
113 
114  void ResetData();
115 
116  void SetChamberStatus(UInt_t roc, Bool_t status) { fActiveChambers.SetBitNumber(roc,status); }
117  Bool_t GetChamberStatus(UInt_t roc) {return fActiveChambers.TestBitNumber(roc);}
118 private:
119  Int_t Update(const Int_t iSector, const Int_t iRow, const Int_t iPad,
120  const Int_t iTimeBin, Float_t signal,
121  const Int_t iPatch=-1, const Int_t iBranch=-1);
122  void FindLocalMaxima(const Int_t iSector);
123 
124  void MakeArrays(); // Create arrays for random data acces
125  void CleanArrays(); // Clean arrays for random data acces
126  void SetExpandDigit(const Int_t iRow, Int_t iPad, Int_t iTimeBin,
127  const Float_t signal); // Fill arrays with signals
128  void GetPadAndTimeBin(Int_t bin, Int_t& iPad, Int_t& iTimeBin); // Get pad and time bin corresponding to the 1d bin
129  Float_t GetQ(const Float_t* adcArray, const Int_t time,
130  const Int_t pad, const Int_t maxTimeBins,
131  Int_t& timeMin,Int_t& timeMax,Int_t& padMin,Int_t& padMax) const;
132  void UpdateEventHistograms();
133 
134  void Init();
135 
136  TObjArray *ConfigArrRocs(TObjArray *arr, const Text_t* name);
137 
139  Int_t fLastTimeBin;
140  Int_t fAdcMin;
141  Int_t fAdcMax;
142  Float_t fMinQMax;
144 
145 
147  //
148  //
161 
162  TProfile* fHistQVsTimeSideA;
163  TProfile* fHistQVsTimeSideC;
166 
169 
171  Bool_t fIsAnalysed;
172 
173  Int_t fMaxEvents;
177 
179 
180  //
181  // Expand buffer
182  //
183  Float_t** fAllBins;
184  Int_t** fAllSigBins;
185  Int_t* fAllNSigBins;
186  Int_t fRowsMax;
187  Int_t fPadsMax;
188  Int_t fTimeBinsMax;
189 
190  // DQM variables
191  Bool_t fIsDQM;
192  TProfile* fHistOccVsSector;
193  TProfile2D* fHistOcc2dVsSector;
194  TProfile* fHistQVsSector;
195  TProfile* fHistQmaxVsSector;
196  TArrayD* fOccVec;
197  TArrayD* fOccMaxVec;
198  TArrayD* fOccVecFine;
199  TArrayD* fOccMaxVecFine;
200 
201 
203  ClassDef(AliTPCdataQA, 6) // Implementation of the TPC Raw QA
205 };
206 
207 
208 
209 #endif
210 
Int_t fPadsMax
! Maximum number of time bins
Definition: AliTPCdataQA.h:187
Int_t fClusterCounter
Cluster counter.
Definition: AliTPCdataQA.h:176
TProfile * fHistQmaxVsSector
! QMax vs sector (for DQM only)
Definition: AliTPCdataQA.h:195
void FillOccupancyProfile()
Int_t GetFirstTimeBin() const
Definition: AliTPCdataQA.h:89
AliTPCCalPad * GetMaxCharge() const
Definition: AliTPCdataQA.h:60
TArrayD * fOccVecFine
! "2D" occupancy help counter for DQM
Definition: AliTPCdataQA.h:198
Float_t GetMinQMax() const
Definition: AliTPCdataQA.h:100
Int_t ** fAllSigBins
! array of pointers to the indexes over threshold
Definition: AliTPCdataQA.h:184
#define TObjArray
void SetNoise(AliTPCCalPad *const noiseCal)
Definition: AliTPCdataQA.h:49
TProfile * fHistQMaxVsTimeSideA
QMax vs time (side A)
Definition: AliTPCdataQA.h:164
Int_t fEventCounter
event Counter
Definition: AliTPCdataQA.h:170
TProfile * fHistQVsSector
! Q vs sector (for DQM only)
Definition: AliTPCdataQA.h:194
void SetExpandDigit(const Int_t iRow, Int_t iPad, Int_t iTimeBin, const Float_t signal)
Int_t fAdcMin
min adc channel of pedestal value
Definition: AliTPCdataQA.h:140
TH1F * GetHistOccupancyVsEventConst() const
Definition: AliTPCdataQA.h:73
Int_t fFirstTimeBin
First Time bin needed for analysis.
Definition: AliTPCdataQA.h:138
void SetIsDQM(Bool_t value)
Definition: AliTPCdataQA.h:112
Int_t GetLastTimeBin() const
Definition: AliTPCdataQA.h:90
Float_t ** fAllBins
! array for digit using random access
Definition: AliTPCdataQA.h:183
AliTPCCalPad * fNoThreshold
number of digits
Definition: AliTPCdataQA.h:154
void SetMinQMax(Float_t minQmax)
Definition: AliTPCdataQA.h:51
TBits fActiveChambers
configured ROCs
Definition: AliTPCdataQA.h:178
AliTPCCalPad * GetNTimeBins() const
Definition: AliTPCdataQA.h:66
AliTPCCalPad * fTimePosition
Time position of local maximum.
Definition: AliTPCdataQA.h:157
AliTPCCalPad * fOverThreshold20
! local maxima with qMax over threshold
Definition: AliTPCdataQA.h:159
void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE)
AliTPCCalPad * fOverThreshold30
! local maxima with qMax over threshold
Definition: AliTPCdataQA.h:160
Int_t GetEventCounter() const
Definition: AliTPCdataQA.h:93
Int_t GetClusterCounter() const
Definition: AliTPCdataQA.h:98
AliTPCCalPad * GetTimePosition() const
Definition: AliTPCdataQA.h:68
Int_t GetAdcMin() const
Definition: AliTPCdataQA.h:91
Int_t GetEventsPerBin() const
Definition: AliTPCdataQA.h:96
Int_t Update(const Int_t iSector, const Int_t iRow, const Int_t iPad, const Int_t iTimeBin, Float_t signal, const Int_t iPatch=-1, const Int_t iBranch=-1)
Int_t fSignalCounter
Signal counter.
Definition: AliTPCdataQA.h:175
TProfile2D * GetHistOcc2dVsSector() const
Definition: AliTPCdataQA.h:80
TProfile * GetHistQMaxVsTimeSideA() const
Definition: AliTPCdataQA.h:71
AliTPCCalPad * GetOverThreshold30() const
Definition: AliTPCdataQA.h:65
void CleanArrays()
Int_t fAdcMax
max adc channel of pedestal value
Definition: AliTPCdataQA.h:141
void SetChamberStatus(UInt_t roc, Bool_t status)
Definition: AliTPCdataQA.h:116
TArrayD * fOccMaxVec
! Occupancy help normlization for DQM
Definition: AliTPCdataQA.h:197
Int_t GetAdcMax() const
Definition: AliTPCdataQA.h:92
virtual ~AliTPCdataQA()
Int_t fTimeBinsMax
! Maximum number of time bins
Definition: AliTPCdataQA.h:188
void FindLocalMaxima(const Int_t iSector)
This class provides access to TPC digits in raw data.
AliTPCCalPad * fNLocalMaxima
local maximas found
Definition: AliTPCdataQA.h:151
TProfile * GetHistQVsTimeSideA() const
Definition: AliTPCdataQA.h:69
TProfile * GetHistOccVsSector() const
Definition: AliTPCdataQA.h:79
TArrayD * fOccMaxVecFine
! "2D" occupancy help normlization for DQM
Definition: AliTPCdataQA.h:199
TH1F * GetHistNclustersVsEventConst() const
Definition: AliTPCdataQA.h:74
void SetMaxEvents(Int_t value)
Definition: AliTPCdataQA.h:108
TArrayD * fOccVec
! Occupancy help counter for DQM
Definition: AliTPCdataQA.h:196
Int_t fEventsPerBin
Events per bin for event histograms.
Definition: AliTPCdataQA.h:174
void SetEventsPerBin(Int_t value)
Definition: AliTPCdataQA.h:109
TObjArray * ConfigArrRocs(TObjArray *arr, const Text_t *name)
TProfile * fHistQVsTimeSideC
Q vs time (side C)
Definition: AliTPCdataQA.h:163
Int_t fLastTimeBin
Last Time bin needed for analysis.
Definition: AliTPCdataQA.h:139
AliTPCCalPad * fNPads
pads with of cluster
Definition: AliTPCdataQA.h:156
Bool_t fRequireNeighbouringPad
If clusterer should require a neighbouring pad to accept it.
Definition: AliTPCdataQA.h:143
Geometry class for a single ROC.
Definition: AliTPCROC.h:14
Int_t GetMaxEvents() const
Definition: AliTPCdataQA.h:95
void ResetProfiles()
TProfile * fHistQVsTimeSideA
Q vs time (side A)
Definition: AliTPCdataQA.h:162
TPC calibration base class for one ROC.
Definition: AliTPCCalROC.h:20
void SetRangeAdc(Int_t aMin, Int_t aMax)
Definition: AliTPCdataQA.h:107
AliTPCCalPad * GetNPads() const
Definition: AliTPCdataQA.h:67
AliTPCAltroMapping ** fMapping
! Altro Mapping object
Definition: AliTPCdataQA.h:146
TProfile * GetHistQVsSector() const
Definition: AliTPCdataQA.h:81
TProfile2D * fHistOcc2dVsSector
! Occ vs sector 2D (for DQM only)
Definition: AliTPCdataQA.h:193
AliTPCCalPad * fNoise
! option to set noise cal object
Definition: AliTPCdataQA.h:150
Int_t fMaxEvents
Max events for event histograms.
Definition: AliTPCdataQA.h:173
TProfile * fHistOccVsSector
! Occ vs sector (for DQM only)
Definition: AliTPCdataQA.h:192
AliTPCCalPad * GetMeanCharge() const
Definition: AliTPCdataQA.h:61
AliTPCCalPad * fMeanCharge
mean charge
Definition: AliTPCdataQA.h:153
Bool_t fIsAnalysed
Set to true after Analyse has been called.
Definition: AliTPCdataQA.h:171
TProfile * fHistQMaxVsTimeSideC
QMax vs time (side C)
Definition: AliTPCdataQA.h:165
AliTPCAltroMapping ** GetAltroMapping() const
Definition: AliTPCdataQA.h:85
AliTPCCalPad * fMaxCharge
max charge
Definition: AliTPCdataQA.h:152
TH1F * GetHistOccupancyVsEvent()
AliTPCCalPad * fNTimeBins
timebins width of cluster
Definition: AliTPCdataQA.h:155
Bool_t GetIsDQM() const
Definition: AliTPCdataQA.h:104
Float_t GetQ(const Float_t *adcArray, const Int_t time, const Int_t pad, const Int_t maxTimeBins, Int_t &timeMin, Int_t &timeMax, Int_t &padMin, Int_t &padMax) const
void SetRangeTime(Int_t tMin, Int_t tMax)
Definition: AliTPCdataQA.h:106
TProfile * GetHistQMaxVsTimeSideC() const
Definition: AliTPCdataQA.h:72
TH1F * fHistNclustersVsEvent
Nclusters vs event number (~time)
Definition: AliTPCdataQA.h:168
AliTPCCalPad * GetNLocalMaxima() const
Definition: AliTPCdataQA.h:62
void UpdateEventHistograms()
TH1F * GetHistNclustersVsEvent()
AliTPCCalPad * fOverThreshold10
! local maxima with qMax over threshold
Definition: AliTPCdataQA.h:158
void GetPadAndTimeBin(Int_t bin, Int_t &iPad, Int_t &iTimeBin)
Bool_t ProcessEvent(AliTPCRawStreamV3 *const rawStreamV3)
Bool_t GetRequireNeighbouringPad() const
Definition: AliTPCdataQA.h:101
void SetAltroMapping(AliTPCAltroMapping **mapp)
Definition: AliTPCdataQA.h:86
Int_t * fAllNSigBins
!
Definition: AliTPCdataQA.h:185
AliTPCCalPad * GetNoThreshold() const
Definition: AliTPCdataQA.h:59
AliTPCCalPad * GetOverThreshold20() const
Definition: AliTPCdataQA.h:64
void SetPedestal(AliTPCCalPad *const pedestalCal)
Definition: AliTPCdataQA.h:48
Bool_t fIsDQM
! Is DQM -> Simple output (no 2D!)
Definition: AliTPCdataQA.h:191
TH1F * fHistOccupancyVsEvent
Occupancy vs event number (~time)
Definition: AliTPCdataQA.h:167
void MakeTree(const char *fname="QApad.root") const
AliTPCCalPad * GetOverThreshold10() const
Definition: AliTPCdataQA.h:63
Int_t GetSignalCounter() const
Definition: AliTPCdataQA.h:97
char * fname
void SetRequireNeighbouringPad(Bool_t req=kTRUE)
Definition: AliTPCdataQA.h:52
Int_t fRowsMax
! Maximum number of time bins
Definition: AliTPCdataQA.h:186
Bool_t GetChamberStatus(UInt_t roc)
Definition: AliTPCdataQA.h:117
Float_t fMinQMax
Minimun charge for Maximum ADC in cluster.
Definition: AliTPCdataQA.h:142
TProfile * GetHistQVsTimeSideC() const
Definition: AliTPCdataQA.h:70
TProfile * GetHistQmaxVsSector() const
Definition: AliTPCdataQA.h:82
AliTPCdataQA & operator=(const AliTPCdataQA &source)
Bool_t GetIsAnalysed() const
Definition: AliTPCdataQA.h:94
AliTPCCalPad * fPedestal
! option to set pedestal cal object
Definition: AliTPCdataQA.h:149