Skip to content

Commit 7daf8e2

Browse files
authoredJan 16, 2025··
fix: decltype on MCParticle::momentum in UndoAfterBurner (#1708)
### 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.
1 parent 809b1ac commit 7daf8e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/algorithms/reco/UndoAfterBurner.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void eicrecon::UndoAfterBurner::process(
126126
mc = rotationAboutX(mc);
127127
mc = headOnBoostVector(mc);
128128

129-
edm4hep::Vector3f mcMom(mc.Px(), mc.Py(), mc.Pz());
129+
decltype(edm4hep::MCParticleData::momentum) mcMom(mc.Px(), mc.Py(), mc.Pz());
130130
edm4hep::MutableMCParticle MCTrack(p.clone());
131131
MCTrack.setMomentum(mcMom);
132132

0 commit comments

Comments
 (0)
Please sign in to comment.