]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDGainDA.h
Minor fix
[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 *
79 * @param det Detector #
80 * @param ring Ring identifier
81 * @param sec Sector number
82 * @param strip Strip number
83 */
18216140 84 void Analyse(UShort_t det, Char_t ring, UShort_t sec, UShort_t strip);
6cf6e7a0 85 /**
86 * Write out the header
87 */
18216140 88 void WriteHeaderToFile();
6cf6e7a0 89 /**
90 * Go to the next sample
91 *
92 * @param det Detector #
93 * @param ring Ring identifier
94 * @param sec Sector number
95 * @param strip Strip number
96 */
97 void UpdatePulseAndADC(UShort_t det,
98 Char_t ring,
99 UShort_t sec,
100 UShort_t strip);
101 /**
102 * Reset all
103 *
104 */
18216140 105 void ResetPulseAndUpdateChannel();
6cf6e7a0 106 /**
107 * End of event
108 *
109 */
18216140 110 void FinishEvent();
6cf6e7a0 111 /**
112 * End of job
113 *
114 * @param dummy Not used
115 */
116 void Terminate(TFile* dummy);
18216140 117
6cf6e7a0 118private:
119 /**
120 * Get the channel histogram
121 *
122 * @param det Detector #
123 * @param ring Ring identifier
124 * @param sec Sector number
125 * @param strip Strip number
126 *
127 * @return Histogram
128 */
129 TH1S* GetChannelHistogram(UShort_t det, Char_t ring, UShort_t sec,
130 UShort_t strip);
131 /**
132 * Get strip graph
133 *
134 * @param det Detector #
135 * @param ring Ring identifier
136 * @param sec Sector number
137 * @param strip Strip number
138 *
139 * @return Graph
140 */
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
18216140 149
6cf6e7a0 150 TH1F fSummaryGains; // Summary histogram
151 Int_t fCurrentSummaryStrip; // Current strip for summary
3bae5d02 152
6cf6e7a0 153 ClassDef(AliFMDGainDA,0) // Detector algorithm for gain runs
18216140 154
155};
156#endif
6cf6e7a0 157// Local Variables:
158// mode: C++
159// End: