//
if (fBeamEnergy<=0 && fBeamType!=kNoBeamField) {
if (fBeamType == kBeamTypepp) fBeamEnergy = 7000.; // max proton energy
- else if (fBeamType == kBeamTypeAA) fBeamEnergy = 2750; // max PbPb energy
+ else if (fBeamType == kBeamTypeAA) fBeamEnergy = 2760; // max PbPb energy
AliInfo("Maximim possible beam energy for requested beam is assumed");
}
const char* parname = 0;
Bool_t AliMagF::LoadParameterization()
{
if (fMeasuredMap) {
- AliError(Form("Field data %s are already loaded from %s\n",GetParamName(),GetDataFileName()));
- return kTRUE;
+ AliFatal(Form("Field data %s are already loaded from %s\n",GetParamName(),GetDataFileName()));
}
//
char* fname = gSystem->ExpandPathName(GetDataFileName());
TFile* file = TFile::Open(fname);
if (!file) {
- AliError(Form("Failed to open magnetic field data file %s\n",fname));
- return kFALSE;
+ AliFatal(Form("Failed to open magnetic field data file %s\n",fname));
}
//
fMeasuredMap = dynamic_cast<AliMagWrapCheb*>(file->Get(GetParamName()));
if (!fMeasuredMap) {
- AliError(Form("Did not find field %s in %s\n",GetParamName(),fname));
- return kFALSE;
+ AliFatal(Form("Did not find field %s in %s\n",GetParamName(),fname));
}
file->Close();
delete file;
const Float_t tolerance=0.03; // relative current tolerance
const Float_t zero=77.; // "zero" current (A)
//
- BMap_t map;
+ BMap_t map = k5kG;
double sclL3,sclDip;
//
Float_t l3Pol = l3Cur > 0 ? 1:-1;
if (TMath::Abs((sclDip=diCur/diNominalCurrent)-1.) > tolerance && !uniform) {
if (diCur <= zero) sclDip = 0.; // some small current.. -> Dipole OFF
else {
- AliErrorGeneral("AliMagF",Form("Wrong dipole current (%f A)!",diCur));
- return 0;
+ AliFatalGeneral("AliMagF",Form("Wrong dipole current (%f A)!",diCur));
}
}
//
else if (TMath::Abs((sclL3=l3Cur/l3NominalCurrent2)-1.) < tolerance) map = k2kG;
else if (l3Cur <= zero && diCur<=zero) { sclL3=0; sclDip=0; map = k5kGUniform;}
else {
- AliErrorGeneral("AliMagF",Form("Wrong L3 current (%f A)!",l3Cur));
- return 0;
+ AliFatalGeneral("AliMagF",Form("Wrong L3 current (%f A)!",l3Cur));
}
}
//
if (sclDip!=0 && map!=k5kGUniform) {
if ( (l3Cur<=zero) || ((convention==kConvLHC && l3Pol!=diPol) || (convention==kConvDCS2008 && l3Pol==diPol)) ) {
- AliErrorGeneral("AliMagF",Form("Wrong combination for L3/Dipole polarities (%c/%c) for convention %d",
+ AliFatalGeneral("AliMagF",Form("Wrong combination for L3/Dipole polarities (%c/%c) for convention %d",
l3Pol>0?'+':'-',diPol>0?'+':'-',GetPolarityConvention()));
- return 0;
}
}
//
else if (btypestr.Contains(protonBeam)) btype = kBeamTypepp;
else AliInfoGeneral("AliMagF",Form("Assume no LHC magnet field for the beam type %s, ",beamtype));
char ttl[80];
- sprintf(ttl,"L3: %+5d Dip: %+4d kA; %s | Polarities in %s convention",(int)TMath::Sign(l3Cur,float(sclL3)),
+ snprintf(ttl,79,"L3: %+5d Dip: %+4d kA; %s | Polarities in %s convention",(int)TMath::Sign(l3Cur,float(sclL3)),
(int)TMath::Sign(diCur,float(sclDip)),uniform ? " Constant":"",
convention==kConvLHC ? "LHC":"DCS2008");
// LHC and DCS08 conventions have opposite dipole polarities