+ for (Int_t j=clow; j<=cup; j++)
+ {
+ if (i!=row || j!=col) // No increase of edge value for the 'dead' module itself
+ {
+ AliAttribObj* a=(AliAttribObj*)fAttributes->At(i-1);
+ if (a)
+ {
+ a->IncreaseEdgeValue(j);
+ }
+ else
+ {
+ a=new AliAttribObj();
+ a->SetEdgeOn(j);
+ fAttributes->AddAt(a,i-1);
+ }
+
+ AliCalmodule* m=GetModule(i,j);
+ if (m) m->IncreaseEdgeValue();
+ }
+ }
+ }
+}
+///////////////////////////////////////////////////////////////////////////
+void AliCalorimeter::SetAlive(Int_t row,Int_t col)
+{
+// Indicate a certain calorimeter module as 'active module'.
+
+ // Check for (row,col) boundaries.
+ if (row<1 || col<1 || (fNrows && fNcolumns && (row>fNrows || col>fNcolumns)))
+ {
+ cout << " *AliCalorimeter::SetAlive* row,col : " << row << "," << col
+ << " out of range." << endl;
+ if (fNrows && fNcolumns) cout << " Nrows,Ncols = " << fNrows << "," << fNcolumns << endl;
+ return;
+ }
+
+ // Only action on fAttributes in case an attribute is present at (row,col),
+ // since by default a module has dead=0 unless explicitly set otherwise.
+ if (fAttributes)
+ {
+ if (row <= fAttributes->GetSize())
+ {
+ AliAttribObj* a=(AliAttribObj*)fAttributes->At(row-1);
+ if (a) a->SetAlive(col);
+ }
+ }
+
+ AliCalmodule* m=GetModule(row,col);
+ if (m) m->SetAlive();
+
+ // Decrease the 'edge value' of surrounding modules
+ Int_t rlow=row-1;
+ Int_t rup=row+1;
+ Int_t clow=col-1;
+ Int_t cup=col+1;
+
+ if (rlow < 1) rlow=row;
+ if (clow < 1) clow=col;
+
+ for (Int_t i=rlow; i<=rup; i++)
+ {
+ for (Int_t j=clow; j<=cup; j++)
+ {
+ if (i!=row || j!=col) // No decrease of edge value for the 'alive' module itself
+ {
+ if (i <= fAttributes->GetSize())
+ {
+ AliAttribObj* a=(AliAttribObj*)fAttributes->At(i-1);
+ if (a) a->DecreaseEdgeValue(j);
+ }
+ AliCalmodule* m=GetModule(i,j);
+ if (m) m->DecreaseEdgeValue();
+ }
+ }
+ }
+}
+///////////////////////////////////////////////////////////////////////////
+void AliCalorimeter::SetGain(Int_t row,Int_t col,Float_t gain)
+{
+// Set the gain value for a certain calorimeter module.
+// See the memberfunction GetSignal() for a definition of the gain value.
+
+ // Check for (row,col) boundaries.
+ if (row<1 || col<1 || (fNrows && fNcolumns && (row>fNrows || col>fNcolumns)))
+ {
+ cout << " *AliCalorimeter::SetGain* row,col : " << row << "," << col
+ << " out of range." << endl;
+ if (fNrows && fNcolumns) cout << " Nrows,Ncols = " << fNrows << "," << fNcolumns << endl;
+ return;
+ }
+
+ if (!fAttributes)
+ {
+ fAttributes=new TObjArray(row);
+ fAttributes->SetOwner();