[WIP] Add flag for fast simulation to MCParticle#1503
[WIP] Add flag for fast simulation to MCParticle#1503tmadlener wants to merge 3 commits intoAIDASoft:masterfrom
Conversation
Test Results 14 files 14 suites 4h 41m 13s ⏱️ For more details on these failures, see this check. Results for commit 994faf2. ♻️ This comment has been updated with latest results. |
|
Hi @tmadlener, thanks for starting this. Here's my two cents:
|
|
Looking into the implementation of the fast simulation inside DD4hep in a bit more detail, it's not entirely clear to me where we would need to place the setting of this status. Users that implement their own fast sim model, definitely do not have access to it any longer, I think, because they only get handed the G4 quantities, but not the DD4hep wrappers around them. |
|
Maybe using |
12c2af3 to
3268d0e
Compare
|
I have added an attempt here to go via the primary map, but this doesn't seem to persist to the output (which is not currently part of the PR!). This has several issues:
I have also tried adding the information to the I could add a Other possible options would be to hook into Any input welcome :) |
|
Quick summary of the discussion at the meeting just now: Hooking into |
|
@tmadlener You could make the type a property of the sensitive action. If not empty return type, otherwise use the type of the dd4hep sensitive detector, which is also a member of the DDG4 sensitive action. |
|
I am not sure I follow your comment. Which type would go into the sensitive action? Looking a bit closer into the DD4hep/DDG4/src/Geant4ParticleHandler.cpp Lines 155 to 157 in f6298cd |
|
@tmadlener DD4hep/DDG4/src/Geant4SensDetAction.cpp Line 355 in f6298cd Normally the type is what is set in the detector constructor by calling SensitiveDetector->setType("c alorimeter" or "tracker" or ....). This sensitive type is accessed in DDG4 by DDG4/src/Geant4ParticleHandler.cpp using this call here: DD4hep/DDG4/plugins/Geant4SensDet.cpp Line 142 in f6298cd
|
|
@tmadlener soll ich das machen oder weisst Du was zu tun ist ? |
This seems to be the case only if the hits are made outside of the usual Geant4 facilities via some global hit maker (as is typically done for fast sim models). In that case we still end up in the ParticleHandler, but with a volume that doesn't have an SDAction attached to it.
3268d0e to
994faf2
Compare
|
I think I am missing something conceptual here entirely. The way I understand it the sensitive action is what transforms the G4Steps into dd4hep hits. However, the It can be assigned to a region in the detector and if the trigger for it applies it will produce (G4) hits, e.g. via the DD4hep/DDG4/plugins/Geant4GFlashShowerModel.cpp Lines 221 to 222 in dac8db6 Or via the one here (which is this one here). At least with the one in DDML this one also passes through |
|
@tmadlener Thomas: Please see here: #1555 |
|
Will be replaced by an approach built on #1555 (+ follow ups) |
BEGINRELEASENOTES
ENDRELEASENOTES
This is the start of this work. The goal in the end is to have an easy way in analysis to check whether an MCParticle has been handled by a fast simulation model or not. This will obviously also require EDM4hep and LCIO to acquire a similar flag, but I would like to finalize a few things here first before going there.
Currently there are a few open questions:
FAST_SIMULATION_TRKandFAST_SIMULATION_CALO? Or do we simply name this current flag appropriately to_CALO(as that is the main / only use case for this)?Geant4FastSimShowerModel::check_trigger, but since killing the primary track is also in user responsibility, this should probably be as well)Tagging @peter-mckeown @gaede to solicit some inupt explicitly