Draft: The second attempt to use status() instead of barcode() in Simulation
The second attempt to use status instead of barcode for the simulation. The end goals are:
-
- to be able to identify the origin of the particles and vertices from their status and not barcodes
-
- to be able to use the
HepMC3::GenParticle::id()
andHepMC3::GenVertex::id()
as unique identifiers of the particles, e.g. inHepMCParticleLink
. In this way the usage ofbarcode()
property
ofGenParticle
a andGenVertex
will be almost eliminated.
- to be able to use the
The 2) was already implemented by @jchapman as an option. See https://indico.cern.ch/event/1298224/contributions/5458615/attachments/2669897/4627904/Migration%20away%20from%20barcodes.pdf
The 1) requires a bit more changes and those are collected in this MR with the idea to split it later into small pieces. Namely:
-
a) Switching from the bare comparison of
status
property of particles to the classificators inTruthUtils
( e.g.isStable
) See !64579 (closed), !64552 (merged) and similar. This is an ongoing work that touches a lot of code, but the changes are trivial. -
b) Switching from the classificators that use the
barcode()
directly asint
to functions that use the underlying objects. See !64571 (merged) This MR will also require the removal of the specification of templatesHepMC::is_simulation_particle()
forint
. -
c) Change the definition of
isStable()
,isPhysical()
,isDecayed()
, i.e. ( status=1,2 particles) to take into account that particles produced in the simulation will have statusoriginal_status + constant x times_particle_interacted
. Implemented in !64713 (merged) -
d) Drop the
Barcode
service from theTruthSvc
and instead of increasing the barcode of each particle in the simulation increase the status of particle. Implemented in this MR. -
e) Change the references where it is needed. To be done.
See also !64569 (closed)
Merge request reports
Activity
This merge request affects 16 packages:
- ForwardDetectors/ForwardTransport
- Generators/TruthUtils
- MuonSpectrometer/MuonTruthAlgs
- PhysicsAnalysis/D3PDMaker/D3PDMakerTest
- PhysicsAnalysis/MCTruthClassifier
- Simulation/G4Sim/MCTruthBase
- Simulation/G4Sim/TrackRecord
- Simulation/G4SimCnv/G4SimTPCnv
- Simulation/G4Utilities/G4UserActions
- Simulation/G4Utilities/TrackWriteFastSim
- Simulation/ISF/ISF_Core/ISF_Event
- Simulation/ISF/ISF_Core/ISF_Services
- Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools
- Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools
- Simulation/ISF/ISF_Geant4/ISF_Geant4Event
- Simulation/ISF/ISF_Geant4/ISF_Geant4Tools
Affected files list will not be printed in this case
Adding @zmarshal ,@jchapman ,@rosati ,@pjacka ,@mfauccig ,@stavrop ,@xiaozhon ,@jojungge ,@apsallid ,@gemmeren ,@ahasib ,@pscholer ,@tadej ,@schaarsc ,@lmijovic as watchers
CI Result FAILURE (hash 5e317b0c) Athena AthSimulation AthGeneration AnalysisBase AthAnalysis externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 1, warnings 1
AthSimulation: number of compilation errors 1, warnings 1
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 75856] This merge request affects 16 packages:
- ForwardDetectors/ForwardTransport
- Generators/TruthUtils
- MuonSpectrometer/MuonTruthAlgs
- PhysicsAnalysis/D3PDMaker/D3PDMakerTest
- PhysicsAnalysis/MCTruthClassifier
- Simulation/G4Sim/MCTruthBase
- Simulation/G4Sim/TrackRecord
- Simulation/G4SimCnv/G4SimTPCnv
- Simulation/G4Utilities/G4UserActions
- Simulation/G4Utilities/TrackWriteFastSim
- Simulation/ISF/ISF_Core/ISF_Event
- Simulation/ISF/ISF_Core/ISF_Services
- Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools
- Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools
- Simulation/ISF/ISF_Geant4/ISF_Geant4Event
- Simulation/ISF/ISF_Geant4/ISF_Geant4Tools
Affected files list will not be printed in this case
Adding @zmarshal ,@jchapman ,@rosati ,@pjacka ,@mfauccig ,@stavrop ,@xiaozhon ,@jojungge ,@apsallid ,@gemmeren ,@ahasib ,@pscholer ,@tadej ,@schaarsc ,@lmijovic as watchers
removed review-pending-level-1 label
CI Result FAILURE (hash d197152a) Athena AthSimulation AthGeneration AnalysisBase AthAnalysis externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 2, warnings 2
AthSimulation: number of compilation errors 2, warnings 1
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 75861] This merge request affects 16 packages:
- ForwardDetectors/ForwardTransport
- Generators/TruthUtils
- MuonSpectrometer/MuonTruthAlgs
- PhysicsAnalysis/D3PDMaker/D3PDMakerTest
- PhysicsAnalysis/MCTruthClassifier
- Simulation/G4Sim/MCTruthBase
- Simulation/G4Sim/TrackRecord
- Simulation/G4SimCnv/G4SimTPCnv
- Simulation/G4Utilities/G4UserActions
- Simulation/G4Utilities/TrackWriteFastSim
- Simulation/ISF/ISF_Core/ISF_Event
- Simulation/ISF/ISF_Core/ISF_Services
- Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools
- Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools
- Simulation/ISF/ISF_Geant4/ISF_Geant4Event
- Simulation/ISF/ISF_Geant4/ISF_Geant4Tools
Affected files list will not be printed in this case
Adding @zmarshal ,@jchapman ,@rosati ,@pjacka ,@mfauccig ,@stavrop ,@xiaozhon ,@jojungge ,@apsallid ,@gemmeren ,@ahasib ,@pscholer ,@tadej ,@schaarsc ,@lmijovic as watchers
mentioned in merge request !64855 (merged)