| Message: insert Electric fileld to logical volume | Not Logged In (login) |
|
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: | Outline Depth: | Add message: |
|
to: |