Message: Quadrupole field does not work((( Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Quadrupole field does not work((( 

Forum: Fields: Magnetic and Otherwise
Date: 20 Feb, 2016
From: Aleksei <Aleksei>

Hello everyone. I try to create a quadrupole lens or field. But trajectories of protons after passage of particles through a logical volume with quadrupole field are at 45 degrees relative to axis. Why is it so? G4RotationMatrix? What is G4RotationMatrix? I do not no!

G4RotationMatrix* trip_rot = new G4RotationMatrix(?????????????????????);
G4QuadrupoleMagField *pipeField = new G4QuadrupoleMagField(fGradient, G4ThreeVector(??????????), trip_rot);

My source code:

G4double fGradient = 2000*gauss/m;
G4QuadrupoleMagField *pipeField = new G4QuadrupoleMagField(fGradient);
G4Mag_UsualEqRhs* myEquationq = new G4Mag_UsualEqRhs(pipeField);
G4MagIntegratorStepper* myStepperq = new G4ClassicalRK4(myEquationq, 8);
G4ChordFinder* myChordFinderq = new G4ChordFinder(pipeField,0.1*mm, myStepperq);
G4FieldManager* fieldMgrq = new G4FieldManager(pipeField,myChordFinderq,false);

G4Box *solidB = new G4Box("solidB", 1*m, 1*m, 1*m);
G4LogicalVolume* logicB = new G4LogicalVolume(solidB, Mat("G4_Galactic"), "logicB",fieldMgrq);
new G4PVPlacement(0, G4ThreeVector(5*m,5*m,-7*m), logicB,
                                           "physiB", world->getLogic(), false, 0);
Please help. Thank you.)))))))



 Add Message Add Message
to: "Quadrupole field does not work((("

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]