22 using std::setprecision;
25 using std::ostringstream;
26 using std::stringstream;
124 if (eIt->target().outdeg() < 1) {
125 if (
pMap[*eIt]->pstat() > -10) {
139 vector<shared_ptr<Parton>> mP =
142 vector<fjcore::PseudoJet> forFJ;
144 for (
int i = 0;
i < mP.size();
i++)
145 forFJ.push_back((*mP[
i]).GetPseudoJet());
193 <<
"\"" << n.
id() <<
"(" << fixed << setprecision(2) <<
vMap[
n]->x_in().t()
195 *o <<
"x " <<
vMap[
n]->x_in().x() << endl;
196 *o <<
"y " <<
vMap[
n]->x_in().y() << endl;
197 *o <<
"z " <<
vMap[
n]->x_in().z() << endl;
198 *o <<
"t " <<
vMap[
n]->x_in().t() << endl;
203 <<
"\"(" << fixed << setprecision(2) <<
pMap[
e]->pt() <<
")\"" << endl;
204 *o <<
"plabel " <<
pMap[
e]->plabel() << endl;
205 *o <<
"pid " <<
pMap[
e]->pid() << endl;
206 *o <<
"pstat " <<
pMap[
e]->pstat() << endl;
207 *o <<
"pT " <<
pMap[
e]->pt() << endl;
208 *o <<
"eta " <<
pMap[
e]->eta() << endl;
209 *o <<
"phi " <<
pMap[
e]->phi() << endl;
210 *o <<
"E " <<
pMap[
e]->e() << endl;
217 pMap[*eIt] =
nullptr;
222 vMap[*nIt] =
nullptr;
232 os << *nIt <<
"=" <<
vMap[*nIt]->x_in().t() <<
" ";
238 os << *nIt <<
"=" <<
vMap[*nIt]->x_in().t() <<
" ";
239 cout <<
"Vertex list : " << os.str() << endl;
249 os << *eIt <<
"=" <<
pMap[*eIt]->
pt() <<
" ";
255 os << *eIt <<
"=" <<
pMap[*eIt]->
pt() <<
" ";
256 cout <<
"Parton list : " << os.str() << endl;
271 int plabel,
pid, pstat;
275 if (((
string)(tmp->
key)).find(
"pT") < 1)
277 if (((
string)(tmp->
key)).find(
"eta") < 1)
279 if (((
string)(tmp->
key)).find(
"phi") < 1)
281 if (((
string)(tmp->
key)).find(
"E") < 1)
283 if (((
string)(tmp->
key)).find(
"plabel") < 1)
285 if (((
string)(tmp->
key)).find(
"pid") < 1)
287 if (((
string)(tmp->
key)).find(
"pstat") < 1)
307 if (((
string)(tmp->
key)).find(
"x") < 1)
309 if (((
string)(tmp->
key)).find(
"y") < 1)
311 if (((
string)(tmp->
key)).find(
"z") < 1)
313 if (((
string)(tmp->
key)).find(
"t") < 1)
319 vMap[
n] = make_shared<Vertex>(
x,
y,
z,
t);
327 gv.open(fName.c_str());
331 gv <<
"digraph \"graph\" {" << endl;
333 gv <<
"rankdir=\"LR\";" << endl;
334 gv <<
"node [shape=plaintext, fontsize=11];"
336 gv <<
"edge [fontsize=10];" << endl;
346 label = (
"[label=\"" +
to_string(n) +
"(");
351 stream << fixed << setprecision(2) << (
vMap[*nIt]->x_in().t());
352 gv << n <<
" " << label << stream.str() << label2 << endl;
363 if ((
pMap[*eIt]->pstat()) == -13) {
365 label = (
"[style=\"dotted\" color=\"red\"label=\"(");
366 }
else if ((
pMap[*eIt]->pstat()) == -11) {
368 label = (
"[color=\"red\"label=\"(");
369 }
else if ((
pMap[*eIt]->pstat()) == -17) {
371 label = (
"[color=\"darkorange\"label=\"(");
372 }
else if ((
pMap[*eIt]->pstat()) == -1) {
374 label = (
"[color=\"green\"label=\"(");
375 }
else if ((
pMap[*eIt]->
t()) < 4.0) {
377 label = (
"[color=\"blue\"label=\"(");
379 label = (
"[label=\"(");
383 if ((
pMap[*eIt]->pstat()) == -13) {
384 stream << std::scientific << setprecision(1) << (
pMap[*eIt]->e()) <<
","
385 << (
pMap[*eIt]->
pt()) <<
"," << (
pMap[*eIt]->
t()) <<
","
388 stream << fixed << setprecision(2) << (
pMap[*eIt]->e()) <<
","
389 << (
pMap[*eIt]->
pt()) <<
"," << (
pMap[*eIt]->
t()) <<
","
394 <<
" " << label << stream.str() << label2 << endl;
405 g.open(fName.c_str());
407 g <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
408 g <<
"<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns\"" << endl;
409 g <<
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" << endl;
410 g <<
"xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns" << endl;
411 g <<
" http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd\">" << endl;
413 g <<
"<key id=\"nlabel\" for=\"node\" attr.name=\"label\" "
414 "attr.type=\"string\"/>"
416 g <<
"<key id=\"nx\" for=\"node\" attr.name=\"x\" attr.type=\"double\"/>"
418 g <<
"<key id=\"ny\" for=\"node\" attr.name=\"y\" attr.type=\"double\"/>"
420 g <<
"<key id=\"nz\" for=\"node\" attr.name=\"z\" attr.type=\"double\"/>"
422 g <<
"<key id=\"nt\" for=\"node\" attr.name=\"t\" attr.type=\"double\"/>"
425 g <<
"<key id=\"elabel\" for=\"edge\" attr.name=\"label\" "
426 "attr.type=\"string\"/>"
428 g <<
"<key id=\"epl\" for=\"edge\" attr.name=\"plabel\" attr.type=\"int\"/>"
430 g <<
"<key id=\"epid\" for=\"edge\" attr.name=\"pid\" attr.type=\"int\"/>"
432 g <<
"<key id=\"estat\" for=\"edge\" attr.name=\"pstat\" attr.type=\"int\"/>"
435 g <<
"<key id=\"ept\" for=\"edge\" attr.name=\"pT\" attr.type=\"double\"/>"
437 g <<
"<key id=\"eeta\" for=\"edge\" attr.name=\"eta\" attr.type=\"double\"/>"
439 g <<
"<key id=\"ephi\" for=\"edge\" attr.name=\"phi\" attr.type=\"double\"/>"
441 g <<
"<key id=\"ee\" for=\"edge\" attr.name=\"E\" attr.type=\"double\"/>"
444 g <<
"<graph id=\"G\" edgedefault=\"directed\">" << endl;
452 stream << fixed << setprecision(2) << (
vMap[*nIt]->x_in().t());
454 g <<
"<node id=\"" << n <<
"\">" << endl;
456 g <<
"<data key=\"nlabel\">" <<
to_string(n) +
"(" + stream.str() +
")"
457 <<
"</data>" << endl;
458 g <<
"<data key=\"nx\">" <<
vMap[*nIt]->x_in().x() <<
"</data>" << endl;
459 g <<
"<data key=\"ny\">" <<
vMap[*nIt]->x_in().y() <<
"</data>" << endl;
460 g <<
"<data key=\"nz\">" <<
vMap[*nIt]->x_in().z() <<
"</data>" << endl;
461 g <<
"<data key=\"nt\">" <<
vMap[*nIt]->x_in().t() <<
"</data>" << endl;
462 g <<
"</node>" << endl;
469 g <<
"<edge id=\"" << n <<
"\" source=\"" <<
to_string(eIt->source().id())
470 <<
"\" target=\"" <<
to_string(eIt->target().id()) <<
"\">" << endl;
471 g <<
"<data key=\"elabel\">" <<
to_string((
pMap[*eIt]->
pt())) <<
"</data>"
473 g <<
"<data key=\"epl\">" <<
pMap[*eIt]->plabel() <<
"</data>" << endl;
474 g <<
"<data key=\"epid\">" <<
pMap[*eIt]->pid() <<
"</data>" << endl;
475 g <<
"<data key=\"estat\">" <<
pMap[*eIt]->pstat() <<
"</data>" << endl;
476 g <<
"<data key=\"ept\">" <<
pMap[*eIt]->pt() <<
"</data>" << endl;
477 g <<
"<data key=\"eeta\">" <<
pMap[*eIt]->eta() <<
"</data>" << endl;
478 g <<
"<data key=\"ephi\">" <<
pMap[*eIt]->phi() <<
"</data>" << endl;
479 g <<
"<data key=\"ee\">" <<
pMap[*eIt]->e() <<
"</data>" << endl;
480 g <<
"</edge>" << endl;
484 g <<
"</graph>" << endl;
485 g <<
"</graphml>" << endl;