/* $Id$ */
+//_________________________________________________________________________
+///*-- Author: Yves Schutz (SUBATECH)
+// : Aleksei Pavlinov (WSU); Jun 30, 2006 - ALICE numbering scheme
///////////////////////////////////////////////////////////////////////////////
// //
// class for EMCAL calibration //
// //
///////////////////////////////////////////////////////////////////////////////
+#include <TMath.h>
+
#include "AliEMCALCalibData.h"
ClassImp(AliEMCALCalibData)
Int_t nRow2 = 12; //Modules 11 and 12 are half modules
for(Int_t supermodule=0; supermodule<nSMod; supermodule++) {
- if(supermodule > 10)
+ if(supermodule >= 10)
nRow = nRow2;
for(Int_t column=0; column<nCol; column++) {
for(Int_t row=0; row<nRow; row++) {
Int_t nRow2 = 12; //Modules 11 and 12 are half modules
for(Int_t supermodule=0; supermodule<nSMod; supermodule++) {
- if(supermodule > 10)
+ if(supermodule >= 10)
nRow = nRow2;
for(Int_t column=0; column<nCol; column++) {
for(Int_t row=0; row<nRow; row++) {
if (strstr(option,"ped")) {
printf("\n ---- Pedestal values ----\n\n");
for (Int_t supermodule=0; supermodule<nSMod; supermodule++){
- if(supermodule > 10)
+ if(supermodule >= 10)
nRow = nRow2;
printf("============== Supermodule %d\n",supermodule+1);
for (Int_t column=0; column<nCol; column++){
if (strstr(option,"gain")) {
printf("\n ---- ADC channel values ----\n\n");
for (Int_t supermodule=0; supermodule<nSMod; supermodule++){
- if(supermodule > 10)
+ if(supermodule >= 10)
nRow = nRow2;
printf("============== Supermodule %d\n",supermodule+1);
for (Int_t column=0; column<nCol; column++){
Float_t AliEMCALCalibData::GetADCchannel(Int_t supermodule, Int_t column, Int_t row) const
{
// Set ADC channel witdth values
- //supermodule, column,raw should follow the internal EMCAL convention:
- //supermodule 1:12, column 1:48, row 1:24
+ // All indexes start from 0!
+ // Supermodule, column,raw should follow the ALICE convention:
+ // supermodule 0:11, column 0:47, row 0:23
- return fADCchannel[supermodule-1][column-1][row-1];
+ return fADCchannel[supermodule][column][row];
}
//________________________________________________________________
Float_t AliEMCALCalibData::GetADCpedestal(Int_t supermodule, Int_t column, Int_t row) const
{
// Get ADC pedestal values
- return fADCpedestal[supermodule-1][column-1][row-1];
+ return fADCpedestal[supermodule][column][row];
}
//________________________________________________________________
void AliEMCALCalibData::SetADCchannel(Int_t supermodule, Int_t column, Int_t row, Float_t value)
{
// Set ADC channel width values
- fADCchannel[supermodule-1][column-1][row-1] = value;
+ fADCchannel[supermodule][column][row] = value;
}
//________________________________________________________________
void AliEMCALCalibData::SetADCpedestal(Int_t supermodule, Int_t column, Int_t row, Float_t value)
{
// Set ADC pedestal values
- fADCpedestal[supermodule-1][column-1][row-1] = value;
+ fADCpedestal[supermodule][column][row] = value;
}