Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_container
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
containers
eic_container
Merge requests
!229
Undo particle handler patch as it was causing issues
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Undo particle handler patch as it was causing issues
undo_particle_handler_patch
into
master
Overview
0
Commits
1
Pipelines
0
Changes
2
Merged
Sylvester Joosten
requested to merge
undo_particle_handler_patch
into
master
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
9a530393
1 commit,
3 years ago
2 files
+
0
−
28
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
spack/packages/dd4hep/geant4_particle_handler.patch deleted
100644 → 0
+
0
−
27
Options
diff --git a/DDG4/src/Geant4ParticleHandler.cpp b/DDG4/src/Geant4ParticleHandler.cpp
index 82a4b702..779dd044 100644
--- a/DDG4/src/Geant4ParticleHandler.cpp
+++ b/DDG4/src/Geant4ParticleHandler.cpp
@@ -436,11 +436,8 @@
void Geant4ParticleHandler::rebaseSimulatedTracks(int ) {
for(count = 0, iend=pm.end(), i=pm.begin(); i!=iend; ++i) {
Particle* p = (*i).second;
orgParticles[p->id] = p->id;
- finalParticles[p->id] = p;
+ finalParticles[p->id] = p->addRef();
if ( p->id > count ) count = p->id;
- if ( (p->reason&G4PARTICLE_PRIMARY) != G4PARTICLE_PRIMARY ) {
- p->addRef();
- }
}
// (1.1) Define the new particle mapping for the simulated tracks
for(++count, iend=m_particleMap.end(), i=m_particleMap.begin(); i!=iend; ++i) {
@@ -448,7 +445,8 @@
void Geant4ParticleHandler::rebaseSimulatedTracks(int ) {
if ( (p->reason&G4PARTICLE_PRIMARY) != G4PARTICLE_PRIMARY ) {
//if ( orgParticles.find(p->id) == orgParticles.end() ) {
orgParticles[p->id] = count;
- finalParticles[count] = p;
+ finalParticles[count]->release();
+ finalParticles[count] = p->addRef();
p->id = count;
++count;
}
Loading