]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDGainDA.h
change axis title style to italics
[u/mrichter/AliRoot.git] / FMD / AliFMDGainDA.h
CommitLineData
18216140 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"
6cf6e7a0 14#include "TH1F.h"
18216140 15#include "TObjArray.h"
6cf6e7a0 16// #include "TGraphErrors.h"
17class TGraphErrors;
18class TH1S;
18216140 19
6cf6e7a0 20class AliFMDGainDA: public AliFMDBaseDA
21{
22public:
23 /**
24 * Constructor
25 *
26 */
18216140 27 AliFMDGainDA() ;
6cf6e7a0 28 /**
29 * Copy constructor
30 *
31 * @param gainDA Object to copy from
32 */
18216140 33 AliFMDGainDA(const AliFMDGainDA & gainDA) ;
8e23c82d 34 /**
35 * Assignment operator
36 *
37 * @param gainDA Object to assign from
38 */
39 AliFMDGainDA& operator=(const AliFMDGainDA&) { return *this; }
6cf6e7a0 40 /**
41 * Destructor
42 *
43 */
18216140 44 virtual ~AliFMDGainDA();
6cf6e7a0 45 /**
46 * Initialize
47 *
48 */
18216140 49 void Init();
6cf6e7a0 50 /**
51 * Set the maximum pulse size
52 *
53 * @param highPulse Maximum pulse size
54 */
18216140 55 void SetMaxPulse(Int_t highPulse = 256) {fHighPulse = highPulse; }
6cf6e7a0 56 /**
57 * Set the number of strips per input channel
58 *
59 * @param nStrips Number of strips per channel
60 */
18216140 61 void SetNumberOfStrips(Int_t nStrips) {fNumberOfStripsPerChip = nStrips;}
62
6cf6e7a0 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);
a31ea3ce 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);
6cf6e7a0 88 /**
89 * Fill channel histogram
90 *
91 * @param digit Digit to fill from
92 */
18216140 93 void FillChannels(AliFMDDigit* digit);
6cf6e7a0 94 /**
95 * Analyse the result
96 *
2a082c96 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
6cf6e7a0 102 */
18216140 103 void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip);
6cf6e7a0 104 /**
105 * Write out the header
106 */
18216140 107 void WriteHeaderToFile();
6cf6e7a0 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 */
18216140 124 void ResetPulseAndUpdateChannel();
6cf6e7a0 125 /**
126 * End of event
127 *
128 */
18216140 129 void FinishEvent();
6cf6e7a0 130 /**
131 * End of job
132 *
133 * @param dummy Not used
134 */
135 void Terminate(TFile* dummy);
a31ea3ce 136 /**
137 * Initialize container
138 *
139 * @param dir Directory to make containers in
140 */
141 virtual void InitContainer(TDirectory* dir);
2a082c96 142
6cf6e7a0 143private:
144 /**
145 * Get the channel histogram
146 *
147 * @param det Detector #
148 * @param ring Ring identifier
149 * @param sec Sector number
a31ea3ce 150 * @param va VA chip number
6cf6e7a0 151 *
152 * @return Histogram
153 */
154 TH1S* GetChannelHistogram(UShort_t det, Char_t ring, UShort_t sec,
a31ea3ce 155 UShort_t va);
6cf6e7a0 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);
a31ea3ce 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);
6cf6e7a0 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
18216140 184
6cf6e7a0 185 TH1F fSummaryGains; // Summary histogram
186 Int_t fCurrentSummaryStrip; // Current strip for summary
2a082c96 187
188 void MakeSummary(UShort_t det, Char_t ring);
189
8cc1cb63 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
3bae5d02 200
6cf6e7a0 201 ClassDef(AliFMDGainDA,0) // Detector algorithm for gain runs
18216140 202
203};
204#endif
6cf6e7a0 205// Local Variables:
206// mode: C++
207// End: