00001 /* \class PtMinAssociatedVariableMaxCutCandSelector 00002 * 00003 * Candidate Selector based on a minimum pt cut 00004 * plus a cut on an associated variable (e.g.: isolation) 00005 * 00006 * Usage: 00007 * 00008 * module selectedCands = PtMinAssociatedVariableMaxCutCandSelector { 00009 * InputTag src = myCollection 00010 * double ptMin = 15.0 00011 * double max = 0.2 00012 * } 00013 * 00014 * \author: Luca Lista, INFN 00015 * 00016 */ 00017 #include "FWCore/Framework/interface/MakerMacros.h" 00018 #include "PhysicsTools/UtilAlgos/interface/SingleObjectSelector.h" 00019 #include "PhysicsTools/UtilAlgos/interface/PairSelector.h" 00020 #include "PhysicsTools/UtilAlgos/interface/RefSelector.h" 00021 #include "PhysicsTools/UtilAlgos/interface/PtMinSelector.h" 00022 #include "PhysicsTools/UtilAlgos/interface/MaxSelector.h" 00023 #include "DataFormats/Candidate/interface/Candidate.h" 00024 00025 typedef double isolation; 00026 00027 typedef SingleObjectSelector< 00028 edm::AssociationVector<reco::CandidateRefProd, std::vector<isolation> >, 00029 PairSelector< 00030 RefSelector<PtMinSelector>, 00031 MaxSelector<isolation> 00032 > 00033 > PtMinAssociatedVariableMaxCutCandSelector; 00034 00035 DEFINE_FWK_MODULE( PtMinAssociatedVariableMaxCutCandSelector );