Just for additional info:
one can of course combine the scripts and access the vertex info directly via the variables _event_vertex_*:
PReaction my_reaction("_P1 = 2.2","g","p","p eta [g g]","delme",1,0,1,0);
my_reaction.Do("vz = sampleFlat() * 400 - 200;");
my_reaction.Do("loop: vx = sampleFlat() * 20 - 10; vy = sampleFlat() * 20 - 10; ");
my_reaction.Do("if ((vx*vx + vy*vy) > 100); goto loop");
my_reaction.Do("_event_vertex_x=vx; _event_vertex_y=vy; _event_vertex_z=vz; ");
my_reaction.Loop(10000);