14 : conf_(conf), verbose_(0), dvf_(0), ptMin_(1.0)
17 produces<reco::VertexCollection>();
21 std::string finder = conf.
getParameter<std::string>(
"Finder");
25 double zSeparation = conf.
getParameter<
double>(
"ZSeparation");
30 if (finder ==
"DivisiveVertexFinder") {
31 if (verbose_ > 0)
edm::LogInfo(
"PixelVertexProducer") <<
": Using the DivisiveVertexFinder\n";
51 if (
verbose_ > 0)
edm::LogInfo(
"PixelVertexProducer") <<
": Found " << tracks.size() <<
" tracks in TrackCollection called " << trackCollName <<
"\n";
56 for (
unsigned int i=0;
i<tracks.size();
i++) {
60 if (
verbose_ > 0)
edm::LogInfo(
"PixelVertexProducer") <<
": Selected " << trks.
size() <<
" of these tracks for vertexing\n";
83 edm::LogInfo(
"PixelVertexProducer") <<
": Found " << vertexes->size() <<
" vertexes\n";
84 for (
unsigned int i=0;
i<vertexes->size(); ++
i) {
85 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) );
94 for (
unsigned int i=0;
i<vertexes->size(); ++
i) {
95 double z=(*vertexes)[
i].z();
100 for (std::vector<reco::TrackBaseRef >::const_iterator it = (*vertexes)[
i].tracks_begin();
101 it !=(*vertexes)[
i].tracks_end(); it++) {
110 edm::LogWarning(
"PixelVertexProducer") <<
"No beamspot found. Using returning vertexes with (0,0,Z) ";
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
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.
double x0() const
x coordinate