40 src_(consumes<pat::
MuonCollection>(iConfig.getParameter<edm::InputTag>(
"src"))),
41 linkToPackedPF_(iConfig.getParameter<bool>(
"linkToPackedPFCandidates"))
43 produces<std::vector<pat::Muon> >();
58 auto_ptr<vector<pat::Muon> >
out(
new vector<pat::Muon>());
59 out->reserve(
src->size());
61 std::map<reco::CandidatePtr,pat::PackedCandidateRef> mu2pc;
62 if (linkToPackedPF_) {
67 for (
unsigned int i = 0,
n = pf->size();
i <
n; ++
i) {
73 for (vector<pat::Muon>::const_iterator it =
src->begin(), ed =
src->end(); it != ed; ++it) {
76 if (linkToPackedPF_) {
T getParameter(std::string const &) const
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
edm::EDGetTokenT< pat::MuonCollection > src_
PATMuonSlimmer(const edm::ParameterSet &iConfig)
virtual ~PATMuonSlimmer()
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > pf2pc_
#define DEFINE_FWK_MODULE(type)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
bool isNonnull() const
Checks for non-null.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
reco::MuonRef muonRef() const
std::vector< Muon > MuonCollection
Particle reconstructed by the particle flow algorithm.
edm::EDGetTokenT< reco::PFCandidateCollection > pf_
Analysis-level muon class.
edm::Ptr< reco::Candidate > refToOrig_