9 #include <analysis/utility/ParticleCopy.h>
10 #include <analysis/dataobjects/Particle.h>
12 #include <framework/datastore/StoreArray.h>
24 copy->copyRelations(original);
32 for (
unsigned iOld = 0; iOld < nDaughters; iOld++) {
40 bool updateType =
true;
41 if (copy->hasExtraInfo(
"bremsCorrected")) updateType =
false;
43 copy->removeDaughter(originalDaughter, updateType);
45 copy->appendDaughter(daughterCopy, updateType);
53 unsigned nDaughters = mother->getNDaughters();
54 for (
unsigned iOld = 0; iOld < nDaughters; iOld++) {
55 const Particle* originalDaughter = mother->getDaughter(0);
59 mother->removeDaughter(originalDaughter);
61 mother->appendDaughter(daughterCopy);
Class to store reconstructed particles.
unsigned getNDaughters(void) const
Returns number of daughter particles.
const Particle * getDaughter(unsigned i) const
Returns a pointer to the i-th daughter particle.
std::string getArrayName() const
Get name of array this object is stored in, or "" if not found.
Accessor to arrays stored in the data store.
T * appendNew()
Construct a new T object at the end of the array.
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.
Abstract base class for different kinds of events.