Message: A little step to solve my problem Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question A little step to solve my problem 

Keywords: A little step to address the problem with the Electri Field
Forum: Fields: Magnetic and Otherwise
Date: 17 Nov, 2004
From: G.A.P.Cirrone <G.A.P.Cirrone>

Dear all, thanks to the help of Gumplinger and Apostolakis I am in the root to solve my problem.

I was able to set an Uniform Electric Field inside the detector construction class of my application but I am not yet able to set a LOCAL electric field. In fact I use the line code below to define the field but I want define the field only in the absorber and not in all the world volume. So I inserted the pointer in the logical volume of the absorber but still the field is in all the world.

Here I post all my detectorConstruction with the field definition and the pointer to it in the local absorber. It run but the FIELD IS IN ALL THE WORLD.

G4VPhysicalVolume* DetectorConstruction::ConstructVolumes()
 // --------------------------------   FIELD  ---------------------------------

G4UniformElectricField* myField = new G4UniformElectricField(G4ThreeVector(0,900 *kilovolt/cm, 0));

 G4FieldManager *pFieldMgr;

 G4MagIntegratorStepper* pStepper;

 G4ChordFinder* pChordFinder;

 G4EqMagElectricField* fEquation = new G4EqMagElectricField(myField);

 G4MagInt_Driver* pIntgrDriver;

 G4TransportationManager* pTransportMgr = G4TransportationManager::GetTransportationManager();

 G4PropagatorInField* pFieldPropagator;

 pFieldPropagator = pTransportMgr -> GetPropagatorInField();

 pStepper = new G4ClassicalRK4(fEquation, 8);

 pFieldMgr = pTransportMgr -> GetFieldManager();

 pFieldMgr -> SetFieldChangesEnergy(true);
 pFieldMgr -> SetDetectorField(myField);

 pIntgrDriver = new G4MagInt_Driver(0.001 *mm, pStepper, pStepper -> GetNumberOfVariables());
 //if(pChordFinder) delete pChordFinder;
 pChordFinder = new G4ChordFinder(pIntgrDriver);
 pFieldMgr -> SetChordFinder(pChordFinder);



  // World
  sWorld = new G4Box("World",					//name
                   worldSizeX/2,worldSizeYZ/2,worldSizeYZ/2);	//dimensions

  lWorld = new G4LogicalVolume(sWorld,			//shape
                               worldMaterial,		//material
                              "World");			//name

  pWorld = new G4PVPlacement(0,				//no rotation
  			   G4ThreeVector(),		//at (0,0,0)
                           lWorld,			//logical volume
			   "World",			//name
                           0,	       		        //mother  volume
                           false,			//no boolean operation
                           0);				//copy number

  // Absorber
  sAbsor = new G4Box("Absorber",				//name
                   absorSizeX/2,absorSizeYZ/2,absorSizeYZ/2);	//dimensions

  lAbsor = new G4LogicalVolume(sAbsor,			//shape
                               absorMaterial,		//material
			       0);		//name

           new G4PVPlacement(0,				//no rotation
  			   G4ThreeVector(),		//at (0,0,0)
                           lAbsor,			//logical volume
			   "Absorber",			//name
                           lWorld,	       		//mother  volume
                           false,			//no boolean operation
                           0);				//copy number

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

1 Feedback: Re: A little step to solve my problem   (Peter Gumplinger - 17 Nov, 2004)
1 More: Re: A little step to solve my problem   (Peter Gumplinger - 17 Nov, 2004)
3 Ok: Fixed problem with the LOCAL PURE ELECTRIC FIELD   (Pablo Cirrone - 18 Nov, 2004)
 Add Message Add Message
to: "A little step to solve my problem"

 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 ]