|
|
Go to the documentation of this file.
64 : verbose_(conf.getParameter<
int>(
"Verbosity")),
66 ptMin_(conf.getParameter<double>(
"PtMin")),
67 method2(conf.getParameter<
bool>(
"Method2")),
72 produces<reco::VertexCollection>();
88 if (conf.
exists(
"PVcomparer")) {
94 <<
"minimum track pT setting differs between PixelVertexProducer (" <<
ptMin_ <<
") and PVcomparer ("
95 <<
track_pt_min <<
") [PVcomparer considers tracks w/ lower threshold than PixelVertexProducer does] !!!";
97 edm::LogInfo(
"PixelVertexProducer") <<
"minimum track pT setting differs between PixelVertexProducer ("
105 if (
finder ==
"DivisiveVertexFinder") {
107 edm::LogInfo(
"PixelVertexProducer") <<
": Using the DivisiveVertexFinder\n";
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.";
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
bool findVertexesAlt(const reco::TrackRefVector &trks, reco::VertexCollection &vertexes, const math::XYZPoint &bs)
#define DEFINE_FWK_MODULE(type)
void produce(edm::Event &, const edm::EventSetup &) override
bool exists(std::string const ¶meterName) const
checks if a parameter exists
XYZPointD XYZPoint
point in space with cartesian internal representation
const edm::EDGetTokenT< reco::BeamSpot > token_BeamSpot
const edm::EDGetTokenT< reco::TrackCollection > token_Tracks
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
T getParameter(std::string const &) const
double x0() const
x coordinate
const edm::InputTag trackCollName
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.
PixelVertexProducer(const edm::ParameterSet &)
~PixelVertexProducer() override
DivisiveVertexFinder * dvf_
double y0() const
y coordinate
size_type size() const
Size of the RefVector.
std::vector< Track > TrackCollection
collection of Tracks