R__LOAD_LIBRARY ($PLUTOLIBDIR/libPluto.so) int pip_mupnu_long () { // pi+ (Tb = 1.0 GeV) PParticle pip ("pi+", 1.0 ); // Decay pi+ ---> mu+ , nu_mu PParticle mup ("mu+") , nu ("nu"); PParticle* parttable[] = { &pip, &mup , &nu }; PChannel* pip_decay = new PChannel ( parttable , 2 ); // "2" = no of decay particles // other flags: obsolete // Constructing the full reaction PChannel* table_of_channels[] = { pip_decay }; PReaction* my_reaction = new PReaction ( table_of_channels , "pip_mupnu_long", 1 , 1 , 0 , 0 , 1 ); /* o Table of channels o Output file name o Number of channels in table o Options: f0: 0=Tracked, 1=All particles in ROOT output file_name.root f1: unused f2: 0=Do not calculate, 1=Calculate production vertices for product particles f3: 0=Do not produce, 1=Produce GEANT ascii output file_name.evt (tracked particles always) */ my_reaction->Print (); // Generate events! my_reaction->Loop (10000, 1); /* No of events, status @ end */ return 0; }