Skip to content

Commit

Permalink
fix: decltype on MCParticle::momentum in UndoAfterBurner (#1708)
Browse files Browse the repository at this point in the history
### Briefly, what does this PR introduce?
In EDM4hep-0.99, `MCParticle::momentum` is now `Vector3f` instead of
`Vector3d`, which causes warnings in UndoAfterBurner. This PR adds a
decltype to get around this.

### What kind of change does this PR introduce?
- [ ] Bug fix (issue #__)
- [x] New feature (support EDM4hep-0.99)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
No.
  • Loading branch information
wdconinc authored Jan 16, 2025
1 parent 809b1ac commit 7daf8e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/algorithms/reco/UndoAfterBurner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void eicrecon::UndoAfterBurner::process(
mc = rotationAboutX(mc);
mc = headOnBoostVector(mc);

edm4hep::Vector3f mcMom(mc.Px(), mc.Py(), mc.Pz());
decltype(edm4hep::MCParticleData::momentum) mcMom(mc.Px(), mc.Py(), mc.Pz());
edm4hep::MutableMCParticle MCTrack(p.clone());
MCTrack.setMomentum(mcMom);

Expand Down

0 comments on commit 7daf8e2

Please sign in to comment.