Feature #1882

Multiple primary tracks per event

Added by Dobbs, Adam over 7 years ago. Updated over 7 years ago.

Target version:
Start date:
26 October 2016
Due date:
% Done:


Estimated time:
New Issue


MAUS cannot currently simulate multiple primary tracks per event (i.e. trigger). Issue is becoming very pertinent due to need to simulate the descoped DEMO, which potentially has dark current noise.

My initial break down of the task:

  • MCEvent:
    • Currently holds a pointer to a single Primary, this must become an array of pointers to Primaries, changing the class interface
    • Appropriate MCEvent data processor will need to be updated
    • Calling code will need to be refactored
    • Tests will need to be updated
  • MapPyBeamMaker:
    • particle["primary"] = {} should become particle["primary"] = [] i.e. a list of dicts not a single dict
    • Add a nested loop to populate this list with multiple primaries
    • Add a configuration variable to set the number of primaries per event
    • Tests will need to be updated
  • MAUSGeant4Manager:
    • Function RunManyParticles will need a new nested loop over primaries
    • Tests will need to be updated

This is not an extensive list, and may grow when I start coding.


Updated by Dobbs, Adam over 7 years ago

I have found a few extras tasks now that I have started coding:

  • MapCppCkovMCDigitizer uses MCEvent::GetPrimary()::GetTime(), needs refactoring
  • MapCppEMRMCDigitization uses MCEvent::GetPrimary(), needs refactoring

Will need to decide what these codes need, as both assume only a single primary is present.


Updated by Dobbs, Adam over 7 years ago

I have managed to get MAUS to generate multiple primaries per event, confirmed by looking at the output ROOT file. The number is controlled by a datacard variables, primaries_n.

I have not convinced MAUS / GEANT4 to turn these primaries into full MC tracks however. I have been hacking MAUSGeant4Manager but now reached the point where I am getting the warning:

Geant4 is not ready to run, aborting run at MAUSGeant4Manager::BeamOn

when I tell it to process all the primaries I am sending it.

Branch containing my progress at

Also available in: Atom PDF