Message: Re: multiple field maps Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: multiple field maps 

Keywords: multiple field maps magnetic field
Forum: Fields: Magnetic and Otherwise
Re: Question multiple field maps (Kazutaka Nakahara)
Re: Warning Re: multiple field maps (Gumplinger Peter)
Date: 01 May, 2007
From: Tom Roberts <Tom Roberts>

 > Maybe, if there is need we should extend this to allow the 
 > G4FieldManager to keep a list of fields and each subsequent call
 > to SetDetectorField will add automatically to the list.

It takes more than a mere list -- EM fields overlap in general, and they must be summed. But in most cases the evaluation of the field dominates the CPU time to track particles, and summing a bunch of fields only makes that worse.

What I did is implement a GlobalField class (derived from G4ElectroMagneticField) that permits other objects to register themselves as defining a field and a bounding box. Now the GlobalField::GetFieldValue() can efficiently loop over all registered objects, checking their bounding boxes before calling their AddFieldValue() to add its result into the sum. It is important that the bounding box be in global coordinates, because the global->local transform is often the most expensive part of the field computation.

For one of my simulations with 38 individual field objects, implementing these bounding boxes sped it up by a factor of 8 (!).

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

1 None: Re: multiple field maps   (maurizio - 01 Aug, 2007)
 Add Message Add Message
to: "Re: multiple field maps"

 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 ]