Feature #768
File IO for beam maker
100%
Description
Can we have a beam maker option that just reads a file? Should be easy using xboa...
Updated by Rogers, Chris about 12 years ago
- Assignee changed from Rogers, Chris to Rajaram, Durga
Updated by Rogers, Chris about 12 years ago
File formats to implement are all the ones in xboa...for009, for003 (ICOOL) G4BLTrackFile), anything else that comes up. Event number splits into different spills.
Updated by Rajaram, Durga about 12 years ago
Hi Chris,
I have a python+xboa patchwork that seems to be working on an icool_for003 beam file --
loads bunch_dict from file at birth; process iterates over hits and stuffs N primaries into each spill.
Reads fine, particle parameters in spills are consistent with input file, and other maps are not complaining.
Ongoing:
analyzing the sim.out to verify
checks/traps for errors/failures
To do:
write and run test_
get a MICE G4BL file, check, and make it the default(?)
code clean up [ ugly and probably convoluted learn-as-you-go python/xboa stuff right now]
Updated by Rajaram, Durga about 12 years ago
- Workflow set to New Issue
Yes, the code is in my branch.
MapPyBeamMaker.py and ConfigurationDefaults.py
Verified it with for003 and g4bl_track_file formatted files
Test files are in MapPyBeamMaker/ in my branch
-> New flags in ConfigurationDefaults
#use_beam_file = True/False
#beam_file = filename
#beam_file_format = IO format (only tested with for003 & g4bl_track_file)
#nbm_particles_per_spill = #particles to put in a spill
Opens file -> skips headers/comments -> read in beam particles via Hit.read..
I would like to test with a real MICE G4BL file - where can I get one?
Updated by Rogers, Chris almost 12 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
- Workflow changed from Under Review to Closed
- I added tests for the file IO stuff (it passed everything first time incidentally)
- I switched the format of the sample G4bl track file - this has changed, I don't know when, but I made it current for G4BL 2.06
- I set the use_beam_file flag according to particle_generator == "file" - I didn't see the use in having two flags to control the same thing
Updated by Rogers, Chris almost 12 years ago
- Target version changed from Future MAUS release to MAUS-v0.1.2