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) ;
34 AliFMDGainDA& operator=(const AliFMDGainDA&) { return *this; }
38 * @param gainDA Object to assign from
40 AliFMDGainDA& operator=(const AliFMDGainDA&) { return *this; }
45 virtual ~AliFMDGainDA();
52 * Set the maximum pulse size
54 * @param highPulse Maximum pulse size
56 void SetMaxPulse(Int_t highPulse = 256) {fHighPulse = highPulse; }
58 * Set the number of strips per input channel
60 * @param nStrips Number of strips per channel
62 void SetNumberOfStrips(Int_t nStrips) {fNumberOfStripsPerChip = nStrips;}
66 * Make a container for a channel
68 * @param sectorArray Sectors
69 * @param det Detector #
70 * @param ring Ring identifier
71 * @param sec Sector number
72 * @param strip Strip number
74 void AddChannelContainer(TObjArray* sectorArray,
75 UShort_t det, Char_t ring,
76 UShort_t sec, UShort_t strip);
78 * Fill channel histogram
80 * @param digit Digit to fill from
82 void FillChannels(AliFMDDigit* digit);
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
92 void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip);
94 * Write out the header
96 void WriteHeaderToFile();
98 * Go to the next sample
100 * @param det Detector #
101 * @param ring Ring identifier
102 * @param sec Sector number
103 * @param strip Strip number
105 void UpdatePulseAndADC(UShort_t det,
113 void ResetPulseAndUpdateChannel();
122 * @param dummy Not used
124 void Terminate(TFile* dummy);
128 * Get the channel histogram
130 * @param det Detector #
131 * @param ring Ring identifier
132 * @param sec Sector number
133 * @param strip Strip number
137 TH1S* GetChannelHistogram(UShort_t det, Char_t ring, UShort_t sec,
142 * @param det Detector #
143 * @param ring Ring identifier
144 * @param sec Sector number
145 * @param strip Strip number
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
158 TH1F fSummaryGains; // Summary histogram
159 Int_t fCurrentSummaryStrip; // Current strip for summary
161 void MakeSummary(UShort_t det, Char_t ring);
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
174 ClassDef(AliFMDGainDA,0) // Detector algorithm for gain runs