Belle II Software light-2406-ragdoll
|
Class to go over all the particles in the Graph an sort them in a sensible way. More...
Public Member Functions | |
ParticleSorter (MemoryPool< MCParticleGraph::GraphParticle > &particles, TClonesArray *plist, bool setVertex, bool setTime) | |
ParticleSorter constructor. | |
void | setStartIndex (int index) |
Set the starting index for the particle graph. | |
template<class Graph > | |
void | sort (Graph &g) |
Sort the particles and generate MCParticle list. | |
template<class Vertex , class Graph > | |
void | finish_vertex (Vertex v, Graph &g) |
Go through the daughters of the vertex. | |
template<class Vertex , class Graph > | |
void | find_daughters (Vertex v, Graph &g, MCParticleGraph::GraphParticle &mother) |
Find the daughters of the given vertex. | |
void | setVertexTime (MCParticleGraph::GraphParticle &m, const MCParticleGraph::GraphParticle &d) |
Set the vertex and time information of the mother particle. | |
Protected Attributes | |
int | m_index |
The latest index given to a particle. | |
MemoryPool< MCParticleGraph::GraphParticle > & | m_particles |
Reference to the list of particles which should be sorted. | |
TClonesArray * | m_plist |
The final array of sorted particles which is stored in the DataStore. | |
bool | m_setVertex |
True if the vertex information should be saved. | |
bool | m_setTime |
True if the production time information should be saved. | |
vector< bool > | m_seen |
Vector of the particles that were already seen while sorting the graph. | |
std::queue< unsigned int > | m_vqueue |
The list of the vertices that will be visited. | |
Class to go over all the particles in the Graph an sort them in a sensible way.
All particles will be assigned an index, starting at 1. If an particle has its ignore flag set, then it will get assigned the index of its last, unignored parent. The particles will be sorted by depth: First all primary particles, then all direct daughters of the first primary particle, all direct daughters of the second primary particle and so forth.
Definition at line 49 of file MCParticleGraph.cc.
|
inline |
ParticleSorter constructor.
particles | Reference to the list of particles which should be sorted. |
plist | The final array of sorted particles which is stored in the DataStore. |
setVertex | Set to true if the vertex information should be saved. |
setTime | Set to true if the production time information should be saved. |
Definition at line 60 of file MCParticleGraph.cc.
|
inline |
Find the daughters of the given vertex.
v | The vertex whose daughters are investigated. |
g | The graph in which the vertex lives. |
mother | Reference to the mother particle. |
Definition at line 129 of file MCParticleGraph.cc.
|
inline |
Go through the daughters of the vertex.
Add the found particles to the final particle list.
v | The vertex whose daughters are investigated. |
g | The graph in which the vertex lives. |
Definition at line 102 of file MCParticleGraph.cc.
|
inline |
Set the starting index for the particle graph.
Normally this is 0 so the first real particle has an id of 1 but this can be used if there are already particles present so the first particle will have id N+1
index | number of particles already present |
Definition at line 68 of file MCParticleGraph.cc.
|
inline |
Set the vertex and time information of the mother particle.
m | Reference to the mother particle whose vertex and time information should be set. |
d | Reference to the daughter particle. |
Definition at line 180 of file MCParticleGraph.cc.
|
inline |
Sort the particles and generate MCParticle list.
g | The graph which should be sorted and transformed to a list of particles. |
Definition at line 74 of file MCParticleGraph.cc.
|
protected |
The latest index given to a particle.
Definition at line 197 of file MCParticleGraph.cc.
|
protected |
Reference to the list of particles which should be sorted.
Definition at line 198 of file MCParticleGraph.cc.
|
protected |
The final array of sorted particles which is stored in the DataStore.
Definition at line 200 of file MCParticleGraph.cc.
|
protected |
Vector of the particles that were already seen while sorting the graph.
Definition at line 204 of file MCParticleGraph.cc.
|
protected |
True if the production time information should be saved.
Definition at line 202 of file MCParticleGraph.cc.
|
protected |
True if the vertex information should be saved.
Definition at line 201 of file MCParticleGraph.cc.
|
protected |
The list of the vertices that will be visited.
Definition at line 205 of file MCParticleGraph.cc.