Project

General

Profile

Meeting 2016 04 29

Agenda

  • GQLink implementation - progress as of today
    • Running complete QSS simulations within Geant4 (very simple models)
    • Comparative plots
  • Next steps

staticB model simulation

Parameters

  • stepMax = 20 mm
  • trackMaxLen = 1 km
  • Simple example without volume crossings, as they are not supported in GQLink yet.

Comparative plot

GQLink_ComputeStep code

G4double
G4PropagatorInField::GQLink_ComputeStep(
                const G4Track&            track,
                G4FieldTrack&             pFieldTrack,
                G4double                  CurrentProposedStepLength,
                G4double&                 currentSafety,                // IN/OUT
                G4VPhysicalVolume*        pPhysVol)
{
    G4double step_mm = CurrentProposedStepLength * CLHEP::mm;
    G4double v_mm_ns = track.CalculateVelocity() * (CLHEP::mm / CLHEP::ns);
    G4double stepTime = step_mm / v_mm_ns;

    int n_vars = this->qssModel->n_vars();
    G4double *newState = new G4double[n_vars];

    this->qssModel->advance(stepTime, newState);

    pFieldTrack.LoadFromArray(newState, n_vars);
    G4double curveLength = pFieldTrack.GetCurveLength();
    pFieldTrack.SetCurveLength(curveLength + step_mm);

    delete[] newState;

    return step_mm;
}

GQLink callgraph