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