Project

General

Profile

Feature #768

File IO for beam maker

Added by Rogers, Chris about 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Category:
Simulation
Target version:
Start date:
24 October 2011
Due date:
% Done:

100%

Estimated time:
Workflow:
Closed

Description

Can we have a beam maker option that just reads a file? Should be easy using xboa...

#1

Updated by Rogers, Chris about 12 years ago

  • Assignee changed from Rogers, Chris to Rajaram, Durga
#2

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.

#3

Updated by Rogers, Chris about 12 years ago

Hi Durga, what's the status on this?

#4

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]

#5

Updated by Rogers, Chris about 12 years ago

Did this ever get finished?

#6

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?

#7

Updated by Rogers, Chris about 12 years ago

  • Workflow changed from New Issue to Under Review
#8

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
Merged with trunk. I made a few minor changes during the merge -
  • 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
#9

Updated by Rogers, Chris almost 12 years ago

  • Target version changed from Future MAUS release to MAUS-v0.1.2

Also available in: Atom PDF