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 AliFMDSDigit.cxx
17 @author Christian Holm Christensen <cholm@nbi.dk>
18 @date Mon Mar 27 12:37:41 2006
19 @brief Digits for the FMD
22 //////////////////////////////////////////////////////////////////////
24 // Digits classes for the FMD
31 // - ADC count in this channel
38 // - Total energy deposited in the strip
39 // - ADC count in this channel
41 // As the Digits and SDigits have so much in common, the classes
42 // AliFMDDigit and AliFMDSDigit are implemented via a base
43 // class AliFMDBaseDigit.
45 // +-----------------+
46 // | AliFMDBaseDigit |
47 // +-----------------+
52 // +-------------+ +--------------+
53 // | AliFMDDigit | | AliFMDSDigit |
54 // +-------------+ +--------------+
56 // (Note, that I'd really would have liked to implement AliFMDHit as a
57 // derived class from some base class - say AliFMDStrip, and the Digit
58 // classes would (eventually) have derived from that as well.
59 // However, ROOT doesn't do well with multiple inheritance, so I chose
62 // Latest changes by Christian Holm Christensen
64 //////////////////////////////////////////////////////////////////////
66 #include "AliFMDSDigit.h" // ALIFMDDIGIT_H
67 #include "Riostream.h" // ROOT_Riostream
70 //====================================================================
71 ClassImp(AliFMDSDigit)
73 ; // Here to make Emacs happy
75 //____________________________________________________________________
76 AliFMDSDigit::AliFMDSDigit()
89 //____________________________________________________________________
90 AliFMDSDigit::AliFMDSDigit(UShort_t detector,
102 : AliFMDBaseDigit(detector, ring, sector, strip),
113 // Creates a real data digit object
117 // detector Detector # (1, 2, or 3)
118 // ring Ring ID ('I' or 'O')
119 // sector Sector # (For inner/outer rings: 0-19/0-39)
120 // strip Strip # (For inner/outer rings: 0-511/0-255)
121 // edep Total energy deposited
122 // count1 ADC count (a 10-bit word)
123 // count2 ADC count (a 10-bit word) -1 if not used
124 // count3 ADC count (a 10-bit word) -1 if not used
126 for (Int_t i = 0; i < npart; i++) AddTrack(refs[i]);
129 //____________________________________________________________________
131 AliFMDSDigit::Print(Option_t* option) const
133 // Print digit to standard out
134 AliFMDBaseDigit::Print();
136 << std::setw(10) << fEdep << " -> "
137 << std::setw(4) << fCount1 << " ("
138 << std::setw(4) << fCount2 << ","
139 << std::setw(4) << fCount3 << ","
140 << std::setw(4) << fCount4 << ") = "
141 << std::setw(4) << Counts() << std::flush;
144 if (opt.Contains("p", TString::kIgnoreCase))
146 << std::setw(2) << fNPrimaries << "/"
147 << std::setw(2) << fNParticles << "]"
149 if (opt.Contains("l", TString::kIgnoreCase)) {
151 for (Int_t i = 0; i < GetNTrack(); i++)
152 std::cout << (i == 0 ? "" : ",") << std::setw(5) << fTracks[i];
154 for (Int_t i = 0; i < fLabels.fN; i++)
155 std::cout << (i == 0 ? "" : ",") << fLabels.fArray[i];
158 std::cout << std::endl;
161 //____________________________________________________________________