|Message: Re: Help setting up an Electric Field||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
> When the simulation starts, it seems as though particles are leaving
> the xenon and keep going on forever until they exit the world volume,
> which gives me a segmentation fault.
My guess is the segmentation fault has nothing to do with your field setup. You probably have code like this somewhere:
G4StepPoint* thePostPoint = theStep->GetPostStepPoint(); G4VPhysicalVolume* thePostPV = thePostPoint->GetPhysicalVolume(); ...... thePostPV->GetName();
You must check that the pointer thePostPV is not NULL:
It is NULL for the last step when the particle leaves the world volume.
> I know that to isolate the field to only the xenon cylinder, I need to
> use the line:
> xenon_log->SetFieldManager(field->GetGlobalFieldManager(), false);
No, that's not correct! While yes, you have to set a field manager to the logical volume, if you set the 'global field manager' to it, you achieved nothing. Moreover, you assigned your field to the global field manager, thus your field is everywhere. The 'false/true' means:
// Sets FieldManager and propagates it:
// i) only to daughters with G4FieldManager = 0
// if forceToAllDaughters=false
// ii) to all daughters
// if forceToAllDaughters=true
I know there was an error in example:
until G4.9. It was supposed to have exhibited tracking in a magnetic field associated to selected logical volumes (besides a global field). Now corrected, you want to follow this example, except you don't want to set any field to the global field manager. The code:
fLocalFieldManager = new G4FieldManager(); fLocalFieldManager->SetDetectorField(.... fLocalFieldManager->SetChordFinder(
// Set local field manager and local field
> in what class do I put this line? The documentation isn't very
> specific about this.
In DetectorConstruction.cc where you have the pointer xenon_log.
|Inline Depth:||Outline Depth:||Add message:|