52 produces<reco::GenParticleRefVector>();
55 if (iConfig.
exists(
"acceptNoDaughters")) {
56 acceptNoDaughters = iConfig.
getParameter<
bool>(
"acceptNoDaughters");
58 acceptNoDaughters =
false;
60 if (iConfig.
exists(
"skipFirstN")) {
61 skipFirstN = iConfig.
getParameter<
unsigned int>(
"skipFirstN");
65 if (iConfig.
exists(
"withTop")) {
85 auto thePartons = std::make_unique<GenParticleRefVector>();
94 bool isAParton =
false;
95 bool isALepton =
false;
104 if (aParticle.
status() == 3 && isAParton) {
110 int nparton_daughters = 0;
114 if ((daughterFlavour == 1 || daughterFlavour == 2 || daughterFlavour == 3 || daughterFlavour == 4 ||
115 daughterFlavour == 5 || daughterFlavour == 6 || daughterFlavour == 21)) {
119 if (nparton_daughters == 0) {
Log< level::Info, true > LogVerbatim
T getParameter(std::string const &) const
~PartonSelector() override
bool exists(std::string const ¶meterName) const
checks if a parameter exists
size_t numberOfDaughters() const override
number of daughters
edm::EDGetTokenT< reco::GenParticleCollection > tokenGenParticles_
int status() const final
status word
int pdgId() const final
PDG identifier.
Abs< T >::type abs(const T &t)
PartonSelector(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
virtual int pdgId() const =0
PDG identifier.
TString nPart(Int_t part, TString string, TString delimit=";", Bool_t removerest=true)
edm::Ref< edm::HepMCProduct, HepMC::GenParticle > GenParticleRef
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...