9#include <analysis/utility/ParticleCopy.h>
10#include <analysis/dataobjects/Particle.h>
12#include <framework/datastore/StoreArray.h>
24 copy->copyRelations(original);
25 copy->writeExtraInfo(
"original_index", original->
getArrayIndex());
37 bool updateType =
true;
38 if (copy->hasExtraInfo(
"bremsCorrected") ||
39 copy->getParticleSource() == Particle::EParticleSourceObject::c_V0)
42 for (
unsigned iOld = 0; iOld < nDaughters; iOld++) {
48 copy->removeDaughter(originalDaughter, updateType);
50 copy->appendDaughter(daughterCopy, updateType);
62 bool updateType =
true;
68 for (
unsigned iOld_neverUsed = 0; iOld_neverUsed < nDaughters; iOld_neverUsed++) {
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.
std::string getArrayName() const
Get name of array this object is stored in, or "" if not found.
int getArrayIndex() const
Returns this object's array index (in StoreArray), or -1 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.