CMS 3D CMS Logo

cms::TauMET Class Reference

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

Inheritance diagram for cms::TauMET:

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

List of all members.

Public Member Functions

 TauMET (const edm::ParameterSet &)
 ~TauMET ()

Private Member Functions

virtual void beginJob (const edm::EventSetup &)
virtual void endJob ()
virtual void produce (edm::Event &, const edm::EventSetup &)

Private Attributes

TauMETAlgo _algo
string _correctorLabel
double _gammaIsolationMinPt
string _InputCaloJetsLabel
string _InputMETLabel
string _InputTausLabel
double _jetEMfracLimit
double _JetMatchDeltaR
double _jetPTthreshold
string _metType
double _seedTrackPt
double _TauEtaMax
double _TauMinEt
string _tauType
double _trackIsolationMinPt
bool _UseECALIsolation
bool _UseProngStructure
bool _UseSeedTrack
bool _UseTrackIsolation


Detailed Description

Definition at line 24 of file TauMET.h.


Constructor & Destructor Documentation

cms::TauMET::TauMET ( const edm::ParameterSet iConfig  )  [explicit]

Definition at line 23 of file TauMET.cc.

References _correctorLabel, _gammaIsolationMinPt, _InputCaloJetsLabel, _InputMETLabel, _InputTausLabel, _jetEMfracLimit, _JetMatchDeltaR, _jetPTthreshold, _metType, _seedTrackPt, _TauEtaMax, _TauMinEt, _tauType, _trackIsolationMinPt, _UseECALIsolation, _UseProngStructure, _UseSeedTrack, _UseTrackIsolation, and edm::ParameterSet::getParameter().

00023                                                : _algo() {
00024 
00025     _InputTausLabel    = iConfig.getParameter<string>("InputTausLabel");
00026     _tauType    = iConfig.getParameter<string>("tauType");
00027     _InputCaloJetsLabel    = iConfig.getParameter<string>("InputCaloJetsLabel");
00028     _jetPTthreshold      = iConfig.getParameter<double>("jetPTthreshold");
00029     _jetEMfracLimit      = iConfig.getParameter<double>("jetEMfracLimit");
00030     _correctorLabel      = iConfig.getParameter<string>("correctorLabel");
00031     _InputMETLabel    = iConfig.getParameter<string>("InputMETLabel");
00032     _metType    = iConfig.getParameter<string>("metType");
00033     _JetMatchDeltaR      = iConfig.getParameter<double>("JetMatchDeltaR");
00034     _TauMinEt      = iConfig.getParameter<double>("TauMinEt");
00035     _TauEtaMax      = iConfig.getParameter<double>("TauEtaMax");
00036     _UseSeedTrack      = iConfig.getParameter<bool>("UseSeedTrack");
00037     _seedTrackPt      = iConfig.getParameter<double>("seedTrackPt");
00038     _UseTrackIsolation      = iConfig.getParameter<bool>("UseTrackIsolation");
00039     _trackIsolationMinPt      = iConfig.getParameter<double>("trackIsolationMinPt");
00040     _UseECALIsolation      = iConfig.getParameter<bool>("UseECALIsolation");
00041     _gammaIsolationMinPt      = iConfig.getParameter<double>("gammaIsolationMinPt");
00042     _UseProngStructure      = iConfig.getParameter<bool>("UseProngStructure");
00043 
00044     if( _metType == "recoMET" ) {
00045       produces< METCollection   >();
00046     } else {
00047       produces< CaloMETCollection   >();
00048     }
00049 
00050   }

cms::TauMET::~TauMET (  ) 

Definition at line 53 of file TauMET.cc.

00053                   {
00054     // do anything here that needs to be done at desctruction time
00055     // (e.g. close files, deallocate resources etc.)
00056   }


Member Function Documentation

void cms::TauMET::beginJob ( const edm::EventSetup  )  [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 97 of file TauMET.cc.

00097 { }

void cms::TauMET::endJob ( void   )  [private, virtual]

Reimplemented from edm::EDProducer.

Definition at line 100 of file TauMET.cc.

00100 { }

void cms::TauMET::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDProducer.

Definition at line 59 of file TauMET.cc.

References _algo, _correctorLabel, _gammaIsolationMinPt, _InputCaloJetsLabel, _InputMETLabel, _InputTausLabel, _jetEMfracLimit, _JetMatchDeltaR, _jetPTthreshold, _metType, _seedTrackPt, _TauEtaMax, _TauMinEt, _trackIsolationMinPt, _UseECALIsolation, _UseProngStructure, _UseSeedTrack, _UseTrackIsolation, TestMuL1L2Filter_cff::cerr, lat::endl(), edm::Event::getByLabel(), JetCorrector::getJetCorrector(), output(), edm::Event::put(), and TauMETAlgo::run().

00059                                                                     {
00060 
00061     using namespace edm;
00062 
00063     Handle<CaloJetCollection> calojetHandle;
00064     iEvent.getByLabel(_InputCaloJetsLabel, calojetHandle);
00065     const JetCorrector* correctedjets = JetCorrector::getJetCorrector (_correctorLabel, iSetup);
00066 
00067     Handle<PFTauCollection> tauHandle;
00068     iEvent.getByLabel(_InputTausLabel,tauHandle);
00069 
00070     if( _metType == "recoCaloMET" ) {
00071       Handle<CaloMETCollection> metHandle;
00072       iEvent.getByLabel(_InputMETLabel,metHandle);
00073       std::auto_ptr< CaloMETCollection > output( new CaloMETCollection() );
00074       _algo.run(iEvent,iSetup,tauHandle,calojetHandle,_jetPTthreshold,_jetEMfracLimit,*correctedjets,*(metHandle.product()),
00075                 _JetMatchDeltaR,_TauMinEt,
00076                 _TauEtaMax,_UseSeedTrack,_seedTrackPt,_UseTrackIsolation,_trackIsolationMinPt,_UseECALIsolation,
00077                 _gammaIsolationMinPt,_UseProngStructure,&*output);
00078       iEvent.put( output );
00079     } else if( _metType == "recoMET" ) {
00080       Handle<METCollection> metHandle;
00081       iEvent.getByLabel(_InputMETLabel,metHandle);
00082       std::auto_ptr< METCollection > output( new METCollection() );
00083       _algo.run(iEvent,iSetup,tauHandle,calojetHandle,_jetPTthreshold,_jetEMfracLimit,*correctedjets,*(metHandle.product()),
00084                 _JetMatchDeltaR,_TauMinEt,
00085                 _TauEtaMax,_UseSeedTrack,_seedTrackPt,_UseTrackIsolation,_trackIsolationMinPt,_UseECALIsolation,
00086                 _gammaIsolationMinPt,_UseProngStructure,&*output);
00087       iEvent.put( output );
00088     } else {
00089       std::cerr << "Incorrect Met Type!!! " << std::endl;
00090       std::cerr << "Please re-run and set the metType to 'recoCaloMET' or 'recoMET' " << std::endl;
00091       return;
00092     }
00093 
00094   }


Member Data Documentation

TauMETAlgo cms::TauMET::_algo [private]

Definition at line 54 of file TauMET.h.

Referenced by produce().

string cms::TauMET::_correctorLabel [private]

Definition at line 40 of file TauMET.h.

Referenced by produce(), and TauMET().

double cms::TauMET::_gammaIsolationMinPt [private]

Definition at line 51 of file TauMET.h.

Referenced by produce(), and TauMET().

string cms::TauMET::_InputCaloJetsLabel [private]

Definition at line 37 of file TauMET.h.

Referenced by produce(), and TauMET().

string cms::TauMET::_InputMETLabel [private]

Definition at line 41 of file TauMET.h.

Referenced by produce(), and TauMET().

string cms::TauMET::_InputTausLabel [private]

Definition at line 35 of file TauMET.h.

Referenced by produce(), and TauMET().

double cms::TauMET::_jetEMfracLimit [private]

Definition at line 39 of file TauMET.h.

Referenced by produce(), and TauMET().

double cms::TauMET::_JetMatchDeltaR [private]

Definition at line 43 of file TauMET.h.

Referenced by produce(), and TauMET().

double cms::TauMET::_jetPTthreshold [private]

Definition at line 38 of file TauMET.h.

Referenced by produce(), and TauMET().

string cms::TauMET::_metType [private]

Definition at line 42 of file TauMET.h.

Referenced by produce(), and TauMET().

double cms::TauMET::_seedTrackPt [private]

Definition at line 47 of file TauMET.h.

Referenced by produce(), and TauMET().

double cms::TauMET::_TauEtaMax [private]

Definition at line 45 of file TauMET.h.

Referenced by produce(), and TauMET().

double cms::TauMET::_TauMinEt [private]

Definition at line 44 of file TauMET.h.

Referenced by produce(), and TauMET().

string cms::TauMET::_tauType [private]

Definition at line 36 of file TauMET.h.

Referenced by TauMET().

double cms::TauMET::_trackIsolationMinPt [private]

Definition at line 49 of file TauMET.h.

Referenced by produce(), and TauMET().

bool cms::TauMET::_UseECALIsolation [private]

Definition at line 50 of file TauMET.h.

Referenced by produce(), and TauMET().

bool cms::TauMET::_UseProngStructure [private]

Definition at line 52 of file TauMET.h.

Referenced by produce(), and TauMET().

bool cms::TauMET::_UseSeedTrack [private]

Definition at line 46 of file TauMET.h.

Referenced by produce(), and TauMET().

bool cms::TauMET::_UseTrackIsolation [private]

Definition at line 48 of file TauMET.h.

Referenced by produce(), and TauMET().


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