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 //====================================================================
72 ; // Here to make Emacs happy
75 //____________________________________________________________________
76 AliFMDDigit::AliFMDDigit()
85 //____________________________________________________________________
86 AliFMDDigit::AliFMDDigit(UShort_t detector,
96 : AliFMDBaseDigit(detector, ring, sector, strip),
103 // Creates a real data digit object
107 // detector Detector # (1, 2, or 3)
108 // ring Ring ID ('I' or 'O')
109 // sector Sector # (For inner/outer rings: 0-19/0-39)
110 // strip Strip # (For inner/outer rings: 0-511/0-255)
111 // count1 ADC count (a 10-bit word)
112 // count2 ADC count (a 10-bit word) -1 if not used
113 // count3 ADC count (a 10-bit word) -1 if not used
115 for (Int_t i = 0; i < nrefs; i++) AddTrack(refs[i]);
118 //____________________________________________________________________
120 AliFMDDigit::GetTitle() const
124 t = Form("ADC: %d", Counts());
128 //____________________________________________________________________
130 AliFMDDigit::Print(Option_t* option) const
132 // Print digit to standard out
133 AliFMDBaseDigit::Print();
135 << std::setw(4) << fCount1 << " ("
136 << std::setw(4) << fCount2 << ","
137 << std::setw(4) << fCount3 << ","
138 << std::setw(4) << fCount4 << ") = "
139 << std::setw(4) << Counts() << std::flush;
141 if (opt.Contains("l", TString::kIgnoreCase)) {
143 for (Int_t i = 0; i < 3; i++)
144 std::cout << (i == 0 ? "" : ",") << std::setw(5) << fTracks[i];
146 std::cout << std::endl;
149 //____________________________________________________________________