Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Generation

This module allows you to perform event generation using the Fun4Sim.C macro, similar to the SimChainDev module. The macro uses the Fun4AllRUSEventInputManager and Fun4AllRUSEventOutputManager for RUS file input and output handling.

The basic file structure is defined to include only the minimum or most significant variables needed for further processing, such as reconstruction and vertexing.

Event-Level Variables

Variable Name Type Description
runID int Identifier for the current run
spillID int Identifier for the spill in the run
eventID int Unique identifier for the event
turnID int Identifier for the Turn
rfID int Identifier for the RF
fpgaTrigger int[5] Array of FPGA trigger
nimTrigger int[5] Array of NIM trigger
rfIntensity int[33] Array for QIE RF intensities

Hit-Level Variables

Variable Name Type Description
gProcessID std::vector<int> Process IDs for MC hits (only for the MC )
hitID std::vector<int> Hit IDs for all hits
hitTrackID std::vector<int> Track IDs for all hits
detectorID std::vector<int> Detector IDs for all hits
elementID std::vector<int> Element IDs associated with each hit
driftDistance std::vector<double> Drift distances for each hit
tdcTime std::vector<double> TDC timing values for each hit

##Truth-Level (MC) Variables (only if true_mode is enabled)

Variable Name Type Description
gCharge std::vector<int> Charges of MC tracks .
gTrackID std::vector<int> Track IDs .
gvx, gvy, gvz std::vector<double> Vertex position
gpx, gpy, gpz std::vector<double> Momentum at the vertex
gx_st1, gy_st1, gz_st1 std::vector<double> Position at Station 1
gpx_st1, gpy_st1, gpz_st1 std::vector<double> Momentum at Station 1
gx_st3, gy_st3, gz_st3 std::vector<double> Position at Station 3
gpx_st3, gpy_st3, gpz_st3 std::vector<double> Momentum at Station 3

Simulation Guide

  1. Access the Rivanna computer.

  2. Clone the repository:

    git clone https://github.com/uva-spin/UVA_RUS_Basic
  3. Go to the repository:

    cd UVA_RUS_Basic
  4. Set up the environment:

     source /project/ptgroup/spinquest/this-e1039.sh
  5. This repository contains the simulation macros and code to test and run the Fun4Sim simulation locally. Run the simulation macro locally for testing. In the Fun4Sim.C macro, we have used:

const bool count_only_good_events = true; 
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 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(10)'
  1. Once the job runs locally and looks alright, you can submit a few jobs on the grid before submitting large jobs:

    ./jobscript.sh test 2 10
    • 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.
    • 10 is the number of accepted 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:).
  2. Once everything looks alright, submit large jobs. For example:

    ./jobscript.sh DY_Target 100 200
  3. For more detailed information regarding job subscriptions, read the instructions here: SpinQuest Monte Carlo Generation on Rivanna.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages