46 auto newVertexCollection = std::make_unique<reco::VertexCollection>();
53 if(vertices1->size()==0)
54 LogError(
"HeavyIonVertexing") <<
"adaptive vertex collection is empty!" << endl;
56 if(vertices1->begin()->zError()<3) {
58 reco::VertexCollection::const_iterator vertex1 = vertices1->begin();
59 newVertexCollection->push_back(*vertex1);
61 LogInfo(
"HeavyIonVertexing") <<
"adaptive vertex:\n vz = (" 62 << vertex1->x() <<
", " << vertex1->y() <<
", " << vertex1->z() <<
")" 64 << vertex1->xError() <<
", " << vertex1->yError() <<
", " 65 << vertex1->zError() <<
")" << endl;
79 beamSpot = *beamSpotHandle;
81 LogError(
"HeavyIonVertexing") <<
"no beamspot found " << endl;
83 if(vertices2->size() > 0) {
85 reco::VertexCollection::const_iterator vertex2 = vertices2->begin();
89 err(2,2)=
pow(vertex2->zError(),2);
92 newVertexCollection->push_back(newVertex);
94 LogInfo(
"HeavyIonVertexing") <<
"median vertex + beamspot: \n position = (" 95 << newVertex.x() <<
", " << newVertex.y() <<
", " << newVertex.z() <<
")" 97 << newVertex.xError() <<
", " << newVertex.yError() <<
", " 98 << newVertex.zError() <<
")" << endl;
108 newVertexCollection->push_back(newVertex);
110 LogInfo(
"HeavyIonVertexing") <<
"beam spot: \n position = (" 111 << newVertex.x() <<
", " << newVertex.y() <<
", " << newVertex.z() <<
")" 113 << newVertex.xError() <<
", " << newVertex.yError() <<
", " 114 << newVertex.zError() <<
")" << endl;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
math::Error< dimension >::type Error
covariance error matrix (3x3)
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< reco::VertexCollection > theAdaptiveVertexCollection
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotTag
math::XYZPoint Point
point in the space
double BeamWidthX() const
beam width X
edm::EDGetTokenT< reco::VertexCollection > theMedianVertexCollection
T const * product() const
double sigmaZ() const
sigma z
double BeamWidthY() const
beam width Y
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