48 gp2pgp_(consumes<edm::Association<std::vector<pat::
PackedGenParticle> > >(iConfig.getParameter<edm::
InputTag>(
"packedGenParticles"))),
49 cut_(iConfig.getParameter<std::
string>(
"cut")),
50 clearDaughters_(iConfig.getParameter<bool>(
"clearDaughters")),
51 dropSpecific_(iConfig.getParameter<bool>(
"dropSpecific"))
53 produces<std::vector<reco::GenJet> >();
64 auto_ptr<vector<reco::GenJet> >
out(
new vector<reco::GenJet>());
65 out->reserve(
src->size());
72 if (!cut_(*it))
continue;
77 if (clearDaughters_) {
85 std::map<unsigned int,reco::CandidatePtr> ptrs;
86 for(
unsigned int i=0;
i<old.size();
i++)
93 for(std::map<unsigned int,reco::CandidatePtr>::iterator itp=ptrs.begin();itp!=ptrs.end();itp++)
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
virtual ~PATGenJetSlimmer()
const bool clearDaughters_
reset daughters to an empty vector
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
Matcher of reconstructed objects to L1 Muons.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
const StringCutObjectSelector< reco::GenJet > cut_
const edm::EDGetTokenT< edm::Association< std::vector< pat::PackedGenParticle > > > gp2pgp_
const bool dropSpecific_
drop the specific
Jets made from MC generator particles.
std::vector< CandidatePtr > daughters
collection of references to daughters
const edm::EDGetTokenT< edm::View< reco::GenJet > > src_
void clearDaughters()
clear daughter references
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
void setSpecific(const Specific &spec)
set the specific (note: responsibility of keeping it consistent with the jet daughers belongs to the ...
const daughters & daughterPtrVector() const
references to daughtes
void addDaughter(const CandidatePtr &)
add a daughter via a reference
PATGenJetSlimmer(const edm::ParameterSet &iConfig)