00001 /* \class PhotonSelector 00002 * 00003 * Selects photon with a configurable string-based cut. 00004 * Saves clones of the selected photons 00005 * 00006 * \author: Luca Lista, INFN 00007 * 00008 * usage: 00009 * 00010 * module bestPhotons = PhotonSelector { 00011 * src = photons 00012 * string cut = "pt > 20 & abs( eta ) < 2" 00013 * } 00014 * 00015 * for more details about the cut syntax, see the documentation 00016 * page below: 00017 * 00018 * httpss://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePhysicsCutParser 00019 * 00020 * 00021 */ 00022 00023 #include "FWCore/Framework/interface/MakerMacros.h" 00024 #include "PhysicsTools/UtilAlgos/interface/SingleObjectSelector.h" 00025 #include "PhysicsTools/UtilAlgos/interface/StringCutObjectSelector.h" 00026 #include "DataFormats/EgammaCandidates/interface/Photon.h" 00027 #include "DataFormats/EgammaCandidates/interface/PhotonFwd.h" 00028 00029 typedef SingleObjectSelector< 00030 reco::PhotonCollection, 00031 StringCutObjectSelector<reco::Photon> 00032 > PhotonSelector; 00033 00034 DEFINE_FWK_MODULE( PhotonSelector );