I would like to simulate the presence of a quadrupolar magnetic field inside a beam pipe, i.e.
G4Tubs* pipe = new G4Tubs("pipe",innerR,outerR,hLen,0.,360.*deg);
G4LogicalVolume* pipeLV = new G4LogicalVolume(pipe,G4Material::GetMaterial("G4_STAINLESS-STEEL"),"pipeLV",0,0,0);
G4Tubs* magVol = new G4Tubs("magvol",0.,innerR,hLen,0.,360.*deg);
G4LogicalVolume* magLV = new G4LogicalVolume(magVol,G4Material::GetMaterial("Vacuum"),"magLV",0,0,0);
At this point I understand that I have to attach the magnetic field to magLV with a command like (taken from Book for Application Developers)
G4bool allLocal = true;
magLV->SetFieldManager(localFieldManager, allLocal)
What is not clear, is how to define the localFieldManager so that it uses G4QuadrupoleMagField. I looked around a bit but could not find an example of how to do this.
Could somebody help me and point me to the correct documentation?
Thank you
Emanuele Leonardi