Description: This produces 1D (z only) primary vertexes using only pixel information.
Implementation: This producer can use either the Divisive Primary Vertex Finder or the Histogramming Primary Vertex Finder (currently not implemented). It relies on the PixelTripletProducer and PixelTrackProducer having already been run upstream. This is code ported from ORCA originally written by S Cucciarelli, M Konecki, D Kotlinski.
Definition at line 35 of file PixelVertexProducer.h.
Definition at line 67 of file PixelVertexProducer.cc.
References reco::Vertex::add(), vertices_cff::chi2, dvf_, reco::BeamSpot::dxdz(), reco::BeamSpot::dydz(), relativeConstraints::error, DivisiveVertexFinder::findVertexes(), DivisiveVertexFinder::findVertexesAlt(), edm::Event::getByToken(), mps_fire::i, edm::HandleBase::isValid(), method2, eostools::move(), ndof, convertSQLiteXML::ok, reco::BeamSpot::position(), edm::Handle< T >::product(), EnergyCorrector::pt, ptMin_, edm::RefVector< C, T, F >::push_back(), edm::Event::put(), reco::BeamSpot::rotatedCovariance3D(), edm::RefVector< C, T, F >::size(), mathSSE::sqrt(), token_BeamSpot, token_Tracks, findElectronsInSiStrips_cfi::trackCollection, trackCollName, l1t::tracks, findQualityFiles::v, verbose_, hltMVAJetPuId_cff::vertexes, x, reco::BeamSpot::x0(), y, reco::BeamSpot::y0(), z, and reco::BeamSpot::z0().
78 for (
unsigned int i=0;
i<tracks.size();
i++) {
82 if (
verbose_ > 0)
edm::LogInfo(
"PixelVertexProducer") <<
": Selected " << trks.
size() <<
" of these tracks for vertexing\n";
90 auto vertexes = std::make_unique<reco::VertexCollection>();
106 edm::LogInfo(
"PixelVertexProducer") <<
"Vertex number " <<
i <<
" has " << (*vertexes)[
i].tracksSize() <<
" tracks with a position of " << (*vertexes)[
i].z() <<
" +- " <<
std::sqrt( (*
vertexes)[
i].covariance(2,2) );
116 double z=(*vertexes)[
i].z();
121 for (std::vector<reco::TrackBaseRef >::const_iterator it = (*
vertexes)[
i].tracks_begin();
122 it !=(*vertexes)[
i].tracks_end(); it++) {
131 edm::LogWarning(
"PixelVertexProducer") <<
"No beamspot found. Using returning vertexes with (0,0,Z) ";
139 if ( (bse.cxx() <= 0.) ||
141 (bse.czz() <= 0.) ) {
148 edm::LogInfo(
"PixelVertexProducer") <<
"No vertices found. Beamspot with invalid errors " << bse.matrix() << std::endl
149 <<
"Will put Vertex derived from dummy-fake BeamSpot into Event.\n" 150 << (*vertexes)[0].x() <<
"\n" 151 << (*vertexes)[0].y() <<
"\n" 152 << (*vertexes)[0].z() <<
"\n";
157 edm::LogInfo(
"PixelVertexProducer") <<
"No vertices found. Will put Vertex derived from BeamSpot into Event:\n" 158 << (*vertexes)[0].x() <<
"\n" 159 << (*vertexes)[0].y() <<
"\n" 160 << (*vertexes)[0].z() <<
"\n";
166 edm::LogWarning(
"PixelVertexProducer") <<
"No beamspot and no vertex found. No vertex returned.";
double z0() const
z coordinate
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EDGetTokenT< reco::TrackCollection > token_Tracks
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< Track > TrackCollection
collection of Tracks
bool findVertexesAlt(const reco::TrackRefVector &trks, reco::VertexCollection &vertexes, const math::XYZPoint &bs)
const edm::InputTag trackCollName
const edm::EDGetTokenT< reco::BeamSpot > token_BeamSpot
double dydz() const
dydz slope
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
math::XYZPoint Point
point in the space
bool findVertexes(const reco::TrackRefVector &trks, reco::VertexCollection &vertexes)
Run the divisive algorithm and return a vector of vertexes for the input track collection.
double dxdz() const
dxdz slope
T const * product() const
XYZPointD XYZPoint
point in space with cartesian internal representation
DivisiveVertexFinder * dvf_
double y0() const
y coordinate
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
size_type size() const
Size of the RefVector.
const Point & position() const
position
Covariance3DMatrix rotatedCovariance3D() const
double x0() const
x coordinate