35 virtual void endJob()
override ;
59 , ptMin_ ( iConfig.getParameter<double> (
"ptMin") )
60 , maxPTDiff_ ( iConfig.getParameter<double> (
"maxPTDiff") )
61 , taggingMode_ ( iConfig.getParameter<bool> (
"taggingMode") )
62 , debug_ ( iConfig.getParameter<bool> (
"debug") )
65 produces<reco::PFCandidateCollection>(
"muons");
85 bool foundMuon =
false;
87 auto_ptr< reco::PFCandidateCollection >
98 if ( muon->isTrackerMuon()
99 && muon->isGlobalMuon()
100 && fabs(muon->innerTrack()->pt()/muon->globalTrack()->pt() - 1) <=
maxPTDiff_
106 pOutputCandidateCollection->push_back( cand );
109 cout << cand << endl;
110 cout <<
"\t" <<
"tracker pT = ";
111 if (muon->isTrackerMuon())
cout << muon->innerTrack()->pt();
112 else cout <<
"(n/a)";
114 cout <<
"\t" <<
"global fit pT = ";
115 if (muon->isGlobalMuon())
cout << muon->globalTrack()->pt();
116 else cout <<
"(n/a)";
121 iEvent.
put( pOutputCandidateCollection,
"muons" );
123 bool pass = !foundMuon;
125 iEvent.
put( std::auto_ptr<bool>(
new bool(pass)) );
edm::EDGetTokenT< reco::PFCandidateCollection > tokenPFCandidates_
virtual bool filter(edm::Event &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
InconsistentMuonPFCandidateFilter(const edm::ParameterSet &)
virtual double pt() const
transverse momentum
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
reco::MuonRef muonRef() const
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
virtual void beginJob() override
~InconsistentMuonPFCandidateFilter()
virtual void endJob() override
Particle reconstructed by the particle flow algorithm.
virtual ParticleType particleId() const