Avoid removing particles from the GenEvent after SimHit creation has started
In order to complete the switch from using GenParticle
barcodes
to GenParticle
id
to link GenParticles
within a GenEvent
to other persistent EDM objects (SimHits), then we cannot remove GenParticles
from the GenEvent
during the actual simulation process as this can alter the ids of other GenParticles
which may have already been linked to SimHits. Any removal has to happen before the first SimHits are created.
Initial approach
- Read in BeamTruthEvent
McEventCollection
as previously. Copy BeamTruthEvent to shadowTruthMcEventCollection
(not saved toStoreGate
). - For each
GenEvent
in shadowTruth:
a) ApplyZeroLifetimePositioner
to deal with the issue of oscillating neutral mesons.
b) ApplyTruthPreselectionTool
. This makes a copy of theGenEvent
, identifies all particles (including quasi-stable particles) in theGenEvent
held in the BeamTruthEventMcEventCollection
which will be passed to the Simulators and add a ShadowParticleIdAttribute
holding theid
of theGenParticle
in theshadowTruth
version of theGenEvent
to them. It then loops over theGenParticle
andGenVertex
objects in theGenEvent
copy and removes all objects with an ancestor which has the ShadowParticleIdAttribute
(effectively this removes the decay trees downstream of quasi-stable particles). This modified copy of theGenEvent
is stored in the TruthEventMcEventCollection
(saved toStoreGate
). - As previously pass the
GenEvent
object(s) in TruthEvent toInputConverter::convert
. As the selection ofGenParticle
objects has already been done though, this now just createsISFParticle
objects fromGenParticle
objects with the ShadowParticleIdAttribute
. - During the building of the
G4Event
, when converting a quasi-stable particle (identified as aGenParticle
with status==2 and no endGenVertex
) to aG4PrimaryParticle
, the predefined decay chain is taken from the _shadowTruthGenEvent
instead of theGenEvent
from the TruthEventMcEventCollection
. We also avoid linkingG4PrimaryParticle
objects in the predefined decay chain to anyHepMC
truth. - Simulation then proceeds as before, the only difference is in the barcodes assigned to particles produced in predefined decays and in the ordering of
GenParticle
andGenVertex
objects in the outputGenEvent
.
Notes:
- The implementation of
TruthPreselectionTool
could be improved. Consider integrating with theInputConverter
directly? - After this is validated and switched on by default it should be possible to simplify the TruthSvc implementation considerably.
Edited by John Derek Chapman
Merge request reports
Activity
- Resolved by John Derek Chapman
added 200 commits
-
5492a12f...76eefd35 - 193 commits from branch
atlas:23.0
- 0f8b6e23 - Initial commit of DropQSParticleDaughters Algorithm. Possibly not the most...
- c7174b71 - New-style InputConverter
- 0c51dd48 - Update SimulatorTool interface (incomplete)
- 7191d445 - Update SimKernelMT
- 5458542e - GenParticleSimWhiteList: Do not throw for status 2 GenParticles without an end vertex
- 0804359a - Enable ShadowTruthEvents for FullG4MT
- 450bf6ef - Migrate ISimulatorTool implementations to new interfaces
Toggle commit list-
5492a12f...76eefd35 - 193 commits from branch
added 7 commits
- ff7db1a3 - Update ISimulatorTool interface and ISimulatorTool implementations
- 5e1fdd63 - Update SimKernelMT
- 0ec15718 - GenParticleSimWhiteList: Do not throw for status 2 GenParticles without an end vertex
- 6b0ac885 - Enable ShadowTruthEvents for FullG4MT
- e856f874 - ActsFatrasSimTool bugfix
- b70343dd - DropQSParticleDaughters optimize
- 187630a4 - TruthSvc update
Toggle commit listadded 1 commit
- 9c968afe - Add AssociatedParticle Attribute to link quasi-stable particles in filtered...
added 1 commit
- 6bf6467c - Add AssociatedParticle Attribute to link quasi-stable particles in filtered...
mentioned in merge request !63108 (merged)
mentioned in merge request !63138 (merged)
added 112 commits
-
6bf6467c...f5667c6c - 103 commits from branch
atlas:23.0
- c3db2f1d - Add new ShadowParticle Attribute for linking between GenEvents
- 97bb18f2 - Add DropQSParticleDaughters Algorithm.
- e27ec3ed - New-style InputConverter
- c90d936d - Update ISimulatorTool interface and ISimulatorTool implementations
- f1a4adf3 - ActsFatrasSimTool bugfix
- 0d5de60e - Update SimKernelMT
- 07041d4e - GenParticleSimWhiteList: Do not throw for status 2 GenParticles without an end vertex
- fa4fbd1f - Enable ShadowTruthEvents for FullG4MT
- 9f8b096e - TruthSvc update
Toggle commit list-
6bf6467c...f5667c6c - 103 commits from branch
added 25 commits
- fc5e7179 - InputConverter: Clean-up ahead of refactoring
- 671d7192 - InputConverter: Refactoring
- aae3e5d2 - InputConverter: Make the linking of G4PrimaryParticles in pre-defined decay-chains optional
- adda1e45 - CaloOnly sequence using menusequenceCA wrapped for legacy config
- 065b5797 - increment version to 23.0.30 in relevant projects
- 02cf36c7 - athena:23.0-coverity-L1CaloFEXSim
- 7a2651b2 - 23.0-cleanup-InDetAlignGenAlgs
- 54ac58d4 - JetEventCleaningAlg - Clean up the pointer managerment
- 751e79f2 - Check if LumiBlock containers exist before recording
- 47506918 - fixed a bug where 1e5 used instead of 1e6 and modified to use MagicNumber constant instead
- af378eba - Update Calibration Hit Configuration Code
- 2da4502d - egammaTruthAlg::isAccepted changed 100000 to SIM_REGENERATION_THRESHOLD (1000000)
- a0050d39 - Fix a bug in GeneratorFilters: do not assume barcode-ordered vertices
- 17c3cc40 - 23.0-coverity-SCT_ConditionsTools
- 8113ebd1 - Rewrite LArNoiseCorrelationMonAlg to reduce complexity
- 1918a26a - Update Run1 Digitization jobs to use OFLCOND-RUN12-SDR-31-01 (ATLASSIM-6559)
- 982695ef - Add new ShadowParticle Attribute for linking between GenEvents
- b353dee0 - Add DropQSParticleDaughters Algorithm.
- 049e233e - New-style InputConverter
- 304365e6 - Update ISimulatorTool interface and ISimulatorTool implementations
- 8918aa41 - ActsFatrasSimTool bugfix
- 4801c7f2 - Update SimKernelMT
- 5d4ab3c1 - GenParticleSimWhiteList: Do not throw for status 2 GenParticles without an end vertex
- a4619aa2 - Enable ShadowTruthEvents for FullG4MT
- 0ab9f563 - TruthSvc update
Toggle commit listadded 23 commits
- f717faff - InputConverter: Make the linking of G4PrimaryParticles in pre-defined decay-chains optional
- a124ad83 - CaloOnly sequence using menusequenceCA wrapped for legacy config
- 09c0063f - increment version to 23.0.30 in relevant projects
- 8b5fd3dd - athena:23.0-coverity-L1CaloFEXSim
- 96dba3a5 - 23.0-cleanup-InDetAlignGenAlgs
- 019994d7 - JetEventCleaningAlg - Clean up the pointer managerment
- d6af4f4b - Check if LumiBlock containers exist before recording
- dc87b03e - fixed a bug where 1e5 used instead of 1e6 and modified to use MagicNumber constant instead
- e0886e72 - Update Calibration Hit Configuration Code
- eded2dc3 - egammaTruthAlg::isAccepted changed 100000 to SIM_REGENERATION_THRESHOLD (1000000)
- 50bc2ec6 - Fix a bug in GeneratorFilters: do not assume barcode-ordered vertices
- 9a0732fe - 23.0-coverity-SCT_ConditionsTools
- 3ca78de8 - Rewrite LArNoiseCorrelationMonAlg to reduce complexity
- b6a5e90d - Update Run1 Digitization jobs to use OFLCOND-RUN12-SDR-31-01 (ATLASSIM-6559)
- 93e38b9b - Add new ShadowParticle Attribute for linking between GenEvents
- 6d28c2ab - Add DropQSParticleDaughters Algorithm.
- e35a9569 - New-style InputConverter
- b8dc9d7d - Update ISimulatorTool interface and ISimulatorTool implementations
- 08236939 - ActsFatrasSimTool bugfix
- c517ee2b - Update SimKernelMT
- 7e3e9671 - GenParticleSimWhiteList: Do not throw for status 2 GenParticles without an end vertex
- f98a7332 - Enable ShadowTruthEvents for FullG4MT
- e6105588 - TruthSvc update
Toggle commit listadded 25 commits
- aeb0bb31 - InputConverter: Refactoring
- 6f8bd3c8 - InputConverter: Make the linking of G4PrimaryParticles in pre-defined decay-chains optional
- f9d2bff7 - CaloOnly sequence using menusequenceCA wrapped for legacy config
- b84d1499 - increment version to 23.0.30 in relevant projects
- 2219b13b - athena:23.0-coverity-L1CaloFEXSim
- d6ff7a71 - 23.0-cleanup-InDetAlignGenAlgs
- 7858eefa - JetEventCleaningAlg - Clean up the pointer managerment
- 40282ad8 - Check if LumiBlock containers exist before recording
- 17793e4a - fixed a bug where 1e5 used instead of 1e6 and modified to use MagicNumber constant instead
- 8aebf92e - Update Calibration Hit Configuration Code
- 2d1d0c54 - egammaTruthAlg::isAccepted changed 100000 to SIM_REGENERATION_THRESHOLD (1000000)
- c021c929 - Fix a bug in GeneratorFilters: do not assume barcode-ordered vertices
- b91d05f0 - 23.0-coverity-SCT_ConditionsTools
- 95acaa0f - Rewrite LArNoiseCorrelationMonAlg to reduce complexity
- e1c61a30 - Update Run1 Digitization jobs to use OFLCOND-RUN12-SDR-31-01 (ATLASSIM-6559)
- a34f4ed2 - Add new ShadowParticle Attribute for linking between GenEvents
- fbe5894f - Add DropQSParticleDaughters Algorithm.
- 3fc62e0c - New-style InputConverter
- 17ec4d1b - Update ISimulatorTool interface and ISimulatorTool implementations
- ba9d2aeb - ActsFatrasSimTool bugfix
- cee981cd - Update SimKernelMT
- 0b25345e - GenParticleSimWhiteList: Do not throw for status 2 GenParticles without an end vertex
- 0ea926dd - Enable ShadowTruthEvents for FullG4MT
- 7cde72a8 - TruthSvc update
- b703629d - fixup
Toggle commit listadded 38 commits
-
b703629d...f5667c6c - 25 commits from branch
atlas:23.0
- 90ba6e5e - InputConverter: Clean-up ahead of refactoring
- d940c8e8 - InputConverter: Refactoring
- f50943fa - InputConverter: Make the linking of G4PrimaryParticles in pre-defined decay-chains optional
- a1fec2f3 - Add new ShadowParticle Attribute for linking between GenEvents
- 132e2389 - Add DropQSParticleDaughters Algorithm.
- ffdc0916 - New-style InputConverter
- 1e71070b - Update ISimulatorTool interface and ISimulatorTool implementations
- 4d2fad94 - ActsFatrasSimTool bugfix
- ee1d60ce - Update SimKernelMT
- 03ad6b8b - GenParticleSimWhiteList: Do not throw for status 2 GenParticles without an end vertex
- 25a50e4d - Enable ShadowTruthEvents for FullG4MT
- 8f32ec8f - TruthSvc update
- 7afa964f - fixup
Toggle commit list-
b703629d...f5667c6c - 25 commits from branch
added 7 commits
- 129022d6 - New-style InputConverter
- 603f7448 - Update ISimulatorTool interface and ISimulatorTool implementations
- 76282606 - ActsFatrasSimTool bugfix
- 0c3f3e31 - Update SimKernelMT
- 68b22421 - GenParticleSimWhiteList: Do not throw for status 2 GenParticles without an end vertex
- be37459f - Enable ShadowTruthEvents for FullG4MT
- d7d41c76 - TruthSvc update
Toggle commit listadded 5 commits
Toggle commit listadded 5 commits
Toggle commit listadded 54 commits
-
c83605f0...2f028f99 - 44 commits from branch
atlas:23.0
- d5f19cf8 - InputConverter: Refactoring
- bd11261c - InputConverter: Make the linking of G4PrimaryParticles in pre-defined decay-chains optional
- a2eeacb4 - Add DropQSParticleDaughters Algorithm.
- 94e0db1f - New-style InputConverter
- a6b4b7b9 - Update ISimulatorTool interface and ISimulatorTool implementations
- 480ad583 - Update SimKernelMT
- 1deb0062 - GenParticleSimWhiteList: Do not throw for status 2 GenParticles without an end vertex
- af4ff0e2 - Enable ShadowTruthEvents for FullG4MT
- 8744496b - TruthSvc update
- 996abce2 - DropQSParticleDaughters: Refactor
Toggle commit list-
c83605f0...2f028f99 - 44 commits from branch
Please register or sign in to reply