Message: Rotating a field & obtaining the EM field in a certain point Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Rotating a field & obtaining the EM field in a certain point 

Forum: Fields: Magnetic and Otherwise
Date: 26 Sep, 2006
From: Giovanni Marchiori <giovanni.marchiori@pi.infn.it>

I have two unrelated questions on electromagnetic fields:
1) when I associate a field to a logical volume with SetFieldManager, when
I then rotate the logical volume and place it inside the world, the field
is not rotated at all: is this behaviour expected? Do I have to rotate the
field by hand?
What I do is:

  G4double fieldValue = 1.5*tesla;
  G4UniformMagField* intField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue));
  G4Mag_UsualEqRhs* iEquation = new G4Mag_UsualEqRhs(intField);
  G4MagIntegratorStepper* iStepper = new G4ClassicalRK4(iEquation);
  G4ChordFinder* iChordFinder = new G4ChordFinder(intField,1.0e-6*mm,iStepper);
  G4FieldManager* fieldMgr = new G4FieldManager(intField,iChordFinder);  

  G4RotationMatrix* RotPos = new G4RotationMatrix(
                                                  G4ThreeVector( 0., 0. , 1 ),
                                                  G4ThreeVector( 0., 1. , 0.),
                                                  G4ThreeVector(-1., 0. , 0. )
						  );

  G4Tubs* solidInnerSol = new G4Tubs("sInnerSolenoid",
				     0.,
				     rmin,
				     length/2.0,
				     startphi,
				     deltaphi);
 
  G4LogicalVolume* logicInnerSol = new G4LogicalVolume(solidInnerSol,
						       CentralVacuum,
						       "lInnerSolenoid",
						       fieldMgr);
                    
  G4VPhysicalVolume* physiInnerSol = new G4PVPlacement(RotPos,
						       G4ThreeVector(),
						       logicInnerSol,
						       "pInnerSolenoid",
						       logicWorld,
						       false,
						       0);

  What I obtain is a cilinder with axis along x, but the field inside it
  is still parallel to z. Isn't there any connection between the
  orientation of a volume and that of its associated field?

2) What is the easiest way to know, once I have setup the
geometry of the fields, what is the total electromagnetic field - in global
coordinates - in a generic point in space? Does Geant4 provide such a
functionality?

I am using Geant4 8.1.patch01 on a Linux machine.

Thanks
   Giovanni

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Feedback: Re: Rotating a field & obtaining the EM field in a certain point   (John Apostolakis - 27 Sep, 2006)
(_ None: Re: Rotating a field & obtaining the EM field in a certain point   (Giovanni Marchiori - 27 Sep, 2006)
 Add Message Add Message
to: "Rotating a field & obtaining the EM field in a certain point"

 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 ]