1 /**************************************************************************
2 * Copyright(c) 2004, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /** @file AliFMDDigit.cxx
17 @author Christian Holm Christensen <cholm@nbi.dk>
18 @date Mon Mar 27 12:37:41 2006
19 @brief Digits for the FMD
21 //////////////////////////////////////////////////////////////////////
23 // Digits classes for the FMD
30 // - ADC count in this channel
37 // - Total energy deposited in the strip
38 // - ADC count in this channel
40 // As the Digits and SDigits have so much in common, the classes
41 // AliFMDDigit and AliFMDSDigit are implemented via a base
42 // class AliFMDBaseDigit.
44 // +-----------------+
45 // | AliFMDBaseDigit |
46 // +-----------------+
51 // +-------------+ +--------------+
52 // | AliFMDDigit | | AliFMDSDigit |
53 // +-------------+ +--------------+
55 // (Note, that I'd really would have liked to implement AliFMDHit as a
56 // derived class from some base class - say AliFMDStrip, and the Digit
57 // classes would (eventually) have derived from that as well.
58 // However, ROOT doesn't do well with multiple inheritance, so I chose
61 // Latest changes by Christian Holm Christensen
63 //////////////////////////////////////////////////////////////////////
65 #include "AliFMDDigit.h" // ALIFMDDIGIT_H
66 #include "Riostream.h" // ROOT_Riostream
69 //====================================================================
70 ClassImp(AliFMDBaseDigit)
72 ; // This is here to keep Emacs from indenting the next line
75 //____________________________________________________________________
76 AliFMDBaseDigit::AliFMDBaseDigit()
83 //____________________________________________________________________
84 AliFMDBaseDigit::AliFMDBaseDigit(UShort_t detector,
88 : fDetector(detector),
94 // Creates a base data digit object
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)
104 //____________________________________________________________________
106 AliFMDBaseDigit::Print(Option_t* /* option*/) const
108 // Print digit to standard out
109 cout << ClassName() << ": FMD" << fDetector << fRing << "["
110 << setw(3) << fSector << ","
111 << setw(3) << fStrip << "]"
115 //____________________________________________________________________
117 AliFMDBaseDigit::GetName() const
120 n = Form("FMD%d%c[%2d,%3d]", fDetector, fRing, fSector, fStrip);
124 //====================================================================
125 ClassImp(AliFMDDigit)
127 //____________________________________________________________________
128 AliFMDDigit::AliFMDDigit()
134 //____________________________________________________________________
135 AliFMDDigit::AliFMDDigit(UShort_t detector,
142 : AliFMDBaseDigit(detector, ring, sector, strip),
148 // Creates a real data digit object
152 // detector Detector # (1, 2, or 3)
153 // ring Ring ID ('I' or 'O')
154 // sector Sector # (For inner/outer rings: 0-19/0-39)
155 // strip Strip # (For inner/outer rings: 0-511/0-255)
156 // count1 ADC count (a 10-bit word)
157 // count2 ADC count (a 10-bit word) -1 if not used
158 // count3 ADC count (a 10-bit word) -1 if not used
161 //____________________________________________________________________
163 AliFMDDigit::GetTitle() const
166 t = Form("ADC: %d", Counts());
170 //____________________________________________________________________
172 AliFMDDigit::Print(Option_t* /* option*/) const
174 // Print digit to standard out
175 AliFMDBaseDigit::Print();
177 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
181 //====================================================================
182 ClassImp(AliFMDSDigit)
184 //____________________________________________________________________
185 AliFMDSDigit::AliFMDSDigit()
192 //____________________________________________________________________
193 AliFMDSDigit::AliFMDSDigit(UShort_t detector,
201 : AliFMDBaseDigit(detector, ring, sector, strip),
208 // Creates a real data digit object
212 // detector Detector # (1, 2, or 3)
213 // ring Ring ID ('I' or 'O')
214 // sector Sector # (For inner/outer rings: 0-19/0-39)
215 // strip Strip # (For inner/outer rings: 0-511/0-255)
216 // edep Total energy deposited
217 // count1 ADC count (a 10-bit word)
218 // count2 ADC count (a 10-bit word) -1 if not used
219 // count3 ADC count (a 10-bit word) -1 if not used
222 //____________________________________________________________________
224 AliFMDSDigit::Print(Option_t* /* option*/) const
226 // Print digit to standard out
227 AliFMDBaseDigit::Print();
228 cout << "\t" << fEdep << " -> "
229 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
233 //____________________________________________________________________