]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RALICE/AliCalmodule.cxx
New version of the code, see history.txt for more details
[u/mrichter/AliRoot.git] / RALICE / AliCalmodule.cxx
CommitLineData
4c039060 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$
f40f8fbd 18Revision 1.3 1999/11/03 14:23:17 fca
19New version of RALICE introduced
20
959fbac5 21Revision 1.2 1999/09/29 09:24:28 fca
22Introduction of the Copyright and cvs Log
23
4c039060 24*/
25
959fbac5 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
f40f8fbd 34//- Modified: NvE 18-jan-2000 UU-SAP Utrecht
959fbac5 35///////////////////////////////////////////////////////////////////////////
36
d88f97cc 37#include "AliCalmodule.h"
38
39ClassImp(AliCalmodule) // Class implementation to enable ROOT I/O
40
41AliCalmodule::AliCalmodule()
42{
43// Default constructor, all module data is set to 0
44 fRow=0;
45 fCol=0;
46 fSigc=0;
d88f97cc 47 fDead=0;
48 fGain=1;
49}
50///////////////////////////////////////////////////////////////////////////
51AliCalmodule::~AliCalmodule()
52{
53// Default destructor
54}
55///////////////////////////////////////////////////////////////////////////
56AliCalmodule::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;
959fbac5 61 AliSignal::SetSignal(sig);
d88f97cc 62 fSigc=sig;
d88f97cc 63 fDead=0;
64 fGain=1;
65}
66///////////////////////////////////////////////////////////////////////////
67void AliCalmodule::SetRow(Int_t i)
68{
69// Set the row number for this module
70 fRow=i;
71}
72///////////////////////////////////////////////////////////////////////////
73void AliCalmodule::SetColumn(Int_t i)
74{
75// Set the column number for this module
76 fCol=i;
77}
78///////////////////////////////////////////////////////////////////////////
79void 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;
959fbac5 84 AliSignal::SetSignal(sig);
d88f97cc 85 fSigc=sig;
86}
87///////////////////////////////////////////////////////////////////////////
88void 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;
959fbac5 93 AliSignal::AddSignal(sig);
d88f97cc 94 fSigc+=sig;
95}
96///////////////////////////////////////////////////////////////////////////
97void AliCalmodule::SetClusteredSignal(Float_t sig)
98{
99// Set or change the signal of the module after clustering
100 fSigc=sig;
101}
102///////////////////////////////////////////////////////////////////////////
d88f97cc 103void AliCalmodule::SetDead()
104{
105// Indicate the module as dead
106 fDead=1;
107}
108///////////////////////////////////////////////////////////////////////////
109void AliCalmodule::SetAlive()
110{
111// Indicate the module as dead
112 fDead=0;
113}
114///////////////////////////////////////////////////////////////////////////
115void AliCalmodule::SetGain(Float_t gain)
116{
117// Set the gain value of the readout system
118 fGain=gain;
119}
120///////////////////////////////////////////////////////////////////////////
121Int_t AliCalmodule::GetRow()
122{
123// Provide the row number of the module
124 return fRow;
125}
126///////////////////////////////////////////////////////////////////////////
127Int_t AliCalmodule::GetColumn()
128{
129// Provide the column number of the module
130 return fCol;
131}
132///////////////////////////////////////////////////////////////////////////
d88f97cc 133Float_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///////////////////////////////////////////////////////////////////////////
d88f97cc 146Int_t AliCalmodule::GetDeadValue()
147{
148// Provide the value of the dead indicator (1=dead 0=alive)
149 return fDead;
150}
151///////////////////////////////////////////////////////////////////////////
152Float_t AliCalmodule::GetGain()
153{
154// Provide the gain value of the readout system
155 return fGain;
156}
157///////////////////////////////////////////////////////////////////////////