]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDDigit.cxx
Whoops, forgot some debug output. Now removed
[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
62#ifndef ALIFMDDIGIT_H
63# include "AliFMDDigit.h"
64#endif
65#ifndef __IOSTREAM__
66# include <iostream>
67#endif
68#ifndef __IOMANIP__
69# include <iomanip>
70#endif
71
72//====================================================================
73ClassImp(AliFMDBaseDigit);
74
75//____________________________________________________________________
76AliFMDBaseDigit::AliFMDBaseDigit()
77 : fDetector(0),
78 fRing('\0'),
79 fSector(0),
80 fStrip(0)
81{}
82
83//____________________________________________________________________
84AliFMDBaseDigit::AliFMDBaseDigit(UShort_t detector,
85 Char_t ring,
86 UShort_t sector,
87 UShort_t strip)
88 : fDetector(detector),
89 fRing(ring),
90 fSector(sector),
91 fStrip(strip)
92{
93 //
94 // Creates a base data digit object
95 //
96 // Parameters
97 //
98 // detector Detector # (1, 2, or 3)
99 // ring Ring ID ('I' or 'O')
100 // sector Sector # (For inner/outer rings: 0-19/0-39)
101 // strip Strip # (For inner/outer rings: 0-511/0-255)
102}
103
104//____________________________________________________________________
105void
106AliFMDBaseDigit::Print(Option_t* /* option*/) const
107{
108 // Print digit to standard out
109 std::cout << ClassName() << ": FMD" << fDetector << fRing << "["
110 << std::setw(3) << fSector << ","
111 << std::setw(3) << fStrip << "]"
112 << std::endl;
113}
114
115//====================================================================
116ClassImp(AliFMDDigit);
117
118//____________________________________________________________________
119AliFMDDigit::AliFMDDigit()
120 : fCount1(0),
121 fCount2(-1),
122 fCount3(-1)
123{}
124
125//____________________________________________________________________
126AliFMDDigit::AliFMDDigit(UShort_t detector,
127 Char_t ring,
128 UShort_t sector,
129 UShort_t strip,
130 UShort_t count1,
131 Short_t count2,
132 Short_t count3)
133 : AliFMDBaseDigit(detector, ring, sector, strip),
134 fCount1(count1),
135 fCount2(count2),
136 fCount3(count3)
137{
138 //
139 // Creates a real data digit object
140 //
141 // Parameters
142 //
143 // detector Detector # (1, 2, or 3)
144 // ring Ring ID ('I' or 'O')
145 // sector Sector # (For inner/outer rings: 0-19/0-39)
146 // strip Strip # (For inner/outer rings: 0-511/0-255)
147 // count1 ADC count (a 10-bit word)
148 // count2 ADC count (a 10-bit word) -1 if not used
149 // count3 ADC count (a 10-bit word) -1 if not used
150}
151
152//____________________________________________________________________
153void
154AliFMDDigit::Print(Option_t* /* option*/) const
155{
156 // Print digit to standard out
157 AliFMDBaseDigit::Print();
158 std::cout << "\t"
159 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
160 << Counts() << std::endl;
161}
162
163//====================================================================
164ClassImp(AliFMDSDigit);
165
166//____________________________________________________________________
167AliFMDSDigit::AliFMDSDigit()
168 : fEdep(0),
169 fCount1(0),
170 fCount2(-1),
171 fCount3(-1)
172{}
173
174//____________________________________________________________________
175AliFMDSDigit::AliFMDSDigit(UShort_t detector,
176 Char_t ring,
177 UShort_t sector,
178 UShort_t strip,
179 Float_t edep,
180 UShort_t count1,
181 Short_t count2,
182 Short_t count3)
183 : AliFMDBaseDigit(detector, ring, sector, strip),
184 fEdep(edep),
185 fCount1(count1),
186 fCount2(count2),
187 fCount3(count3)
188{
189 //
190 // Creates a real data digit object
191 //
192 // Parameters
193 //
194 // detector Detector # (1, 2, or 3)
195 // ring Ring ID ('I' or 'O')
196 // sector Sector # (For inner/outer rings: 0-19/0-39)
197 // strip Strip # (For inner/outer rings: 0-511/0-255)
198 // edep Total energy deposited
199 // count1 ADC count (a 10-bit word)
200 // count2 ADC count (a 10-bit word) -1 if not used
201 // count3 ADC count (a 10-bit word) -1 if not used
202}
203
204//____________________________________________________________________
205void
206AliFMDSDigit::Print(Option_t* /* option*/) const
207{
208 // Print digit to standard out
209 AliFMDBaseDigit::Print();
210 std::cout << "\t" << fEdep << " -> "
211 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
212 << Counts() << std::endl;
213}
214
215//____________________________________________________________________
216//
217// EOF
218//