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 //////////////////////////////////////////////////////////////////////
63 # include "AliFMDDigit.h"
72 //====================================================================
73 ClassImp(AliFMDBaseDigit);
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 std::cout << ClassName() << ": FMD" << fDetector << fRing << "["
110 << std::setw(3) << fSector << ","
111 << std::setw(3) << fStrip << "]"
115 //====================================================================
116 ClassImp(AliFMDDigit);
118 //____________________________________________________________________
119 AliFMDDigit::AliFMDDigit()
125 //____________________________________________________________________
126 AliFMDDigit::AliFMDDigit(UShort_t detector,
133 : AliFMDBaseDigit(detector, ring, sector, strip),
139 // Creates a real data digit object
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
152 //____________________________________________________________________
154 AliFMDDigit::Print(Option_t* /* option*/) const
156 // Print digit to standard out
157 AliFMDBaseDigit::Print();
159 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
160 << Counts() << std::endl;
163 //====================================================================
164 ClassImp(AliFMDSDigit);
166 //____________________________________________________________________
167 AliFMDSDigit::AliFMDSDigit()
174 //____________________________________________________________________
175 AliFMDSDigit::AliFMDSDigit(UShort_t detector,
183 : AliFMDBaseDigit(detector, ring, sector, strip),
190 // Creates a real data digit object
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
204 //____________________________________________________________________
206 AliFMDSDigit::Print(Option_t* /* option*/) const
208 // Print digit to standard out
209 AliFMDBaseDigit::Print();
210 std::cout << "\t" << fEdep << " -> "
211 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
212 << Counts() << std::endl;
215 //____________________________________________________________________