24 produces<reco::VertexCollection>();
52 ev.
getByLabel(theAdaptiveVertexCollection, vc1);
55 if(vertices1->size()==0)
56 LogError(
"HeavyIonVertexing") <<
"adaptive vertex collection is empty!" << endl;
58 if(vertices1->begin()->zError()<3) {
60 reco::VertexCollection::const_iterator vertex1 = vertices1->begin();
61 newVertexCollection->push_back(*vertex1);
63 LogInfo(
"HeavyIonVertexing") <<
"adaptive vertex:\n vz = ("
64 << vertex1->x() <<
", " << vertex1->y() <<
", " << vertex1->z() <<
")"
66 << vertex1->xError() <<
", " << vertex1->yError() <<
", "
67 << vertex1->zError() <<
")" << endl;
79 ev.
getByLabel(
"offlineBeamSpot", beamSpotHandle);
82 beamSpot = *beamSpotHandle;
84 LogError(
"HeavyIonVertexing") <<
"no beamspot with name: 'offlineBeamSpot'" << endl;
86 if(vertices2->size() > 0) {
88 reco::VertexCollection::const_iterator vertex2 = vertices2->begin();
92 err(2,2)=
pow(vertex2->zError(),2);
95 newVertexCollection->push_back(newVertex);
97 LogInfo(
"HeavyIonVertexing") <<
"median vertex + beamspot: \n position = ("
98 << newVertex.x() <<
", " << newVertex.y() <<
", " << newVertex.z() <<
")"
100 << newVertex.xError() <<
", " << newVertex.yError() <<
", "
101 << newVertex.zError() <<
")" << endl;
111 newVertexCollection->push_back(newVertex);
113 LogInfo(
"HeavyIonVertexing") <<
"beam spot: \n position = ("
114 << newVertex.x() <<
", " << newVertex.y() <<
", " << newVertex.z() <<
")"
116 << newVertex.xError() <<
", " << newVertex.yError() <<
", "
117 << newVertex.zError() <<
")" << endl;
124 ev.
put(newVertexCollection);
T getParameter(std::string const &) const
math::Error< dimension >::type Error
covariance error matrix (3x3)
std::vector< Vertex > VertexCollection
collection of Vertex objects
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
math::XYZPoint Point
point in the space
double BeamWidthX() const
beam width X
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void produce(edm::Event &ev, const edm::EventSetup &es)
HIBestVertexProducer(const edm::ParameterSet &ps)
double sigmaZ() const
sigma z
double BeamWidthY() const
beam width Y
T const * product() const
double y0() const
y coordinate
const Point & position() const
position
Power< A, B >::type pow(const A &a, const B &b)
double x0() const
x coordinate