//________________________________________________________________
AliZDCCalibData::AliZDCCalibData(const char* name)
{
+ // Constructor
TString namst = "Calib_";
namst += name;
SetName(namst.Data());
//________________________________________________________________
void AliZDCCalibData::Reset()
{
+ // Reset
memset(fMeanPedestal,0,47*sizeof(Float_t));
memset(fMeanPedWidth,0,47*sizeof(Float_t));
memset(fOOTPedestal,0,44*sizeof(Float_t));
//________________________________________________________________
void AliZDCCalibData::Print(Option_t *) const
{
- printf("\n ####### Mean pedestal values ####### \n");
- for(int t=0; t<47; t++){
- if(t==0 || t==24) printf("\n\t -------- ZN HighRes -------- \n");
- else if(t==5 || t==29) printf("\n\t -------- ZN LowRes -------- \n");
- else if(t==10 || t==34) printf("\n\t -------- ZP HighRes -------- \n");
- else if(t==15 || t==39) printf("\n\t -------- ZP LowRes -------- \n");
- else if(t==20) printf("\n\t -------- ZEM1 HighRes -------- ");
- else if(t==21) printf("\n\t -------- ZEM1 LowRes -------- ");
- else if(t==22) printf("\n\t -------- ZEM2 HighRes -------- ");
- else if(t==23) printf("\n\t -------- ZEM2 LowRes -------- ");
- printf(" MeanPed[ADC%d] = %.1f ",t,fMeanPedestal[t]);
+ // Printing of calibration object
+ printf("\n ####### In-time pedestal values (mean value, sigma) ####### \n");
+ for(int t=0; t<44; t++){
+ if(t==0 || t==24) printf("\n-------- ZN HighRes -------- \n");
+ else if(t==5 || t==29) printf("\n-------- ZN LowRes -------- \n");
+ else if(t==10 || t==34) printf("\n-------- ZP HighRes -------- \n");
+ else if(t==15 || t==39) printf("\n-------- ZP LowRes -------- \n");
+ else if(t==20) printf("\n-------- ZEM1 HighRes -------- \n");
+ else if(t==21) printf("\n-------- ZEM1 LowRes -------- \n");
+ else if(t==22) printf("\n-------- ZEM2 HighRes -------- \n");
+ else if(t==23) printf("\n-------- ZEM2 LowRes -------- \n");
+ printf("ADC%d (%.1f, %.1f)\t",t,fMeanPedestal[t],fMeanPedWidth[t]);
}
-
- printf("\n\n\n ####### Out Of Time pedestal values ####### \n");
+ //
+ printf("\n\n\n ####### Out-of-time pedestal values (mean value, sigma) ####### \n");
for(int t=0; t<44; t++){
- if(t==0 || t==24) printf("\n\t -------- ZN HighRes -------- \n");
- else if(t==5 || t==29) printf("\n\t -------- ZN LowRes -------- \n");
- else if(t==10 || t==34) printf("\n\t -------- ZP HighRes -------- \n");
- else if(t==15 || t==39) printf("\n\t -------- ZP LowRes -------- \n");
- else if(t==20) printf("\n\t -------- ZEM1 HighRes -------- ");
- else if(t==21) printf("\n\t -------- ZEM1 LowRes -------- ");
- else if(t==22) printf("\n\t -------- ZEM2 HighRes -------- ");
- else if(t==23) printf("\n\t -------- ZEM2 LowRes -------- ");
- printf(" OOTPed[ADC%d] = %.1f ",t,fOOTPedestal[t]);
+ if(t==0 || t==24) printf("\n-------- ZN HighRes -------- \n");
+ else if(t==5 || t==29) printf("\n-------- ZN LowRes -------- \n");
+ else if(t==10 || t==34) printf("\n-------- ZP HighRes -------- \n");
+ else if(t==15 || t==39) printf("\n-------- ZP LowRes -------- \n");
+ else if(t==20) printf("\n-------- ZEM1 HighRes -------- \n");
+ else if(t==21) printf("\n-------- ZEM1 LowRes -------- \n");
+ else if(t==22) printf("\n-------- ZEM2 HighRes -------- \n");
+ else if(t==23) printf("\n-------- ZEM2 LowRes -------- \n");
+ printf("ADC%d (%.1f, %.1f)\t",t,fOOTPedestal[t],fOOTPedWidth[t]);
}
- printf("\n\n\n ####### Energy calibration coefficients ####### \n");
- printf(" ZN1 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[0]);
- printf(" ZP1 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[1]);
- printf(" ZN2 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[2]);
- printf(" ZP2 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[3]);
- printf(" ZEM1 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[4]);
- printf(" ZEM2 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[5]);
+ printf("\n\n\n ####### Energy calibration coefficients ####### \n");
+ printf(" ZN1 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[0]);
+ printf(" ZP1 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[1]);
+ printf(" ZN2 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[2]);
+ printf(" ZP2 = %.4f (E[TeV]/ADCch.) \n",fEnCalibration[3]);
+ printf(" ZEM1 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[4]);
+ printf(" ZEM2 = %.2f (E[TeV]/ADCch.) \n",fEnCalibration[5]);
}
//________________________________________________________________
}
//________________________________________________________________
-void AliZDCCalibData:: SetPedCorrCoeff(Float_t* PedCorrCoeff0,
- Float_t* PedCorrCoeff1)
+void AliZDCCalibData:: SetPedCorrCoeff(Float_t* PedCorrCoeff)
{
- if(PedCorrCoeff0 && PedCorrCoeff1) for(int t=0; t<44; t++){
- fPedCorrCoeff[0][t] = PedCorrCoeff0[t];
- fPedCorrCoeff[1][t] = PedCorrCoeff1[t];
+ // Set coefficients for pedestal correlations
+ if(PedCorrCoeff){
+ for(Int_t j=0; j<2; j++){
+ for(int t=0; t<44; t++)
+ fPedCorrCoeff[j][t] = PedCorrCoeff[t];
+ }
}
- else for(int t=0; t<44; t++){
- fPedCorrCoeff[0][t] = 0.;
- fPedCorrCoeff[1][t] = 0.;
+ else{
+ for(Int_t j=0; j<2; j++){
+ for(int t=0; t<44; t++)
+ fPedCorrCoeff[j][t] = 0.;
+ }
}
+
+}
+
+//________________________________________________________________
+void AliZDCCalibData:: SetPedCorrCoeff(Float_t* PedCorrCoeff0, Float_t* PedCorrCoeff1)
+{
+ // Set coefficients for pedestal correlations
+ if(PedCorrCoeff0 && PedCorrCoeff1){
+ for(int t=0; t<44; t++){
+ fPedCorrCoeff[0][t] = PedCorrCoeff0[t];
+ fPedCorrCoeff[0][t] = PedCorrCoeff1[t];
+ }
+ }
+ else{
+ for(int t=0; t<44; t++){
+ fPedCorrCoeff[0][t] = 0.;
+ fPedCorrCoeff[1][t] = 0.;
+ }
+ }
+
}
//________________________________________________________________
void AliZDCCalibData::SetEnCalib(Float_t* EnCalib)
{
+ // Set energy calibration coefficients
if(EnCalib) for(int t=0; t<6; t++) fEnCalibration[t] = EnCalib[t];
else for(int t=0; t<6; t++) fEnCalibration[t] = 0.;
}
+//________________________________________________________________
+void AliZDCCalibData::SetPMTHVVal(Float_t* HVVal)
+{
+ // Set PMTs HV values
+ if(HVVal) for(int t=0; t<22; t++) fPMTHVVal[t] = HVVal[t];
+ else for(int t=0; t<22; t++) fPMTHVVal[t] = 0.;
+}
+