7 pdgID(cfg.getParameter<
std::vector<
int> >(
"PdgId")),
8 index(cfg.getParameter<
std::vector<unsigned> >(
"Index")),
14 <<
"Configuration Error :" 15 <<
"Sizes of array parameters 'PdgId' and 'Index' differ.";
20 edm::LogInfo(
"TagMode") <<
"Filter result in '" <<
tag <<
"', filtering disabled.";
27 LogDebug(
"FilterResult") << (result?
"Pass":
"Fail");
40 HepMC::GenEvent::particle_const_iterator
41 p(genEvent->particles_begin()),
42 p_end(genEvent->particles_end());
44 for (
unsigned i=0;
p!=p_end &&
i<=
maxIndex; ++
p, i++ ) {
45 LogDebug(
"Particle") <<
"index: " << i <<
" pdgID: " << (*p)->pdg_id();
46 for (
unsigned j = 0; j <
pdgID.size(); j++) {
T getUntrackedParameter(std::string const &, T const &) const
bool filter(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool pass(const edm::Event &) const
MCPdgIndexFilter(const edm::ParameterSet &)
const std::vector< unsigned > index
const edm::EDGetTokenT< edm::HepMCProduct > token_
const HepMC::GenEvent * GetEvent() const
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
const std::vector< int > pdgID
edm::EDPutTokenT< bool > putToken_