-
Notifications
You must be signed in to change notification settings - Fork 35
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
Gather and set more Step/Track attributes when calling sensitive detectors #839
Conversation
@whokion I just pushed an update to https://github.com/celeritas-project/cmssw that should (hopefully!) enable all the missing track attributes that caused CMSSW to crash. The track/parent IDs , which are necessary for some of the fine calo work, can't be reconstructed at present because celeritas/geant4 track IDs are completely independent. |
Okay, will pick up the update and test it with this branch! Thanks! |
A test result with this update using the CMS HL-LHC geometry hits an exception from SensitiveDetector::cmsTrackInformation(const G4Track* aTrack) :
|
Crap, I thought that was only needed for fine calo. I'll see if there's some way that I can hack in support for this... |
Yup, it seems that CMS does weird things for their MC hits, but hope that we are close to handle them anyway - see these places calling cmsTrackInformation, especially from |
Synchronizing CMSSW with the sparse checkout, I reproduce the same exception (that I reported yesterday, but seems not logged in this conversation thread, so re-posting below, note that there is the additional exception from
|
The second error is definitely because of the first: because celeritas aborted mid-step, it didn't finish transporting all the tracks. When I rebased from 13.0.x onto 13.0.6 I apparently missed a bunch of |
Have you also rollback SimG4CMS/Tracker/src/TkAccumulatingSensitiveDetector.cc ?
and another one:
By pass them, have an except from |
Okay, the exception is from if-block inside CaloSD - isParameterized is set to true at here inside the HCalSD constructor. So the question is why the HF hit is reached to here for HL-LHC geometry? - again, this is a weird implementation of CMS anyway as HF should use the G4VFastSimulation interface for using cms shower library rather than the ProcessHit interface. Probably should ask Kevin P. Anyway, by-pass the isParameterized block, cmssw+celeritas with the cms-hllhc geometry configuration runs successfully even though there are some error or warning messages from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as on-going CMS integration concerns (for Run3 and HL-HLC geometry configurations), the PR is good to go.
@whokion Sorry about the build errors: I'd inadvertently left some of the 13.0.x code in there. That's great news! What was the exception you were seeing in I think I should add a JSON output for the 'missed' regions: it's likely that we could see geometry errors (or disagreements between VecGeom and Geant4) if we plot how they're clustered together. We can talk about this Thursday. |
The remaining exception is from the HF shower library or parameterisation block inside |
Thanks @whokion , it looks like the step always gets |
@sethrj Okay and thanks for the update, which will be tested without the useCeleritas flag. Just to clarify, adding the NewSecondaryVector into the proxy G4Step created by GPU is not necessary if the HF hit processing is implemented in a different way - the fact that it is need for G4SteppingManager or TrackingManagerHelper only matters for the normal Geant4 CPU tracking, not for celeritas tracking on GPU, as they are not used. It is a just side effect to our current hit processing pipeline by the (weird way of CMS) HF hit processing as the hit itself normally should not provide information of the secondary particles created by the current step - the better way of implementing the FAST HF simulation is to use the Geatn4 FastSimulation interface and its own processHit method for the HF shower if either a parameterization method or the shower library is used - i.e., killing the secondary tracks during the hit processing is a weird logic. |
Agreed. But it shouldn't hurt to create this new secondary vector (once per simulation) and it's something that Geant4 always does: doing the same should make it less likely to cause a crash in other simulation frameworks or Geant4 applications. |
Confirm that cmsRun+celeritas runs successfully with updates in celeritas and cmssw along with cms-run3-sd-calotk.txt or cms-hllhc-sd-calotk.txt. |
**CHAINED ON #835 **
This introduces a few new options for calling back from GPU to Geant4 sensitive detector classes. With the
track
option, a particle-type-dependent track will be used for the step, and post-step data will be copied to the track temporarily. A newdirection
attribute allows the setting ofMomentumDirection
for pre/post/track.See #822 .