53 produces<reco::GenParticleRefVector>();
56 if ( iConfig.
exists(
"withTop") ) {
76 iEvent.
getByLabel (inputTagGenParticles_, particles );
77 edm::LogVerbatim(
"PartonSelector") <<
"=== GenParticle size:" << particles->size();
82 for (
size_t m = 0;
m < particles->size();
m++) {
89 bool isAParton =
false;
90 bool isALepton =
false;
97 (flavour == 6 && withTop) ||
98 flavour == 21 ) isAParton =
true;
104 flavour == 16 ) isALepton =
true;
108 if( aParticle.
status() == 3 && isAParton ) {
114 int nparton_daughters = 0;
120 if( (daughterFlavour == 1 || daughterFlavour == 2 || daughterFlavour == 3 ||
121 daughterFlavour == 4 || daughterFlavour == 5 || daughterFlavour == 6 || daughterFlavour == 21)) {
126 if(nparton_daughters == 0){
136 if( withLeptons && aParticle.
status() == 3 && isALepton ) {
143 iEvent.
put( thePartons );
T getParameter(std::string const &) const
virtual int pdgId() const
PDG identifier.
#define DEFINE_FWK_MODULE(type)
virtual int status() const
status word
edm::Ref< GenParticleCollection > GenParticleRef
persistent reference to a GenParticle
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::InputTag inputTagGenParticles_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual size_t numberOfDaughters() const
number of daughters
virtual const Candidate * daughter(size_type) const
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
PartonSelector(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual int pdgId() const =0
PDG identifier.
TString nPart(Int_t part, TString string, TString delimit=";", Bool_t removerest=true)
virtual void produce(edm::Event &, const edm::EventSetup &)
int flavour(const Candidate &part)