56 cout <<
"======================= GlobalVertexReco::InitRun() =======================" << endl;
57 cout <<
"===========================================================================" << endl;
65 if (
Verbosity() > 1) cout <<
"GlobalVertexReco::process_event -- entered" << endl;
70 GlobalVertexMap *globalmap = findNode::getClass<GlobalVertexMap>(topNode,
"GlobalVertexMap");
73 cout <<
PHWHERE <<
"::ERROR - cannot find GlobalVertexMap" << endl;
77 SvtxVertexMap *svtxmap = findNode::getClass<SvtxVertexMap>(topNode,
"SvtxVertexMap");
78 BbcVertexMap *bbcmap = findNode::getClass<BbcVertexMap>(topNode,
"BbcVertexMap");
96 std::set<unsigned int> used_svtx_vtxids;
97 std::set<unsigned int> used_bbc_vtxids;
99 if (svtxmap && bbcmap)
101 if (
Verbosity()) cout <<
"GlobalVertexReco::process_event - svtxmap && bbcmap" << endl;
104 svtxiter != svtxmap->
end();
112 bbciter != bbcmap->end();
118 float sigma = fabs(svtx->
get_z() - bbc->
get_z()) / combined_error;
119 if (sigma < min_sigma)
126 if (min_sigma > 3.0 || !bbc_best)
continue;
131 for (
unsigned int i = 0; i < 3; ++i)
134 for (
unsigned int j = i; j < 3; ++j)
147 used_svtx_vtxids.insert(svtx->
get_id());
149 used_bbc_vtxids.insert(bbc_best->
get_id());
151 globalmap->
insert(vertex);
160 if (
Verbosity()) cout <<
"GlobalVertexReco::process_event - svtxmap " << endl;
163 svtxiter != svtxmap->
end();
168 if (used_svtx_vtxids.find(svtx->
get_id()) != used_svtx_vtxids.end())
continue;
169 if (isnan(svtx->
get_z()))
continue;
174 for (
unsigned int i = 0; i < 3; ++i)
177 for (
unsigned int j = i; j < 3; ++j)
191 used_svtx_vtxids.insert(svtx->
get_id());
193 globalmap->
insert(vertex);
202 if (
Verbosity()) cout <<
"GlobalVertexReco::process_event - bbcmap" << endl;
205 bbciter != bbcmap->end();
210 if (used_bbc_vtxids.find(bbc->
get_id()) != used_bbc_vtxids.end())
continue;
211 if (isnan(bbc->
get_z()))
continue;
237 used_bbc_vtxids.insert(bbc->
get_id());
239 globalmap->
insert(vertex);
261 cout <<
PHWHERE <<
"DST Node missing, doing nothing." << endl;
274 GlobalVertexMap *vertexes = findNode::getClass<GlobalVertexMap>(topNode,
"GlobalVertexMap");
279 globalNode->
addNode(VertexMapNode);
283 cout <<
PHWHERE <<
"::ERROR - GlobalVertexMap pre-exists, but should not, perhaps you are also running the FastSim" << endl;