98 template<
typename GenObject_type>
99 GenParticles_type<GenObject_type> operator()(GenObject_type input)
const {
100 for(
auto obj: m_checkedObjects) {
103 m_checkedObjects.clear();
104 return _recursive(input);
109 template<
typename GenObject_type,
typename dummy>
110 GenParticles_type<GenObject_type> _recursive(GenObject_type input)
const ;
112 template<typename GenObject_type, typename std::enable_if<std::is_same<GenVertex, typename std::remove_const<typename GenObject_type::element_type>::type>::value,
int*>::type =
nullptr>
113 GenParticles_type<GenObject_type> _recursive(GenObject_type input)
const {
115 GenParticles_type <GenObject_type> results;
116 if ( !input )
return results;
117 for(
auto v: m_checkedObjects) {
118 if(v->id() == input->id())
return results;
123 for(
auto p: m_applyRelation(input)) {
124 results.emplace_back(p);
125 GenParticles_type <GenObject_type> tmp = _recursive(p);
126 results.insert(results.end(),
127 std::make_move_iterator(tmp.begin()),
128 std::make_move_iterator(tmp.end()));
134 template<typename GenObject_type, typename std::enable_if<std::is_same<GenParticle, typename std::remove_const<typename GenObject_type::element_type>::type>::value,
int*>::type =
nullptr>
135 GenParticles_type<GenObject_type> _recursive(GenObject_type input)
const {
136 return _recursive(m_applyRelation.vertex(input));
144 virtual int id()
const = 0;
147 template<
typename ID_type>
151 constexpr idInterface(ID_type genObject): m_object(genObject) {}
152 int id()
const {
return m_object->id();}
160 Relation_type m_applyRelation;
161 mutable std::vector<hasId*> m_checkedObjects;
173 template<
typename GenObject_type,
typename dummy>
174 GenParticles_type<GenObject_type> operator()(GenObject_type input)
const;
176 template<typename GenObject_type, typename std::enable_if<std::is_same<GenVertex, typename std::remove_const<typename GenObject_type::element_type>::type>::value,
int*>::type =
nullptr>
177 GenParticles_type<GenObject_type> operator()(GenObject_type input)
const {
return input->particles_in();}
179 template<typename GenObject_type, typename std::enable_if<std::is_same<GenParticle, typename std::remove_const<typename GenObject_type::element_type>::type>::value,
int*>::type =
nullptr>
180 GenParticles_type<GenObject_type> operator()(GenObject_type input)
const {
return (*
this)(vertex(input));}
182 template<
typename GenObject_type>
183 GenVertex_type<GenObject_type> vertex(GenObject_type input)
const {
return input->production_vertex();}
195 template<
typename GenObject_type,
typename dummy>
196 GenParticles_type<GenObject_type> operator()(GenObject_type input)
const;
198 template<typename GenObject_type, typename std::enable_if<std::is_same<GenVertex, typename std::remove_const<typename GenObject_type::element_type>::type>::value,
int*>::type =
nullptr>
199 GenParticles_type<GenObject_type> operator()(GenObject_type input)
const {
return input->particles_out();}
201 template<typename GenObject_type, typename std::enable_if<std::is_same<GenParticle, typename std::remove_const<typename GenObject_type::element_type>::type>::value,
int*>::type =
nullptr>
202 GenParticles_type<GenObject_type> operator()(GenObject_type input)
const {
return (*
this)(vertex(input));}
204 template<
typename GenObject_type>
205 GenVertex_type<GenObject_type> vertex(GenObject_type input)
const {
return input->end_vertex();}
Definition of class GenParticle.