#include <JetMETCorrections/Type1MET/interface/MuonMET.h>
Public Member Functions | |
MuonMET () | |
MuonMET (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
virtual | ~MuonMET () |
Private Attributes | |
MuonMETAlgo | alg_ |
edm::InputTag | metTypeInputTag_ |
edm::InputTag | muonsInputTag_ |
double | towerEtThreshold_ |
TrackDetectorAssociator | trackAssociator_ |
TrackAssociatorParameters | trackAssociatorParameters_ |
edm::InputTag | uncorMETInputTag_ |
bool | useHO_ |
bool | useRecHits_ |
bool | useTrackAssociatorPositions_ |
Definition at line 33 of file MuonMET.h.
MuonMET::MuonMET | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 44 of file MuonMET.cc.
References edm::ParameterSet::getParameter(), edm::InputTag::label(), TrackAssociatorParameters::loadParameters(), metTypeInputTag_, muonsInputTag_, towerEtThreshold_, trackAssociator_, trackAssociatorParameters_, uncorMETInputTag_, TrackDetectorAssociator::useDefaultPropagator(), useHO_, useRecHits_, and useTrackAssociatorPositions_.
00044 : alg_() 00045 { 00046 metTypeInputTag_ = iConfig.getParameter<edm::InputTag>("metTypeInputTag"); 00047 uncorMETInputTag_ = iConfig.getParameter<edm::InputTag>("uncorMETInputTag"); 00048 muonsInputTag_ = iConfig.getParameter<edm::InputTag>("muonsInputTag"); 00049 useTrackAssociatorPositions_ = iConfig.getParameter<bool>("useTrackAssociatorPositions"); 00050 useRecHits_ = iConfig.getParameter<bool>("useRecHits"); 00051 useHO_ = iConfig.getParameter<bool>("useHO"); 00052 towerEtThreshold_ = iConfig.getParameter<double>("towerEtThreshold"); 00053 00054 edm::ParameterSet trackAssociatorParams = 00055 iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters"); 00056 trackAssociatorParameters_.loadParameters(trackAssociatorParams); 00057 trackAssociator_.useDefaultPropagator(); 00058 00059 if( metTypeInputTag_.label() == "CaloMET" ) { 00060 produces<CaloMETCollection>(); 00061 } else 00062 produces<METCollection>(); 00063 00064 }
MuonMET::MuonMET | ( | ) | [explicit] |
MuonMET::~MuonMET | ( | ) | [virtual] |
void MuonMET::produce | ( | edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 70 of file MuonMET.cc.
References edm::Event::getByLabel(), output(), and edm::Event::put().
00071 { 00072 using namespace edm; 00073 00074 //get the muons 00075 Handle<View<reco::Muon> > inputMuons; 00076 iEvent.getByLabel( muonsInputTag_, inputMuons ); 00077 00078 if( metTypeInputTag_.label() == "CaloMET") 00079 { 00080 Handle<View<reco::CaloMET> > inputUncorMet; 00081 iEvent.getByLabel( uncorMETInputTag_, inputUncorMet ); //Get Inputs 00082 std::auto_ptr<CaloMETCollection> output( new CaloMETCollection() ); //Create empty output 00083 00084 //new MET cor 00085 alg_.run(iEvent, iSetup, *(inputUncorMet.product()), 00086 *(inputMuons.product()), 00087 trackAssociator_, 00088 trackAssociatorParameters_, 00089 &*output, 00090 useTrackAssociatorPositions_, 00091 useRecHits_, useHO_, 00092 towerEtThreshold_); 00093 00094 iEvent.put(output); //Put output into Event 00095 } 00096 else 00097 { 00098 Handle<View<reco::MET> > inputUncorMet; //Define Inputs 00099 iEvent.getByLabel( uncorMETInputTag_, inputUncorMet ); //Get Inputs 00100 std::auto_ptr<METCollection> output( new METCollection() ); //Create empty output 00101 00102 alg_.run(iEvent, iSetup, *(inputUncorMet.product()), 00103 *(inputMuons.product()), 00104 trackAssociator_, 00105 trackAssociatorParameters_, 00106 &*output, 00107 useTrackAssociatorPositions_, 00108 useRecHits_, useHO_, 00109 towerEtThreshold_); 00110 00111 iEvent.put( output ); //Put output into Event 00112 } 00113 }
MuonMETAlgo cms::MuonMET::alg_ [private] |
edm::InputTag cms::MuonMET::metTypeInputTag_ [private] |
edm::InputTag cms::MuonMET::muonsInputTag_ [private] |
double cms::MuonMET::towerEtThreshold_ [private] |
edm::InputTag cms::MuonMET::uncorMETInputTag_ [private] |
bool cms::MuonMET::useHO_ [private] |
bool cms::MuonMET::useRecHits_ [private] |