int eta_write_ascii () { PReaction* R = new PReaction ("3.5", "p", "p", "p p eta"); // Defining variables further used to write to ASCII file R->Do ("eta_px = [eta]->Px() ; eta_py = [eta]->Py() ;" "eta_pz = [eta]->Pz() ; eta_m = [eta]->M () ") ; // Writing our variables to ASCII output file R->Output("eta_sample.txt", "echo $eta_px $eta_py $eta_pz $eta_m"); R->Print(); R->Loop (1000) ; return 0; }