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>();
108 for (reco::VertexCollection::const_iterator vtx = vtxs->begin(), evtx=vtxs->end();
109 vtx != evtx; ++vtx) {
110 if (vtxs_trim->size() >=
maxVtx_)
break ;
117 iEvent.
put(vtxs_trim);
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)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< Vertex > VertexCollection
collection of Vertex objects
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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)
virtual void produce(edm::Event &, const edm::EventSetup &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
PixelVertexCollectionTrimmer(const edm::ParameterSet &)
~PixelVertexCollectionTrimmer()
PVClusterComparer * pvComparer_