X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALCalibData.cxx;h=44f44f1b906888049156c7e3301a80815de65e62;hb=6ebd8b1a02d9cd52aa31944142b284fb063b600b;hp=36bb21479456769cee7a5123962d23a72cce26e5;hpb=df5cea6bc576ef197fcac0a4554bd3658048d490;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALCalibData.cxx b/EMCAL/AliEMCALCalibData.cxx index 36bb2147945..44f44f1b906 100644 --- a/EMCAL/AliEMCALCalibData.cxx +++ b/EMCAL/AliEMCALCalibData.cxx @@ -31,37 +31,36 @@ ClassImp(AliEMCALCalibData) -//________________________________________________________________ -AliEMCALCalibData::AliEMCALCalibData() +//__________________________________________________________ +AliEMCALCalibData::AliEMCALCalibData() : +TNamed(), fADCchannelRef(0) { // Default constructor Reset(); } -//________________________________________________________________ -AliEMCALCalibData::AliEMCALCalibData(const char* name) +//________________________________________________________________________ +AliEMCALCalibData::AliEMCALCalibData(const char* name) : +TNamed(name,name),fADCchannelRef(0) { // Constructor - TString namst = "Calib_"; - namst += name; - SetName(namst.Data()); - SetTitle(namst.Data()); Reset(); } -//________________________________________________________________ +//______________________________________________________________________ AliEMCALCalibData::AliEMCALCalibData(const AliEMCALCalibData& calibda) : - TNamed(calibda) +TNamed(calibda), fADCchannelRef(calibda.fADCchannelRef) { // copy constructor - SetName(calibda.GetName()); + SetName (calibda.GetName()); SetTitle(calibda.GetName()); Reset(); - + Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; //12 Int_t nCol = AliEMCALGeoParams::fgkEMCALCols; //48 Int_t nRow = AliEMCALGeoParams::fgkEMCALRows; //24 Int_t nRow2 = AliEMCALGeoParams::fgkEMCALRows; //12 - Modules 11 and 12 are half modules + // in reality they are 1/3 but leave them as 1/2 for(Int_t supermodule = 0; supermodule < nSMod; supermodule++) { @@ -81,31 +80,33 @@ AliEMCALCalibData::AliEMCALCalibData(const AliEMCALCalibData& calibda) : fADCpedestal[supermodule][column][row] = calibda.GetADCpedestal(supermodule,column,row); - fTimeChannel[supermodule][column][row] = - calibda.GetTimeChannel(supermodule,column,row); - fTimeChannelDecal[supermodule][column][row] = calibda.GetTimeChannelDecal(supermodule,column,row); + for(Int_t bc = 0; bc < 4; bc++) + fTimeChannel[supermodule][column][row][bc] = + calibda.GetTimeChannel(supermodule,column,row,bc); } } } } - //________________________________________________________________ AliEMCALCalibData &AliEMCALCalibData::operator =(const AliEMCALCalibData& calibda) { // assignment operator - SetName(calibda.GetName()); + SetName (calibda.GetName()); SetTitle(calibda.GetName()); Reset(); - + + fADCchannelRef = calibda.GetADCchannelRef() ; + Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; //12 Int_t nCol = AliEMCALGeoParams::fgkEMCALCols; //48 Int_t nRow = AliEMCALGeoParams::fgkEMCALRows; //24 Int_t nRow2 = AliEMCALGeoParams::fgkEMCALRows/2; //12 - Modules 11 and 12 are half modules + // in reality they are 1/3 but leave them as 1/2 for(Int_t supermodule = 0; supermodule < nSMod; supermodule++) { @@ -125,35 +126,33 @@ AliEMCALCalibData &AliEMCALCalibData::operator =(const AliEMCALCalibData& calibd fADCpedestal[supermodule][column][row] = calibda.GetADCpedestal(supermodule,column,row); - fTimeChannel[supermodule][column][row] = - calibda.GetTimeChannel(supermodule,column,row); - fTimeChannelDecal[supermodule][column][row] = calibda.GetTimeChannelDecal(supermodule,column,row); + for(Int_t bc = 0; bc < 4; bc++) + fTimeChannel[supermodule][column][row][bc] = + calibda.GetTimeChannel(supermodule,column,row,bc); + } } } + return *this; } -//________________________________________________________________ -AliEMCALCalibData::~AliEMCALCalibData() -{ - // Destructor -} - -//________________________________________________________________ +//_____________________________ void AliEMCALCalibData::Reset() { // Set all pedestals to 0 and all ADC channels widths to 1 - //memset(fADCchannel ,1,12*48*24*sizeof(Float_t)); - //memset(fADCpedestal,0,12*48*24*sizeof(Float_t)); - + + fADCchannelRef = 0.0162; + Int_t nSMod = AliEMCALGeoParams::fgkEMCALModules; //12 Int_t nCol = AliEMCALGeoParams::fgkEMCALCols; //48 Int_t nRow = AliEMCALGeoParams::fgkEMCALRows; //24 Int_t nRow2 = AliEMCALGeoParams::fgkEMCALRows/2; //12 - Modules 11 and 12 are half modules + // in reality they are 1/3 but leave them as 1/2 + for (Int_t supermodule=0; supermodule= 10) nRow = nRow2; @@ -166,15 +165,17 @@ void AliEMCALCalibData::Reset() fADCchannelDecal [supermodule][column][row]=1.; fADCchannel [supermodule][column][row]=1.; - fTimeChannel [supermodule][column][row]=0.; fTimeChannelDecal[supermodule][column][row]=0.; - + + for(Int_t bc = 0; bc < 4; bc++) + fTimeChannel[supermodule][column][row][bc]=0; + } } - } + } } -//________________________________________________________________ +//____________________________________________________ void AliEMCALCalibData::Print(Option_t *option) const { // Print tables of pedestals and ADC channels widths @@ -184,6 +185,8 @@ void AliEMCALCalibData::Print(Option_t *option) const Int_t nCol = AliEMCALGeoParams::fgkEMCALCols; //48 Int_t nRow = AliEMCALGeoParams::fgkEMCALRows; //24 Int_t nRow2 = AliEMCALGeoParams::fgkEMCALRows/2; //12 - Modules 11 and 12 are half modules + // in reality they are 1/3 but leave them as 1/2 + if (strstr(option,"ped") || strstr(option,"all")) { printf("\n ---- Pedestal values ----\n\n"); for (Int_t supermodule=0; supermodule= 10) - nRow = nRow2; - for (Int_t column=0; columnGetADCchannel(supermodule, column, row); - Double_t ped1 = cd1->GetADCpedestal(supermodule, column, row); - Double_t adc2 = cd2->GetADCchannel(supermodule, column, row); - Double_t ped2 = cd2->GetADCpedestal(supermodule, column, row); - Double_t adc = adc2/adc1; - Double_t ped = ped2-adc*ped1; - if (print) - printf("%d %d %d: %f %f %f %f -> %f %f\n",supermodule,column,row,adc1,ped1,adc2,ped2,adc,ped); - fADCchannel [supermodule][column][row]=adc; - fADCpedestal[supermodule][column][row]=ped; - } - } - } -}