22 Particle* copy = array.appendNew(*original);
23 copy->copyRelations(original);
24 copy->writeExtraInfo(
"original_index", original->
getArrayIndex());
36 bool updateType =
true;
37 if (copy->hasExtraInfo(
"bremsCorrected") ||
38 copy->getParticleSource() == Particle::EParticleSourceObject::c_V0)
41 for (
unsigned iOld = 0; iOld < nDaughters; iOld++) {
47 copy->removeDaughter(originalDaughter, updateType);
49 copy->appendDaughter(daughterCopy, updateType);
Class to store reconstructed particles.
void appendDaughter(const Particle *daughter, const bool updateType=true, const int daughterProperty=c_Ordinary)
Appends index of daughter to daughters index array.
bool hasExtraInfo(const std::string &name) const
Return whether the extra info with the given name is set.
unsigned getNDaughters(void) const
Returns number of daughter particles.
EParticleSourceObject getParticleSource() const
Returns particle source as defined with enum EParticleSourceObject.
void removeDaughter(const Particle *daughter, const bool updateType=true)
Removes index of daughter from daughters index array.
const Particle * getDaughter(unsigned i) const
Returns a pointer to the i-th daughter particle.
void copyDaughters(Particle *mother)
Function copies all (grand-)^n-daughter particles of the argument mother Particle.
Particle * copyParticle(const Particle *original)
Function takes argument Particle and creates a copy of it and copies of all its (grand-)^n-daughters.