12#include "CLHEP/Geometry/Point3D.h"
18 const IInterface* parent)
22 declareInterface<IGenParticleSelector>(
this);
31 return StatusCode::SUCCESS;
36 return StatusCode::SUCCESS;
39std::vector<HepMC::ConstGenParticlePtr>*
42 if (! SimTracks)
return nullptr;
44 std::vector<HepMC::ConstGenParticlePtr>* genSignal =
45 new std::vector<HepMC::ConstGenParticlePtr>;
50 for( ; itCollision != SimTracks->
end(); ++itCollision ) {
51 const HepMC::GenEvent* genEvent = *itCollision;
53 for (
const auto& particle: *genEvent) {
58 int pdgCode = particle->pdg_id();
63 if (std::fabs(
charge)<0.5)
continue;
65 genSignal->push_back(particle);
double charge(const T &p)
ATLAS-specific HepMC functions.
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
virtual StatusCode initialize()
initialize
virtual StatusCode finalize()
InDetHaloSelector(const std::string &type, const std::string &name, const IInterface *parent)
virtual std::vector< HepMC::ConstGenParticlePtr > * selectGenSignal(const McEventCollection *) const
main method performing the genparticle selection; it works on the entire collection.
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
double charge(const T &p)
bool isNucleus(const T &p)
PDG rule 16 Nuclear codes are given as 10-digit numbers ±10LZZZAAAI.