CommonTools
CandAlgos
plugins
LargestPtCandViewSelector.cc
Go to the documentation of this file.
1
/* \class LargestPtCandViewSelector
2
*
3
* Keep a fixed number of largest pt candidates.
4
* The input collection is read as View<Candidate>.
5
* Saves a collection of references to selected objects.
6
* Usage:
7
*
8
*
9
* module McPartonRefs = LargestPtCandViewSelector {
10
* InputTag src = myCollection
11
* uint32 maxNumber = 3
12
* }
13
*
14
* \author: Loic Quertenmont, UCL
15
*
16
*/
17
18
#include "
FWCore/Framework/interface/MakerMacros.h
"
19
#include "
CommonTools/UtilAlgos/interface/ObjectSelector.h
"
20
#include "
CommonTools/UtilAlgos/interface/SortCollectionSelector.h
"
21
#include "
CommonTools/Utils/interface/PtComparator.h
"
22
#include "
DataFormats/Candidate/interface/Candidate.h
"
23
24
typedef
ObjectSelector<SortCollectionSelector<reco::CandidateView, GreaterByPt<reco::Candidate>
> >
25
LargestPtCandViewSelector
;
26
27
DEFINE_FWK_MODULE
(
LargestPtCandViewSelector
);
ObjectSelector.h
PtComparator.h
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
ObjectSelector
Definition:
ObjectSelector.h:39
SortCollectionSelector.h
LargestPtCandViewSelector
ObjectSelector< SortCollectionSelector< reco::CandidateView, GreaterByPt< reco::Candidate > > > LargestPtCandViewSelector
Definition:
LargestPtCandViewSelector.cc:25
Candidate.h
Generated for CMSSW Reference Manual by
1.8.16