template<class Evt, class Prt, class Vtx>
class MC::Loops< Evt, Prt, Vtx >
Definition at line 14 of file Loops.h.
template<class Evt , class Prt , class Vtx >
| int MC::Loops< Evt, Prt, Vtx >::findLoops |
( |
const Evt * |
evt, |
|
|
bool |
force |
|
) |
| |
|
inline |
Function that does the work to identify loops Pass the event of interest.
'force' allows the event to be re-searched even if it was previously.
Definition at line 47 of file Loops.h.
61 std::map<Prt, int> incycle;
64 for (
const auto &
p: *
m_evt){
65 if (!
p->end_vertex()||!
p->production_vertex()){
73 size_t minincycle =
m_evt->particles_size();
77 for (
const auto &
p: *
m_evt) {
80 if (incycle[
p] != 0)
continue;
85 auto ev =
p->end_vertex();
90 for (
auto& po: *
ev) goodo = goodo && (incycle[po] == -1);
91 if (goodo) incycle[
p] = -1;
95 auto pv =
p->production_vertex();
101 for (
auto&
pi:
ev->particles_in()) goodi = goodi && (incycle[
pi] == -1);
103 for (
auto ip =
ev->particles_in_const_begin();
104 ip !=
ev->particles_in_const_end();
107 goodi = goodi && (incycle[*
ip] == -1);
110 if (goodi) incycle[
p] = -1;
114 if (minincycle ==
unknown)
break;
121 for (
const auto &
p: *
m_evt){
122 if (incycle[
p] == 0) incycle[
p] = 1;
128 for (
auto &
v:
m_evt->vertices()) {
130 for (
auto iv =
m_evt->vertices_begin(); iv !=
m_evt->vertices_end(); ++iv) {
137 for (
auto& pin:
v->particles_in()){
138 if (incycle[pin] == 1) {
140 for (
auto ipin =
v->particles_in_const_begin();
141 ipin !=
v->particles_in_const_end();
143 if (incycle[*ipin] == 1) {
153 for (
const auto& pou: *
v) {
154 if (incycle[pou] == 1) {