Skip to content

Commit c76e6db

Browse files
committed
u
1 parent 79ef45a commit c76e6db

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎ALICE3/Core/Decayer.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,16 @@ class Decayer
157157
decay.Generate();
158158

159159
std::vector<o2::upgrade::OTFParticle> decayProducts;
160+
decayProducts.reserve(dauMasses.size());
160161
for (size_t i = 0; i < dauMasses.size(); ++i) {
161-
o2::upgrade::OTFParticle particle;
162-
TLorentzVector dau = *decay.GetDecay(i);
163-
particle.setPDG(pdgCodesDaughters[i]);
164-
particle.setVxVyVz(mVx, mVy, mVz);
165-
particle.setPxPyPzE(dau.Px(), dau.Py(), dau.Pz(), dau.E());
166-
particle.setBitOn(o2::upgrade::DecayerBits::ProducedByDecayer);
167-
decayProducts.push_back(particle);
162+
o2::upgrade::OTFParticle daughter;
163+
const TLorentzVector& dau = *decay.GetDecay(i);
164+
daughter.setPDG(pdgCodesDaughters[i]);
165+
daughter.setVxVyVz(mVx, mVy, mVz);
166+
daughter.setPxPyPzE(dau.Px(), dau.Py(), dau.Pz(), dau.E());
167+
daughter.setBitOn(o2::upgrade::DecayerBits::ProducedByDecayer);
168+
decayProducts.push_back(daughter);
168169
}
169-
170170
return decayProducts;
171171
}
172172

0 commit comments

Comments
 (0)