]>
Commit | Line | Data |
---|---|---|
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" | |
14 | #include "TH1F.h" | |
15 | #include "TObjArray.h" | |
16 | // #include "TGraphErrors.h" | |
17 | class TGraphErrors; | |
18 | class TH1S; | |
19 | ||
20 | class AliFMDGainDA: public AliFMDBaseDA | |
21 | { | |
22 | public: | |
23 | /** | |
24 | * Constructor | |
25 | * | |
26 | */ | |
27 | AliFMDGainDA() ; | |
28 | /** | |
29 | * Copy constructor | |
30 | * | |
31 | * @param gainDA Object to copy from | |
32 | */ | |
33 | AliFMDGainDA(const AliFMDGainDA & gainDA) ; | |
34 | /** | |
35 | * Assignment operator | |
36 | * | |
37 | * @param gainDA Object to assign from | |
38 | */ | |
39 | AliFMDGainDA& operator=(const AliFMDGainDA&) { return *this; } | |
40 | /** | |
41 | * Destructor | |
42 | * | |
43 | */ | |
44 | virtual ~AliFMDGainDA(); | |
45 | /** | |
46 | * Initialize | |
47 | * | |
48 | */ | |
49 | void Init(); | |
50 | /** | |
51 | * Set the maximum pulse size | |
52 | * | |
53 | * @param highPulse Maximum pulse size | |
54 | */ | |
55 | void SetMaxPulse(Int_t highPulse = 256) {fHighPulse = highPulse; } | |
56 | /** | |
57 | * Set the number of strips per input channel | |
58 | * | |
59 | * @param nStrips Number of strips per channel | |
60 | */ | |
61 | void SetNumberOfStrips(Int_t nStrips) {fNumberOfStripsPerChip = nStrips;} | |
62 | ||
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 | */ | |
81 | void FillChannels(AliFMDDigit* digit); | |
82 | /** | |
83 | * Analyse the result | |
84 | * | |
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 | |
90 | */ | |
91 | void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip); | |
92 | /** | |
93 | * Write out the header | |
94 | */ | |
95 | void WriteHeaderToFile(); | |
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 | */ | |
112 | void ResetPulseAndUpdateChannel(); | |
113 | /** | |
114 | * End of event | |
115 | * | |
116 | */ | |
117 | void FinishEvent(); | |
118 | /** | |
119 | * End of job | |
120 | * | |
121 | * @param dummy Not used | |
122 | */ | |
123 | void Terminate(TFile* dummy); | |
124 | ||
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 | |
156 | ||
157 | TH1F fSummaryGains; // Summary histogram | |
158 | Int_t fCurrentSummaryStrip; // Current strip for summary | |
159 | ||
160 | void MakeSummary(UShort_t det, Char_t ring); | |
161 | ||
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 | |
172 | ||
173 | ClassDef(AliFMDGainDA,0) // Detector algorithm for gain runs | |
174 | ||
175 | }; | |
176 | #endif | |
177 | // Local Variables: | |
178 | // mode: C++ | |
179 | // End: |