55 virtual void endJob()
override ;
69 theMuonLabel_( iConfig.getParameter<edm::
InputTag>(
"MuonLabel" ) ),
70 thePatMuonToken_( mayConsume<pat::
MuonCollection>( theMuonLabel_ ) ),
72 patMuons_( iConfig.getParameter<bool>(
"PatMuons" ) ),
73 dbObjectLabel_( iConfig.getUntrackedParameter<std::
string>(
"DbObjectLabel",
"") ),
77 produces<pat::MuonCollection>();
79 produces<reco::MuonCollection>();
92 std::auto_ptr<T> pOut(
new T);
95 for(
typename T::const_iterator
muon = allMuons->begin();
muon != allMuons->end(); ++
muon ) {
98 double pt = (*corrector_)(*muon);
100 double eta = muon->eta();
101 double phi = muon->phi();
106 pOut->push_back(*newMuon);
virtual void endJob() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string dbObjectLabel_
#define DEFINE_FWK_MODULE(type)
virtual void produce(edm::Event &, const edm::EventSetup &) override
std::vector< Muon > MuonCollection
collection of Muon objects
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::ESHandle< MuScleFitDBobject > dbObject_
Container::value_type value_type
std::auto_ptr< T > applyCorrection(const edm::Handle< T > &allMuons)
virtual void beginJob() override
boost::shared_ptr< MomentumScaleCorrector > corrector_
unsigned long long dbObjectCacheId_
edm::EDGetTokenT< reco::MuonCollection > theRecoMuonToken_
edm::InputTag theMuonLabel_
T const * product() const
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
MuScleFitMuonProducer(const edm::ParameterSet &)
edm::EDGetTokenT< pat::MuonCollection > thePatMuonToken_