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 41 of file PixelVertexProducer.cc.
Definition at line 125 of file PixelVertexProducer.cc.
References cms::cuda::bs, hltPixelTracks_cff::chi2, dvf_, MillePedeFileConverter_cfg::e, relativeConstraints::error, DivisiveVertexFinder::findVertexes(), DivisiveVertexFinder::findVertexesAlt(), mps_fire::i, edm::HandleBase::isValid(), method2, eostools::move(), ndof, convertSQLiteXML::ok, DiDispStaMuonMonitor_cfi::pt, ptMin_, mathSSE::sqrt(), token_BeamSpot, token_Tracks, JetHT_cfg::trackCollection, trackCollName, pwdgSkimBPark_cfi::tracks, hltEgammaHLTExtra_cfi::trks, findQualityFiles::v, verbose_, jetsAK4_CHS_cff::vertexes, x, reco::BeamSpot::x0(), y, reco::BeamSpot::y0(), and z.
131 edm::LogInfo(
"PixelVertexProducer") <<
": Found " <<
tracks.size() <<
" tracks in TrackCollection called " 136 for (
unsigned int i = 0;
i <
tracks.size();
i++) {
141 edm::LogInfo(
"PixelVertexProducer") <<
": Selected " <<
trks.size() <<
" of these tracks for vertexing\n";
151 auto vertexes = std::make_unique<reco::VertexCollection>();
158 edm::LogInfo(
"PixelVertexProducer") <<
"Method2 returned status of " <<
ok;
163 edm::LogInfo(
"PixelVertexProducer") <<
"Method1 returned status of " <<
ok;
168 for (
unsigned int i = 0;
i <
vertexes->size(); ++
i) {
170 <<
"Vertex number " <<
i <<
" has " << (*vertexes)[
i].tracksSize() <<
" tracks with a position of " 178 for (
unsigned int i = 0;
i <
vertexes->size(); ++
i) {
179 double z = (*vertexes)[
i].z();
180 double x =
bs.x0() +
bs.dxdz() * (
z -
bs.z0());
181 double y =
bs.y0() +
bs.dydz() * (
z -
bs.z0());
188 for (std::vector<reco::TrackBaseRef>::const_iterator it = (*
vertexes)[
i].tracks_begin();
189 it != (*vertexes)[
i].tracks_end();
196 edm::LogWarning(
"PixelVertexProducer") <<
"No beamspot found. Using returning vertexes with (0,0,Z) ";
203 if ((bse.cxx() <= 0.) || (bse.cyy() <= 0.) || (bse.czz() <= 0.)) {
211 <<
"No vertices found. Beamspot with invalid errors " << bse.matrix() << std::endl
212 <<
"Will put Vertex derived from dummy-fake BeamSpot into Event.\n" 213 << (*vertexes)[0].x() <<
"\n" 214 << (*vertexes)[0].y() <<
"\n" 215 << (*vertexes)[0].z() <<
"\n";
219 edm::LogInfo(
"PixelVertexProducer") <<
"No vertices found. Will put Vertex derived from BeamSpot into Event:\n" 220 << (*vertexes)[0].x() <<
"\n" 221 << (*vertexes)[0].y() <<
"\n" 222 << (*vertexes)[0].z() <<
"\n";
227 edm::LogWarning(
"PixelVertexProducer") <<
"No beamspot and no vertex found. No vertex returned.";
const edm::EDGetTokenT< reco::TrackCollection > token_Tracks
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 x0() const
x coordinate
math::XYZPoint Point
point in the space
double y0() const
y coordinate
bool findVertexes(const reco::TrackRefVector &trks, reco::VertexCollection &vertexes)
Run the divisive algorithm and return a vector of vertexes for the input track collection.
Log< level::Info, false > LogInfo
XYZPointD XYZPoint
point in space with cartesian internal representation
DivisiveVertexFinder * dvf_
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
Log< level::Warning, false > LogWarning