#include <MuonMET.h>
Public Member Functions | |
MuonMET (const edm::ParameterSet &) | |
MuonMET () | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
virtual | ~MuonMET () |
Private Attributes | |
MuonMETAlgo | alg_ |
edm::InputTag | metTypeInputTag_ |
edm::InputTag | muonDepValueMap_ |
edm::InputTag | muonsInputTag_ |
edm::InputTag | uncorMETInputTag_ |
MuonMET::MuonMET | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 47 of file MuonMET.cc.
References edm::ParameterSet::getParameter(), edm::InputTag::label(), metTypeInputTag_, muonDepValueMap_, muonsInputTag_, and uncorMETInputTag_.
: alg_() { metTypeInputTag_ = iConfig.getParameter<edm::InputTag>("metTypeInputTag"); uncorMETInputTag_ = iConfig.getParameter<edm::InputTag>("uncorMETInputTag"); muonsInputTag_ = iConfig.getParameter<edm::InputTag>("muonsInputTag"); muonDepValueMap_ = iConfig.getParameter<edm::InputTag>("muonMETDepositValueMapInputTag"); if( metTypeInputTag_.label() == "CaloMET" ) { produces<reco::CaloMETCollection>(); } else produces<reco::METCollection>(); }
MuonMET::MuonMET | ( | ) | [explicit] |
Definition at line 60 of file MuonMET.cc.
: alg_() {}
MuonMET::~MuonMET | ( | ) | [virtual] |
Definition at line 62 of file MuonMET.cc.
{}
void MuonMET::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 65 of file MuonMET.cc.
References alg_, edm::Event::getByLabel(), edm::InputTag::label(), metTypeInputTag_, muonDepValueMap_, muonsInputTag_, convertSQLitetoXML_cfg::output, edm::Handle< T >::product(), edm::Event::put(), MuonMETAlgo::run(), and uncorMETInputTag_.
{ using namespace edm; //get the muons Handle<View<reco::Muon> > inputMuons; iEvent.getByLabel( muonsInputTag_, inputMuons ); Handle<ValueMap<reco::MuonMETCorrectionData> > vm_muCorrData_h; iEvent.getByLabel( muonDepValueMap_, vm_muCorrData_h); if( metTypeInputTag_.label() == "CaloMET") { Handle<View<reco::CaloMET> > inputUncorMet; iEvent.getByLabel( uncorMETInputTag_, inputUncorMet ); //Get Inputs std::auto_ptr<reco::CaloMETCollection> output( new reco::CaloMETCollection() ); //Create empty output alg_.run(*(inputMuons.product()), *(vm_muCorrData_h.product()), *(inputUncorMet.product()), &*output); iEvent.put(output); //Put output into Event } else { Handle<View<reco::MET> > inputUncorMet; //Define Inputs iEvent.getByLabel( uncorMETInputTag_, inputUncorMet ); //Get Inputs std::auto_ptr<reco::METCollection> output( new reco::METCollection() ); //Create empty output alg_.run(*(inputMuons.product()), *(vm_muCorrData_h.product()),*(inputUncorMet.product()), &*output); iEvent.put(output); //Put output into Event } }
MuonMETAlgo cms::MuonMET::alg_ [private] |
edm::InputTag cms::MuonMET::metTypeInputTag_ [private] |
edm::InputTag cms::MuonMET::muonDepValueMap_ [private] |
edm::InputTag cms::MuonMET::muonsInputTag_ [private] |
edm::InputTag cms::MuonMET::uncorMETInputTag_ [private] |