Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:02

0001 /* \class LargestPtCandSelector
0002  * 
0003  * Keep the maxNumber biggest (in respect to Pt) Candidates from myCollection
0004  * Usage:
0005  *
0006  *
0007  *  module McPartonSele = LargestPtCandSelector {
0008  *      InputTag src     = myCollection
0009  *      uint32 maxNumber = 3        
0010  * } 
0011  *
0012  * \author: Loic Quertenmont, UCL
0013  *
0014  */
0015 
0016 #include "FWCore/Framework/interface/MakerMacros.h"
0017 #include "CommonTools/UtilAlgos/interface/ObjectSelector.h"
0018 #include "CommonTools/UtilAlgos/interface/SortCollectionSelector.h"
0019 #include "CommonTools/Utils/interface/PtComparator.h"
0020 #include "DataFormats/Candidate/interface/Candidate.h"
0021 
0022 typedef ObjectSelector<SortCollectionSelector<reco::CandidateCollection, GreaterByPt<reco::Candidate> > >
0023     LargestPtCandSelector;
0024 
0025 DEFINE_FWK_MODULE(LargestPtCandSelector);