]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDGainDA.h
LHC clock phase simulation added. Set to "0", waiting for the implementation in the...
[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) ;
6cf6e7a0 34 /**
35 * Destructor
36 *
37 */
18216140 38 virtual ~AliFMDGainDA();
6cf6e7a0 39 /**
40 * Initialize
41 *
42 */
18216140 43 void Init();
6cf6e7a0 44 /**
45 * Set the maximum pulse size
46 *
47 * @param highPulse Maximum pulse size
48 */
18216140 49 void SetMaxPulse(Int_t highPulse = 256) {fHighPulse = highPulse; }
6cf6e7a0 50 /**
51 * Set the number of strips per input channel
52 *
53 * @param nStrips Number of strips per channel
54 */
18216140 55 void SetNumberOfStrips(Int_t nStrips) {fNumberOfStripsPerChip = nStrips;}
56
6cf6e7a0 57protected:
58 /**
59 * Make a container for a channel
60 *
61 * @param sectorArray Sectors
62 * @param det Detector #
63 * @param ring Ring identifier
64 * @param sec Sector number
65 * @param strip Strip number
66 */
67 void AddChannelContainer(TObjArray* sectorArray,
68 UShort_t det, Char_t ring,
69 UShort_t sec, UShort_t strip);
70 /**
71 * Fill channel histogram
72 *
73 * @param digit Digit to fill from
74 */
18216140 75 void FillChannels(AliFMDDigit* digit);
6cf6e7a0 76 /**
77 * Analyse the result
78 *
2a082c96 79 * @param det Detector #
80 * @param ring Ring identifier
81 * @param sec Sector number
82 * @param strip Strip number
83 * @param h Summary histogram with bins for sector and strip
6cf6e7a0 84 */
18216140 85 void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip);
6cf6e7a0 86 /**
87 * Write out the header
88 */
18216140 89 void WriteHeaderToFile();
6cf6e7a0 90 /**
91 * Go to the next sample
92 *
93 * @param det Detector #
94 * @param ring Ring identifier
95 * @param sec Sector number
96 * @param strip Strip number
97 */
98 void UpdatePulseAndADC(UShort_t det,
99 Char_t ring,
100 UShort_t sec,
101 UShort_t strip);
102 /**
103 * Reset all
104 *
105 */
18216140 106 void ResetPulseAndUpdateChannel();
6cf6e7a0 107 /**
108 * End of event
109 *
110 */
18216140 111 void FinishEvent();
6cf6e7a0 112 /**
113 * End of job
114 *
115 * @param dummy Not used
116 */
117 void Terminate(TFile* dummy);
2a082c96 118
6cf6e7a0 119private:
120 /**
121 * Get the channel histogram
122 *
123 * @param det Detector #
124 * @param ring Ring identifier
125 * @param sec Sector number
126 * @param strip Strip number
127 *
128 * @return Histogram
129 */
130 TH1S* GetChannelHistogram(UShort_t det, Char_t ring, UShort_t sec,
131 UShort_t strip);
132 /**
133 * Get strip graph
134 *
135 * @param det Detector #
136 * @param ring Ring identifier
137 * @param sec Sector number
138 * @param strip Strip number
139 *
140 * @return Graph
141 */
142 TGraphErrors* GetChannel(UShort_t det, Char_t ring,
143 UShort_t sec, UShort_t strip);
144 TObjArray fGainArray; // Array of gains
145 Int_t fHighPulse; // Highest pulse
146 TArrayS fEventsPerChannel; // # of events per pulse step
147 TArrayS fCurrentPulse; // The current pulse size
148 TArrayS fCurrentChannel; // The current strip number
149 Int_t fNumberOfStripsPerChip; // Number of strips
18216140 150
6cf6e7a0 151 TH1F fSummaryGains; // Summary histogram
152 Int_t fCurrentSummaryStrip; // Current strip for summary
2a082c96 153
154 void MakeSummary(UShort_t det, Char_t ring);
155
156 TH2* fGainFMD1i;
157 TH2* fGainFMD2i;
158 TH2* fGainFMD2o;
159 TH2* fGainFMD3i;
160 TH2* fGainFMD3o;
161 TH2* fChi2FMD1i;
162 TH2* fChi2FMD2i;
163 TH2* fChi2FMD2o;
164 TH2* fChi2FMD3i;
165 TH2* fChi2FMD3o;
3bae5d02 166
6cf6e7a0 167 ClassDef(AliFMDGainDA,0) // Detector algorithm for gain runs
18216140 168
169};
170#endif
6cf6e7a0 171// Local Variables:
172// mode: C++
173// End: