BOSS 7.1.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
virtual GenIMCselectorcreate () const =0
 
virtual bool operator() (const Particle *const) const =0
 
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 {
12 m_TypeList.push_back(ParticleType);
13}

◆ IsGenType() [2/3]

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

Definition at line 14 of file IsGenType.cxx.

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

◆ IsGenType() [3/3]

IsGenType::IsGenType ( const IsGenType src)

Definition at line 20 of file IsGenType.cxx.

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

Member Function Documentation

◆ create()

GenIMCselector * IsGenType::create ( ) const
virtual

Implements GenIMCselector.

Definition at line 33 of file IsGenType.cxx.

33{return new IsGenType(*this);}

◆ operator()() [1/2]

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

Definition at line 30 of file IsGenType.cxx.

30 {
31 return this->operator()(&p);
32}
virtual bool operator()(const Particle *const p) const
Definition: IsGenType.cxx:22

◆ operator()() [2/2]

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

Implements GenIMCselector.

Definition at line 22 of file IsGenType.cxx.

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

Referenced by operator()().


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