CMS 3D CMS Logo

LargestPtCandSelector.cc

Go to the documentation of this file.
00001 /* \class LargestPtCandSelector
00002  * 
00003  * Keep the maxNumber biggest (in respect to Pt) Candidates from myCollection
00004  * Usage:
00005  *
00006  *
00007  *  module McPartonSele = LargestPtCandSelector {
00008  *      InputTag src     = myCollection
00009  *      uint32 maxNumber = 3            
00010  * } 
00011  *
00012  * \author: Loic Quertenmont, UCL
00013  *
00014  */
00015 
00016 #include "FWCore/Framework/interface/MakerMacros.h"
00017 #include "PhysicsTools/UtilAlgos/interface/ObjectSelector.h"
00018 #include "PhysicsTools/UtilAlgos/interface/SortCollectionSelector.h"
00019 #include "PhysicsTools/Utilities/interface/PtComparator.h"
00020 #include "DataFormats/Candidate/interface/Candidate.h"
00021 
00022 typedef ObjectSelector<
00023           SortCollectionSelector<
00024             reco::CandidateCollection,
00025             GreaterByPt<reco::Candidate>
00026           >
00027         > LargestPtCandSelector;
00028 
00029 DEFINE_FWK_MODULE( LargestPtCandSelector );

Generated on Tue Jun 9 17:40:59 2009 for CMSSW by  doxygen 1.5.4