00001 /* \class AssociatedVariableMaxCutCandRefSelector 00002 * 00003 * Candidate Selector based on a maximun cut on an 00004 * associated variable (e.g.: isolation), and saver a 00005 * collection of references. 00006 * 00007 * Usage: 00008 * 00009 * module selectedCands = AssociatedVariableMaxCutCandRefSelector { 00010 * InputTag src = myCollection 00011 * double max = 0.2 00012 * } 00013 * 00014 * \author: Luca Lista, INFN 00015 * 00016 */ 00017 #include "FWCore/Framework/interface/MakerMacros.h" 00018 #include "CommonTools/UtilAlgos/interface/SingleObjectSelector.h" 00019 #include "CommonTools/UtilAlgos/interface/PairSelector.h" 00020 #include "CommonTools/UtilAlgos/interface/RefSelector.h" 00021 #include "CommonTools/UtilAlgos/interface/AnySelector.h" 00022 #include "CommonTools/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<AnySelector>, 00031 MaxSelector<isolation> 00032 >, 00033 reco::CandidateRefVector 00034 > AssociatedVariableMaxCutCandRefSelector; 00035 00036 DEFINE_FWK_MODULE( AssociatedVariableMaxCutCandRefSelector );