Skip to content

simulate.py scans return only 1 event #103

@c-dilks

Description

@c-dilks

Environment: (where does this bug occur, have you tried other environments)

  • Which branch (often main for latest released): main

Steps to reproduce: (give a step by step account of how to trigger the bug)

  1. simulate.py -t 6 -k 5 -n 30 (eta scan, used in CI)

Likely other tests (set with -t option) fail as well. simulate.py generates a Geant4 macro file then runs it with npsim; the tests that now (likely) fail have the following pattern:

/control/verbose 2
/run/initialize
/gps/verbose 2
/gps/particle pi+
/gps/number 1
/gps/position 0 0 0 cm

# eta scan, with varied azimuth for each eta bin

# eta=1.6  theta=22.828754832963863 deg
/gps/direction 0.2679262666315343 -0.2806111036063496 0.9216685544064713
/gps/ene/mono 4.862377599175745 GeV
/run/beamOn 1
/gps/direction 0.35670337364908533 -0.15260989170314782 0.9216685544064713
/gps/ene/mono 4.862377599175745 GeV
/run/beamOn 1
/gps/direction 0.355244674481362 -0.15597530917076796 0.9216685544064713
/gps/ene/mono 4.862377599175745 GeV
/run/beamOn 1
/gps/direction -0.3269047091825161 -0.2089506806224379 0.9216685544064713
/gps/ene/mono 4.862377599175745 GeV
/run/beamOn 1
/gps/direction 0.1315721232832751 0.3649874685424366 0.9216685544064713
/gps/ene/mono 4.862377599175745 GeV
/run/beamOn 1

...

Expected Result: (what do you expect when you execute the steps above)

An output file with many events, and stdout from npsim includes (irrelevant lines omitted):

ParticleHandler  INFO  +++ Event 0 Begin event action. Access event related information.
ParticleHandler  INFO  +++ Event 1 Begin event action. Access event related information.
ParticleHandler  INFO  +++ Event 2 Begin event action. Access event related information.
ParticleHandler  INFO  +++ Event 3 Begin event action. Access event related information.
ParticleHandler  INFO  +++ Event 4 Begin event action. Access event related information.
...

Actual Result: (what do you get when you execute the steps above)

An output file with 1 event, and the corresponding stdout is repeated for event 0:

ParticleHandler  INFO  +++ Event 0 Begin event action. Access event related information.
ParticleHandler  INFO  +++ Event 0 Begin event action. Access event related information.
ParticleHandler  INFO  +++ Event 0 Begin event action. Access event related information.
ParticleHandler  INFO  +++ Event 0 Begin event action. Access event related information.
ParticleHandler  INFO  +++ Event 0 Begin event action. Access event related information.
...

See example CI log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions