1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////
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.
25 //--- Author: Nick van Eijndhoven 13-jun-1997 UU-SAP Utrecht
26 //- Modified: NvE $Date$ UU-SAP Utrecht
27 ///////////////////////////////////////////////////////////////////////////
29 #include "AliCalmodule.h"
30 #include "Riostream.h"
32 ClassImp(AliCalmodule) // Class implementation to enable ROOT I/O
34 AliCalmodule::AliCalmodule() : AliSignal()
36 // Default constructor, all module data is set to 0
43 ///////////////////////////////////////////////////////////////////////////
44 AliCalmodule::~AliCalmodule()
48 ///////////////////////////////////////////////////////////////////////////
49 AliCalmodule::AliCalmodule(AliCalmodule& m) : AliSignal(m)
58 ///////////////////////////////////////////////////////////////////////////
59 AliCalmodule::AliCalmodule(Int_t row,Int_t col,Float_t sig) : AliSignal()
61 // Module constructor with initialisation of module data
64 AliSignal::SetSignal(sig);
69 ///////////////////////////////////////////////////////////////////////////
70 void AliCalmodule::SetRow(Int_t i)
72 // Set the row number for this module
75 ///////////////////////////////////////////////////////////////////////////
76 void AliCalmodule::SetColumn(Int_t i)
78 // Set the column number for this module
81 ///////////////////////////////////////////////////////////////////////////
82 void AliCalmodule::SetSignal(Int_t row,Int_t col,Float_t sig)
84 // Set or change the data of the module
87 AliSignal::SetSignal(sig);
90 ///////////////////////////////////////////////////////////////////////////
91 void AliCalmodule::AddSignal(Int_t row,Int_t col,Float_t sig)
93 // Add or change the data of the module
96 AliSignal::AddSignal(sig);
99 ///////////////////////////////////////////////////////////////////////////
100 void AliCalmodule::SetClusteredSignal(Float_t sig)
102 // Set or change the signal of the module after clustering
105 ///////////////////////////////////////////////////////////////////////////
106 void AliCalmodule::SetDead()
108 // Indicate the module as dead
111 ///////////////////////////////////////////////////////////////////////////
112 void AliCalmodule::SetAlive()
114 // Indicate the module as dead
117 ///////////////////////////////////////////////////////////////////////////
118 void AliCalmodule::SetGain(Float_t gain)
120 // Set the gain value of the readout system
123 ///////////////////////////////////////////////////////////////////////////
124 Int_t AliCalmodule::GetRow()
126 // Provide the row number of the module
129 ///////////////////////////////////////////////////////////////////////////
130 Int_t AliCalmodule::GetColumn()
132 // Provide the column number of the module
135 ///////////////////////////////////////////////////////////////////////////
136 Float_t AliCalmodule::GetClusteredSignal()
138 // Provide the signal of the module after clustering
148 ///////////////////////////////////////////////////////////////////////////
149 Int_t AliCalmodule::GetDeadValue()
151 // Provide the value of the dead indicator (1=dead 0=alive)
154 ///////////////////////////////////////////////////////////////////////////
155 Float_t AliCalmodule::GetGain()
157 // Provide the gain value of the readout system
160 ///////////////////////////////////////////////////////////////////////////
161 AliCalmodule* AliCalmodule::MakeCopy(AliCalmodule& m)
163 // Make a deep copy of the input object and provide the pointer to the copy.
164 // This memberfunction enables automatic creation of new objects of the
165 // correct type depending on the argument type, a feature which may be very useful
166 // for containers like AliCalorimeter when adding objects in case the
167 // container owns the objects. This feature allows e.g. AliCalorimeter
168 // to store either AliCalmodule objects or objects derived from AliCalmodule
169 // via tha AddSignal memberfunction, provided these derived classes also have
170 // a proper MakeCopy memberfunction.
172 AliCalmodule* cal=new AliCalmodule(m);
175 ///////////////////////////////////////////////////////////////////////////