62 vtxToken_ = consumes<reco::VertexCollection>(vtxInputTag);
68 double track_pt_min = PVcomparerPSet.getParameter<
double>(
"track_pt_min");
69 double track_pt_max = PVcomparerPSet.getParameter<
double>(
"track_pt_max");
70 double track_chi2_max = PVcomparerPSet.getParameter<
double>(
"track_chi2_max");
71 double track_prob_min = PVcomparerPSet.getParameter<
double>(
"track_prob_min");
75 produces<reco::VertexCollection>();
88 auto vtxs_trim = std::make_unique<reco::VertexCollection>();
108 for (reco::VertexCollection::const_iterator
vtx = vtxs->begin(), evtx=vtxs->end();
110 if (vtxs_trim->size() >=
maxVtx_)
break ;
128 ->setComment(
"input (pixel) vertex collection");
129 desc.
add<
unsigned int> (
"maxVtx", 100)
130 ->setComment(
"max output collection size (number of accepted vertices)");
131 desc.
add<
double> (
"fractionSumPt2", 0.3)
132 ->
setComment(
"threshold on sumPt2 fraction of the leading vertex");
133 desc.
add<
double> (
"minSumPt2", 0. )
134 ->setComment(
"min sumPt2");
136 PVcomparerPSet.
add<
double>(
"track_pt_min",1.0)
138 PVcomparerPSet.
add<
double>(
"track_pt_max",10.0)
140 PVcomparerPSet.
add<
double>(
"track_chi2_max",99999.)
142 PVcomparerPSet.
add<
double>(
"track_prob_min",-1.)
145 ->setComment(
"from RecoPixelVertexing/PixelVertexFinding/python/PVClusterComparer_cfi.py");
146 descriptions.
add(
"hltPixelVertexCollectionTrimmer",desc);
T getParameter(std::string const &) const
void setComment(std::string const &value)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
~PixelVertexCollectionTrimmer() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
double pTSquaredSum(const PVCluster &v)
Calculate sum of square of the pT's of the tracks in the vertex.
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void produce(edm::Event &, const edm::EventSetup &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
PixelVertexCollectionTrimmer(const edm::ParameterSet &)
PVClusterComparer * pvComparer_