Skip to content

Commit

Permalink
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
amorsch committed Apr 5, 2014
2 parents 6b9e073 + a65f2f3 commit 706433a
Show file tree
Hide file tree
Showing 12 changed files with 658 additions and 358 deletions.
51 changes: 48 additions & 3 deletions EMCAL/AliEMCALCalibData.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ TNamed(calibda), fADCchannelRef(calibda.fADCchannelRef)
fADCchannel[supermodule][column][row] =
calibda.GetADCchannel(supermodule,column,row);

fADCchannelDecal[supermodule][column][row] =
fADCchannelOnline[supermodule][column][row] =
calibda.GetADCchannelOnline(supermodule,column,row);

fADCchannelDecal[supermodule][column][row] =
calibda.GetADCchannelDecal(supermodule,column,row);

fADCpedestal[supermodule][column][row] =
Expand Down Expand Up @@ -126,6 +129,9 @@ AliEMCALCalibData &AliEMCALCalibData::operator =(const AliEMCALCalibData& calibd

fADCchannel[supermodule][column][row] =
calibda.GetADCchannel(supermodule,column,row);

fADCchannelOnline[supermodule][column][row] =
calibda.GetADCchannelOnline(supermodule,column,row);

fADCchannelDecal[supermodule][column][row] =
calibda.GetADCchannelDecal(supermodule,column,row);
Expand Down Expand Up @@ -175,7 +181,8 @@ void AliEMCALCalibData::Reset()
fADCpedestal [supermodule][column][row]=0.;

fADCchannelDecal [supermodule][column][row]=1.;
fADCchannel [supermodule][column][row]=1.;
fADCchannel [supermodule][column][row]=fADCchannelRef;
fADCchannelOnline[supermodule][column][row]=fADCchannelRef;

fTimeChannelDecal[supermodule][column][row]=0.;

Expand Down Expand Up @@ -238,6 +245,26 @@ void AliEMCALCalibData::Print(Option_t *option) const
}
}

if (strstr(option,"adconline") || strstr(option,"all")) {
printf("\n ---- ADC online channel values ----\n\n");
for (Int_t supermodule=0; supermodule<nSMod; supermodule++){
nCol = AliEMCALGeoParams::fgkEMCALCols; //48
nRow = AliEMCALGeoParams::fgkEMCALRows; //24
// in reality they are 1/3 but leave them as 1/2
if(supermodule /2 == 5)
nRow = nRow/2;
if(supermodule > 11 && supermodule < 18)
nCol = nCol*2/3;
printf("============== Supermodule %d\n",supermodule+1);
for (Int_t column=0; column<nCol; column++){
for (Int_t row=0; row<nRow; row++){
printf("[c%d,r%d] %2.4f ",column, row,fADCchannelOnline[supermodule][column][row]);
}
printf("\n");
}
}
}

if (strstr(option,"adcdecal") || strstr(option,"all")) {
printf("\n ---- ADC decalibration channel values ----\n\n");
for (Int_t supermodule=0; supermodule<nSMod; supermodule++){
Expand Down Expand Up @@ -311,6 +338,17 @@ Float_t AliEMCALCalibData::GetADCchannel(Int_t supermodule, Int_t column, Int_t
return fADCchannel[supermodule][column][row];
}

//________________________________________________________________
Float_t AliEMCALCalibData::GetADCchannelOnline(Int_t supermodule, Int_t column, Int_t row) const
{
// Set ADC channel witdth values, first online calibration parameter
// All indexes start from 0!
// Supermodule, column,raw should follow the ALICE convention:
// supermodule 0:11, column 0:47, row 0:23

return fADCchannelOnline[supermodule][column][row];
}

//________________________________________________________________
Float_t AliEMCALCalibData::GetADCchannelDecal(Int_t supermodule, Int_t column, Int_t row) const
{
Expand Down Expand Up @@ -350,10 +388,17 @@ void AliEMCALCalibData::SetADCchannel(Int_t supermodule, Int_t column, Int_t row
fADCchannel[supermodule][column][row] = value;
}

//________________________________________________________________
void AliEMCALCalibData::SetADCchannelOnline(Int_t supermodule, Int_t column, Int_t row, Float_t value)
{
// Set ADC channel online width values
fADCchannelOnline[supermodule][column][row] = value;
}

//________________________________________________________________
void AliEMCALCalibData::SetADCchannelDecal(Int_t supermodule, Int_t column, Int_t row, Float_t value)
{
// Set ADC channel width values
// Set ADC channel width values, decalibration
fADCchannelDecal[supermodule][column][row] = value;
}

Expand Down
7 changes: 5 additions & 2 deletions EMCAL/AliEMCALCalibData.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class AliEMCALCalibData: public TNamed {

// All indexes start from 0!
Float_t GetADCchannel (Int_t module, Int_t column, Int_t row) const;
Float_t GetADCchannelOnline(Int_t module, Int_t column, Int_t row) const;
Float_t GetADCchannelDecal (Int_t module, Int_t column, Int_t row) const;
Float_t GetADCpedestal (Int_t module, Int_t column, Int_t row) const;
Float_t GetTimeChannelDecal(Int_t module, Int_t column, Int_t row) const;
Expand All @@ -38,6 +39,7 @@ class AliEMCALCalibData: public TNamed {
Float_t GetADCchannelRef () const { return fADCchannelRef ; }

void SetADCchannel (Int_t module, Int_t column, Int_t row, Float_t value);
void SetADCchannelOnline(Int_t module, Int_t column, Int_t row, Float_t value);
void SetADCchannelDecal (Int_t module, Int_t column, Int_t row, Float_t value);
void SetADCpedestal (Int_t module, Int_t column, Int_t row, Float_t value);
void SetTimeChannelDecal(Int_t module, Int_t column, Int_t row, Float_t value);
Expand All @@ -47,15 +49,16 @@ class AliEMCALCalibData: public TNamed {

protected:

Float_t fADCchannelRef ; // base value of the ADC channel set from cosmics calibration
Float_t fADCchannelRef ; // base value of the ADC channel set from cosmics calibration, not to be used, instead use fADCchannelOnline

Float_t fADCchannel [AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows] ; // width of one ADC channel in GeV ([mod][col][row])
Float_t fADCchannelOnline[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows] ; // width of one ADC channel in GeV ([mod][col][row]) obtained from the voltage settings online
Float_t fADCchannelDecal [AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows] ; // decalibrate width of one ADC channel in GeV ([mod][col][row])
Float_t fADCpedestal [AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows] ; // value of the ADC pedestal ([mod][col][row]), not used
Float_t fTimeChannelDecal[AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows] ; // time shift of one ADC channel ([mod][col][row])
Float_t fTimeChannel [AliEMCALGeoParams::fgkEMCALModules][AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows][4] ; // time shift of one ADC channel ([mod][col][row][bunch crossing number])

ClassDef(AliEMCALCalibData,4) // EMCAL Calibration data
ClassDef(AliEMCALCalibData,5) // EMCAL Calibration data
};

#endif
Loading

0 comments on commit 706433a

Please sign in to comment.