35 using namespace Jetscape;
42 ostream &
operator<<(ostream & ostr,
const fjcore::PseudoJet & jet);
53 int main(
int argc,
char** argv)
55 JetScapeLogger::Instance()->SetDebug(
false);
56 JetScapeLogger::Instance()->SetRemark(
false);
59 JetScapeLogger::Instance()->SetVerboseLevel(0);
67 vector<shared_ptr<PartonShower>> mShowers;
74 auto reader=make_shared<JetScapeReaderAscii>(
"test_out.dat");
84 cout<<
"Analyze current event = "<<
reader->GetCurrentEvent()<<endl;
85 mShowers=
reader->GetPartonShowers();
88 for (
int i=0;
i<mShowers.size();
i++)
90 cout<<
" Analyze parton shower = "<<
i<<endl;
92 mShowers[
i]->PrintVertices();
93 mShowers[
i]->PrintPartons();
95 finals += mShowers[
i]->GetFinalPartonsForFastJet().size();
97 fjcore::ClusterSequence cs(mShowers[
i]->GetFinalPartonsForFastJet(), jet_def);
101 cout<<jet_def.description()<<endl;
104 for (
int k=0;
k<jets.size();
k++)
105 cout<<
"Anti-kT jet "<<
k<<
" : "<<jets[
k]<<endl;
107 cout<<
"Shower initiating parton : "<<*(mShowers[
i]->GetPartonAt(0))<<endl;
114 mShowers[
i]->SaveAsGV(
"my_test.gv");
115 mShowers[
i]->SaveAsGML(
"my_test.gml");
116 mShowers[
i]->SaveAsGraphML(
"my_test.graphml");
122 cout <<
" Found " << finals <<
" final state partons." << endl;
123 auto hadrons =
reader->GetHadrons();
124 cout<<
"Number of hadrons is: " << hadrons.size() << endl;
126 fjcore::ClusterSequence hcs(
reader->GetHadronsForFastJet(), jet_def);
128 cout<<
"AT HADRONIC LEVEL " << endl;
129 for (
int k=0;
k<hjets.size();
k++)
130 cout<<
"Anti-kT jet "<<
k<<
" : "<<hjets[
k]<<endl;
144 JSINFO<<
"Some GTL graph/shower analysis/dfs search output:";
154 cout<<
"DFS graph search feature from GTL:"<<endl;
156 cout<<
"Node/Vertex ordering result from DFS:"<<endl;
158 for (itt2 = search.
begin(), endt2=search.
end(); itt2 !=endt2; ++itt2)
163 cout<<
"Edge/Parton ordering result from DFS:"<<endl;
172 cout<<
"List of root nodes found in graph/shower : ";
188 INFO_NICE<<
"------------------------------------";
189 INFO_NICE<<
"| Reader Test JetScape Framework ... |";
190 INFO_NICE<<
"------------------------------------";
197 ostream &
operator<<(ostream & ostr,
const fjcore::PseudoJet & jet) {
201 ostr <<
" pt = " << jet.pt()
202 <<
" m = " << jet.m()
203 <<
" y = " << jet.rap()
204 <<
" phi = " << jet.phi();