49 Int_t NIronSlabs = 12;
51 TGeoVolume *top=gGeoManager->GetTopVolume();
52 TGeoMedium *Fe = gGeoManager->GetMedium(
"iron");
56 TGeoUniformMagField *magField =
new TGeoUniformMagField(0.,-
MagneticField,0.);
57 TGeoUniformMagField *RetField =
new TGeoUniformMagField(0.,
MagneticField,0.);
59 TGeoBBox *Layer =
new TGeoBBox(225,400,
IronLenght/2);
60 TGeoVolume *volLayer =
new TGeoVolume(
"volLayer",Layer,Fe);
61 for(Int_t i = 0; i< NIronSlabs; i++)
64 top->AddNode(volLayer,i,
new TGeoTranslation(0, 0, d));
66 volLayer->SetField(magField);
68 cout <<
"************************************" << endl;
70 cout <<
" NIronSlabs = " << NIronSlabs << endl;
71 cout <<
" zLastSlab = "<< zLastSlab << endl;
76 TGeoVolume *volLayer2 =
new TGeoVolume(
"volLayer2",Layer,Fe);
77 for(Int_t i = 0; i< NIronSlabs; i++)
80 top->AddNode(volLayer2,i,
new TGeoTranslation(0, 0, d2));
82 volLayer2->SetField(RetField);
84 cout <<
"************************************" << endl;