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 and Analysis for SpinQuest (Last updated on Jan 29, 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.

1. Access the [Rivanna computer](https://ood.hpc.virginia.edu/pun/sys/dashboard).
2. Clone the repository:
   ```bash
   git clone https://github.com/uva-spin/UVA_RUS_Basic
   ```
3. Go to the repository:
   ```bash
   cd UVA_RUS_Basic
   ```
4. Set up the environment:
   ```bash
    source /project/ptgroup/spinquest/this-e1039.sh
   ```
5. Run the simulation macro locally for testing. 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:
   ```bash
   cd DY_Target
   root -b 'Fun4Sim.C(1000)'
   ```
6. Once the job runs locally and looks alright, you can submit a few jobs on the grid before submitting large jobs:
   ```bash
   ./jobscript.sh test 2 1000
   ```
   - `test` is the name of this job, used as the name of a new directory to store job outputs.
   - `2` is the number of jobs.
   - `1000` is the number of events per job.
   - Job outputs will appear under `/sfs/weka/scratch/<username>/MC`.
   - You can use "squeue -u user", to check the status of your jobs (or use the "Active Jobs" tab on your UVA OpenOnDemand [web page:](https://ood.hpc.virginia.edu/pun/sys/dashboard/activejobs?jobcluster=all&jobfilter=user)).

Here are the updated instruction of generating Monte Carlo for SpinQuest simulations and analysis

  • Login to Rivanna (https://ood.hpc.virginia.edu/pun/sys/dashboard)
  • Create a folder to submit your jobs from on /project/ptgroup/ or /project/UVA-Spin
  • The scripts to generate Monte Carlo (MC) events on Rivanna are in: 
  • /project/ptgroup/work/MC_Generation

    You can make more and store the generating scripts here but label them in a way that is easy to understand.  The present naming convention is <Exp>_<channel>_<vertex origin>
    • Option for <Exp> are 906 or 1039.  The Geant4 geometry is different for the setup of E906 and E1039, so for SpinQuest make sure you are using the E1039 geometry.
    • Option for <channel> are : Drell-Yan (DY), Jpsi (JPsi), Psi' (Psip) Pion background (Pion), Kaon background (Kaon), Random-multi muons (MultiMuon), Single Muons + or- (SingMup/m)
    • Option for <Vertex origin> : target (Target), Beam Dump (Dump), Everything that seen by the beam (All), The gap between the target and dump (TargetDumpGap), and arbitrary vertex origin (Manual, should specify numbers such as x,y,z→25,25,100 would be a target size with diameter 25cm and 100cm long.
  • You can copy any MC scripts to your directory to submit.  The scripts to generate Monte Carlo (MC) events on Rivanna are in: 

    /project/ptgroup/work/MC_Generation

    Example of copying: cd /project/ptgroup/YourFolder

    rsync -av --exclude scratch /project/ptgroup/work/MC_Generation/DY_Target_script .


    We will keep track of all MC generation scripts so we can all see how a particular MC batch was produced.  Details of each one should be kept in ReadMe in that directory.
  • Other MC configurations you make that are not included in this directory you should copy over and make a note about so other people can use it as well.
  • To summit you jobs to produce the MC navigate to the directory where you want to run the script.
  • Setup the environment using: source /project/ptgroup/spinquest/this-e1039.sh  command
  • Submit your job using the following command.
    ./jobscript.sh <Outputfoldername> <Number of jobs> <Number of Events per Job> For example: ./jobscript.sh DY_Target_1M  100  10000       (Here we need to generate ~1M events. The accepted events depend on the channel). Strongly recommended not to exceed 10K events per job.

...