CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/PhysicsTools/JetMCAlgos/plugins/TauGenJetDecayModeSelector.cc

Go to the documentation of this file.
00001 #include "PhysicsTools/JetMCAlgos/plugins/TauGenJetDecayModeSelector.h"
00002 
00003 #include "PhysicsTools/JetMCUtils/interface/JetMCTag.h"
00004 
00005 TauGenJetDecayModeSelectorImp::TauGenJetDecayModeSelectorImp(const edm::ParameterSet& cfg)
00006 {
00007   selectedTauDecayModes_ = cfg.getParameter<vstring>("select");
00008 }
00009 
00010 bool TauGenJetDecayModeSelectorImp::operator()(const reco::GenJet& tauGenJet) const
00011 {
00012   std::string tauGenJetDecayMode = JetMCTagUtils::genTauDecayMode(tauGenJet);
00013   for ( vstring::const_iterator selectedTauDecayMode = selectedTauDecayModes_.begin();
00014         selectedTauDecayMode != selectedTauDecayModes_.end(); ++selectedTauDecayMode ) {
00015     if ( tauGenJetDecayMode == (*selectedTauDecayMode) ) return true;
00016   }
00017   return false;
00018 }
00019 
00020 #include "FWCore/Framework/interface/MakerMacros.h"
00021 
00022 DEFINE_FWK_MODULE(TauGenJetDecayModeSelector);