30 : srcPixelsString_(ps.getParameter<std::
string>(
"pixelRecHits")),
31 minZ_(ps.getParameter<double>(
"minZ")),
32 maxZ_(ps.getParameter<double>(
"maxZ")),
33 zStep_(ps.getParameter<double>(
"zStep"))
37 produces<reco::VertexCollection>();
55 auto vertices = std::make_unique<reco::VertexCollection>();
62 if (hRecHits.isValid()) {
69 std::vector<VertexHit> vhits;
80 std::vector<SiPixelCluster::Pixel> pixels(
hit->cluster()->pixels());
81 bool pixelOnEdge =
false;
82 for(std::vector<SiPixelCluster::Pixel>::const_iterator pixel = pixels.begin();
83 pixel != pixels.end(); ++pixel) {
84 int pixelX = pixel->x;
85 int pixelY = pixel->y;
96 hit->localPosition().
y(),
97 hit->localPosition().
z());
102 vh.
w =
hit->cluster()->sizeY();
108 int nhits = 0, nhits_max = 0;
109 double chi = 0, chi_max = 1
e+9;
114 if(nhits > nhits_max) {
118 if(nhits >= nhits_max && chi < chi_max) {
125 <<
" [vertex position] estimated = " << zest
126 <<
" | pixel barrel hits = " << vhits.size();
130 err(2,2) = 0.6 * 0.6;
145 for(std::vector<VertexHit>::const_iterator
hit = hits.begin();
hit!= hits.end();
hit++) {
146 double p = 2 * fabs(
hit->
z - z0)/
hit->r + 0.5;
148 chi += fabs(p -
hit->w);
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
int getContainedHits(const std::vector< VertexHit > &hits, double z0, double &chi)
HIPixelClusterVtxProducer(const edm::ParameterSet &ps)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
math::Error< dimension >::type Error
covariance error matrix (3x3)
virtual void produce(edm::Event &ev, const edm::EventSetup &es) override
~HIPixelClusterVtxProducer()
virtual bool isItEdgePixelInX(int ixbin) const =0
data_type const * data(size_t cell) const
math::XYZPoint Point
point in the space
edm::EDGetTokenT< SiPixelRecHitCollection > srcPixels_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
std::string srcPixelsString_
T const * product() const
virtual bool isItEdgePixelInY(int iybin) const =0
const TrackerGeomDet * idToDet(DetId) const