Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Field Propagation using Runge-Kutta integration and example15 as demo (
#166) * First version of classes for Runge-Kutta integration of track in field - MagneticFieldEquation - DormandPrince45 - Stepper - RkIntegrationDriver - fieldConstants.h with kB2C, delta_intersection parameters - fieldPropagatorRungeKutta : new class for use by electrons.cu, used in new Example14 More: Example15: field propagation using Runge-Kutta. Based on Example13 otherwise. Tests - unit test test_magfieldRK.cpp Simple checks for equation, stepper and driver classes Driver: check version of Advance and V1 (old) Checks driver vs helix results (on cpu). Details: -------- RkIntegrationDriver Introduced new Advance method. Using AdvanceV1 as backward compatible. Enabled used of RK classes with double integrands (field remains float.) PrintFieldVectors: auxiliary methods, initially host-only Changed VECCORE_ATT_HOST_DEVICE to __host__ __device__ example15: Added ability to print Track info check result of RK integration in electrons.cu report differences Optional argument for Bz field value. Use TrackML as default geometry. * Electrons.cu + RK: return iterations; print good & bad steps. * Runge-Kutta integration: changes to identify cause of errors. (For debugging) * Fix for compilation - due to change to use fieldConstants.h * electrons.cu: Adapted to changes in G4HepEM (using Example13) Took revisions from Example13/electrons.cu * Example15: Fixed multiple parts using changes in Example13 - electrons.cu - example15.cpp - example15.cu - example15.cuh - example15.h Changed fieldPropagatorRungeKutta.h to suppress 'id' in argument * Fix to pass world volume to G4TransporationManager * 15/electrons: Improved printing of differences RK vs helix * fieldPropagatorRungeKutta: added checks vs Helix * Example15 / magfield : revised prints, new header file. * fieldPropagatorRungeKutta: fix update of momentum in substep of ComputeStepAndNextVolume * fieldPropagatorRungeKutta: Refine intersection for comparisons * Example15 / magneticfield: checks first refined, then disabled. * fieldPropagatorRungeKutta: IntegrateToEnd reports if loopCt > 1 RkIntegrationDriver: small cleanup * fieldPropagatorRungeKutta: fix condition for ending - adding condition (curvedStep > 0) * Example15: improvements to printing changes (investigating). * fieldPropagatorRungeKutta: added step reduction for zero steps (copying from fpConstBz) * example15.cu: fix call to ensure that ClearQueue occurs (not just when printing.) * example15/electrons.cu: first cleanup, removed max_step=0.25mm, always RK. * fieldPropagatorRungeKutta.h: sharper step reduction for stuck tracks, flip side if failing After a maximum number of failed (zero) steps, reducing the step size each time, accept that the track will not cross the boundary, and flip it to the other volume, which it is apparently entering (or never left.) * example15.cu: Added optional printing and info printing ; Revised magfield/inc/CompareResponses * example15: reset cms2018.gdml as default geometryf * example15.cu: removed most (optional) verbosity * fieldPropagatorConstBz::ComputeNextStepAndVolume: moved slot after safety in args * Example13/electrons.cu : added arguments to ComputeStepAndNextVolume * fieldPropagatorConstBz: After multiple zero steps move to other side of boundary; fieldPropagatorConstBz::ComputeStepAndNextVolume - Optional defaul values in interface (at compile time) - Protected some verbosity using if(verbose) - Added some optional verbosity Both of these are to be trimmed / refined. * fieldPropagatorConstBz: cleaned up several printouts; defaults in ComputeNextStepAndVolume Enable defaults for the last 3 arguments of ComputeNextStepAndVolume * fieldPropagatorRungeKutta: removed optional prints & cleanup * fieldPropagatorConstBz::ComputeStepAndNextVolume enforce that safety arg is const * fieldPropagatorConstBz.h : clean-up; added const in arg Safety was const in ComputeStepAndNextVolume implementation only - added it to declaration. * fieldPropagatorConstBz: fix vecgeom::Precision; cosmetics * Example13: set B=3.8T ; electrons.cu: took out slot in args of fieldProp... * CompareResponces.h: Added Copyright, reuse * Example15/electrons.cu : cleanup. Fix to remove slot. * example15.cu: cleanup * example15.cpp: Set stack limit to 8K
- Loading branch information