CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
cms::TauMET Class Reference

#include <TauMET.h>

Inheritance diagram for cms::TauMET:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 TauMET (const edm::ParameterSet &)
 
 ~TauMET ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 24 of file TauMET.h.

Constructor & Destructor Documentation

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

Definition at line 26 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().

26  : _algo() {
27 
28  _InputTausLabel = iConfig.getParameter<std::string>("InputTausLabel");
29  _tauType = iConfig.getParameter<std::string>("tauType");
30  _InputCaloJetsLabel = iConfig.getParameter<std::string>("InputCaloJetsLabel");
31  _jetPTthreshold = iConfig.getParameter<double>("jetPTthreshold");
32  _jetEMfracLimit = iConfig.getParameter<double>("jetEMfracLimit");
33  _correctorLabel = iConfig.getParameter<std::string>("correctorLabel");
34  _InputMETLabel = iConfig.getParameter<std::string>("InputMETLabel");
35  _metType = iConfig.getParameter<std::string>("metType");
36  _JetMatchDeltaR = iConfig.getParameter<double>("JetMatchDeltaR");
37  _TauMinEt = iConfig.getParameter<double>("TauMinEt");
38  _TauEtaMax = iConfig.getParameter<double>("TauEtaMax");
39  _UseSeedTrack = iConfig.getParameter<bool>("UseSeedTrack");
40  _seedTrackPt = iConfig.getParameter<double>("seedTrackPt");
41  _UseTrackIsolation = iConfig.getParameter<bool>("UseTrackIsolation");
42  _trackIsolationMinPt = iConfig.getParameter<double>("trackIsolationMinPt");
43  _UseECALIsolation = iConfig.getParameter<bool>("UseECALIsolation");
44  _gammaIsolationMinPt = iConfig.getParameter<double>("gammaIsolationMinPt");
45  _UseProngStructure = iConfig.getParameter<bool>("UseProngStructure");
46 
47  if( _metType == "recoMET" ) {
48  produces< METCollection >();
49  } else {
50  produces< CaloMETCollection >();
51  }
52 
53  }
T getParameter(std::string const &) const
std::string _InputCaloJetsLabel
Definition: TauMET.h:37
double _trackIsolationMinPt
Definition: TauMET.h:49
std::string _metType
Definition: TauMET.h:42
bool _UseECALIsolation
Definition: TauMET.h:50
double _jetEMfracLimit
Definition: TauMET.h:39
std::string _InputTausLabel
Definition: TauMET.h:35
double _TauEtaMax
Definition: TauMET.h:45
std::string _correctorLabel
Definition: TauMET.h:40
std::string _tauType
Definition: TauMET.h:36
bool _UseProngStructure
Definition: TauMET.h:52
std::string _InputMETLabel
Definition: TauMET.h:41
double _TauMinEt
Definition: TauMET.h:44
TauMETAlgo _algo
Definition: TauMET.h:54
double _gammaIsolationMinPt
Definition: TauMET.h:51
bool _UseTrackIsolation
Definition: TauMET.h:48
bool _UseSeedTrack
Definition: TauMET.h:46
double _jetPTthreshold
Definition: TauMET.h:38
double _seedTrackPt
Definition: TauMET.h:47
double _JetMatchDeltaR
Definition: TauMET.h:43
cms::TauMET::~TauMET ( )

Definition at line 56 of file TauMET.cc.

56  {
57  // do anything here that needs to be done at desctruction time
58  // (e.g. close files, deallocate resources etc.)
59  }

Member Function Documentation

void cms::TauMET::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 100 of file TauMET.cc.

100 { }
void cms::TauMET::endJob ( void  )
privatevirtual

Reimplemented from edm::EDProducer.

Definition at line 103 of file TauMET.cc.

103 { }
void cms::TauMET::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 62 of file TauMET.cc.

References _algo, _correctorLabel, _gammaIsolationMinPt, _InputCaloJetsLabel, _InputMETLabel, _InputTausLabel, _jetEMfracLimit, _JetMatchDeltaR, _jetPTthreshold, _metType, _seedTrackPt, _TauEtaMax, _TauMinEt, _trackIsolationMinPt, _UseECALIsolation, _UseProngStructure, _UseSeedTrack, _UseTrackIsolation, dtNoiseDBValidation_cfg::cerr, edm::Event::getByLabel(), JetCorrector::getJetCorrector(), convertSQLitetoXML_cfg::output, edm::Handle< T >::product(), edm::Event::put(), and TauMETAlgo::run().

62  {
63 
64  using namespace edm;
65 
66  Handle<CaloJetCollection> calojetHandle;
67  iEvent.getByLabel(_InputCaloJetsLabel, calojetHandle);
68  const JetCorrector* correctedjets = JetCorrector::getJetCorrector (_correctorLabel, iSetup);
69 
70  Handle<PFTauCollection> tauHandle;
71  iEvent.getByLabel(_InputTausLabel,tauHandle);
72 
73  if( _metType == "recoCaloMET" ) {
74  Handle<CaloMETCollection> metHandle;
75  iEvent.getByLabel(_InputMETLabel,metHandle);
76  std::auto_ptr< CaloMETCollection > output( new CaloMETCollection() );
77  _algo.run(iEvent,iSetup,tauHandle,calojetHandle,_jetPTthreshold,_jetEMfracLimit,*correctedjets,*(metHandle.product()),
81  iEvent.put( output );
82  } else if( _metType == "recoMET" ) {
83  Handle<METCollection> metHandle;
84  iEvent.getByLabel(_InputMETLabel,metHandle);
85  std::auto_ptr< METCollection > output( new METCollection() );
86  _algo.run(iEvent,iSetup,tauHandle,calojetHandle,_jetPTthreshold,_jetEMfracLimit,*correctedjets,*(metHandle.product()),
90  iEvent.put( output );
91  } else {
92  std::cerr << "Incorrect Met Type!!! " << std::endl;
93  std::cerr << "Please re-run and set the metType to 'recoCaloMET' or 'recoMET' " << std::endl;
94  return;
95  }
96 
97  }
std::string _InputCaloJetsLabel
Definition: TauMET.h:37
double _trackIsolationMinPt
Definition: TauMET.h:49
std::string _metType
Definition: TauMET.h:42
bool _UseECALIsolation
Definition: TauMET.h:50
std::vector< reco::MET > METCollection
collection of MET objects
Definition: METCollection.h:23
double _jetEMfracLimit
Definition: TauMET.h:39
std::string _InputTausLabel
Definition: TauMET.h:35
double _TauEtaMax
Definition: TauMET.h:45
std::string _correctorLabel
Definition: TauMET.h:40
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool _UseProngStructure
Definition: TauMET.h:52
std::string _InputMETLabel
Definition: TauMET.h:41
double _TauMinEt
Definition: TauMET.h:44
TauMETAlgo _algo
Definition: TauMET.h:54
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
double _gammaIsolationMinPt
Definition: TauMET.h:51
bool _UseTrackIsolation
Definition: TauMET.h:48
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
Definition: JetCorrector.cc:51
T const * product() const
Definition: Handle.h:74
bool _UseSeedTrack
Definition: TauMET.h:46
double _jetPTthreshold
Definition: TauMET.h:38
virtual void run(edm::Event &, const edm::EventSetup &, edm::Handle< reco::PFTauCollection >, edm::Handle< reco::CaloJetCollection >, double, double, const JetCorrector &, const std::vector< reco::CaloMET > &, double, double, double, bool, double, bool, double, bool, double, bool, std::vector< reco::CaloMET > *corrMET)
Definition: TauMETAlgo.cc:17
double _seedTrackPt
Definition: TauMET.h:47
double _JetMatchDeltaR
Definition: TauMET.h:43

Member Data Documentation

TauMETAlgo cms::TauMET::_algo
private

Definition at line 54 of file TauMET.h.

Referenced by produce().

std::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().

std::string cms::TauMET::_InputCaloJetsLabel
private

Definition at line 37 of file TauMET.h.

Referenced by produce(), and TauMET().

std::string cms::TauMET::_InputMETLabel
private

Definition at line 41 of file TauMET.h.

Referenced by produce(), and TauMET().

std::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().

std::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().

std::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().