]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDGainDA.h
Add comments and fix warnings
[u/mrichter/AliRoot.git] / FMD / AliFMDGainDA.h
1 #ifndef ALIFMDGAINDA_H
2 #define ALIFMDGAINDA_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4  * reserved. 
5  *
6  * See cxx source for full Copyright notice                               
7  */
8 // This class implements the Gain detector algorithm (DA) for the FMD. 
9 // The gain is the response of the VA chips to a known pulse and has to be 
10 // calculated strip-by-strip, pulse-by-pulse. 
11
12
13 #include "AliFMDBaseDA.h"
14 #include "TH1F.h"
15 #include "TObjArray.h"
16 // #include "TGraphErrors.h"
17 class TGraphErrors;
18 class TH1S;
19
20 class AliFMDGainDA: public AliFMDBaseDA 
21 {
22 public:
23   /** 
24    * Constructor 
25    * 
26    */
27   AliFMDGainDA() ;
28   /** 
29    * Copy constructor 
30    * 
31    * @param gainDA  Object to copy from
32    */  
33   AliFMDGainDA(const AliFMDGainDA & gainDA) ;
34   AliFMDGainDA& operator=(const AliFMDGainDA&) { return *this; }
35   /** 
36    * Assignment operator 
37    * 
38    * @param gainDA Object to assign from
39    */  
40   AliFMDGainDA& operator=(const AliFMDGainDA&) { return *this; }
41   /** 
42    * Destructor 
43    * 
44    */
45   virtual ~AliFMDGainDA();
46   /** 
47    * Initialize 
48    * 
49    */
50   void Init();
51   /** 
52    * Set the maximum pulse size 
53    * 
54    * @param highPulse Maximum pulse size
55    */
56   void SetMaxPulse(Int_t highPulse = 256) {fHighPulse = highPulse; }
57   /** 
58    * Set the number of strips per input channel 
59    * 
60    * @param nStrips Number of strips per channel
61    */
62   void SetNumberOfStrips(Int_t nStrips) {fNumberOfStripsPerChip = nStrips;}
63
64 protected:
65   /** 
66    * Make a container for a channel 
67    * 
68    * @param sectorArray Sectors 
69    * @param det         Detector # 
70    * @param ring        Ring identifier 
71    * @param sec         Sector number
72    * @param strip       Strip number
73    */ 
74   void AddChannelContainer(TObjArray* sectorArray, 
75                            UShort_t det, Char_t ring, 
76                            UShort_t sec, UShort_t strip);
77   /** 
78    * Fill channel histogram 
79    * 
80    * @param digit Digit to fill from
81    */
82   void FillChannels(AliFMDDigit* digit);
83   /** 
84    * Analyse the result
85    * 
86    * @param det   Detector # 
87    * @param ring  Ring identifier 
88    * @param sec   Sector number
89    * @param strip Strip number
90    * @param h     Summary histogram with bins for sector and strip
91    */
92   void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip);
93   /**
94    * Write out the header 
95    */
96   void WriteHeaderToFile();
97   /** 
98    * Go to the next sample
99    * 
100    * @param det         Detector # 
101    * @param ring        Ring identifier 
102    * @param sec         Sector number
103    * @param strip       Strip number
104    */
105   void UpdatePulseAndADC(UShort_t det, 
106                          Char_t ring, 
107                          UShort_t sec, 
108                          UShort_t strip);
109   /** 
110    * Reset all 
111    * 
112    */
113   void ResetPulseAndUpdateChannel();
114   /** 
115    * End of event 
116    * 
117    */
118   void FinishEvent();
119   /** 
120    * End of job
121    * 
122    * @param dummy Not used
123    */
124   void Terminate(TFile* dummy);
125
126 private:
127   /** 
128    * Get the channel histogram
129    * 
130    * @param det         Detector # 
131    * @param ring        Ring identifier 
132    * @param sec         Sector number
133    * @param strip       Strip number
134    * 
135    * @return Histogram
136    */  
137   TH1S* GetChannelHistogram(UShort_t det, Char_t ring, UShort_t sec, 
138                             UShort_t strip);
139   /** 
140    * Get strip graph
141    * 
142    * @param det         Detector # 
143    * @param ring        Ring identifier 
144    * @param sec         Sector number
145    * @param strip       Strip number
146    * 
147    * @return Graph
148    */
149   TGraphErrors* GetChannel(UShort_t det, Char_t ring, 
150                            UShort_t sec, UShort_t strip);
151   TObjArray fGainArray;          // Array of gains 
152   Int_t     fHighPulse;          // Highest pulse
153   TArrayS   fEventsPerChannel;   // # of events per pulse step
154   TArrayS   fCurrentPulse;       // The current pulse size 
155   TArrayS   fCurrentChannel;     // The current strip number
156   Int_t     fNumberOfStripsPerChip; // Number of strips
157   
158   TH1F      fSummaryGains;         // Summary histogram 
159   Int_t     fCurrentSummaryStrip;  // Current strip for summary
160
161   void  MakeSummary(UShort_t det, Char_t ring);
162
163   TH2* fGainFMD1i; // AMORE DQM histogram
164   TH2* fGainFMD2i; // AMORE DQM histogram
165   TH2* fGainFMD2o; // AMORE DQM histogram
166   TH2* fGainFMD3i; // AMORE DQM histogram
167   TH2* fGainFMD3o; // AMORE DQM histogram
168   TH2* fChi2FMD1i; // AMORE DQM histogram
169   TH2* fChi2FMD2i; // AMORE DQM histogram
170   TH2* fChi2FMD2o; // AMORE DQM histogram
171   TH2* fChi2FMD3i; // AMORE DQM histogram
172   TH2* fChi2FMD3o; // AMORE DQM histogram
173   
174   ClassDef(AliFMDGainDA,0) // Detector algorithm for gain runs
175
176 };
177 #endif
178 // Local Variables: 
179 //  mode: C++ 
180 // End: