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 **************************************************************************/
18 //////////////////////////////////////////////////////////////////////
20 // Digits classes for the FMD
27 // - ADC count in this channel
34 // - Total energy deposited in the strip
35 // - ADC count in this channel
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.
41 // +-----------------+
42 // | AliFMDBaseDigit |
43 // +-----------------+
48 // +-------------+ +--------------+
49 // | AliFMDDigit | | AliFMDSDigit |
50 // +-------------+ +--------------+
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
58 // Latest changes by Christian Holm Christensen
60 //////////////////////////////////////////////////////////////////////
62 #include "AliFMDDigit.h" // ALIFMDDIGIT_H
63 #include "Riostream.h" // ROOT_Riostream
65 //====================================================================
66 ClassImp(AliFMDBaseDigit);
68 //____________________________________________________________________
69 AliFMDBaseDigit::AliFMDBaseDigit()
76 //____________________________________________________________________
77 AliFMDBaseDigit::AliFMDBaseDigit(UShort_t detector,
81 : fDetector(detector),
87 // Creates a base data digit object
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)
97 //____________________________________________________________________
99 AliFMDBaseDigit::Print(Option_t* /* option*/) const
101 // Print digit to standard out
102 cout << ClassName() << ": FMD" << fDetector << fRing << "["
103 << setw(3) << fSector << ","
104 << setw(3) << fStrip << "]"
108 //====================================================================
109 ClassImp(AliFMDDigit);
111 //____________________________________________________________________
112 AliFMDDigit::AliFMDDigit()
118 //____________________________________________________________________
119 AliFMDDigit::AliFMDDigit(UShort_t detector,
126 : AliFMDBaseDigit(detector, ring, sector, strip),
132 // Creates a real data digit object
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
145 //____________________________________________________________________
147 AliFMDDigit::Print(Option_t* /* option*/) const
149 // Print digit to standard out
150 AliFMDBaseDigit::Print();
152 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
156 //====================================================================
157 ClassImp(AliFMDSDigit);
159 //____________________________________________________________________
160 AliFMDSDigit::AliFMDSDigit()
167 //____________________________________________________________________
168 AliFMDSDigit::AliFMDSDigit(UShort_t detector,
176 : AliFMDBaseDigit(detector, ring, sector, strip),
183 // Creates a real data digit object
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
197 //____________________________________________________________________
199 AliFMDSDigit::Print(Option_t* /* option*/) const
201 // Print digit to standard out
202 AliFMDBaseDigit::Print();
203 cout << "\t" << fEdep << " -> "
204 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
208 //____________________________________________________________________