Support #1874

Simulating cooling channel with measured data on GRID

Added by Liu, Ao over 7 years ago. Updated almost 7 years ago.

Start date:
20 September 2016
Due date:
% Done:


Estimated time:


This issue tracker is created to support the studies of the Step IV cooling channel beamline optics.

The reason why this is needed is that, since MAUS now is not fast enough to do tracking with many detailed, segmented geometries, tracking in MAUS takes too much time, say, tens of mins to track 100 particles, and we have 100,000 particles to track.

Therefore, splitting the input beam to pieces and use parallel jobs to track them is a good idea. I will supply data cards and G4BL particle library to start the runs. Please help me set up a workbench to submit the jobs.

Best regards,


G4BLoutput-3200-0_2.json (6.9 MB) G4BLoutput-3200-0_2.json Rajaram, Durga, 20 September 2016 21:06

Updated by Maletic, Dimitrije over 7 years ago

Hi, I was using this script to split G4BL into 5k particles files:
(needs to be modified for different number of events...)

Also, the files I am using for job submission to grid are at:

(also stated on page 6 in the) description of GRID job submisson.

If you want me to split G4BL files and submit the jobs, I'd be happy to do it.

The examples of requests are on the page:

And information about how to get to outputs can be found at:


Updated by Rajaram, Durga over 7 years ago


The JSON files that Dimitrije refers are the input to the simulation.
Each file gets submitted as a separate job.
And each file is basically a collection of "primaries" -- in a JSON list.
See attached sample JSON chunk.
Note in our default case, they are handed off 1m downstream of D2.


Updated by Liu, Ao over 7 years ago


Does it have to be a JSON list, or you may use G4Beamline track files? The format will be like the following:
  2. x,y,z in mm, P in MeV/c, time in ns
    69.9553 -28.9923 13962.2190 -9.9327 -28.9643 147.5750 0.0000 -13 1 0 0 1.00
    -18.9227 99.8870 13962.7100 21.7547 -3.6470 136.0877 0.0000 -13 2 0 0 1.00
    -12.9223 18.0127 13962.4393 9.5573 -1.8660 142.7883 0.0000 -13 3 0 0 1.00
    21.0610 2.7327 13962.3620 1.6930 -10.8750 140.1883 0.0000 -13 4 0 0 1.00



Updated by Rajaram, Durga over 7 years ago

Life is much easier if it's a json file containing a list of primaries. Then all Dimitrije will have to do is store your json files on the GRID and run a job against each.


Updated by Liu, Ao over 7 years ago

I'll figure out a way to convert my G4BL ASCII file to JSON.


Updated by Nebrensky, Henry over 7 years ago

... and someone needs to be responsible for documenting which beam is what, e.g. linked from the beam libraries page.


Updated by Liu, Ao over 7 years ago


The JSON files I'll create correspond to the data we took in July, so it won't be related to the beam library we have before. Those, I believe, were generated by G4BL instead. I'll keep track of all the JSON files I created in this issue tracker.


Updated by Liu, Ao over 7 years ago

Hi Dimitrije and Durga,

I got the JSON files to process for each run from 08154 to 08160.

Now, I can provide a separate data card for each JSON file, but I need a favor to split the JSON to multiple files. So I'll upload a zip package with each run as an individual daughter package. In each daughter package I'll include a data card file for MAUS. However, I do remind you that since I need to start tracking by defining the input beam at (e.g. when I use G4BL ASCII format)
beam = {
"particle_generator":"file", # routine for generating empty primaries
"random_seed": 10,
I don't know how to specify split files for JSON files when submitting to GRID. If you have questions about what I want to do, please Skype me, my Skype is frankliuao. Email is . Thanks.


Updated by Bayes, Ryan over 7 years ago

The code is set up to do this already Ao. You need to put the split JSON files in a location that is visible to the grid (either at a http (web) location or a location on the grid) and provide a file containing references to the locations of all your JSON files. The beam setting will be specified by the grid script at run time.


Updated by Rajaram, Durga over 7 years ago

Also, you don't need the beam dictionary cards.
Just use default cards & supply the input json file name to bin/

python bin/ -input_json_file_name g4bl_mybeam_0.json


Updated by Liu, Ao over 7 years ago

Sorry guys this weekend I was analyzing data from the new run, making my slides for the NAPAC talk, trying to build MAUS on two local servers and my MacBook, and stuff. Since simulating using a G4BL format file worked fine for me I didn't push myself to test json. I'll do that hopefully tomorrow. I'll first need to check MAUS tracking (using G4BL file) with data and then see whether it's time to do large scale tracking on GRID.

Thanks to both of you for your patience.


Updated by Rogers, Chris over 7 years ago

Hi Ao,
Is this issue still relevant?



Updated by Rogers, Chris almost 7 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF