legend-exp / LegendHDF5IO.jl

HDF5-IO in Julia for the LEGEND experiment
Other
0 stars 6 forks source link

Update input parsing for GEARS_HDF5Input #27

Closed fhagemann closed 1 year ago

fhagemann commented 1 year ago

The current version of Base.read(input::GEARS_HDF5Input) seems to rely on a format that has not been used since June 2020 anymore. Some of the output variables were renamed before releasing v1.0.0 in July 2020:

This PR would adjust the function Base.read(input::GEARS_HDF5Input) such that it works for the new format (that was tagged for both v1.0.0 and v2.0.0).

fhagemann commented 1 year ago

I have also noticed that GEARS_HDF5 and G4SIMPLE_HDF5 return Tables with different column names. Is this intended? Is there a LEGEND specific format that we would like to use here as output format?

#output GEARS_HDF5Input   
 hits = TypedTables.Table(    
        evtno = evtno,
        detno = detno,
        thit = thit,
        edep = edep,
        pos = pos,
        ekin = ekin,
        stp = stp,
        l = l, # not in G4SIMPLE_OUTPUT
        mom = mom,
        trk = trk,
        pdg = pdg,
        pro = pro, # not in G4SIMPLE_OUTPUT
    )

#output G4SIMPLE_HDF5Input
hits = TypedTables.Table(
        evtno = evtno,
        detno = irep,
        thit = thit,
        edep = edep,
        pos = pos,
        ekin = ekin,
        volID = detno, # not in GEARS_OUTPUT
        stp = stp,
        mom = mom,
        trk = trk, 
        pdg = pdg,
    )
oschulz commented 1 year ago

Is this intended?

Development between the two packages is not really coordinates, as far as I know ...

fhagemann commented 1 year ago

Is this intended?

Development between the two packages is not really coordinates, as far as I know ...

Sure, but should we adapt the LegendHDF5IO output such that both gears and g4simple give similar outputs when they are read in using the LegendHDF5IO functions?

Is there a LEGEND default how GEANT4 data is stored when read into a julia session?

oschulz commented 1 year ago

Sure, but should we adapt the LegendHDF5IO output such that both gears and g4simple give similar outputs when they are read in using the LegendHDF5IO functions?

Yes, that would be great!

Is there a LEGEND default how GEANT4 data is stored when read into a julia session?

Not yet, I think, so feel free to choose common column names. Renamed them later would be easy anyway.