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 * Fill channel histogram
79 * @param digit Digit to fill from
81 void FillChannels(AliFMDDigit* digit);
85 * @param det Detector #
86 * @param ring Ring identifier
87 * @param sec Sector number
88 * @param strip Strip number
89 * @param h Summary histogram with bins for sector and strip
91 void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip);
93 * Write out the header
95 void WriteHeaderToFile();
97 * Go to the next sample
99 * @param det Detector #
100 * @param ring Ring identifier
101 * @param sec Sector number
102 * @param strip Strip number
104 void UpdatePulseAndADC(UShort_t det,
112 void ResetPulseAndUpdateChannel();
121 * @param dummy Not used
123 void Terminate(TFile* dummy);
127 * Get the channel histogram
129 * @param det Detector #
130 * @param ring Ring identifier
131 * @param sec Sector number
132 * @param strip Strip number
136 TH1S* GetChannelHistogram(UShort_t det, Char_t ring, UShort_t sec,
141 * @param det Detector #
142 * @param ring Ring identifier
143 * @param sec Sector number
144 * @param strip Strip number
148 TGraphErrors* GetChannel(UShort_t det, Char_t ring,
149 UShort_t sec, UShort_t strip);
150 TObjArray fGainArray; // Array of gains
151 Int_t fHighPulse; // Highest pulse
152 TArrayS fEventsPerChannel; // # of events per pulse step
153 TArrayS fCurrentPulse; // The current pulse size
154 TArrayS fCurrentChannel; // The current strip number
155 Int_t fNumberOfStripsPerChip; // Number of strips
157 TH1F fSummaryGains; // Summary histogram
158 Int_t fCurrentSummaryStrip; // Current strip for summary
160 void MakeSummary(UShort_t det, Char_t ring);
162 TH2* fGainFMD1i; // AMORE DQM histogram
163 TH2* fGainFMD2i; // AMORE DQM histogram
164 TH2* fGainFMD2o; // AMORE DQM histogram
165 TH2* fGainFMD3i; // AMORE DQM histogram
166 TH2* fGainFMD3o; // AMORE DQM histogram
167 TH2* fChi2FMD1i; // AMORE DQM histogram
168 TH2* fChi2FMD2i; // AMORE DQM histogram
169 TH2* fChi2FMD2o; // AMORE DQM histogram
170 TH2* fChi2FMD3i; // AMORE DQM histogram
171 TH2* fChi2FMD3o; // AMORE DQM histogram
173 ClassDef(AliFMDGainDA,0) // Detector algorithm for gain runs