|Message: Re: Local to Global... again||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)|
This is more a whole different way to approach your problem, rather than a direct answer to your question.
You might be interested in G4beamline, a program to apply Geant4 single-particle tracking to beamlines (primarily muon cooling for neutrino factories and muon colliders, but also of general use). If your problem fits within its capabilities, you'll find it is a truly ENORMOUS reduction in effort to use it rather than write a Geant4 simulation from scratch. If your problem doesn't fit within its capabilities, email me and we can discuss whether it makes sense to enhance the program.
G4beamline reads a text input file to define the system to be simulated. The way it solves your problem is to construct its own object-oriented hierarchy while reading the input file, and then construct the Geant4 geometry at the end of input. So it knows, say, that quadrupole Q1 has thus-and-so physical dimensions and field gradient, and is placed at x=0,y=0,z=1000. Its field is defined in terms of the local coordinates of the quadrupole, and the conversion global-to-local for computing the field is determined from the G4beamline internal geometry (includes rotating B back to the global coordinate basis). Overlapping fields are handled automatically and efficiently.
The problem with fields in a volume is that real-world fields are not so constrained -- volumes cannot overlap but real fields do. All of my magnet objects (quadrupoles, bends, sector bends, and most especially solenoids) have fringe fields that extend outside their geometrical boundaries. If one attempted to make large-enough geometrical volumes to contain the fringe fields, the rules on intersecting volumes would make it impossible to construct realistic systems.
|Inline Depth:||Outline Depth:||Add message:|