]>
Commit | Line | Data |
---|---|---|
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" |
17 | class TGraphErrors; | |
18 | class TH1S; | |
18216140 | 19 | |
6cf6e7a0 | 20 | class AliFMDGainDA: public AliFMDBaseDA |
21 | { | |
22 | public: | |
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 | 63 | protected: |
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); | |
76 | /** | |
77 | * Fill channel histogram | |
78 | * | |
79 | * @param digit Digit to fill from | |
80 | */ | |
18216140 | 81 | void FillChannels(AliFMDDigit* digit); |
6cf6e7a0 | 82 | /** |
83 | * Analyse the result | |
84 | * | |
2a082c96 | 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 | |
6cf6e7a0 | 90 | */ |
18216140 | 91 | void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip); |
6cf6e7a0 | 92 | /** |
93 | * Write out the header | |
94 | */ | |
18216140 | 95 | void WriteHeaderToFile(); |
6cf6e7a0 | 96 | /** |
97 | * Go to the next sample | |
98 | * | |
99 | * @param det Detector # | |
100 | * @param ring Ring identifier | |
101 | * @param sec Sector number | |
102 | * @param strip Strip number | |
103 | */ | |
104 | void UpdatePulseAndADC(UShort_t det, | |
105 | Char_t ring, | |
106 | UShort_t sec, | |
107 | UShort_t strip); | |
108 | /** | |
109 | * Reset all | |
110 | * | |
111 | */ | |
18216140 | 112 | void ResetPulseAndUpdateChannel(); |
6cf6e7a0 | 113 | /** |
114 | * End of event | |
115 | * | |
116 | */ | |
18216140 | 117 | void FinishEvent(); |
6cf6e7a0 | 118 | /** |
119 | * End of job | |
120 | * | |
121 | * @param dummy Not used | |
122 | */ | |
123 | void Terminate(TFile* dummy); | |
2a082c96 | 124 | |
6cf6e7a0 | 125 | private: |
126 | /** | |
127 | * Get the channel histogram | |
128 | * | |
129 | * @param det Detector # | |
130 | * @param ring Ring identifier | |
131 | * @param sec Sector number | |
132 | * @param strip Strip number | |
133 | * | |
134 | * @return Histogram | |
135 | */ | |
136 | TH1S* GetChannelHistogram(UShort_t det, Char_t ring, UShort_t sec, | |
137 | UShort_t strip); | |
138 | /** | |
139 | * Get strip graph | |
140 | * | |
141 | * @param det Detector # | |
142 | * @param ring Ring identifier | |
143 | * @param sec Sector number | |
144 | * @param strip Strip number | |
145 | * | |
146 | * @return Graph | |
147 | */ | |
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 | |
18216140 | 156 | |
6cf6e7a0 | 157 | TH1F fSummaryGains; // Summary histogram |
158 | Int_t fCurrentSummaryStrip; // Current strip for summary | |
2a082c96 | 159 | |
160 | void MakeSummary(UShort_t det, Char_t ring); | |
161 | ||
8cc1cb63 | 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 | |
3bae5d02 | 172 | |
6cf6e7a0 | 173 | ClassDef(AliFMDGainDA,0) // Detector algorithm for gain runs |
18216140 | 174 | |
175 | }; | |
176 | #endif | |
6cf6e7a0 | 177 | // Local Variables: |
178 | // mode: C++ | |
179 | // End: |