CMS 3D CMS Logo

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

List of all members.

Public Member Functions

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

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

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, edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

                                               : _algo() {

    _InputTausLabel    = iConfig.getParameter<std::string>("InputTausLabel");
    _tauType    = iConfig.getParameter<std::string>("tauType");
    _InputCaloJetsLabel    = iConfig.getParameter<std::string>("InputCaloJetsLabel");
    _jetPTthreshold      = iConfig.getParameter<double>("jetPTthreshold");
    _jetEMfracLimit      = iConfig.getParameter<double>("jetEMfracLimit");
    _correctorLabel      = iConfig.getParameter<std::string>("correctorLabel");
    _InputMETLabel    = iConfig.getParameter<std::string>("InputMETLabel");
    _metType    = iConfig.getParameter<std::string>("metType");
    _JetMatchDeltaR      = iConfig.getParameter<double>("JetMatchDeltaR");
    _TauMinEt      = iConfig.getParameter<double>("TauMinEt");
    _TauEtaMax      = iConfig.getParameter<double>("TauEtaMax");
    _UseSeedTrack      = iConfig.getParameter<bool>("UseSeedTrack");
    _seedTrackPt      = iConfig.getParameter<double>("seedTrackPt");
    _UseTrackIsolation      = iConfig.getParameter<bool>("UseTrackIsolation");
    _trackIsolationMinPt      = iConfig.getParameter<double>("trackIsolationMinPt");
    _UseECALIsolation      = iConfig.getParameter<bool>("UseECALIsolation");
    _gammaIsolationMinPt      = iConfig.getParameter<double>("gammaIsolationMinPt");
    _UseProngStructure      = iConfig.getParameter<bool>("UseProngStructure");

    if( _metType == "recoMET" ) {
      produces< METCollection   >();
    } else {
      produces< CaloMETCollection   >();
    }

  }
cms::TauMET::~TauMET ( )

Definition at line 56 of file TauMET.cc.

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

Member Function Documentation

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

Reimplemented from edm::EDProducer.

Definition at line 100 of file TauMET.cc.

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

Reimplemented from edm::EDProducer.

Definition at line 103 of file TauMET.cc.

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

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

                                                                    {

    using namespace edm;

    Handle<CaloJetCollection> calojetHandle;
    iEvent.getByLabel(_InputCaloJetsLabel, calojetHandle);
    const JetCorrector* correctedjets = JetCorrector::getJetCorrector (_correctorLabel, iSetup);

    Handle<PFTauCollection> tauHandle;
    iEvent.getByLabel(_InputTausLabel,tauHandle);

    if( _metType == "recoCaloMET" ) {
      Handle<CaloMETCollection> metHandle;
      iEvent.getByLabel(_InputMETLabel,metHandle);
      std::auto_ptr< CaloMETCollection > output( new CaloMETCollection() );
      _algo.run(iEvent,iSetup,tauHandle,calojetHandle,_jetPTthreshold,_jetEMfracLimit,*correctedjets,*(metHandle.product()),
                _JetMatchDeltaR,_TauMinEt,
                _TauEtaMax,_UseSeedTrack,_seedTrackPt,_UseTrackIsolation,_trackIsolationMinPt,_UseECALIsolation,
                _gammaIsolationMinPt,_UseProngStructure,&*output);
      iEvent.put( output );
    } else if( _metType == "recoMET" ) {
      Handle<METCollection> metHandle;
      iEvent.getByLabel(_InputMETLabel,metHandle);
      std::auto_ptr< METCollection > output( new METCollection() );
      _algo.run(iEvent,iSetup,tauHandle,calojetHandle,_jetPTthreshold,_jetEMfracLimit,*correctedjets,*(metHandle.product()),
                _JetMatchDeltaR,_TauMinEt,
                _TauEtaMax,_UseSeedTrack,_seedTrackPt,_UseTrackIsolation,_trackIsolationMinPt,_UseECALIsolation,
                _gammaIsolationMinPt,_UseProngStructure,&*output);
      iEvent.put( output );
    } else {
      std::cerr << "Incorrect Met Type!!! " << std::endl;
      std::cerr << "Please re-run and set the metType to 'recoCaloMET' or 'recoMET' " << std::endl;
      return;
    }

  }

Member Data Documentation

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

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

Definition at line 49 of file TauMET.h.

Referenced by produce(), and TauMET().

Definition at line 50 of file TauMET.h.

Referenced by produce(), and TauMET().

Definition at line 52 of file TauMET.h.

Referenced by produce(), and TauMET().

Definition at line 46 of file TauMET.h.

Referenced by produce(), and TauMET().

Definition at line 48 of file TauMET.h.

Referenced by produce(), and TauMET().