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