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) ;
38 virtual ~AliFMDGainDA();
45 * Set the maximum pulse size
47 * @param highPulse Maximum pulse size
49 void SetMaxPulse(Int_t highPulse = 256) {fHighPulse = highPulse; }
51 * Set the number of strips per input channel
53 * @param nStrips Number of strips per channel
55 void SetNumberOfStrips(Int_t nStrips) {fNumberOfStripsPerChip = nStrips;}
59 * Make a container for a channel
61 * @param sectorArray Sectors
62 * @param det Detector #
63 * @param ring Ring identifier
64 * @param sec Sector number
65 * @param strip Strip number
67 void AddChannelContainer(TObjArray* sectorArray,
68 UShort_t det, Char_t ring,
69 UShort_t sec, UShort_t strip);
71 * Fill channel histogram
73 * @param digit Digit to fill from
75 void FillChannels(AliFMDDigit* digit);
79 * @param det Detector #
80 * @param ring Ring identifier
81 * @param sec Sector number
82 * @param strip Strip number
84 void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip);
86 * Write out the header
88 void WriteHeaderToFile();
90 * Go to the next sample
92 * @param det Detector #
93 * @param ring Ring identifier
94 * @param sec Sector number
95 * @param strip Strip number
97 void UpdatePulseAndADC(UShort_t det,
105 void ResetPulseAndUpdateChannel();
114 * @param dummy Not used
116 void Terminate(TFile* dummy);
120 * Get the channel histogram
122 * @param det Detector #
123 * @param ring Ring identifier
124 * @param sec Sector number
125 * @param strip Strip number
129 TH1S* GetChannelHistogram(UShort_t det, Char_t ring, UShort_t sec,
134 * @param det Detector #
135 * @param ring Ring identifier
136 * @param sec Sector number
137 * @param strip Strip number
141 TGraphErrors* GetChannel(UShort_t det, Char_t ring,
142 UShort_t sec, UShort_t strip);
143 TObjArray fGainArray; // Array of gains
144 Int_t fHighPulse; // Highest pulse
145 TArrayS fEventsPerChannel; // # of events per pulse step
146 TArrayS fCurrentPulse; // The current pulse size
147 TArrayS fCurrentChannel; // The current strip number
148 Int_t fNumberOfStripsPerChip; // Number of strips
150 TH1F fSummaryGains; // Summary histogram
151 Int_t fCurrentSummaryStrip; // Current strip for summary
153 ClassDef(AliFMDGainDA,0) // Detector algorithm for gain runs