]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDDigit.cxx
Adding missing include
[u/mrichter/AliRoot.git] / FMD / AliFMDDigit.cxx
CommitLineData
4347b38f 1/**************************************************************************
2 * Copyright(c) 2004, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/* $Id$ */
17
18//////////////////////////////////////////////////////////////////////
19//
20// Digits classes for the FMD
21//
22// Digits consists of
23// - Detector #
24// - Ring ID
25// - Sector #
26// - Strip #
27// - ADC count in this channel
28//
29// Digits consists of
30// - Detector #
31// - Ring ID
32// - Sector #
33// - Strip #
34// - Total energy deposited in the strip
35// - ADC count in this channel
36//
37// As the Digits and SDigits have so much in common, the classes
38// AliFMDDigit and AliFMDSDigit are implemented via a base
39// class AliFMDBaseDigit.
40///
41// +-----------------+
42// | AliFMDBaseDigit |
43// +-----------------+
44// ^
45// |
46// +------------+
47// | |
48// +-------------+ +--------------+
49// | AliFMDDigit | | AliFMDSDigit |
50// +-------------+ +--------------+
51//
52// (Note, that I'd really would have liked to implement AliFMDHit as a
53// derived class from some base class - say AliFMDStrip, and the Digit
54// classes would (eventually) have derived from that as well.
55// However, ROOT doesn't do well with multiple inheritance, so I chose
56// not to anyway).
57//
58// Latest changes by Christian Holm Christensen
59//
60//////////////////////////////////////////////////////////////////////
61
e802be3e 62#include "AliFMDDigit.h" // ALIFMDDIGIT_H
63#include "Riostream.h" // ROOT_Riostream
4347b38f 64
65//====================================================================
66ClassImp(AliFMDBaseDigit);
67
68//____________________________________________________________________
69AliFMDBaseDigit::AliFMDBaseDigit()
70 : fDetector(0),
71 fRing('\0'),
72 fSector(0),
73 fStrip(0)
74{}
75
76//____________________________________________________________________
77AliFMDBaseDigit::AliFMDBaseDigit(UShort_t detector,
78 Char_t ring,
79 UShort_t sector,
80 UShort_t strip)
81 : fDetector(detector),
82 fRing(ring),
83 fSector(sector),
84 fStrip(strip)
85{
86 //
87 // Creates a base data digit object
88 //
89 // Parameters
90 //
91 // detector Detector # (1, 2, or 3)
92 // ring Ring ID ('I' or 'O')
93 // sector Sector # (For inner/outer rings: 0-19/0-39)
94 // strip Strip # (For inner/outer rings: 0-511/0-255)
95}
96
97//____________________________________________________________________
98void
99AliFMDBaseDigit::Print(Option_t* /* option*/) const
100{
101 // Print digit to standard out
7c09877a 102 cout << ClassName() << ": FMD" << fDetector << fRing << "["
e802be3e 103 << setw(3) << fSector << ","
104 << setw(3) << fStrip << "]"
105 << endl;
4347b38f 106}
107
108//====================================================================
109ClassImp(AliFMDDigit);
110
111//____________________________________________________________________
112AliFMDDigit::AliFMDDigit()
113 : fCount1(0),
114 fCount2(-1),
115 fCount3(-1)
116{}
117
118//____________________________________________________________________
119AliFMDDigit::AliFMDDigit(UShort_t detector,
120 Char_t ring,
121 UShort_t sector,
122 UShort_t strip,
123 UShort_t count1,
124 Short_t count2,
125 Short_t count3)
126 : AliFMDBaseDigit(detector, ring, sector, strip),
127 fCount1(count1),
128 fCount2(count2),
129 fCount3(count3)
130{
131 //
132 // Creates a real data digit object
133 //
134 // Parameters
135 //
136 // detector Detector # (1, 2, or 3)
137 // ring Ring ID ('I' or 'O')
138 // sector Sector # (For inner/outer rings: 0-19/0-39)
139 // strip Strip # (For inner/outer rings: 0-511/0-255)
140 // count1 ADC count (a 10-bit word)
141 // count2 ADC count (a 10-bit word) -1 if not used
142 // count3 ADC count (a 10-bit word) -1 if not used
143}
144
145//____________________________________________________________________
146void
147AliFMDDigit::Print(Option_t* /* option*/) const
148{
149 // Print digit to standard out
150 AliFMDBaseDigit::Print();
7c09877a 151 cout << "\t"
152 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
153 << Counts() << endl;
4347b38f 154}
155
156//====================================================================
157ClassImp(AliFMDSDigit);
158
159//____________________________________________________________________
160AliFMDSDigit::AliFMDSDigit()
161 : fEdep(0),
162 fCount1(0),
163 fCount2(-1),
164 fCount3(-1)
165{}
166
167//____________________________________________________________________
168AliFMDSDigit::AliFMDSDigit(UShort_t detector,
169 Char_t ring,
170 UShort_t sector,
171 UShort_t strip,
172 Float_t edep,
173 UShort_t count1,
174 Short_t count2,
175 Short_t count3)
176 : AliFMDBaseDigit(detector, ring, sector, strip),
177 fEdep(edep),
178 fCount1(count1),
179 fCount2(count2),
180 fCount3(count3)
181{
182 //
183 // Creates a real data digit object
184 //
185 // Parameters
186 //
187 // detector Detector # (1, 2, or 3)
188 // ring Ring ID ('I' or 'O')
189 // sector Sector # (For inner/outer rings: 0-19/0-39)
190 // strip Strip # (For inner/outer rings: 0-511/0-255)
191 // edep Total energy deposited
192 // count1 ADC count (a 10-bit word)
193 // count2 ADC count (a 10-bit word) -1 if not used
194 // count3 ADC count (a 10-bit word) -1 if not used
195}
196
197//____________________________________________________________________
198void
199AliFMDSDigit::Print(Option_t* /* option*/) const
200{
201 // Print digit to standard out
202 AliFMDBaseDigit::Print();
7c09877a 203 cout << "\t" << fEdep << " -> "
204 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
205 << Counts() << endl;
4347b38f 206}
207
208//____________________________________________________________________
209//
210// EOF
211//