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 ; // This is here to keep Emacs for indenting the next line
71 //____________________________________________________________________
72 AliFMDBaseDigit::AliFMDBaseDigit()
79 //____________________________________________________________________
80 AliFMDBaseDigit::AliFMDBaseDigit(UShort_t detector,
84 : fDetector(detector),
90 // Creates a base data digit object
94 // detector Detector # (1, 2, or 3)
95 // ring Ring ID ('I' or 'O')
96 // sector Sector # (For inner/outer rings: 0-19/0-39)
97 // strip Strip # (For inner/outer rings: 0-511/0-255)
100 //____________________________________________________________________
102 AliFMDBaseDigit::Print(Option_t* /* option*/) const
104 // Print digit to standard out
105 cout << ClassName() << ": FMD" << fDetector << fRing << "["
106 << setw(3) << fSector << ","
107 << setw(3) << fStrip << "]"
111 //====================================================================
112 ClassImp(AliFMDDigit)
114 //____________________________________________________________________
115 AliFMDDigit::AliFMDDigit()
121 //____________________________________________________________________
122 AliFMDDigit::AliFMDDigit(UShort_t detector,
129 : AliFMDBaseDigit(detector, ring, sector, strip),
135 // Creates a real data digit object
139 // detector Detector # (1, 2, or 3)
140 // ring Ring ID ('I' or 'O')
141 // sector Sector # (For inner/outer rings: 0-19/0-39)
142 // strip Strip # (For inner/outer rings: 0-511/0-255)
143 // count1 ADC count (a 10-bit word)
144 // count2 ADC count (a 10-bit word) -1 if not used
145 // count3 ADC count (a 10-bit word) -1 if not used
148 //____________________________________________________________________
150 AliFMDDigit::Print(Option_t* /* option*/) const
152 // Print digit to standard out
153 AliFMDBaseDigit::Print();
155 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
159 //====================================================================
160 ClassImp(AliFMDSDigit)
162 //____________________________________________________________________
163 AliFMDSDigit::AliFMDSDigit()
170 //____________________________________________________________________
171 AliFMDSDigit::AliFMDSDigit(UShort_t detector,
179 : AliFMDBaseDigit(detector, ring, sector, strip),
186 // Creates a real data digit object
190 // detector Detector # (1, 2, or 3)
191 // ring Ring ID ('I' or 'O')
192 // sector Sector # (For inner/outer rings: 0-19/0-39)
193 // strip Strip # (For inner/outer rings: 0-511/0-255)
194 // edep Total energy deposited
195 // count1 ADC count (a 10-bit word)
196 // count2 ADC count (a 10-bit word) -1 if not used
197 // count3 ADC count (a 10-bit word) -1 if not used
200 //____________________________________________________________________
202 AliFMDSDigit::Print(Option_t* /* option*/) const
204 // Print digit to standard out
205 AliFMDBaseDigit::Print();
206 cout << "\t" << fEdep << " -> "
207 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
211 //____________________________________________________________________