47 linkToPackedPF_(iConfig.getParameter<
bool>("linkToPackedPFCandidates")),
48 saveTeVMuons_(iConfig.getParameter<std::
string>("saveTeVMuons")),
49 modifyMuon_(iConfig.getParameter<
bool>("modifyMuons"))
55 muonModifier_->setConsumes(sumes);
57 muonModifier_.reset(
nullptr);
59 produces<std::vector<pat::Muon> >();
60 if (linkToPackedPF_) {
62 pf2pc_ = consumes<edm::Association<pat::PackedCandidateCollection>>(iConfig.
getParameter<
edm::InputTag>(
"packedPFCandidates"));
79 auto_ptr<vector<pat::Muon> >
out(
new vector<pat::Muon>());
80 out->reserve(
src->size());
84 std::map<reco::CandidatePtr,pat::PackedCandidateRef> mu2pc;
90 for (
unsigned int i = 0,
n = pf->size();
i <
n; ++
i) {
96 for (vector<pat::Muon>::const_iterator it =
src->begin(), ed =
src->end(); it != ed; ++it) {
T getParameter(std::string const &) const
void embedDytMuon()
embed reference to the above dyt Track
bool isNonnull() const
Checks for non-null.
void embedTpfmsMuon()
embed reference to the above tpfms Track
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_
StringCutObjectSelector< pat::Muon > saveTeVMuons_
#define DEFINE_FWK_MODULE(type)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
std::vector< pat::PackedCandidate > PackedCandidateCollection
std::unique_ptr< pat::ObjectModifier< pat::Muon > > muonModifier_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
reco::MuonRef muonRef() const
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
std::vector< Muon > MuonCollection
Particle reconstructed by the particle flow algorithm.
edm::EDGetTokenT< reco::PFCandidateCollection > pf_
void embedPickyMuon()
embed reference to the above picky Track
Analysis-level muon class.
edm::Ptr< reco::Candidate > refToOrig_
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) overridefinal