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

#include <AncestorFinder.h>

Inheritance diagram for IDTPM2::PtPdgIdHelper< T, U >:
Collaboration diagram for IDTPM2::PtPdgIdHelper< T, U >:

Public Member Functions

 PtPdgIdHelper (ConfiguredValue< float > pt={}, const ConfiguredValue< int > pdgid={})
bool operator() (const T *t) const
 this is quite clever - can pass the class instance and use it like a function

Private Attributes

ConfiguredValue< float > m_pt
ConfiguredValue< int > m_pdgid

Detailed Description

template<typename T, typename U = T>
class IDTPM2::PtPdgIdHelper< T, U >

Definition at line 138 of file AncestorFinder.h.

Constructor & Destructor Documentation

◆ PtPdgIdHelper()

template<typename T, typename U = T>
IDTPM2::PtPdgIdHelper< T, U >::PtPdgIdHelper ( ConfiguredValue< float > pt = {},
const ConfiguredValue< int > pdgid = {} )
inline

Definition at line 142 of file AncestorFinder.h.

142 :
143 m_pt(pt), m_pdgid(pdgid) {}
ConfiguredValue< float > m_pt
ConfiguredValue< int > m_pdgid

Member Function Documentation

◆ operator()()

template<typename T, typename U = T>
bool IDTPM2::PtPdgIdHelper< T, U >::operator() ( const T * t) const
inlinevirtual

this is quite clever - can pass the class instance and use it like a function

Implements IDTPM2::IPredicate< T >.

Definition at line 146 of file AncestorFinder.h.

146 {
147 if ( std::abs(t->pt()) < m_pt ) return false;
148 if ( std::abs(t->template as<U>()->pdgId()) != m_pdgid ) return false;
149 return true;
150 }

Member Data Documentation

◆ m_pdgid

template<typename T, typename U = T>
ConfiguredValue<int> IDTPM2::PtPdgIdHelper< T, U >::m_pdgid
private

Definition at line 155 of file AncestorFinder.h.

◆ m_pt

template<typename T, typename U = T>
ConfiguredValue<float> IDTPM2::PtPdgIdHelper< T, U >::m_pt
private

Definition at line 154 of file AncestorFinder.h.


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