3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
6 * See cxx source for full Copyright notice
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.
13 #include "AliFMDBaseDA.h"
15 #include "TObjArray.h"
16 // #include "TGraphErrors.h"
20 class AliFMDGainDA: public AliFMDBaseDA
31 * @param gainDA Object to copy from
33 AliFMDGainDA(const AliFMDGainDA & gainDA) ;
37 * @param gainDA Object to assign from
39 AliFMDGainDA& operator=(const AliFMDGainDA&) { return *this; }
44 virtual ~AliFMDGainDA();
51 * Set the maximum pulse size
53 * @param highPulse Maximum pulse size
55 void SetMaxPulse(Int_t highPulse = 256) {fHighPulse = highPulse; }
57 * Set the number of strips per input channel
59 * @param nStrips Number of strips per channel
61 void SetNumberOfStrips(Int_t nStrips) {fNumberOfStripsPerChip = nStrips;}
65 * Make a container for a channel
67 * @param sectorArray Sectors
68 * @param det Detector #
69 * @param ring Ring identifier
70 * @param sec Sector number
71 * @param strip Strip number
73 void AddChannelContainer(TObjArray* sectorArray,
74 UShort_t det, Char_t ring,
75 UShort_t sec, UShort_t strip);
77 * Add summary(s) for sectors
85 virtual void AddSectorSummary(TObjArray* secArray, UShort_t det,
86 Char_t ring, UShort_t sector,
89 * Fill channel histogram
91 * @param digit Digit to fill from
93 void FillChannels(AliFMDDigit* digit);
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
103 void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip);
105 * Write out the header
107 void WriteHeaderToFile();
109 * Go to the next sample
111 * @param det Detector #
112 * @param ring Ring identifier
113 * @param sec Sector number
114 * @param strip Strip number
116 void UpdatePulseAndADC(UShort_t det,
124 void ResetPulseAndUpdateChannel();
133 * @param dummy Not used
135 void Terminate(TFile* dummy);
137 * Initialize container
139 * @param dir Directory to make containers in
141 virtual void InitContainer(TDirectory* dir);
145 * Get the channel histogram
147 * @param det Detector #
148 * @param ring Ring identifier
149 * @param sec Sector number
150 * @param va VA chip number
154 TH1S* GetChannelHistogram(UShort_t det, Char_t ring, UShort_t sec,
159 * @param det Detector #
160 * @param ring Ring identifier
161 * @param sec Sector number
162 * @param strip Strip number
166 TGraphErrors* GetChannel(UShort_t det, Char_t ring,
167 UShort_t sec, UShort_t strip);
169 * Get the summary for a sector
171 * @param det Detector
174 * @param pedNotNoise Option
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
185 TH1F fSummaryGains; // Summary histogram
186 Int_t fCurrentSummaryStrip; // Current strip for summary
188 void MakeSummary(UShort_t det, Char_t ring);
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
201 ClassDef(AliFMDGainDA,0) // Detector algorithm for gain runs