00001 #include "AtlfastEvent/ITransportedParticleFactory.h" 00002 00003 #include "AtlfastEvent/TransportedMonopole.h" 00004 #include "AtlfastEvent/TransportedSMParticle.h" 00005 #include "AtlfastEvent/Phi.h" 00006 00007 namespace Atlfast{ 00008 00009 ITransportedParticle* 00010 ITransportedParticleFactory::create(const HepMC::GenParticle* const &gen_particle, 00011 const std::vector<int> &monopoleIDs){ 00012 00013 //std::cout << "Particle ID = " << gen_particle->pdg_id() << std::flush; 00014 //if ( gen_particle->pdg_id() == monopoleID ){ 00015 IsThisAMonopole itam(gen_particle->pdg_id()); 00016 if ( find_if(monopoleIDs.begin(), monopoleIDs.end(),itam) != monopoleIDs.end() ){ 00017 //std::cout << ", making a TransportedMonopole " << std::endl; 00018 return new TransportedMonopole(gen_particle); 00019 00020 } else { 00021 00022 //std::cout << ", making a TransportedSMParticle" << std::endl; 00023 return new TransportedSMParticle(gen_particle); 00024 00025 } 00026 00027 } 00028 00029 }