HepMC event record
Public Member Functions | Private Member Functions | Private Attributes
FindParticles Class Reference

Detailed Description

Search engine for GenEvent class.

Examples:
basic_tree.cc.

Definition at line 37 of file build/outputs/include/HepMC/Search/FindParticles.h.

#include <FindParticles.h>

+ Collaboration diagram for FindParticles:

Public Member Functions

 FindParticles (const GenEvent &evt, FilterEvent filter_type, FilterList filter_list=FilterList())
 GenEvent-based constructor. More...
 
 FindParticles (const GenParticlePtr &p, Relationship filter_type, FilterList filter_list=FilterList())
 GenParticle-based constructor. More...
 
 FindParticles (const GenVertexPtr &v, Relationship filter_type, FilterList filter_list=FilterList())
 GenVertex-based constructor. More...
 
void narrow_down (FilterList filter_list)
 Narrow down the results applying additional filters. More...
 
const vector< GenParticlePtr > & results () const
 Get results. More...
 
 FindParticles (const GenEvent &evt, FilterEvent filter_type, FilterList filter_list=FilterList())
 GenEvent-based constructor. More...
 
 FindParticles (const GenParticlePtr &p, Relationship filter_type, FilterList filter_list=FilterList())
 GenParticle-based constructor. More...
 
 FindParticles (const GenVertexPtr &v, Relationship filter_type, FilterList filter_list=FilterList())
 GenVertex-based constructor. More...
 
void narrow_down (FilterList filter_list)
 Narrow down the results applying additional filters. More...
 
const vector< GenParticlePtr > & results () const
 Get results. More...
 

Private Member Functions

bool passed_all_filters (const GenParticlePtr &p, FilterList &filter_list)
 Check if particle passed all filters. More...
 
void recursive_check_ancestors (const GenVertexPtr &v, FilterList &filter_list)
 Check if all ancestors passed the filter. More...
 
void recursive_check_descendants (const GenVertexPtr &v, FilterList &filter_list)
 Check if all descendants passed the filter. More...
 
bool passed_all_filters (const GenParticlePtr &p, FilterList &filter_list)
 Check if particle passed all filters. More...
 
void recursive_check_ancestors (const GenVertexPtr &v, FilterList &filter_list)
 Check if all ancestors passed the filter. More...
 
void recursive_check_descendants (const GenVertexPtr &v, FilterList &filter_list)
 Check if all descendants passed the filter. More...
 

Private Attributes

vector< GenParticlePtrm_results
 List of results. More...
 
vector< GenVertexPtrm_checked_vertices
 List of already checked vertices. More...
 

Constructor & Destructor Documentation

◆ FindParticles() [1/6]

FindParticles ( const GenEvent evt,
FilterEvent  filter_type,
FilterList  filter_list = FilterList() 
)

GenEvent-based constructor.

Definition at line 22 of file FindParticles.cc.

References FindParticles::m_results, GenEvent::particles(), and FindParticles::passed_all_filters().

◆ FindParticles() [2/6]

FindParticles ( const GenParticlePtr p,
Relationship  filter_type,
FilterList  filter_list = FilterList() 
)

◆ FindParticles() [3/6]

FindParticles ( const GenVertexPtr v,
Relationship  filter_type,
FilterList  filter_list = FilterList() 
)

◆ FindParticles() [4/6]

FindParticles ( const GenEvent evt,
FilterEvent  filter_type,
FilterList  filter_list = FilterList() 
)

GenEvent-based constructor.

◆ FindParticles() [5/6]

FindParticles ( const GenParticlePtr p,
Relationship  filter_type,
FilterList  filter_list = FilterList() 
)

GenParticle-based constructor.

◆ FindParticles() [6/6]

FindParticles ( const GenVertexPtr v,
Relationship  filter_type,
FilterList  filter_list = FilterList() 
)

GenVertex-based constructor.

Member Function Documentation

◆ narrow_down() [1/2]

void narrow_down ( FilterList  filter_list)

Narrow down the results applying additional filters.

Examples:
basic_tree.cc.

Definition at line 114 of file FindParticles.cc.

References FindParticles::m_results, and FindParticles::passed_all_filters().

◆ narrow_down() [2/2]

void narrow_down ( FilterList  filter_list)

Narrow down the results applying additional filters.

◆ passed_all_filters() [1/2]

bool passed_all_filters ( const GenParticlePtr p,
FilterList filter_list 
)
private

Check if particle passed all filters.

Definition at line 136 of file FindParticles.cc.

References FilterList::filters(), and Filter::passed_filter().

◆ passed_all_filters() [2/2]

bool passed_all_filters ( const GenParticlePtr p,
FilterList filter_list 
)
private

Check if particle passed all filters.

◆ recursive_check_ancestors() [1/2]

void recursive_check_ancestors ( const GenVertexPtr v,
FilterList filter_list 
)
private

Check if all ancestors passed the filter.

Recursively check all particles and production vertices of these particles

◆ recursive_check_ancestors() [2/2]

void recursive_check_ancestors ( const GenVertexPtr v,
FilterList filter_list 
)
private

Check if all ancestors passed the filter.

Recursively check all particles and production vertices of these particles

Definition at line 147 of file FindParticles.cc.

References FindParticles::m_checked_vertices, FindParticles::m_results, and FindParticles::passed_all_filters().

◆ recursive_check_descendants() [1/2]

void recursive_check_descendants ( const GenVertexPtr v,
FilterList filter_list 
)
private

Check if all descendants passed the filter.

Recursively check all particles and end vertices of these particles

◆ recursive_check_descendants() [2/2]

void recursive_check_descendants ( const GenVertexPtr v,
FilterList filter_list 
)
private

Check if all descendants passed the filter.

Recursively check all particles and end vertices of these particles

Definition at line 166 of file FindParticles.cc.

References FindParticles::m_checked_vertices, FindParticles::m_results, and FindParticles::passed_all_filters().

◆ results() [1/2]

const vector<GenParticlePtr>& results ( ) const
inline

Get results.

Definition at line 77 of file include/HepMC/Search/FindParticles.h.

References FindParticles::m_results.

◆ results() [2/2]

const vector<GenParticlePtr>& results ( ) const
inline

Get results.

Examples:
basic_tree.cc.

Definition at line 77 of file build/outputs/include/HepMC/Search/FindParticles.h.

References FindParticles::m_results.

Field Documentation

◆ m_checked_vertices

vector< GenVertexPtr > m_checked_vertices
private

List of already checked vertices.

Definition at line 84 of file build/outputs/include/HepMC/Search/FindParticles.h.

◆ m_results

vector< GenParticlePtr > m_results
private

List of results.

Definition at line 83 of file build/outputs/include/HepMC/Search/FindParticles.h.


The documentation for this class was generated from the following files: