]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDSDigit.cxx
Added ITS Alignment interface to MillePede2 and related supermodule class
[u/mrichter/AliRoot.git] / FMD / AliFMDSDigit.cxx
CommitLineData
02a27b50 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 **************************************************************************/
15/* $Id$ */
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
20 @ingroup FMD_base
21*/
22//////////////////////////////////////////////////////////////////////
23//
24// Digits classes for the FMD
25//
26// Digits consists of
27// - Detector #
28// - Ring ID
29// - Sector #
30// - Strip #
31// - ADC count in this channel
32//
33// Digits consists of
34// - Detector #
35// - Ring ID
36// - Sector #
37// - Strip #
38// - Total energy deposited in the strip
39// - ADC count in this channel
40//
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.
44///
45// +-----------------+
46// | AliFMDBaseDigit |
47// +-----------------+
48// ^
49// |
50// +------------+
51// | |
52// +-------------+ +--------------+
53// | AliFMDDigit | | AliFMDSDigit |
54// +-------------+ +--------------+
55//
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
60// not to anyway).
61//
62// Latest changes by Christian Holm Christensen
63//
64//////////////////////////////////////////////////////////////////////
65
66#include "AliFMDSDigit.h" // ALIFMDDIGIT_H
67#include "Riostream.h" // ROOT_Riostream
68#include <TString.h>
69
70//====================================================================
71ClassImp(AliFMDSDigit)
2aeec17d 72#if 0
73; // Here to make Emacs happy
74#endif
02a27b50 75//____________________________________________________________________
76AliFMDSDigit::AliFMDSDigit()
77 : fEdep(0),
78 fCount1(0),
79 fCount2(-1),
2aeec17d 80 fCount3(-1),
b2e6f0b0 81 fCount4(-1),
82 fLabels(0)
02a27b50 83{
84 // cTOR
85}
86
87//____________________________________________________________________
b2e6f0b0 88AliFMDSDigit::AliFMDSDigit(UShort_t detector,
89 Char_t ring,
90 UShort_t sector,
91 UShort_t strip,
92 Float_t edep,
93 UShort_t count1,
94 Short_t count2,
95 Short_t count3,
96 Short_t count4,
97 UShort_t npart,
98 UShort_t nprim,
99 const TArrayI& refs)
02a27b50 100 : AliFMDBaseDigit(detector, ring, sector, strip),
101 fEdep(edep),
102 fCount1(count1),
103 fCount2(count2),
2aeec17d 104 fCount3(count3),
83ad576a 105 fCount4(count4),
106 fNParticles(npart),
b2e6f0b0 107 fNPrimaries(nprim),
108 fLabels(refs)
02a27b50 109{
110 //
111 // Creates a real data digit object
112 //
113 // Parameters
114 //
115 // detector Detector # (1, 2, or 3)
116 // ring Ring ID ('I' or 'O')
117 // sector Sector # (For inner/outer rings: 0-19/0-39)
118 // strip Strip # (For inner/outer rings: 0-511/0-255)
119 // edep Total energy deposited
120 // count1 ADC count (a 10-bit word)
121 // count2 ADC count (a 10-bit word) -1 if not used
122 // count3 ADC count (a 10-bit word) -1 if not used
123}
124
125//____________________________________________________________________
126void
b2e6f0b0 127AliFMDSDigit::Print(Option_t* option) const
02a27b50 128{
129 // Print digit to standard out
130 AliFMDBaseDigit::Print();
b2e6f0b0 131 std::cout << "\t" << fEdep << " -> "
132 << fCount1 << " (" << fCount2 << "," << fCount3 << ","
133 << fCount4 << ") = " << Counts() << std::flush;
134 TString opt(option);
135 if (opt.Contains("p", TString::kIgnoreCase))
136 std::cout << " [" << fNPrimaries << "/" << fNParticles << "]"
137 << std::flush;
138 if (opt.Contains("l", TString::kIgnoreCase)) {
139 std::cout << " ";
140 for (Int_t i = 0; i < fLabels.fN; i++)
141 std::cout << (i == 0 ? "" : ",") << fLabels.fArray[i];
142 }
143 std::cout << std::endl;
02a27b50 144}
145
146//____________________________________________________________________
147//
148// EOF
149//