Update by Sylwester
[u/mrichter/AliRoot.git] / TRD / AliTRDqaBlackEvents.h
1 #ifndef ALITRDQABLACKEVENTS_H
2 #define ALITRDQABLACKEVENTS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id: AliTRDqaBlackEvents.h 23387 2008-01-17 17:25:16Z cblume $ */
7
8 ////////////////////////////////////////////////////////////////////////////
9 //                                                                        //
10 //  QA of black events                                                    //
11 //                                                                        //
12 //  Author:                                                               //
13 //    Sylwester Radomski (radomski@physi.uni-heidelberg.de)               //
14 //                                                                        //
15 ////////////////////////////////////////////////////////////////////////////
16
17 #include "TObject.h"
18
19 class TH1D;
20 class TH2D;
21 class TH2S;
22 class TH3F;
23 class AliTRDrawStreamTB;
24
25 class AliTRDqaBlackEvents : public TObject {
26
27  public:
28   
29   AliTRDqaBlackEvents();
30   AliTRDqaBlackEvents(const AliTRDqaBlackEvents &qa);
31   ~AliTRDqaBlackEvents() {}
32   AliTRDqaBlackEvents& operator = (const AliTRDqaBlackEvents& /*qa*/) { return *this; };
33
34   void Init();
35   void Reset();
36   Int_t AddEvent(AliTRDrawStreamTB *data);
37   void Process(const char* filename);
38   
39   //TH2D *GetChamberPedestal(Int_t sm, Int_t layer, Int_t stack) {return 0;}
40   TH2D *GetChamberPedestal(Int_t det) {return fChPed[det];}
41   
42   //TH2D *GetChamberNoise(Int_t sm, Int_t layer, Int_t stack) {return 0;}
43   TH2D *GetChamberNoise(Int_t det) {return fChNoise[det];}
44   
45   void SetNoiseLevel(Double_t min, Double_t max) {fMinNoise = min; fMaxNoise = max;}
46   void SetFitMethod(Int_t fit) {fFitType = fit;} 
47
48   void DrawChamber(const char *filename, Int_t det, Int_t w=700, Int_t h=400);
49   //void ScanChamber(const char *filename, Int_t first, Int_t last);
50   void DrawSm(const char *filename, Int_t sm, Int_t w=900, Int_t h=700);
51
52   void SetFullView(Int_t v, Int_t thresh, Int_t count) {
53     fCreateFull = v;
54     fThresh = thresh;
55     fCount = count;
56   }
57
58  private:
59   
60   Int_t fnEvents;         // number of events processed  
61   Int_t fCreateFull;      // flag if to create a full view
62   Int_t fThresh;          // threshold to analyze MCM data
63   Int_t fCount;           // minimum number of entries above threshold
64   
65   // geometry constants 
66   enum {
67     kDET = 540,
68     kROB = 8,
69     kMCM = 16,
70     kADC = 21,
71     kTB  = 30,
72     kCOL = 16,
73     kPAD = 144
74   };
75
76   // histograms per detector
77
78   TH1D *fOccupancy;       // how many times is a pad present in data
79   TH2D *fDetRob;          // detector -- read out board
80
81   // histograms per chamber
82
83   TH1D *fPed[kDET];        // reconstructed pedestals distribution (on hist per chamber)
84   TH1D *fNoise[kDET];      // reconstructed noise distribution (on hist per chamber)
85   TH1D *fNPointDist[kDET]; // distributin of the number of points
86   TH2D *fChPed[kDET];      // Some histograms
87   TH2D *fChNoise[kDET];    // Some histograms
88   TH2D *fNPoint[kDET];     // number of data points
89   TH3F *fData[kDET];       // Some histograms
90   TH1D *fSignal[kDET];     // Some histograms
91   TH2D *fnEntriesRM[kDET];     // number of entries for ROB - MCM
92   TH1D *fnEntriesRMDist[kDET]; // distribtion of number of entries per ROB-MCM
93
94   TH2S *fFullSignal[kDET*kROB*kMCM];     // one histogram per MCM  
95   Short_t fFullCounter[kDET*kROB*kMCM];  // counts a number of entries with high signal
96   
97   TH2D *fTBEvent;    // coherent noise
98
99
100   Int_t fFitType;
101
102   Double_t fMinNoise;   // Minimum noise
103   Double_t fMaxNoise;   // Maximum noise
104
105   ClassDef(AliTRDqaBlackEvents,0) // QA for black events  
106
107 };
108 #endif