Message: insert Electric fileld to logical volume Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question insert Electric fileld to logical volume 

Keywords: insert Electric fileld to logical volume
Forum: Fields: Magnetic and Otherwise
Date: 20 Feb, 2007
From: Lee, Hyun-Seung <sherufa@naver.com>

With reference guide, I tried to make an uniform electric field and attach that to a logical volume(detector) However, when it is building, error is occured.

("singleGap_log" is the logical volume of detector)

--------***code***---------------------------

G4UniformElectricField* fUniformElectricField = new G4UniformElectricField(G4ThreeVector(0.,0.,100.0*kilovolt/cm));

singleGap_log->SetFieldManager(fUniformElectricField->GetLocalFieldManager(),allLocal);

--------***error message***-----------------------------

src/MyDetectorConstruction.cc: In member function `virtual G4VPhysicalVolume* MyDetectorConstruction::Construct()':

src/MyDetectorConstruction.cc:366: error: 'class G4UniformElectricField' has no member named 'GetLocalFieldManager' ---------------------------------------------------------

below, there is the text of "Geant4 User's Guide For Application Developers Detector Definition and Response" (4.3.2 Practical Aspects)

---------***text of user`s guide***------------------------------------

Creating a Field for a Part of the Volume Hierarchy

It is possible to create a field for a part of the detector. In particular it can describe the field (with pointer fEmField, for example) inside a logical volume and all its daughters. This can be done by simply creating a G4FieldManager and attaching it to a logical volume (with pointer, logicVolumeWithField, for example) or set of logical volumes.

  G4bool allLocal = true;       
  logicVolumeWithField->SetFieldManager(fEmField->GetLocalFieldManager(),allLocal);

---------------------------------------------

what class is "fEmField" is instance of? I can`t find "GetLocalFieldManager()"method in reference guide..

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

1 Warning: Re: insert Electric fileld to logical volume   (Peter Gumplinger - 30 Apr, 2007)
3 None: Re: insert Electric fileld to logical volume   (Dan Shapira - 22 Feb, 2008)
 Add Message Add Message
to: "insert Electric fileld to logical volume"

 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 ]