]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/AliCalmodule.cxx
A cluster finder and hit reconstruction class for RICH (adapted from MUON).
[u/mrichter/AliRoot.git] / RALICE / AliCalmodule.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, 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
16 /*
17 $Log$
18 Revision 1.3  1999/11/03 14:23:17  fca
19 New version of RALICE introduced
20
21 Revision 1.2  1999/09/29 09:24:28  fca
22 Introduction of the Copyright and cvs Log
23
24 */
25
26 ///////////////////////////////////////////////////////////////////////////
27 // Class AliCalmodule
28 // Description of a module in a calorimeter system.
29 // A matrix geometry is assumed, such that a module
30 // is identified by (row,col) and contains a certain signal.
31 // Note : row and col start counting at 1.
32 //
33 //--- Author: Nick van Eijndhoven 13-jun-1997 UU-SAP Utrecht
34 //- Modified: NvE 18-jan-2000 UU-SAP Utrecht
35 ///////////////////////////////////////////////////////////////////////////
36
37 #include "AliCalmodule.h"
38  
39 ClassImp(AliCalmodule) // Class implementation to enable ROOT I/O
40  
41 AliCalmodule::AliCalmodule()
42 {
43 // Default constructor, all module data is set to 0
44  fRow=0;
45  fCol=0;
46  fSigc=0;
47  fDead=0;
48  fGain=1;
49 }
50 ///////////////////////////////////////////////////////////////////////////
51 AliCalmodule::~AliCalmodule()
52 {
53 // Default destructor
54 }
55 ///////////////////////////////////////////////////////////////////////////
56 AliCalmodule::AliCalmodule(Int_t row,Int_t col,Float_t sig)
57 {
58 // Module constructor with initialisation of module data
59  fRow=row;
60  fCol=col;
61  AliSignal::SetSignal(sig);
62  fSigc=sig;
63  fDead=0;
64  fGain=1;
65 }
66 ///////////////////////////////////////////////////////////////////////////
67 void AliCalmodule::SetRow(Int_t i)
68 {
69 // Set the row number for this module
70  fRow=i;
71 }
72 ///////////////////////////////////////////////////////////////////////////
73 void AliCalmodule::SetColumn(Int_t i)
74 {
75 // Set the column number for this module
76  fCol=i;
77 }
78 ///////////////////////////////////////////////////////////////////////////
79 void AliCalmodule::SetSignal(Int_t row,Int_t col,Float_t sig)
80 {
81 // Set or change the data of the module
82  fRow=row;
83  fCol=col;
84  AliSignal::SetSignal(sig);
85  fSigc=sig;
86 }
87 ///////////////////////////////////////////////////////////////////////////
88 void AliCalmodule::AddSignal(Int_t row,Int_t col,Float_t sig)
89 {
90 // Add or change the data of the module
91  fRow=row;
92  fCol=col;
93  AliSignal::AddSignal(sig);
94  fSigc+=sig;
95 }
96 ///////////////////////////////////////////////////////////////////////////
97 void AliCalmodule::SetClusteredSignal(Float_t sig)
98 {
99 // Set or change the signal of the module after clustering
100  fSigc=sig;
101 }
102 ///////////////////////////////////////////////////////////////////////////
103 void AliCalmodule::SetDead()
104 {
105 // Indicate the module as dead
106  fDead=1;
107 }
108 ///////////////////////////////////////////////////////////////////////////
109 void AliCalmodule::SetAlive()
110 {
111 // Indicate the module as dead
112  fDead=0;
113 }
114 ///////////////////////////////////////////////////////////////////////////
115 void AliCalmodule::SetGain(Float_t gain)
116 {
117 // Set the gain value of the readout system
118  fGain=gain;
119 }
120 ///////////////////////////////////////////////////////////////////////////
121 Int_t AliCalmodule::GetRow()
122 {
123 // Provide the row number of the module
124  return fRow;
125 }
126 ///////////////////////////////////////////////////////////////////////////
127 Int_t AliCalmodule::GetColumn()
128 {
129 // Provide the column number of the module
130  return fCol;
131 }
132 ///////////////////////////////////////////////////////////////////////////
133 Float_t AliCalmodule::GetClusteredSignal()
134 {
135 // Provide the signal of the module after clustering
136  if (!fDead)
137  {
138   return fSigc;
139  }
140  else
141  {
142   return 0;
143  }
144 }
145 ///////////////////////////////////////////////////////////////////////////
146 Int_t AliCalmodule::GetDeadValue()
147 {
148 // Provide the value of the dead indicator (1=dead 0=alive)
149  return fDead;
150 }
151 ///////////////////////////////////////////////////////////////////////////
152 Float_t AliCalmodule::GetGain()
153 {
154 // Provide the gain value of the readout system
155  return fGain;
156 }
157 ///////////////////////////////////////////////////////////////////////////