Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with SimG4SaveTrackerHits #43

Closed
aciarma opened this issue Jul 26, 2023 · 6 comments
Closed

Issue with SimG4SaveTrackerHits #43

aciarma opened this issue Jul 26, 2023 · 6 comments

Comments

@aciarma
Copy link

aciarma commented Jul 26, 2023

Hi, I've noticed that the code crashes while running k4run and trying to save TrackerHits.

The crash occurred within the function SimG4SaveTrackerHits::saveOutput(G4Event const&) in the shared library libSimG4Components.so.

This appeared to work fine until Friday 21/07, but on monday it didn't.
I tried sourcing key4hep-spack of friday or even previous days but it fails.

Is this something known? I don't quite understand also why if I source some older spack versions it does not work...

I attach a test file, using a geometry already on the repo.
Just source whatever key4hep version and k4run randomtest.py

Archivio.zip

@aciarma
Copy link
Author

aciarma commented Jul 26, 2023

trying to compile in local k4SimGeant4, during the make I get this which may be related:

/afs/cern.ch/user/a/aciarma/public/git_k4SimGeant4/hep-fcc_main/k4SimGeant4/SimG4Components/src/SimG4SaveTrackerHits.cpp: In member function 'virtual StatusCode SimG4SaveTrackerHits::saveOutput(const G4Event&)':
/afs/cern.ch/user/a/aciarma/public/git_k4SimGeant4/hep-fcc_main/k4SimGeant4/SimG4Components/src/SimG4SaveTrackerHits.cpp:80:41: error: 'class PodioDataSvc' has no member named 'getProvider'
   80 |         auto& coll_md = m_podioDataSvc->getProvider().getCollectionMetaData( m_trackHits.get()->getID() );
      |                                         ^~~~~~~~~~~
make[2]: *** [SimG4Components/CMakeFiles/SimG4Components.dir/build.make:244: SimG4Components/CMakeFiles/SimG4Components.dir/src/SimG4SaveCalHits.cpp.o] Error 1

did something change in the Podio libraries?

@kjvbrt
Copy link
Contributor

kjvbrt commented Jul 26, 2023

Hi @aciarma,

this issue seems like related to the switch to use frame base I/O in Podio.
I can investigate the issue further next week.

Best,
Juraj

@aciarma
Copy link
Author

aciarma commented Jul 26, 2023

Thank you @kjvbrt , in the meanwhile, do you know if there is another way I can use to save outputs?

@kjvbrt
Copy link
Contributor

kjvbrt commented Jul 26, 2023

Try locally merging this PR: #40

@aciarma
Copy link
Author

aciarma commented Jul 28, 2023

Hi @kjvbrt, this seems to work sourcing the Jul19 key4hep nightlies before compiling

edit:
should I change how I define the readouts?

I currently do:

from Configurables import SimG4Alg, SimG4SaveTrackerHits
savetrackertool = SimG4SaveTrackerHits("saveTrackerHits_FFQ", readoutNames = ["FFQ_Readout"])
savetrackertool.SimTrackHits.Path = "hits_FFQs"
geantsim = SimG4Alg("SimG4Alg",outputs= ["SimG4SaveTrackerHits/saveTrackerHits_FFQ" ],                                                                                                                         
                    eventProvider=particle_converter)

and I get this:

ToolSvc.saveTra...WARNING Providing multiple readout names deprecated.
ToolSvc.saveTra...WARNING Please use "readoutName" parameter instead.
ToolSvc.saveTra...   INFO Hits from readout "FFQ_Readout" will be saved in the collection "hits_FFQs".

@kjvbrt
Copy link
Contributor

kjvbrt commented Aug 14, 2023

Hi @aciarma, once key4hep/k4FWCore#138 is merged you should be able to use frame data service from the latest nightlies.

@kjvbrt kjvbrt closed this as completed Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants