BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
IsGenType Class Reference

#include <IsGenType.h>

Inheritance diagram for IsGenType:

Public Member Functions

 IsGenType (int ParticleType)
 IsGenType (std::vector< int > ParticleTypeList)
 IsGenType (const IsGenType &src)
GenIMCselectorcreate () const
virtual bool operator() (const Particle *const p) const
virtual bool operator() (const Particle &p) const
Public Member Functions inherited from GenIMCselector
bool operator() (const Particle &p)
virtual ~GenIMCselector ()

Detailed Description

Definition at line 18 of file IsGenType.h.

Constructor & Destructor Documentation

◆ IsGenType() [1/3]

IsGenType::IsGenType ( int ParticleType)

Definition at line 11 of file IsGenType.cxx.

11{ m_TypeList.push_back( ParticleType ); }

Referenced by create(), and IsGenType().

◆ IsGenType() [2/3]

IsGenType::IsGenType ( std::vector< int > ParticleTypeList)

Definition at line 12 of file IsGenType.cxx.

12 {
13 vector<int>::const_iterator itype = ParticleTypeList.begin();
14 for ( ; itype != ParticleTypeList.end(); ++itype ) { m_TypeList.push_back( ( *itype ) ); }
15}

◆ IsGenType() [3/3]

IsGenType::IsGenType ( const IsGenType & src)

Definition at line 16 of file IsGenType.cxx.

17 : GenIMCselector(), m_TypeList( rhs.m_TypeList ) {}

Member Function Documentation

◆ create()

GenIMCselector * IsGenType::create ( ) const
virtual

Implements GenIMCselector.

Definition at line 29 of file IsGenType.cxx.

29{ return new IsGenType( *this ); }
IsGenType(int ParticleType)
Definition IsGenType.cxx:11

◆ operator()() [1/2]

bool IsGenType::operator() ( const Particle & p) const
virtual

Definition at line 28 of file IsGenType.cxx.

28{ return this->operator()( &p ); }
virtual bool operator()(const Particle *const p) const
Definition IsGenType.cxx:19

◆ operator()() [2/2]

bool IsGenType::operator() ( const Particle *const p) const
virtual

Implements GenIMCselector.

Definition at line 19 of file IsGenType.cxx.

19 {
20 vector<int>::const_iterator itype = m_TypeList.begin();
21 for ( ; itype != m_TypeList.end(); ++itype )
22 {
23 if ( abs( p->pdg_id() ) == ( *itype ) ) return true;
24 }
25 return false;
26}

Referenced by operator()().


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