]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - FMD/AliFMDGainDA.h
correct Run Loader
[u/mrichter/AliRoot.git] / FMD / AliFMDGainDA.h
... / ...
CommitLineData
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"
17class TGraphErrors;
18class TH1S;
19
20class AliFMDGainDA: public AliFMDBaseDA
21{
22public:
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 /**
35 * Assignment operator
36 *
37 * @param gainDA Object to assign from
38 */
39 AliFMDGainDA& operator=(const AliFMDGainDA&) { return *this; }
40 /**
41 * Destructor
42 *
43 */
44 virtual ~AliFMDGainDA();
45 /**
46 * Initialize
47 *
48 */
49 void Init();
50 /**
51 * Set the maximum pulse size
52 *
53 * @param highPulse Maximum pulse size
54 */
55 void SetMaxPulse(Int_t highPulse = 256) {fHighPulse = highPulse; }
56 /**
57 * Set the number of strips per input channel
58 *
59 * @param nStrips Number of strips per channel
60 */
61 void SetNumberOfStrips(Int_t nStrips) {fNumberOfStripsPerChip = nStrips;}
62
63protected:
64 /**
65 * Make a container for a channel
66 *
67 * @param sectorArray Sectors
68 * @param det Detector #
69 * @param ring Ring identifier
70 * @param sec Sector number
71 * @param strip Strip number
72 */
73 void AddChannelContainer(TObjArray* sectorArray,
74 UShort_t det, Char_t ring,
75 UShort_t sec, UShort_t strip);
76 /**
77 * Add summary(s) for sectors
78 *
79 * @param secArray
80 * @param det
81 * @param ring
82 * @param sector
83 * @param nStrip
84 */
85 virtual void AddSectorSummary(TObjArray* secArray, UShort_t det,
86 Char_t ring, UShort_t sector,
87 UShort_t nStrip);
88 /**
89 * Fill channel histogram
90 *
91 * @param digit Digit to fill from
92 */
93 void FillChannels(AliFMDDigit* digit);
94 /**
95 * Analyse the result
96 *
97 * @param det Detector #
98 * @param ring Ring identifier
99 * @param sec Sector number
100 * @param strip Strip number
101 * @param h Summary histogram with bins for sector and strip
102 */
103 void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip);
104 /**
105 * Write out the header
106 */
107 void WriteHeaderToFile();
108 /**
109 * Go to the next sample
110 *
111 * @param det Detector #
112 * @param ring Ring identifier
113 * @param sec Sector number
114 * @param strip Strip number
115 */
116 void UpdatePulseAndADC(UShort_t det,
117 Char_t ring,
118 UShort_t sec,
119 UShort_t strip);
120 /**
121 * Reset all
122 *
123 */
124 void ResetPulseAndUpdateChannel();
125 /**
126 * End of event
127 *
128 */
129 void FinishEvent();
130 /**
131 * End of job
132 *
133 * @param dummy Not used
134 */
135 void Terminate(TFile* dummy);
136 /**
137 * Initialize container
138 *
139 * @param dir Directory to make containers in
140 */
141 virtual void InitContainer(TDirectory* dir);
142
143private:
144 /**
145 * Get the channel histogram
146 *
147 * @param det Detector #
148 * @param ring Ring identifier
149 * @param sec Sector number
150 * @param va VA chip number
151 *
152 * @return Histogram
153 */
154 TH1S* GetChannelHistogram(UShort_t det, Char_t ring, UShort_t sec,
155 UShort_t va);
156 /**
157 * Get strip graph
158 *
159 * @param det Detector #
160 * @param ring Ring identifier
161 * @param sec Sector number
162 * @param strip Strip number
163 *
164 * @return Graph
165 */
166 TGraphErrors* GetChannel(UShort_t det, Char_t ring,
167 UShort_t sec, UShort_t strip);
168 /**
169 * Get the summary for a sector
170 *
171 * @param det Detector
172 * @param ring Ring
173 * @param sec Sector
174 * @param pedNotNoise Option
175 *
176 * @return histogram
177 */
178 TH1F* GetSectorSummary(UShort_t det, Char_t ring, UShort_t sec);
179 Int_t fHighPulse; // Highest pulse
180 TArrayS fEventsPerChannel; // # of events per pulse step
181 TArrayS fCurrentPulse; // The current pulse size
182 TArrayS fCurrentChannel; // The current strip number
183 Int_t fNumberOfStripsPerChip; // Number of strips
184
185 TH1F fSummaryGains; // Summary histogram
186 Int_t fCurrentSummaryStrip; // Current strip for summary
187
188 void MakeSummary(UShort_t det, Char_t ring);
189
190 TH2* fGainFMD1i; // AMORE DQM histogram
191 TH2* fGainFMD2i; // AMORE DQM histogram
192 TH2* fGainFMD2o; // AMORE DQM histogram
193 TH2* fGainFMD3i; // AMORE DQM histogram
194 TH2* fGainFMD3o; // AMORE DQM histogram
195 TH2* fChi2FMD1i; // AMORE DQM histogram
196 TH2* fChi2FMD2i; // AMORE DQM histogram
197 TH2* fChi2FMD2o; // AMORE DQM histogram
198 TH2* fChi2FMD3i; // AMORE DQM histogram
199 TH2* fChi2FMD3o; // AMORE DQM histogram
200
201 ClassDef(AliFMDGainDA,0) // Detector algorithm for gain runs
202
203};
204#endif
205// Local Variables:
206// mode: C++
207// End: