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 76 of file PixelVertexProducer.cc.
References reco::Vertex::add(), hltPixelTracks_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(), DiDispStaMuonMonitor_cfi::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, duplicaterechits_cfi::trackCollection, trackCollName, PDWG_EXOHSCP_cff::tracks, findQualityFiles::v, verbose_, hltMVAJetPuId_cff::vertexes, x, reco::BeamSpot::x0(), y, reco::BeamSpot::y0(), z, and reco::BeamSpot::z0().
82 edm::LogInfo(
"PixelVertexProducer") <<
": Found " << tracks.size() <<
" tracks in TrackCollection called " 87 for (
unsigned int i = 0;
i < tracks.size();
i++) {
92 edm::LogInfo(
"PixelVertexProducer") <<
": Selected " << trks.
size() <<
" of these tracks for vertexing\n";
102 auto vertexes = std::make_unique<reco::VertexCollection>();
109 edm::LogInfo(
"PixelVertexProducer") <<
"Method2 returned status of " <<
ok;
114 edm::LogInfo(
"PixelVertexProducer") <<
"Method1 returned status of " <<
ok;
119 for (
unsigned int i = 0;
i <
vertexes->size(); ++
i) {
121 <<
"Vertex number " <<
i <<
" has " << (*vertexes)[
i].tracksSize() <<
" tracks with a position of " 129 for (
unsigned int i = 0;
i <
vertexes->size(); ++
i) {
130 double z = (*vertexes)[
i].z();
131 double x = bs.
x0() + bs.
dxdz() * (z - bs.
z0());
132 double y = bs.
y0() + bs.
dydz() * (z - bs.
z0());
139 for (std::vector<reco::TrackBaseRef>::const_iterator it = (*
vertexes)[
i].tracks_begin();
140 it != (*vertexes)[
i].tracks_end();
147 edm::LogWarning(
"PixelVertexProducer") <<
"No beamspot found. Using returning vertexes with (0,0,Z) ";
154 if ((bse.cxx() <= 0.) || (bse.cyy() <= 0.) || (bse.czz() <= 0.)) {
162 <<
"No vertices found. Beamspot with invalid errors " << bse.matrix() << std::endl
163 <<
"Will put Vertex derived from dummy-fake BeamSpot into Event.\n" 164 << (*vertexes)[0].x() <<
"\n" 165 << (*vertexes)[0].y() <<
"\n" 166 << (*vertexes)[0].z() <<
"\n";
170 edm::LogInfo(
"PixelVertexProducer") <<
"No vertices found. Will put Vertex derived from BeamSpot into Event:\n" 171 << (*vertexes)[0].x() <<
"\n" 172 << (*vertexes)[0].y() <<
"\n" 173 << (*vertexes)[0].z() <<
"\n";
178 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
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
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
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