]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/AliCalmodule.cxx
12fd89222e41d61f03103879b63c6456e693b28d
[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.2  1999/09/29 09:24:28  fca
19 Introduction of the Copyright and cvs Log
20
21 */
22
23 ///////////////////////////////////////////////////////////////////////////
24 // Class AliCalmodule
25 // Description of a module in a calorimeter system.
26 // A matrix geometry is assumed, such that a module
27 // is identified by (row,col) and contains a certain signal.
28 // Note : row and col start counting at 1.
29 //
30 //--- Author: Nick van Eijndhoven 13-jun-1997 UU-SAP Utrecht
31 //- Modified: NvE 31-oct-1999 UU-SAP Utrecht
32 ///////////////////////////////////////////////////////////////////////////
33
34 #include "AliCalmodule.h"
35  
36 ClassImp(AliCalmodule) // Class implementation to enable ROOT I/O
37  
38 AliCalmodule::AliCalmodule()
39 {
40 // Default constructor, all module data is set to 0
41  fRow=0;
42  fCol=0;
43  fSigc=0;
44  fEdge=0;
45  fDead=0;
46  fGain=1;
47 }
48 ///////////////////////////////////////////////////////////////////////////
49 AliCalmodule::~AliCalmodule()
50 {
51 // Default destructor
52 }
53 ///////////////////////////////////////////////////////////////////////////
54 AliCalmodule::AliCalmodule(Int_t row,Int_t col,Float_t sig)
55 {
56 // Module constructor with initialisation of module data
57  fRow=row;
58  fCol=col;
59  AliSignal::SetSignal(sig);
60  fSigc=sig;
61  fEdge=0;
62  fDead=0;
63  fGain=1;
64 }
65 ///////////////////////////////////////////////////////////////////////////
66 void AliCalmodule::SetRow(Int_t i)
67 {
68 // Set the row number for this module
69  fRow=i;
70 }
71 ///////////////////////////////////////////////////////////////////////////
72 void AliCalmodule::SetColumn(Int_t i)
73 {
74 // Set the column number for this module
75  fCol=i;
76 }
77 ///////////////////////////////////////////////////////////////////////////
78 void AliCalmodule::SetSignal(Int_t row,Int_t col,Float_t sig)
79 {
80 // Set or change the data of the module
81  fRow=row;
82  fCol=col;
83  AliSignal::SetSignal(sig);
84  fSigc=sig;
85 }
86 ///////////////////////////////////////////////////////////////////////////
87 void AliCalmodule::AddSignal(Int_t row,Int_t col,Float_t sig)
88 {
89 // Add or change the data of the module
90  fRow=row;
91  fCol=col;
92  AliSignal::AddSignal(sig);
93  fSigc+=sig;
94 }
95 ///////////////////////////////////////////////////////////////////////////
96 void AliCalmodule::SetClusteredSignal(Float_t sig)
97 {
98 // Set or change the signal of the module after clustering
99  fSigc=sig;
100 }
101 ///////////////////////////////////////////////////////////////////////////
102 void AliCalmodule::SetEdgeOn()
103 {
104 // Indicate the module as edge module
105  fEdge=1;
106 }
107 ///////////////////////////////////////////////////////////////////////////
108 void AliCalmodule::SetEdgeOff()
109 {
110 // Indicate the module as non-edge module
111  fEdge=0;
112 }
113 ///////////////////////////////////////////////////////////////////////////
114 void AliCalmodule::EdgeUp()
115 {
116 // Increase the edge value by 1
117 // This simplifies treatment of edge modules around temp. dead modules
118  fEdge+=1;
119 }
120 ///////////////////////////////////////////////////////////////////////////
121 void AliCalmodule::EdgeDown()
122 {
123 // Decrease the edge value by 1
124 // This simplifies treatment of edge modules around temp. dead modules
125  if (fEdge > 0) fEdge-=1;
126 }
127 ///////////////////////////////////////////////////////////////////////////
128 void AliCalmodule::SetDead()
129 {
130 // Indicate the module as dead
131  fDead=1;
132 }
133 ///////////////////////////////////////////////////////////////////////////
134 void AliCalmodule::SetAlive()
135 {
136 // Indicate the module as dead
137  fDead=0;
138 }
139 ///////////////////////////////////////////////////////////////////////////
140 void AliCalmodule::SetGain(Float_t gain)
141 {
142 // Set the gain value of the readout system
143  fGain=gain;
144 }
145 ///////////////////////////////////////////////////////////////////////////
146 Int_t AliCalmodule::GetRow()
147 {
148 // Provide the row number of the module
149  return fRow;
150 }
151 ///////////////////////////////////////////////////////////////////////////
152 Int_t AliCalmodule::GetColumn()
153 {
154 // Provide the column number of the module
155  return fCol;
156 }
157 ///////////////////////////////////////////////////////////////////////////
158 Float_t AliCalmodule::GetClusteredSignal()
159 {
160 // Provide the signal of the module after clustering
161  if (!fDead)
162  {
163   return fSigc;
164  }
165  else
166  {
167   return 0;
168  }
169 }
170 ///////////////////////////////////////////////////////////////////////////
171 Int_t AliCalmodule::GetEdgeValue()
172 {
173 // Provide the value of the edge indicator (1=edge 0=no-edge)
174  return fEdge;
175 }
176 ///////////////////////////////////////////////////////////////////////////
177 Int_t AliCalmodule::GetDeadValue()
178 {
179 // Provide the value of the dead indicator (1=dead 0=alive)
180  return fDead;
181 }
182 ///////////////////////////////////////////////////////////////////////////
183 Float_t AliCalmodule::GetGain()
184 {
185 // Provide the gain value of the readout system
186  return fGain;
187 }
188 ///////////////////////////////////////////////////////////////////////////