first simulation - E1039-Collaboration/e1039-wiki GitHub Wiki

Getting Started on SpinQuest Simulation

This page is to explain (mainly to the people new to the E1039 software) the whole procedure for generating and analyzing simulated events.

Login to Offline-Analysis Server

spinquestgpvm01.fnal.gov is the main offline-analysis server managed by Fermilab for SpinQuest. The system-level E1039 software is ready for use on this server. You need the Kerberos account issued by Fermilab, in order to login to it via SSH. You open a text terminal on your computer and execute the following commands;

kinit <user>@FNAL.GOV
ssh <user>@spinquestgpvm01.fnal.gov

Configuration for E1039 Software

Once you login to gpvm01, you can execute the following command at any directory, to configure the shell (text terminal) environment to use the E1039 software;

source /exp/seaquest/app/software/osg/software/e1039/this-e1039.sh

You might execute which root and root -b to confirm that you can use ROOT, which is a part of the E1039 software.

Cloning E1039 Analysis Packages

The user-level programs for analysis are stored in the GitHub repository named e1039-analysis. You first clone it onto your home directory;

git clone https://github.com/E1039-Collaboration/e1039-analysis.git

If you have a GitHub account, you better clone it using SSH, i.e. git clone [email protected]:E1039-Collaboration/e1039-analysis.git. If you don't, you better create it soon for future use.

You will use SimChainDev and AnaSimDst in it, to generate and analyze simulated events.

Test of Event Generation

A ROOT macro, e1039-analysis/SimChainDev/Fun4Sim.C, can be used to generate simulated events with various configurations. You execute the following commands to generate a small set for test. Note that you have to source this-e1039.sh in advance, when you newly login to the server.

cd e1039-analysis/SimChainDev/
root -b 'Fun4Sim.C(10)'

It should finish in a few minutes and output multiple files in the current directory;

  • DST.root --- The main data file, which contains the true and reconstructed event info, the simulated detector configuration, etc.
  • recoConsts.tsv --- A list of constants used in the event generation and reconstruction.
  • geom.root --- A TGeo geometry file which can be used in track fitting later.

Event Generation

To generate a large number of simulated events, you execute the macro (Fun4Sim.C) repeatedly at separated output directories. A set of shell scripts (gridsub.sh and gridrun.sh) is preapred for this purpose. You now read this page and try "Basic Usage" in it.

Event Analysis

e1039-analysis/AnaSimDst is a template of event analysis. You now read and try its README.md.

More Documents

You should read the following documents to better understand the commands/programs you tried above.

  1. GitHub tutorial
  2. Fun4All and Simulation tutorials:
  3. Build your own analysis module
⚠️ **GitHub.com Fallback** ⚠️