#include <IsCharged.h>
Inheritance diagram for HepMC_helper::IsCharged:
Public Member Functions | |
IsCharged () | |
IMCselector * | create () const |
bool | operator() (const Particle *const p) const |
bool | operator() (const Particle &p) const |
bool | operator() (const Particle &p) |
Private Attributes | |
Atlfast::ChargeService | m_chargeService |
Definition at line 17 of file IsCharged.h.
HepMC_helper::IsCharged::IsCharged | ( | ) |
IMCselector * HepMC_helper::IsCharged::create | ( | ) | const [virtual] |
Implements HepMC_helper::IMCselector.
Definition at line 165 of file HepMC_helper.cxx.
00165 { 00166 IMCselector* p = 0; 00167 try{ 00168 p = new IsCharged(*this); 00169 }catch(std::string errMsg){ 00170 throw errMsg; 00171 } 00172 return p; 00173 }
bool HepMC_helper::IsCharged::operator() | ( | const Particle *const | p | ) | const [virtual] |
Implements HepMC_helper::IMCselector.
Definition at line 150 of file HepMC_helper.cxx.
00150 { 00151 00152 double charge = m_chargeService.operator()(p); 00153 if ( charge == 0 ) return false; 00154 if ( charge == -999. ){ 00155 std::cout << "HepMC_helper::IsCharged ignoring this one" << std::endl; 00156 return false; 00157 } 00158 return true ; 00159 }
bool HepMC_helper::IsCharged::operator() | ( | const Particle & | p | ) | const |
bool HepMC_helper::IMCselector::operator() | ( | const Particle & | p | ) | [inline, inherited] |
Definition at line 24 of file IsCharged.h.