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
41 ///////////////////////////////////////////////////////////////////////////
42 AliCalmodule::~AliCalmodule()
46 ///////////////////////////////////////////////////////////////////////////
47 AliCalmodule::AliCalmodule(const AliCalmodule& m) : AliSignal(m)
54 ///////////////////////////////////////////////////////////////////////////
55 AliCalmodule::AliCalmodule(Int_t row,Int_t col,Double_t sig) : AliSignal()
57 // Module constructor with initialisation of module data
60 AliSignal::SetSignal(sig);
63 ///////////////////////////////////////////////////////////////////////////
64 void AliCalmodule::SetRow(Int_t i)
66 // Set the row number for this module
69 ///////////////////////////////////////////////////////////////////////////
70 void AliCalmodule::SetColumn(Int_t i)
72 // Set the column number for this module
75 ///////////////////////////////////////////////////////////////////////////
76 void AliCalmodule::SetSignal(Double_t sig,Int_t j)
78 // Set or change the data of the module.
79 // This is an extension of AliSignal::SetSignal in view of the clustered signal.
80 AliSignal::SetSignal(sig,j);
83 ///////////////////////////////////////////////////////////////////////////
84 void AliCalmodule::AddSignal(Double_t sig,Int_t j)
86 // Add or change the data of the module
87 // This is an extension of AliSignal::AddSignal in view of the clustered signal.
88 AliSignal::AddSignal(sig,j);
91 ///////////////////////////////////////////////////////////////////////////
92 void AliCalmodule::SetClusteredSignal(Double_t sig)
94 // Set or change the signal of the module after clustering
97 ///////////////////////////////////////////////////////////////////////////
98 Int_t AliCalmodule::GetRow() const
100 // Provide the row number of the module
103 ///////////////////////////////////////////////////////////////////////////
104 Int_t AliCalmodule::GetColumn() const
106 // Provide the column number of the module
109 ///////////////////////////////////////////////////////////////////////////
110 Float_t AliCalmodule::GetClusteredSignal() const
112 // Provide the signal of the module after clustering.
113 Int_t dead=GetDeadValue();
123 ///////////////////////////////////////////////////////////////////////////
124 TObject* AliCalmodule::Clone(const char* name) const
126 // Make a deep copy of the current object and provide the pointer to the copy.
127 // This memberfunction enables automatic creation of new objects of the
128 // correct type depending on the object type, a feature which may be very useful
129 // for containers like AliCalorimeter when adding objects in case the
130 // container owns the objects. This feature allows e.g. AliCalorimeter
131 // to store either AliCalmodule objects or objects derived from AliCalmodule
132 // via tha AddSignal memberfunction, provided these derived classes also have
133 // a proper Clone memberfunction.
135 AliCalmodule* m=new AliCalmodule(*this);
138 if (strlen(name)) m->SetName(name);
142 ///////////////////////////////////////////////////////////////////////////