CMS 3D CMS Logo

cms::MuonMET Class Reference

#include <JetMETCorrections/Type1MET/interface/MuonMET.h>

Inheritance diagram for cms::MuonMET:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

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_


Detailed Description

Definition at line 33 of file MuonMET.h.


Constructor & Destructor Documentation

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]

Definition at line 65 of file MuonMET.cc.

00065 : alg_() {}

MuonMET::~MuonMET (  )  [virtual]

Definition at line 67 of file MuonMET.cc.

00067 {}


Member Function Documentation

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   }


Member Data Documentation

MuonMETAlgo cms::MuonMET::alg_ [private]

Definition at line 43 of file MuonMET.h.

edm::InputTag cms::MuonMET::metTypeInputTag_ [private]

Definition at line 44 of file MuonMET.h.

Referenced by MuonMET().

edm::InputTag cms::MuonMET::muonsInputTag_ [private]

Definition at line 46 of file MuonMET.h.

Referenced by MuonMET().

double cms::MuonMET::towerEtThreshold_ [private]

Definition at line 52 of file MuonMET.h.

Referenced by MuonMET().

TrackDetectorAssociator cms::MuonMET::trackAssociator_ [private]

Definition at line 47 of file MuonMET.h.

Referenced by MuonMET().

TrackAssociatorParameters cms::MuonMET::trackAssociatorParameters_ [private]

Definition at line 48 of file MuonMET.h.

Referenced by MuonMET().

edm::InputTag cms::MuonMET::uncorMETInputTag_ [private]

Definition at line 45 of file MuonMET.h.

Referenced by MuonMET().

bool cms::MuonMET::useHO_ [private]

Definition at line 51 of file MuonMET.h.

Referenced by MuonMET().

bool cms::MuonMET::useRecHits_ [private]

Definition at line 50 of file MuonMET.h.

Referenced by MuonMET().

bool cms::MuonMET::useTrackAssociatorPositions_ [private]

Definition at line 49 of file MuonMET.h.

Referenced by MuonMET().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:36:34 2009 for CMSSW by  doxygen 1.5.4