Run GEMC Isotropic Theta and Phi for Sector 1 DC

From New IAC Wiki
Revision as of 21:30, 29 August 2017 by Vanwdani (talk | contribs) (→‎Batch Conditions for GEMC 3.0)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

LUND Splitting

Using CLAS12 isotropic distribution LUND files for LH2 and NH3 targets and varying incident electron energy we are limited in the number of particles GEMC can work with. Since theta has a range of 35 degrees, by .1 degree increments, this gives 350 different particles as a function of theta. Similarly, for phi with a range of 60 degrees, by .2 degree increments, we find 300 different phi values. Combing these results we should have 105000 unique theta-phi combinations. Since LUND files have 3 lines for every 1 particle simulated we should have 315000 lines in an Theta and Phi Isotropic distribution LUND file. Using the result of the LUND file created earlier:


~/src/CLAS/GEMC/experiments/eg12/MolrBckGrd/DV/Isotropic_study/LH2_0Sol_0Tor_11GeV_IsotropicPhi_ShieldOut> wc -l LUND_Spread_LH2_IsotropicPhi.LUND
315000 LUND_Spread_LH2_IsotropicPhi.LUND

Moving the LUND file into a directory style name

mv LUND_Spread_LH2.LUND LH2_0Sol_0Tor_11GeV_IsotropicPhi_ShieldOut.LUND

Spliting the LUND file into 105 parts of 1000 events, or 3000 lines

split -d -l 3000 -a 3 LH2_0Sol_0Tor_11GeV_IsotropicPhi_ShieldOut.LUND LH2_0Sol_0Tor_11GeV_IsotropicPhi_ShieldOut_

Naming these files LUND files

prename 's/(LH2_0Sol_0Tor_11GeV_IsotropicPhi_ShieldOut_\d{3})/$1.LUND/' LH2_0Sol_0Tor_11GeV_IsotropicPhi_ShieldOut_*

Placing each of these files into its own directory, within a directory named LH2_0Sol_0Tor_11GeV_IsotropicPhi_ShieldOut

find . -name "*.LUND" -exec sh -c 'mkdir "${1%.*}" ; mv "$1" "${1%.*}" ' _ {} \;

GCard Building

A program,File:Gcard builder.C is written to install a LUND specific gcard in each directory.

Commands Building

Similarly, File:Commands builder.C is written to install a specific commands file into each directory for testing.

Batch Conditions for GEMC 2.4

The batch job will need to

cd /home/lds/src/CLAS/GEMC/experiments/eg12/MolrBckGrd/DV/Isotropic_study/LH2_0Sol_0Tor_11GeV_IsotropicPhi_ShieldOut
cd /LH2_0Sol_n100Tor_11GeV_Phi10deg_ShieldOut_00
~/src/CLAS/GEMC/source/gemc -USE_GUI=0 -INPUT_GEN_FILE="LUND,LH2_0Sol_0Tor_11GeV_IsotropicPhi_ShieldOut_000.LUND" -N=3000 eg12.gcard>/dev/null
                                                                                                                       -
                                                                                                                       -
                                                                                                                       -
cd /LH2_0Sol_n100Tor_11GeV_Phi10deg_ShieldOut_104
~/src/CLAS/GEMC/source/gemc -USE_GUI=0 -INPUT_GEN_FILE="LUND,LH2_0Sol_0Tor_11GeV_IsotropicPhi_ShieldOut_104.LUND" -N=3000 eg12.gcard>/dev/null
cd ..
~/src/CLAS/evioRootDV/bin/evio2root LH2_0Sol_0Tor_11GeV_IsotropicPhi_ShieldOut.root 105


The weighting found in the LUND file is applied to the scattering angle theta in the Center of Mass frame to produce the Moller Differential Cross Section. We should be able to use the information from the detector hits such as wire numbers and sectors to find a distribution of hits with respect to the scattering angle theta in the Lab Frame. The Theta distribution will need to undergo a Lorentz transformation to the Center of Mass Frame to apply the corresponding weight found in the LUND file. To do this, a qsub batch command can be created: File:Submit builder.C


These files are run by creating another file

File:Minervesubmit builder.C

Running this

source minervesubmit_LH2_0Sol_0Tor_11GeV_IsotropicPhi_ShieldOut


Batch Conditions for GEMC 3.0

To run a "batch job" we will use screen and bash scripts as follows

screen -S 1
cd ~/src/CLAS/GEMC
tcsh
source setup

Where setup has

setenv JLAB_ROOT /home/lds/src/CLAS/GEMC
setenv JLAB_VERSION 2.1
#setenv JLAB_VERSION 1.3
#setenv JLAB_VERSION 4.0
source $JLAB_ROOT/$JLAB_VERSION/ce/jlab.csh
setenv CLARA_HOME /home/lds/src/CLAS/CLARA/myCLARA

We can create a submit file generator

File:Submit builder2.C


We can also create a Batch file generator

File:Block builder.C


This is run by

./Pre-submit
./Block001