]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDDigit.cxx
RICH becomes HMPID
[u/mrichter/AliRoot.git] / FMD / AliFMDDigit.cxx
CommitLineData
4347b38f 1/**************************************************************************
2 * Copyright(c) 2004, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
4347b38f 15/* $Id$ */
c2fc1258 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
20*/
4347b38f 21//////////////////////////////////////////////////////////////////////
22//
23// Digits classes for the FMD
24//
25// Digits consists of
26// - Detector #
27// - Ring ID
28// - Sector #
29// - Strip #
30// - ADC count in this channel
31//
32// Digits consists of
33// - Detector #
34// - Ring ID
35// - Sector #
36// - Strip #
37// - Total energy deposited in the strip
38// - ADC count in this channel
39//
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.
43///
44// +-----------------+
45// | AliFMDBaseDigit |
46// +-----------------+
47// ^
48// |
49// +------------+
50// | |
51// +-------------+ +--------------+
52// | AliFMDDigit | | AliFMDSDigit |
53// +-------------+ +--------------+
54//
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
59// not to anyway).
60//
61// Latest changes by Christian Holm Christensen
62//
63//////////////////////////////////////////////////////////////////////
64
e802be3e 65#include "AliFMDDigit.h" // ALIFMDDIGIT_H
66#include "Riostream.h" // ROOT_Riostream
8f6ee336 67#include <TString.h>
4347b38f 68
4347b38f 69//====================================================================
925e6570 70ClassImp(AliFMDDigit)
4347b38f 71
72//____________________________________________________________________
73AliFMDDigit::AliFMDDigit()
74 : fCount1(0),
75 fCount2(-1),
76 fCount3(-1)
02a27b50 77{
78 // CTOR
79}
4347b38f 80
81//____________________________________________________________________
82AliFMDDigit::AliFMDDigit(UShort_t detector,
83 Char_t ring,
84 UShort_t sector,
85 UShort_t strip,
86 UShort_t count1,
87 Short_t count2,
88 Short_t count3)
89 : AliFMDBaseDigit(detector, ring, sector, strip),
90 fCount1(count1),
91 fCount2(count2),
92 fCount3(count3)
93{
94 //
95 // Creates a real data digit object
96 //
97 // Parameters
98 //
99 // detector Detector # (1, 2, or 3)
100 // ring Ring ID ('I' or 'O')
101 // sector Sector # (For inner/outer rings: 0-19/0-39)
102 // strip Strip # (For inner/outer rings: 0-511/0-255)
103 // count1 ADC count (a 10-bit word)
104 // count2 ADC count (a 10-bit word) -1 if not used
105 // count3 ADC count (a 10-bit word) -1 if not used
106}
107
bf000c32 108//____________________________________________________________________
109const char*
110AliFMDDigit::GetTitle() const
111{
02a27b50 112 // Get the title
bf000c32 113 static TString t;
114 t = Form("ADC: %d", Counts());
115 return t.Data();
116}
117
4347b38f 118//____________________________________________________________________
119void
120AliFMDDigit::Print(Option_t* /* option*/) const
121{
122 // Print digit to standard out
123 AliFMDBaseDigit::Print();
7c09877a 124 cout << "\t"
125 << fCount1 << " (+ " << fCount2 << " + " << fCount2 << ") = "
126 << Counts() << endl;
4347b38f 127}
128
4347b38f 129//____________________________________________________________________
130//
131// EOF
132//