Versions Compared

Key

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

Take a look at: https://www.cs.rice.edu/~vo9/deeplearning/2019/slides/Rivanna.pdf


Updated Instructions for Generating Monte Carlo Simulations in RUS format for SpinQuest (Last updated on

...

Feb 23, 2025, by Forhad)

If you would like to generate simulated events for SpinQuest experiments and save the output file in RUS format, you should follow these steps.

...

const bool count_only_good_events = falsetrue;
se->run(nevent, count_only_good_events);

This means that the Fun4All macro will keep running until we get accepted events, as required by the SQGeomAcc condition.  You .The legacy generator has been used as the default for J/Psi productions because it is faster compared to Pythia8. You can use the package based on your interest. For example, let's use Drell-Yan events, where the beam interaction point is at the target location:

...

7. Once everything looks alright, submit large jobs. For example:
./jobscript.sh DY_Target 100 1000

Configurations of Event Generation Properly  (Last updated on Jan 30, 2025, by Forhad)

8.   Once all the jobs are completed, you can use the hadd or TChain command to merge the ROOT files. Here is an example using the hadd command:

  1. Basic Usage: To merge multiple ROOT files into a single output file, use: hadd output_file.root input_file1.root input_file2.root input_file3.root
  2. Merging Large File Lists with a Minimum File Size Constraint: To merge only root.root files larger than 20 KB from a directory, use:   hadd output_file.root $(find output_file_path -path "*/RUS.root" -size +20k)

Configurations of Event Generation Properly  (Last updated on Jan 30, 2025, by Forhad)

Wall time when dimuons Wall time when dimuons are accepted in a top-bottom plane-wise (default).

...

  • Beam profile
    • The profile here means the distribution shape of beam protons in X and Y (= R). 
    • When "legacyVtxGen SQ_vtx_gen = true" (or the variable name is "legacyVtxGen" in old versions)
    • When "SQ_vtx_gen = false" (or the variable name is "legacyVtxGen" in old versions)When "legacyVtxGen = false"
      • The shape is defined by the following functions of event generators.
      • "set_vertex_distribution_function()" sets the shape to "Uniform" or "Gaussian".
      • "set_vertex_distribution_mean()" sets the mean of the distribution.
      • "set_vertex_distribution_width()" sets the half width in case of "Uniform" or "sigma" in case of "Gaussian".
  • Distribution of z-vertex
    • The z-vertex means the position of each generated event in Z.
    • When "legacyVtxGen = true"
      • The distribution shape follows the probability of beam-material interaction, namely the product of beam intensity and material amount at Z, where the beam intensity is attenuated over Z.
      • When "VTX_GEN_MATERIAL_MODE" is set to "Target" (via rc->set_CharFlag("VTX_GEN_MATERIAL_MODE", "Target")), events are generated only on the target material.

      • "VTX_GEN_MATERIAL_MODE" can be set to "Dump" or "TargetDumpGap" to enable only the dump material or the material (i.e. air) in between the target and the dump.
    • When "legacyVtxGen = false"
      • The distribution shape is defined by "set_vertex_distribution_function()" etc. together with the beam profile.
  • Target position
    • The z-center and the length of the target is defined by "double target_coil_pos_z" and "double target_l" in Fun4Sim.C (-300 and -7.9 cm by default).
    • "target_z" is the position of the target material relative to the target coils.  It is 0 cm by default.  If you change "target_l", you have to change "target_z" to "0" together, unless you intend to make the relative position non-zero.
    • The x,y-center and the angle of the target are 0 by default.  If you need to change them,
      • Copy "G4_Target.C" to your working directory;

        cp /project/ptgroup/spinquest/core/default/macros/top/G4_Target.C .


      • Edit your "G4_Target.C" file.
      • Replace #include <top/G4_Target.C> with #include "G4_Target.C" in "Fun4Sim.C".

...