Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 /* \class LargestPtCandViewSelector
0002  * 
0003  * Keep a fixed number of largest pt candidates.
0004  * The input collection is read as View<Candidate>.
0005  * Saves a collection of references to selected objects.
0006  * Usage:
0007  *
0008  *
0009  *  module McPartonRefs = LargestPtCandViewSelector {
0010  *      InputTag src     = myCollection
0011  *      uint32 maxNumber = 3        
0012  * } 
0013  *
0014  * \author: Loic Quertenmont, UCL
0015  *
0016  */
0017 
0018 #include "FWCore/Framework/interface/MakerMacros.h"
0019 #include "CommonTools/UtilAlgos/interface/ObjectSelector.h"
0020 #include "CommonTools/UtilAlgos/interface/SortCollectionSelector.h"
0021 #include "CommonTools/Utils/interface/PtComparator.h"
0022 #include "DataFormats/Candidate/interface/Candidate.h"
0023 
0024 typedef ObjectSelector<SortCollectionSelector<reco::CandidateView, GreaterByPt<reco::Candidate> > >
0025     LargestPtCandViewSelector;
0026 
0027 DEFINE_FWK_MODULE(LargestPtCandViewSelector);