AliRoot Core  edcc906 (edcc906)
AliFMDPedestalDA.h
Go to the documentation of this file.
1 #ifndef ALIFMDPEDESTALDA_H
2 #define ALIFMDPEDESTALDA_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
5  * reserved.
6  *
7  * See cxx source for full Copyright notice
8  */
9 // This class implements the pedestal detector algorithm (DA) for the FMD.
10 // It uses 51200 TH1S histograms to store the data for each channel of the FMD.
11 // The mean and standard deviation of a histogram define the pedestal and
12 // the noise for that channel.
13 
14 
15 #include "AliFMDBaseDA.h"
16 #include "TH1.h"
17 #include "TObjArray.h"
18 class TH2;
19 
21 {
22 public:
24 
35  AliFMDPedestalDA(const AliFMDPedestalDA & pedDA);
41  AliFMDPedestalDA& operator=(const AliFMDPedestalDA&) { return *this; }
46  virtual ~AliFMDPedestalDA();
73  Bool_t OpenFiles(Bool_t appendRun=false);
78  void CloseFiles();
83  void Init();
84 
85 protected:
86  enum {
89  };
99  void AddChannelContainer(Array* sectorArray, UShort_t det,
100  Char_t ring, UShort_t sec, UShort_t strip);
110  virtual void AddSectorSummary(Array* secArray, UShort_t det,
111  Char_t ring, UShort_t sector,
112  UShort_t nStrip);
118  void FillChannels(AliFMDDigit* digit);
129  void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip);
134  void WriteHeaderToFile();
139  void FinishEvent() {}
145  void Terminate(TFile* );
146 private:
158  TH1S* GetChannel(UShort_t det, Char_t ring, UShort_t sec,
159  UShort_t strip, UInt_t sample);
170  TH1F* GetSectorSummary(UShort_t det, Char_t ring, UShort_t sec,
171  Bool_t pedNotNoise);
182  Int_t HWIndex(UShort_t ddl, UShort_t board, UShort_t altro,
183  UShort_t chan) const;
187  void InstallFile(Int_t d);
189  Int_t fCurrentChannel; //The current channel
191  TH1F fPedSummary; //Summary of pedestals
193  TH1F fNoiseSummary; //Summary of noises
195  std::ofstream fZSfileFMD1; //Stream for ZS FMD1
197  std::ofstream fZSfileFMD2; //Stream for ZS FMD2
199  std::ofstream fZSfileFMD3; //Stream for ZS FMD3
201  TArrayS fMinTimebin; //minimum timebin
203  TArrayS fMaxTimebin; //maximum timebin
204 
205  void MakeSummary(UShort_t det, Char_t ring);
206 
207  TH2* fSummaryFMD1i; //Summary of FMD1
208  TH2* fSummaryFMD2i; //Summary of FMD2I
209  TH2* fSummaryFMD2o; //Summary of FMD2O
210  TH2* fSummaryFMD3i; //Summary of FMD3I
211  TH2* fSummaryFMD3o; //Summary of FMD3O
212 
213  ClassDef(AliFMDPedestalDA,0)
214 };
215 
216 inline Int_t
217 AliFMDPedestalDA::HWIndex(UShort_t ddl, UShort_t b,
218  UShort_t a, UShort_t c) const
219 {
220  // Save some array entries
221  UShort_t lb = (b > 1 ? b-16+2 : b);
222  const Int_t kNDDL = 3;
223  const Int_t kNBoard = 4;
224  const Int_t kNAltro = 3;
225  const Int_t kNChannel = 16;
226  Int_t idx = c + kNChannel * (a + kNAltro * (lb + kNBoard * ddl));
227  if (idx > kNDDL * kNBoard * kNAltro * kNChannel) return -1;
228  return idx;
229 }
230 
231 #endif
232 //
233 // Local Variables:
234 // mode: C++
235 // End:
236 //
class for digits
Definition: AliFMDDigit.h:28
TBrowser b
Definition: RunAnaESD.C:12
void MakeSummary(UShort_t det, Char_t ring)
std::ofstream fZSfileFMD2
Int_t HWIndex(UShort_t ddl, UShort_t board, UShort_t altro, UShort_t chan) const
void AddChannelContainer(Array *sectorArray, UShort_t det, Char_t ring, UShort_t sec, UShort_t strip)
virtual ~AliFMDPedestalDA()
Bool_t OpenFiles(Bool_t appendRun=false)
TObjArray Array
Definition: AliFMDBaseDA.h:62
void Terminate(TFile *)
std::ofstream fZSfileFMD1
void FillChannels(AliFMDDigit *digit)
TH1S * GetChannel(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip, UInt_t sample)
std::ofstream fZSfileFMD3
AliFMDPedestalDA & operator=(const AliFMDPedestalDA &)
AliFMDBaseDA::Array Array
virtual void AddSectorSummary(Array *secArray, UShort_t det, Char_t ring, UShort_t sector, UShort_t nStrip)
void InstallFile(Int_t d)
void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip)
TH1F * GetSectorSummary(UShort_t det, Char_t ring, UShort_t sec, Bool_t pedNotNoise)