}
printf("\n \n Comment: %s \n \n", comment.Data());
- AliMagF* field = new AliMagF("Maps","Maps",2,1.,1., 10.,mag);
- field->SetL3ConstField(0); //Using const. field in the barrel
+ AliMagF* field = new AliMagF("Maps","Maps",2, -1.,-1., 10.,mag);
TGeoGlobalMagField::Instance()->SetField(field);
rl->CdGAFile();
// track by track
//
//gener->SetVertexSmear(perTrack);
- // Field (L3 0.4 T)
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG));
+ // Field (L3 0.5 T)
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG));
Int_t iABSO = 0;
Int_t iDIPO = 0;
//__________________________________________________________________
// Field (L3 0.4 T)
- AliMagF* field = new AliMagF("Maps","Maps",2,1.,1., 10.,AliMagF::k5kG);
- // field->SetL3ConstField(0); //Using const. field in the barrel
+ AliMagF* field = new AliMagF("Maps","Maps",2, -1., -1., 10.,mag);
TGeoGlobalMagField::Instance()->SetField(field);
rl->CdGAFile();
}
//=============================================================
// Field (L3 0.5 T)
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1, 10., AliMagF::k5kG));
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1, 10., AliMagF::k5kG));
//=============================================================
//=================== Alice BODY parameters =============================
AliBODY *BODY = new AliBODY("BODY","Alice envelop");
// track by track
//
//gener->SetVertexSmear(perTrack);
- // Field (L3 0.4 T)
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG));
+ // Field (L3 0.5 T)
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG));
Int_t iABSO = 0;
Int_t iDIPO = 0;
// Field (L3 0.4 T)
//Zero magnetic field
- AliMagF* field = new AliMagF("Maps","Maps", 2, 0., 1., 10., AliMagF::k5kG);
- field->SetL3ConstField(0); //Using const. field in the barrel
+ AliMagF* field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
+ // AliMagF* field = new AliMagF("Maps","Maps", 2, -1., -1., 10., smag);
TGeoGlobalMagField::Instance()->SetField(field);
rl->CdGAFile();
ok = kFALSE;
}
+ TString beamType = fGRPData->GetBeamType();
+ if (beamType==AliGRPObject::GetInvalidString()) {
+ AliError("GRP/GRP/Data entry: missing value for the beam type ! Using UNKNOWN");
+ beamType = "UNKNOWN";
+ ok = kFALSE;
+ }
+
+ Float_t beamEnergy = fGRPData->GetBeamEnergy();
+ if (beamEnergy==AliGRPObject::GetInvalidFloat()) {
+ AliError("GRP/GRP/Data entry: missing value for the beam energy ! Using 0");
+ beamEnergy = 0;
+ ok = kFALSE;
+ }
+ beamEnergy /= 120E3; // energy is provided in MeV*120
+
+ // read special bits for the polarity convention and map type
+ Int_t polConvention = fGRPData->IsPolarityConventionLHC() ? AliMagF::kConvLHC : AliMagF::kConvDCS2008;
+ Bool_t uniformB = fGRPData->IsUniformBMap();
+
if (ok) {
- if ( !SetFieldMap(l3Current, diCurrent, l3Polarity ? -1:1, diPolarity ? -1:1) ) {
+ if ( !SetFieldMap(l3Current, diCurrent, l3Polarity ? -1:1, diPolarity ? -1:1,
+ polConvention,uniformB,beamEnergy, beamType.Data())) {
AliError("Failed to create a B field map !");
ok = kFALSE;
}
//_____________________________________________________________________________
Bool_t AliGRPManager::SetFieldMap(Float_t l3Cur, Float_t diCur, Float_t l3Pol,
- Float_t diPol, Float_t beamenergy,
- const Char_t *beamtype, const Char_t *path)
+ Float_t diPol, Int_t convention, Bool_t uniform,
+ Float_t beamenergy, const Char_t *beamtype, const Char_t *path)
{
//------------------------------------------------
// The magnetic field map, defined externally...
// L3 current 30000 A -> 0.5 T
// L3 current 12000 A -> 0.2 T
// dipole current 6000 A
- // The polarities must be the same
+ // The polarities must match the convention (LHC or DCS2008)
+ // unless the special uniform map was used for MC
//------------------------------------------------
const Float_t l3NominalCurrent1=30000.; // (A)
const Float_t l3NominalCurrent2=12000.; // (A)
const Float_t tolerance=0.03; // relative current tolerance
const Float_t zero=77.; // "zero" current (A)
//
- TString s=(l3Pol < 0) ? "L3: -" : "L3: +";
- //
- AliMagF::BMap_t map = AliMagF::k5kG;
- //
- double fcL3,fcDip;
+ AliMagF::BMap_t map;
+ double sclL3,sclDip;
//
l3Cur = TMath::Abs(l3Cur);
- if (TMath::Abs(l3Cur-l3NominalCurrent1)/l3NominalCurrent1 < tolerance) {
- fcL3 = l3Cur/l3NominalCurrent1;
- map = AliMagF::k5kG;
- s += "0.5 T; ";
- } else if (TMath::Abs(l3Cur-l3NominalCurrent2)/l3NominalCurrent2 < tolerance) {
- fcL3 = l3Cur/l3NominalCurrent2;
- map = AliMagF::k2kG;
- s += "0.2 T; ";
- } else if (l3Cur <= zero) {
- fcL3 = 0;
- map = AliMagF::k5kGUniform;
- s += "0.0 T; ";
- // fUniformField=kTRUE; // track with the uniform (zero) B field
- } else {
- AliError(Form("Wrong L3 current (%f A)!",l3Cur));
- return kFALSE;
+ diCur = TMath::Abs(diCur);
+ //
+ if (TMath::Abs((sclDip=diCur/diNominalCurrent)-1.) > tolerance && !uniform) {
+ if (diCur <= zero) sclDip = 0.; // some small current.. -> Dipole OFF
+ else {
+ AliError(Form("Wrong dipole current (%f A)!",diCur));
+ return kFALSE;
+ }
}
//
- diCur = TMath::Abs(diCur);
- if (TMath::Abs(diCur-diNominalCurrent)/diNominalCurrent < tolerance) {
- // 3% current tolerance...
- fcDip = diCur/diNominalCurrent;
- s += "Dipole ON";
- } else if (diCur <= zero) { // some small current..
- fcDip = 0.;
- s += "Dipole OFF";
- } else {
- AliError(Form("Wrong dipole current (%f A)!",diCur));
- return kFALSE;
+ if (uniform) {
+ // special treatment of special MC with uniform mag field (normalized to 0.5 T)
+ // no check for scaling/polarities are done
+ map = AliMagF::k5kGUniform;
+ sclL3 = l3Cur/l3NominalCurrent1;
+ }
+ else {
+ if (TMath::Abs((sclL3=l3Cur/l3NominalCurrent1)-1.) < tolerance) map = AliMagF::k5kG;
+ else if (TMath::Abs((sclL3=l3Cur/l3NominalCurrent2)-1.) < tolerance) map = AliMagF::k2kG;
+ else if (l3Cur <= zero) { sclL3 = 0; map = AliMagF::k5kGUniform;}
+ else {
+ AliError(Form("Wrong L3 current (%f A)!",l3Cur));
+ return kFALSE;
+ }
}
//
- if (fcDip!=0 && (map==AliMagF::k5kG || map==AliMagF::k2kG) &&
- ((AliMagF::GetPolarityConvention()==AliMagF::kConvMap2005 && l3Pol!=diPol) ||
- (AliMagF::GetPolarityConvention()==AliMagF::kConvDCS2008 && l3Pol==diPol) ||
- (AliMagF::GetPolarityConvention()==AliMagF::kConvLHC && l3Pol!=diPol)) ) {
+ if (sclDip!=0 && (map==AliMagF::k5kG || map==AliMagF::k2kG) &&
+ ((convention==AliMagF::kConvLHC && l3Pol!=diPol) ||
+ (convention==AliMagF::kConvDCS2008 && l3Pol==diPol)) ) {
AliError(Form("Wrong combination for L3/Dipole polarities (%c/%c) for convention %d",
l3Pol>0?'+':'-',diPol>0?'+':'-',AliMagF::GetPolarityConvention()));
return kFALSE;
}
//
- if (l3Pol<0) fcL3 = -fcL3;
- if (diPol<0) fcDip = -fcDip;
+ if (l3Pol<0) sclL3 = -sclL3;
+ if (diPol<0) sclDip = -sclDip;
//
AliMagF::BeamType_t btype = AliMagF::kNoBeamField;
TString btypestr = beamtype;
else {
AliInfo(Form("Cannot determine the beam type from %s, assume no LHC magnet field",beamtype));
}
-
- AliMagF* fld = new AliMagF("MagneticFieldMap", s.Data(), 2, fcL3, fcDip, 10., map, path,
+ char ttl[50];
+ sprintf(ttl,"L3: %+5d Dip: %+4d kA; %s",(int)TMath::Sign(l3Cur,float(sclL3)),
+ (int)TMath::Sign(diCur,float(sclDip)),uniform ? " Constant":"");
+ AliMagF* fld = new AliMagF("MagneticFieldMap", ttl, 2, sclL3, sclDip, 10., map, path,
btype,beamenergy);
TGeoGlobalMagField::Instance()->SetField( fld );
TGeoGlobalMagField::Instance()->Lock();
private:
Bool_t SetFieldMap(Float_t l3Current=30000., Float_t diCurrent=6000.,
- Float_t l3Pol=1., Float_t dipPol=1., Float_t benergy=7000.,
- const Char_t* btype="pp",
+ Float_t l3Pol=-1., Float_t dipPol=-1.,
+ Int_t convention=0, Bool_t uniform = kFALSE,
+ Float_t benergy=7000., const Char_t* btype="pp",
const Char_t* path="$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
-
+
AliGRPObject* fGRPData; // Data from the GRP/GRP/Data CDB folder
AliGRPManager(const AliGRPManager& man);
public:\r
\r
enum Stats {kMean = 0, kTruncMean = 1, kMedian = 2, kSDMean = 3, kSDMedian = 4};\r
+ \r
+ enum StatusBits {kPolConvLHC = BIT(14), kUniformBMap = BIT(15)};\r
\r
enum DP_HallProbes { \r
khpL3bsf17H1= 0 , khpL3bsf17H2, khpL3bsf17H3, khpL3bsf17Temperature, \r
\r
// getters\r
\r
+ Bool_t IsPolarityConventionLHC() const {return TestBit(kPolConvLHC);}\r
+ Bool_t IsUniformBMap() const {return TestBit(kUniformBMap);}\r
time_t GetTimeStart() const {return fTimeStart;}\r
time_t GetTimeEnd() const {return fTimeEnd;}\r
Float_t GetBeamEnergy() const {return fBeamEnergy;}\r
\r
// setters\r
\r
+ void SetPolarityConventionLHC(Bool_t v=kTRUE) {return SetBit(kPolConvLHC,v);}\r
+ void SetUniformBMap(Bool_t v=kTRUE) {return SetBit(kUniformBMap,v);}\r
void SetTimeStart(time_t timeStart) {fTimeStart = timeStart;}\r
void SetTimeEnd(time_t timeEnd) {fTimeEnd = timeEnd;}\r
void SetBeamEnergy(Float_t beamEnergy) {fBeamEnergy = beamEnergy;}\r
public:
enum BMap_t {k2kG, k5kG, k5kGUniform};
enum BeamType_t {kBeamTypeAA, kBeamTypepp, kNoBeamField};
- enum PolarityConvention_t {kConvMap2005,kConvDCS2008,kConvLHC};
+ enum PolarityConvention_t {kConvLHC,kConvDCS2008,kConvMap2005};
//
AliMagF();
AliMagF(const char *name, const char* title, Int_t integ,
//_____________________________________________________________________________
Bool_t AliReconstruction::SetFieldMap(Float_t l3Cur, Float_t diCur, Float_t l3Pol,
- Float_t diPol, Float_t beamenergy,
- const Char_t *beamtype, const Char_t *path)
+ Float_t diPol, Int_t convention, Bool_t uniform,
+ Float_t beamenergy, const Char_t *beamtype, const Char_t *path)
{
//------------------------------------------------
// The magnetic field map, defined externally...
// L3 current 30000 A -> 0.5 T
// L3 current 12000 A -> 0.2 T
// dipole current 6000 A
- // The polarities must be the same
+ // The polarities must match the convention (LHC or DCS2008)
+ // unless the special uniform map was used for MC
//------------------------------------------------
const Float_t l3NominalCurrent1=30000.; // (A)
const Float_t l3NominalCurrent2=12000.; // (A)
const Float_t tolerance=0.03; // relative current tolerance
const Float_t zero=77.; // "zero" current (A)
//
- TString s=(l3Pol < 0) ? "L3: -" : "L3: +";
- //
- AliMagF::BMap_t map = AliMagF::k5kG;
- //
- double fcL3,fcDip;
+ AliMagF::BMap_t map;
+ double sclL3,sclDip;
//
l3Cur = TMath::Abs(l3Cur);
- if (TMath::Abs(l3Cur-l3NominalCurrent1)/l3NominalCurrent1 < tolerance) {
- fcL3 = l3Cur/l3NominalCurrent1;
- map = AliMagF::k5kG;
- s += "0.5 T; ";
- } else if (TMath::Abs(l3Cur-l3NominalCurrent2)/l3NominalCurrent2 < tolerance) {
- fcL3 = l3Cur/l3NominalCurrent2;
- map = AliMagF::k2kG;
- s += "0.2 T; ";
- } else if (l3Cur <= zero) {
- fcL3 = 0;
- map = AliMagF::k5kGUniform;
- s += "0.0 T; ";
- } else {
- AliError(Form("Wrong L3 current (%f A)!",l3Cur));
- return kFALSE;
- }
- //
diCur = TMath::Abs(diCur);
- if (TMath::Abs(diCur-diNominalCurrent)/diNominalCurrent < tolerance) {
- // 3% current tolerance...
- fcDip = diCur/diNominalCurrent;
- s += "Dipole ON";
- } else if (diCur <= zero) { // some small current..
- fcDip = 0.;
- s += "Dipole OFF";
- } else {
- AliError(Form("Wrong dipole current (%f A)!",diCur));
- return kFALSE;
+ //
+ if (TMath::Abs((sclDip=diCur/diNominalCurrent)-1.) > tolerance && !uniform) {
+ if (diCur <= zero) sclDip = 0.; // some small current.. -> Dipole OFF
+ else {
+ AliError(Form("Wrong dipole current (%f A)!",diCur));
+ return kFALSE;
+ }
}
//
+ if (uniform) {
+ // special treatment of special MC with uniform mag field (normalized to 0.5 T)
+ // no check for scaling/polarities are done
+ map = AliMagF::k5kGUniform;
+ sclL3 = l3Cur/l3NominalCurrent1;
+ }
+ else {
+ if (TMath::Abs((sclL3=l3Cur/l3NominalCurrent1)-1.) < tolerance) map = AliMagF::k5kG;
+ else if (TMath::Abs((sclL3=l3Cur/l3NominalCurrent2)-1.) < tolerance) map = AliMagF::k2kG;
+ else if (l3Cur <= zero) { sclL3 = 0; map = AliMagF::k5kGUniform;}
+ else {
+ AliError(Form("Wrong L3 current (%f A)!",l3Cur));
+ return kFALSE;
+ }
+ }
//
- if (fcDip!=0 && (map==AliMagF::k5kG || map==AliMagF::k2kG) &&
- ((AliMagF::GetPolarityConvention()==AliMagF::kConvMap2005 && l3Pol!=diPol) ||
- (AliMagF::GetPolarityConvention()==AliMagF::kConvDCS2008 && l3Pol==diPol) ||
- (AliMagF::GetPolarityConvention()==AliMagF::kConvLHC && l3Pol!=diPol)) ) {
+ if (sclDip!=0 && (map==AliMagF::k5kG || map==AliMagF::k2kG) &&
+ ((convention==AliMagF::kConvLHC && l3Pol!=diPol) ||
+ (convention==AliMagF::kConvDCS2008 && l3Pol==diPol)) ) {
AliError(Form("Wrong combination for L3/Dipole polarities (%c/%c) for convention %d",
l3Pol>0?'+':'-',diPol>0?'+':'-',AliMagF::GetPolarityConvention()));
return kFALSE;
}
//
- if (l3Pol<0) fcL3 = -fcL3;
- if (diPol<0) fcDip = -fcDip;
+ if (l3Pol<0) sclL3 = -sclL3;
+ if (diPol<0) sclDip = -sclDip;
//
AliMagF::BeamType_t btype = AliMagF::kNoBeamField;
TString btypestr = beamtype;
else {
AliInfo(Form("Cannot determine the beam type from %s, assume no LHC magnet field",beamtype));
}
-
- AliMagF* fld = new AliMagF("MagneticFieldMap", s.Data(), 2, fcL3, fcDip, 10., map, path,
+ char ttl[50];
+ sprintf(ttl,"L3: %+5d Dip: %+4d kA; %s",(int)TMath::Sign(l3Cur,float(sclL3)),
+ (int)TMath::Sign(diCur,float(sclDip)),uniform ? " Constant":"");
+ AliMagF* fld = new AliMagF("MagneticFieldMap", ttl, 2, sclL3, sclDip, 10., map, path,
btype,beamenergy);
TGeoGlobalMagField::Instance()->SetField( fld );
TGeoGlobalMagField::Instance()->Lock();
return kTRUE;
}
-
Bool_t AliReconstruction::InitGRP() {
//------------------------------------
// Initialization of the GRP entry
ok = kFALSE;
}
- /*
- TObjString *l3Current=
- dynamic_cast<TObjString*>(fGRPData->GetValue("fL3Current"));
- if (!l3Current) {
- AliError("GRP/GRP/Data entry: missing value for the L3 current !");
- ok = kFALSE;
- }
- TObjString *l3Polarity=
- dynamic_cast<TObjString*>(fGRPData->GetValue("fL3Polarity"));
- if (!l3Polarity) {
- AliError("GRP/GRP/Data entry: missing value for the L3 polarity !");
- ok = kFALSE;
- }
-
- // Dipole
- TObjString *diCurrent=
- dynamic_cast<TObjString*>(fGRPData->GetValue("fDipoleCurrent"));
- if (!diCurrent) {
- AliError("GRP/GRP/Data entry: missing value for the dipole current !");
- ok = kFALSE;
- }
- TObjString *diPolarity=
- dynamic_cast<TObjString*>(fGRPData->GetValue("fDipolePolarity"));
- if (!diPolarity) {
- AliError("GRP/GRP/Data entry: missing value for the dipole polarity !");
- ok = kFALSE;
- }
- */
+ // read special bits for the polarity convention and map type
+ Int_t polConvention = fGRPData->IsPolarityConventionLHC() ? AliMagF::kConvLHC : AliMagF::kConvDCS2008;
+ Bool_t uniformB = fGRPData->IsUniformBMap();
if (ok) {
- if ( !SetFieldMap(l3Current, diCurrent, l3Polarity ? -1:1, diPolarity ? -1:1) )
+ if ( !SetFieldMap(l3Current, diCurrent, l3Polarity ? -1:1, diPolarity ? -1:1,
+ polConvention,uniformB,beamEnergy, beamType.Data()))
AliFatal("Failed to creat a B field map ! Exiting...");
AliInfo("Running with the B field constructed out of GRP !");
}
else AliFatal("B field is neither set nor constructed from GRP ! Exitig...");
-
}
//*** Get the diamond profiles from OCDB
//*** Magnetic field setters
Bool_t SetFieldMap(Float_t l3Current=30000., Float_t diCurrent=6000.,
- Float_t l3Pol=1., Float_t dipPol=1., Float_t benergy=7000.,
- const Char_t* btype="pp",
+ Float_t l3Pol=-1., Float_t dipPol=-1.,
+ Int_t convention=0, Bool_t uniform = kFALSE,
+ Float_t benergy=7000., const Char_t* btype="pp",
const Char_t* path="$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
//*** Global reconstruction flag setters
grpObj->SetLHCState("STABLE_BEAMS");
grpObj->SetLHCLuminosity(0,(AliGRPObject::Stats)0);
grpObj->SetBeamIntensity(0,(AliGRPObject::Stats)0);
-
+ //
AliMagF *field = (AliMagF*)TGeoGlobalMagField::Instance()->GetField();
Float_t solenoidField = field ? TMath::Abs(field->SolenoidField()) : 0;
- Float_t factor = field ? field->Factor() : 0;
- Float_t l3current = TMath::Abs(factor)*solenoidField*30000./5.;
- grpObj->SetL3Current(l3current,(AliGRPObject::Stats)0);
-
- if (factor > 0) {
- grpObj->SetL3Polarity(0);
- grpObj->SetDipolePolarity(0);
- }
- else {
- grpObj->SetL3Polarity(1);
- grpObj->SetDipolePolarity(1);
- }
-
- if (TMath::Abs(factor) != 0)
- grpObj->SetDipoleCurrent(6000,(AliGRPObject::Stats)0);
- else
- grpObj->SetDipoleCurrent(0,(AliGRPObject::Stats)0);
+ Float_t factorSol = field ? field->GetFactorSol() : 0;
+ Float_t currentSol = TMath::Abs(factorSol)>1E-6 ?
+ TMath::Nint(TMath::Abs(solenoidField/factorSol))/5.*30000.*TMath::Abs(factorSol) : 0;
+ //
+ Float_t factorDip = field ? field->GetFactorDip() : 0;
+ Float_t currentDip = 6000.*TMath::Abs(factorDip);
+ //
+ grpObj->SetL3Current(currentSol,(AliGRPObject::Stats)0);
+ grpObj->SetDipoleCurrent(currentDip,(AliGRPObject::Stats)0);
+ grpObj->SetL3Polarity(factorSol>0 ? 0:1);
+ grpObj->SetDipolePolarity(factorDip>0 ? 0:1);
+ grpObj->SetUniformBMap(field->IsUniform()); // for special MC with k5kGUniform map
+ grpObj->SetPolarityConventionLHC(); // LHC convention +/+ current -> -/- field main components
+ //
grpObj->SetCavernTemperature(0,(AliGRPObject::Stats)0);
//grpMap->Add(new TObjString("fCavernPressure"),new TObjString("0")); ---> not inserted in simulation with the new object, since it is now an AliDCSSensor
gener->Init(); // Initialization of the coctail generator
// Field (the last parameter is 1 => L3 0.4 T)
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG));
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG));
// Make sure the current ROOT directory is in galice.root
rl->CdGAFile();
//
//gener->SetVertexSmear(perTrack);
// Field (L3 0.4 T)
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG));
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG));
Int_t iABSO = 1;
Int_t iDIPO = 1;
#include "STEER/AliConfig.h"
#include "PYTHIA6/AliDecayerPythia.h"
#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagWrapCheb.h"
+#include "STEER/AliMagF.h"
#include "STRUCT/AliBODY.h"
#include "STRUCT/AliMAG.h"
#include "STRUCT/AliABSOv3.h"
// FIELD
//
- AliMagWrapCheb* field = 0x0;
+ AliMagF* field = 0x0;
if (mag == kNoField) {
comment = comment.Append(" | L3 field 0.0 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
} else if (mag == k5kG) {
comment = comment.Append(" | L3 field 0.5 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG,
- kTRUE,"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);
}
printf("\n \n Comment: %s \n \n", comment.Data());
-
+ TGeoGlobalMagField::Instance()->SetField(field);
+
rl->CdGAFile();
gAlice->SetField(field);
#include "STEER/AliConfig.h"
#include "PYTHIA6/AliDecayerPythia.h"
#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagWrapCheb.h"
+#include "STEER/AliMagF.h"
#include "STRUCT/AliBODY.h"
#include "STRUCT/AliMAG.h"
#include "STRUCT/AliABSOv3.h"
// FIELD
//
- AliMagWrapCheb* field = 0x0;
+ AliMagF* field = 0x0;
if (mag == kNoField) {
comment = comment.Append(" | L3 field 0.0 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
} else if (mag == k5kG) {
comment = comment.Append(" | L3 field 0.5 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG,
- kTRUE,"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);
}
printf("\n \n Comment: %s \n \n", comment.Data());
+ TGeoGlobalMagField::Instance()->SetField(field);
rl->CdGAFile();
gAlice->SetField(field);
#include "STEER/AliConfig.h"
#include "PYTHIA6/AliDecayerPythia.h"
#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagWrapCheb.h"
+#include "STEER/AliMagF.h"
#include "STRUCT/AliBODY.h"
#include "STRUCT/AliMAG.h"
#include "STRUCT/AliABSOv3.h"
// FIELD
//
- AliMagWrapCheb* field = 0x0;
+
+ AliMagF* field = 0x0;
if (mag == kNoField) {
comment = comment.Append(" | L3 field 0.0 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
} else if (mag == k5kG) {
comment = comment.Append(" | L3 field 0.5 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG,
- kTRUE,"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);
}
printf("\n \n Comment: %s \n \n", comment.Data());
-
+ TGeoGlobalMagField::Instance()->SetField(field);
+
rl->CdGAFile();
gAlice->SetField(field);
#include "STEER/AliConfig.h"
#include "PYTHIA6/AliDecayerPythia.h"
#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagWrapCheb.h"
+#include "STEER/AliMagF.h"
#include "STRUCT/AliBODY.h"
#include "STRUCT/AliMAG.h"
#include "STRUCT/AliABSOv3.h"
// FIELD
//
- AliMagWrapCheb* field = 0x0;
+
+ AliMagF* field = 0x0;
if (mag == kNoField) {
comment = comment.Append(" | L3 field 0.0 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
} else if (mag == k5kG) {
comment = comment.Append(" | L3 field 0.5 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG,
- kTRUE,"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);
}
printf("\n \n Comment: %s \n \n", comment.Data());
-
+ TGeoGlobalMagField::Instance()->SetField(field);
+
rl->CdGAFile();
gAlice->SetField(field);
#include "STEER/AliConfig.h"
#include "PYTHIA6/AliDecayerPythia.h"
#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagWrapCheb.h"
+#include "STEER/AliMagF.h"
#include "STRUCT/AliBODY.h"
#include "STRUCT/AliMAG.h"
#include "STRUCT/AliABSOv3.h"
// FIELD
//
- AliMagWrapCheb* field = 0x0;
+
+ AliMagF* field = 0x0;
if (mag == kNoField) {
comment = comment.Append(" | L3 field 0.0 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
} else if (mag == k5kG) {
comment = comment.Append(" | L3 field 0.5 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG,
- kTRUE,"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);
}
printf("\n \n Comment: %s \n \n", comment.Data());
-
+ TGeoGlobalMagField::Instance()->SetField(field);
+
rl->CdGAFile();
gAlice->SetField(field);
#include "STEER/AliConfig.h"
#include "PYTHIA6/AliDecayerPythia.h"
#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagWrapCheb.h"
+#include "STEER/AliMagF.h"
#include "STRUCT/AliBODY.h"
#include "STRUCT/AliMAG.h"
#include "STRUCT/AliABSOv3.h"
// FIELD
//
- AliMagWrapCheb* field = 0x0;
+
+ AliMagWrapCheb* field = 0x0;
+ AliMagF* field = 0x0;
if (mag == kNoField) {
comment = comment.Append(" | L3 field 0.0 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
} else if (mag == k5kG) {
comment = comment.Append(" | L3 field 0.5 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG,
- kTRUE,"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);
}
printf("\n \n Comment: %s \n \n", comment.Data());
-
+ TGeoGlobalMagField::Instance()->SetField(field);
+
rl->CdGAFile();
gAlice->SetField(field);
#include "STEER/AliConfig.h"
#include "PYTHIA6/AliDecayerPythia.h"
#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagWrapCheb.h"
+#include "STEER/AliMagF.h"
#include "STRUCT/AliBODY.h"
#include "STRUCT/AliMAG.h"
#include "STRUCT/AliABSOv3.h"
// FIELD
//
- AliMagWrapCheb* field = 0x0;
+
+ AliMagF* field = 0x0;
if (mag == kNoField) {
comment = comment.Append(" | L3 field 0.0 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
} else if (mag == k5kG) {
comment = comment.Append(" | L3 field 0.5 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG,
- kTRUE,"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);
}
printf("\n \n Comment: %s \n \n", comment.Data());
+ TGeoGlobalMagField::Instance()->SetField(field);
rl->CdGAFile();
gAlice->SetField(field);
#include "STEER/AliConfig.h"
#include "PYTHIA6/AliDecayerPythia.h"
#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagWrapCheb.h"
+#include "STEER/AliMagF.h"
#include "STRUCT/AliBODY.h"
#include "STRUCT/AliMAG.h"
#include "STRUCT/AliABSOv3.h"
// FIELD
//
- AliMagWrapCheb* field = 0x0;
- if (mag == kNoField) {
- comment = comment.Append(" | L3 field 0.0 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);
- } else if (mag == k5kG) {
- comment = comment.Append(" | L3 field 0.5 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG,
- kTRUE,"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
- }
- printf("\n \n Comment: %s \n \n", comment.Data());
-
- rl->CdGAFile();
- gAlice->SetField(field);
+
+ AliMagF* field = 0x0;
+ if (mag == kNoField) {
+ comment = comment.Append(" | L3 field 0.0 T");
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
+ } else if (mag == k5kG) {
+ comment = comment.Append(" | L3 field 0.5 T");
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);
+ }
+ printf("\n \n Comment: %s \n \n", comment.Data());
+ TGeoGlobalMagField::Instance()->SetField(field);
+
+ rl->CdGAFile();
+ gAlice->SetField(field);
Int_t iABSO = 1;
// FIELD
//
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 10., mag));
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1., 10., mag));
printf("\n \n Comment: %s \n \n", comment.Data());
gener->Init();
// Field (L3 0.5 T)
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 10., mag));
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1., 10., mag));
Int_t iABSO = 1;
Int_t iDIPO = 1;
#include "STEER/AliConfig.h"
#include "PYTHIA6/AliDecayerPythia.h"
#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagWrapCheb.h"
+#include "STEER/AliMagF.h"
#include "STRUCT/AliBODY.h"
#include "STRUCT/AliMAG.h"
#include "STRUCT/AliABSOv3.h"
// FIELD
//
- AliMagWrapCheb* field = 0x0;
+ AliMagF* field = 0x0;
if (mag == kNoField) {
comment = comment.Append(" | L3 field 0.0 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
} else if (mag == k5kG) {
comment = comment.Append(" | L3 field 0.5 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG,
- kTRUE,"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);
}
printf("\n \n Comment: %s \n \n", comment.Data());
+ TGeoGlobalMagField::Instance()->SetField(field);
+
rl->CdGAFile();
gAlice->SetField(field);
#include "STEER/AliConfig.h"
#include "PYTHIA6/AliDecayerPythia.h"
#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagWrapCheb.h"
+#include "STEER/AliMagF.h"
#include "STRUCT/AliBODY.h"
#include "STRUCT/AliMAG.h"
#include "STRUCT/AliABSOv3.h"
// FIELD
//
- AliMagWrapCheb* field = 0x0;
+ AliMagF* field = 0x0;
if (mag == kNoField) {
comment = comment.Append(" | L3 field 0.0 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
} else if (mag == k5kG) {
comment = comment.Append(" | L3 field 0.5 T");
- field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG,
- kTRUE,"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);
}
printf("\n \n Comment: %s \n \n", comment.Data());
+ TGeoGlobalMagField::Instance()->SetField(field);
rl->CdGAFile();
gAlice->SetField(field);
#include "STEER/AliConfig.h"\r
#include "PYTHIA6/AliDecayerPythia.h"\r
#include "PYTHIA6/AliGenPythia.h"\r
-#include "STEER/AliMagFMaps.h"\r
+#include "STEER/AliMagF.h"\r
#include "STRUCT/AliBODY.h"\r
#include "STRUCT/AliMAG.h"\r
#include "STRUCT/AliABSOv3.h"\r
}\r
// FIELD\r
\r
- printf("\n \n Comment: %s \n \n", comment.Data());\r
+ AliMagF* field = 0x0;\r
if (mag == kNoField) {\r
comment = comment.Append(" | L3 field 0.0 T");\r
- field = new AliMagWrapCheb("Maps","Maps", 2, 0., 10., AliMagWrapCheb::k2kG);\r
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);\r
} else if (mag == k5kG) {\r
comment = comment.Append(" | L3 field 0.5 T");\r
// field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG);\r
- field = new AliMagWrapCheb("Maps","Maps", 2, 1., 10., AliMagWrapCheb::k5kG,kTRUE,"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root");\r
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);\r
}\r
\r
printf("\n \n Comment: %s \n \n", comment.Data());\r
+ TGeoGlobalMagField::Instance()->SetField(field);\r
rl->CdGAFile();\r
- gAlice->SetField(field);\r
\r
\r
\r
\r
//============================================================= \r
// Field (L3 0.5 T) outside dimuon spectrometer\r
- AliMagF *field = new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG);\r
+ AliMagF *field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);\r
TGeoGlobalMagField::Instance()->SetField(field);\r
\r
Int_t iITS = 1;\r
\r
//============================================================= \r
// Field (L3 0.5 T) outside dimuon spectrometer\r
- AliMagF *field = new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG);\r
+ AliMagF *field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);\r
TGeoGlobalMagField::Instance()->SetField(field);\r
\r
Int_t iITS = 1;\r
\r
//============================================================= \r
// Field (L3 0.5 T) outside dimuon spectrometer\r
- AliMagF *field = new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG);\r
+ AliMagF *field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);\r
TGeoGlobalMagField::Instance()->SetField(field);\r
\r
Int_t iITS = 1;\r
\r
//============================================================= \r
// Field (L3 0.5 T) outside dimuon spectrometer\r
- AliMagF *field = new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG);\r
+ AliMagF *field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);\r
TGeoGlobalMagField::Instance()->SetField(field);\r
\r
Int_t iITS = 1;\r
\r
//============================================================= \r
// Field (L3 0.5 T) outside dimuon spectrometer\r
- AliMagF *field = new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG);\r
+ AliMagF *field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);\r
TGeoGlobalMagField::Instance()->SetField(field);\r
\r
Int_t iITS = 1;\r
\r
//============================================================= \r
// Field (L3 0.5 T) outside dimuon spectrometer\r
- AliMagF *field = new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG);\r
+ AliMagF *field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);\r
TGeoGlobalMagField::Instance()->SetField(field);\r
\r
Int_t iITS = 1;\r
// Field
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., smag));
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1., 10., smag));
rl->CdGAFile();
//
Int_t iABSO = 1;
comment = comment.Append(" | L3 field 0.5 T");
}
printf("\n \n Comment: %s \n \n", comment.Data());
-
- AliMagF* field = new AliMagF("Maps","Maps", 2, 1., 1., 10., mag);
- field->SetL3ConstField(0); //Using const. field in the barrel
+ // to use constant field in the barrel use:
+ // AliMagF* field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kGUniform);
+ AliMagF* field = new AliMagF("Maps","Maps", 2, -1., -1., 10., mag);
TGeoGlobalMagField::Instance()->SetField(field);
rl->CdGAFile();
// AliMagF* field = 0x0;
if (mag == kNoField) {
comment = comment.Append(" | L3 field 0.0 T");
- // field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k2kG);
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG));
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform));
} else if (mag == k5kG) {
comment = comment.Append(" | L3 field 0.5 T");
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::kNoField));
-// field = new AliMagFCheb("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG);
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG));
}
printf("\n \n Comment: %s \n \n", comment.Data());
// TGeoGlobalMagField::Instance()->SetField(field);
AliMagF* field = 0x0;
if (mag == kNoField) {
comment = comment.Append(" | L3 field 0.0 T");
- field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k2kG,
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform,
"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root",
AliMagF::kBeamTypepp, energy/2.0);
} else if (mag == k5kG) {
comment = comment.Append(" | L3 field 0.5 T");
- field = new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG,
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG,
"$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root",
AliMagF::kBeamTypepp, energy/2.0);
}
// Field (L3 0.4 T)
- AliMagF* field = new AliMagF("Maps","Maps", 2, 1., 1., 10., smag);
+ AliMagF* field = new AliMagF("Maps","Maps", 2, -1., -1., 10., smag);
TGeoGlobalMagField::Instance()->SetField(field);
rl->CdGAFile();
//
//gener->SetVertexSmear(perTrack);
// Field (L3 0.5 T)
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG));
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG));
Int_t iABSO = 1;
Int_t iDIPO = 1;
// Field (L3 0.4 T)
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., smag));
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1., 10., smag));
rl->CdGAFile();
//
Int_t iABSO = 1;
// Field (L3 0.4 T)
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., smag));
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1., 10., smag));
rl->CdGAFile();
//
Int_t iABSO = 1;
AliMagF* field = 0x0;
if (mag == kNoField) {
comment = comment.Append(" | L3 field 0.0 T");
- field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k2kG);
+ field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k5kGUniform);
} else if (mag == k5kG) {
comment = comment.Append(" | L3 field 0.5 T");
- field = new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG);
+ field = new AliMagF("Maps","Maps", 2, -1., -1., 10., AliMagF::k5kG);
}
printf("\n \n Comment: %s \n \n", comment.Data());
TGeoGlobalMagField::Instance()->SetField(field);
// Field
- TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG));
+ TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, -1., -1., 10., smag));
rl->CdGAFile();
//
}
printf("\n \n Comment: %s \n \n", comment.Data());
- AliMagF* field = new AliMagF("Maps","Maps", 2, 1., 1., 10., mag);
+ AliMagF* field = new AliMagF("Maps","Maps", 2, -1., -1., 10., mag);
TGeoGlobalMagField::Instance()->SetField(field);
rl->CdGAFile();