Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

   pythia8->set_config_file("phpythia8_DY.cfg");
   pythia8->set_config_file("phpythia8_Jpsi.cfg");

Generating Single or Multi muons from using the multi particle gun

For making a single single  or multiple muons you can use use multi particle gun. The portion of the script below can be found on the SimChainDev module. Set the gen_particle true if you would like to generate single muons from multi particle guns. Some user function are available on the doxygen page.

if(gen_particle) {

    PHG4SimpleEventGenerator *genp = new PHG4SimpleEventGenerator("MUP");

  //genp->set_seed(123);
  genp->add_particles("mu+", nmu);  // mu+,e+,proton,pi+,Upsilon
  if (legacyVtxGen) genp->enableLegacyVtxGen();
  else{
  genp->set_vertex_distribution_function(PHG4SimpleEventGenerator::Uniform,
      PHG4SimpleEventGenerator::Uniform,
      PHG4SimpleEventGenerator::Uniform);
  genp->set_vertex_distribution_mean(0.0, 0.0, -300);
  genp->set_vertex_distribution_width(100.0, 100.0, 400.0);
genp->set_vertex_size_function(PHG4SimpleEventGenerator::Uniform); [For Gaussian distributions use "Gaus"]
    genp->set_vertex_size_parameters(0.0, 0.0);

...