ATLAS Offline Software
Loading...
Searching...
No Matches
IDTPM2::PdgIdHelper< T > Class Template Reference

and a specific PDG ID helper, so we can select particles of a particular type NB: this is a class, since we will want to decode with pdg id this is and store it dureing the initialise in the class itself More...

#include <AncestorFinder.h>

Inheritance diagram for IDTPM2::PdgIdHelper< T >:
Collaboration diagram for IDTPM2::PdgIdHelper< T >:

Public Member Functions

 PdgIdHelper (int pdgid)
bool operator() (const T *t) const
 this is quite clever - if we want to pass in an actual class the if we defined operator() then for an instance of object called, say "aclass" then we can call aclass() is if aclass was actually a function - totally wild !

Private Attributes

int m_pdgid

Detailed Description

template<typename T>
class IDTPM2::PdgIdHelper< T >

and a specific PDG ID helper, so we can select particles of a particular type NB: this is a class, since we will want to decode with pdg id this is and store it dureing the initialise in the class itself

Definition at line 97 of file AncestorFinder.h.

Constructor & Destructor Documentation

◆ PdgIdHelper()

template<typename T>
IDTPM2::PdgIdHelper< T >::PdgIdHelper ( int pdgid)
inline

Definition at line 101 of file AncestorFinder.h.

and a specific PDG ID helper, so we can select particles of a particular type NB: this is a class,...

Member Function Documentation

◆ operator()()

template<typename T>
bool IDTPM2::PdgIdHelper< T >::operator() ( const T * t) const
inlinevirtual

this is quite clever - if we want to pass in an actual class the if we defined operator() then for an instance of object called, say "aclass" then we can call aclass() is if aclass was actually a function - totally wild !

Implements IDTPM2::IPredicate< T >.

Definition at line 107 of file AncestorFinder.h.

107{ return std::abs(t->pdgId()) == m_pdgid; }

Member Data Documentation

◆ m_pdgid

template<typename T>
int IDTPM2::PdgIdHelper< T >::m_pdgid
private

Definition at line 111 of file AncestorFinder.h.


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