Skip to content
Snippets Groups Projects
Commit efa0b7e6 authored by Chao Peng's avatar Chao Peng
Browse files

fix a bug in setting the event numbers in ml_imaging_data.py

parent bcc023f4
Branches
Tags
No related merge requests found
...@@ -27,6 +27,7 @@ if kwargs['nev'] < 1: ...@@ -27,6 +27,7 @@ if kwargs['nev'] < 1:
print(kwargs) print(kwargs)
# get sampling fraction from system environment variable, 1.0 by default # get sampling fraction from system environment variable, 1.0 by default
sf = float(os.environ.get('JUGGLER_SAMP_FRAC', '1.0')) sf = float(os.environ.get('JUGGLER_SAMP_FRAC', '1.0'))
print(kwargs['compact'])
geo_service = GeoSvc('GeoSvc', detectors=[f.strip() for f in kwargs['compact'].split(',')]) geo_service = GeoSvc('GeoSvc', detectors=[f.strip() for f in kwargs['compact'].split(',')])
podev = EICDataSvc('EventDataSvc', inputs=[f.strip() for f in kwargs['input'].split(',')]) podev = EICDataSvc('EventDataSvc', inputs=[f.strip() for f in kwargs['input'].split(',')])
...@@ -103,8 +104,8 @@ becal_scfi_reco = CalHitReco('becal_scfi_reco', ...@@ -103,8 +104,8 @@ becal_scfi_reco = CalHitReco('becal_scfi_reco',
thresholdFactor=5.0, thresholdFactor=5.0,
readoutClass='EcalBarrelScFiHits', readoutClass='EcalBarrelScFiHits',
layerField='layer', layerField='layer',
sectorField='module', sectorField='sector',
localDetFields=['system', 'module'], # use local coordinates in each module (stave) localDetFields=['system', 'sector'], # use local coordinates in each module (stave)
**becal_scfi_daq) **becal_scfi_daq)
# merge hits in different layer (projection to local x-y plane) # merge hits in different layer (projection to local x-y plane)
......
...@@ -204,9 +204,9 @@ if __name__ == '__main__': ...@@ -204,9 +204,9 @@ if __name__ == '__main__':
'momentum.x', 'momentum.y', 'momentum.z', 'momentum.x', 'momentum.y', 'momentum.z',
'mass' 'mass'
]) ])
dfm.loc[:, 'event'] = mevs
# select incident particles # select incident particles
dfm = dfm[dfm['generatorStatus'].isin([0, 1])] dfm = dfm[dfm['generatorStatus'].isin([0, 1])]
dfm.loc[:, 'event'] = mevs
# NOTE: assumed single particles # NOTE: assumed single particles
dfm = dfm.groupby('event').first() dfm = dfm.groupby('event').first()
# True momentum # True momentum
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment