15 : conf_(conf), verbose_(0), dvf_(0), ptMin_(1.0)
18 produces<reco::VertexCollection>();
26 double zSeparation = conf.
getParameter<
double>(
"ZSeparation");
31 if (finder ==
"DivisiveVertexFinder") {
32 if (verbose_ > 0)
edm::LogInfo(
"PixelVertexProducer") <<
": Using the DivisiveVertexFinder\n";
52 if (
verbose_ > 0)
edm::LogInfo(
"PixelVertexProducer") <<
": Found " << tracks.size() <<
" tracks in TrackCollection called " << trackCollName <<
"\n";
57 for (
unsigned int i=0;
i<tracks.size();
i++) {
61 if (
verbose_ > 0)
edm::LogInfo(
"PixelVertexProducer") <<
": Selected " << trks.
size() <<
" of these tracks for vertexing\n";
84 edm::LogInfo(
"PixelVertexProducer") <<
": Found " << vertexes->size() <<
" vertexes\n";
85 for (
unsigned int i=0;
i<vertexes->size(); ++
i) {
86 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) );
95 for (
unsigned int i=0;
i<vertexes->size(); ++
i) {
96 double z=(*vertexes)[
i].z();
101 for (std::vector<reco::TrackBaseRef >::const_iterator it = (*vertexes)[
i].tracks_begin();
102 it !=(*vertexes)[
i].tracks_end(); it++) {
111 edm::LogWarning(
"PixelVertexProducer") <<
"No beamspot found. Using returning vertexes with (0,0,Z) ";
114 if(!vertexes->size() && bsHandle.
isValid()){
119 if ( (bse.cxx() <= 0.) ||
121 (bse.czz() <= 0.) ) {
128 edm::LogInfo(
"PixelVertexProducer") <<
"No vertices found. Beamspot with invalid errors " << bse.matrix() << std::endl
129 <<
"Will put Vertex derived from dummy-fake BeamSpot into Event.\n"
130 << (*vertexes)[0].x() <<
"\n"
131 << (*vertexes)[0].y() <<
"\n"
132 << (*vertexes)[0].z() <<
"\n";
137 edm::LogInfo(
"PixelVertexProducer") <<
"No vertices found. Will put Vertex derived from BeamSpot into Event:\n"
138 << (*vertexes)[0].x() <<
"\n"
139 << (*vertexes)[0].y() <<
"\n"
140 << (*vertexes)[0].z() <<
"\n";
144 else if(!vertexes->size() && !bsHandle.
isValid())
146 edm::LogWarning(
"PixelVertexProducer") <<
"No beamspot and no vertex found. No vertex returned.";
T getParameter(std::string const &) const
double z0() const
z coordinate
virtual void produce(edm::Event &, const edm::EventSetup &)
PixelVertexProducer(const edm::ParameterSet &)
std::vector< Track > TrackCollection
collection of Tracks
bool findVertexesAlt(const reco::TrackRefVector &trks, reco::VertexCollection &vertexes, const math::XYZPoint &bs)
std::vector< Vertex > VertexCollection
collection of Vertex objects
double dydz() const
dydz slope
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double dxdz() const
dxdz slope
void add(const TrackBaseRef &r, float w=1.0)
add a reference to a Track
XYZPointD XYZPoint
point in space with cartesian internal representation
T const * product() const
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