CDMS Detector Monte Carlo Group at Texas a&M
How-To Run the DMC and CDMSbats on Brazos
Richard Lawrence, Jorge Morales, David Toback, Katrina Colletti (Aug 2014 - Aug 2016)
Overview
DMC Production is a sequence of several code executions.
- SuperSIM
A simulation of how an incoming particle would scatter or be absorbed by the detector crystal, resulting in energy deposited. SuperSIM is usually handled by another team.
- Detector Monte Carlo
A simulation of the detector crystal response to an energy deposit, resulting in a current output to the hardware. There are two projects for handling this step; MATLAB and GEANT4. This guide covers the use of MATLAB DetectorMC. It includes a standalone module named TES ODE written in python.
- Preprocessing
The current output of MATLAB DetectorMC needs to be put into the standard format for CDMS data. In the future, this step will also add noise if so desired.
- Processing (cdmsbats)
The code humorously named cdmsbats, which is run on both monte carlo and real data, attempts to estimate the energy in an event and labels events for selection by analysis teams.
Getting Started and Software Setup
Instructions:
- Follow the MitchComp CDMS new user guide section II to gain access to SUF machines. Do set up your ssh-key.
- Git will encounter the nickname 'nero', so you need to set up 'nero' on your ssh config
>$ nano ~/.ssh/config
Add the following:
Host nero
Hostname nero.stanford.edu
port 26
user {your-username}
- Set up a space in your work area to install relevant software. Navigate to your work area in /fdata/.
>$ mkdir "/fdata/hepx/store/user/<username>/DMC"
>$ mkdir /fdata/hepx/store/user/<username>/DMC/Code
>$ mkdir /fdata/hepx/store/user/<username>/DMC/Samples
- Determine the version number of the Production you will be creating. For example, it could be V1.5. Create a work space with the same name.
>$ mkdir /fdata/hepx/store/user/<username>/DMC/Samples/V1.5
>$ mkdir /fdata/hepx/store/user/<username>/DMC/Samples/V1.5/Processed
>$ mkdir /fdata/hepx/store/user/<username>/DMC/Samples/V1.5/Raw
Recommendations
DMC Production package
The source and Readme are found in the
DMCProd Git repository.
>$ cd /fdata/hepx/store/user/<username>/DMC
>$ git clone --recursive nero:/data/git/DMC/DMCProd.git
>$ mkdir /fdata/hepx/store/user/<username>/DMC/DMCProd/checkuptools/jobcheck
CDMS Bats
This step should be equivalent to the MitchComp
CDMS Bats setup guide, section I. The source is found in the
cdmsbats Git repository
- Do choose the following install location.
>$ cd /fdata/hepx/store/user/<username>/DMC/Code
>$ git clone --recursive nero:/data/git/Reconstruction/cdmsbats.git
- Determine which version of CDMS Bats is tagged to your production. For example, it could be v5.6.4. Checkout the appropriate version in git.
>$ cd /fdata/hepx/store/user/<username>/DMC/Code/cdmsbats
>$ git tag #shows the versions you have.
>$ git checkout tags/v5.6.4
- Load the environment needed for compile.
>$ export PATH=/home/hepxadmin/miniconda/bin:$PATH
>$ export LD_LIBRARY_PATH=/home/hepxadmin/miniconda/lib
- Compile is done by 'make'. It takes a long time.
>$ make
- Now, just go to the merging scripts location, and make. Your PATH must still be loaded as above.
>$ cd utilities/auto_processing
>$ make
>$ mkdir logs # this will be needed when you run the code
MATLAB Detector MC
This step should be equivalent to the Readme in the
DetectorMC Git repository. Matlab is already installed on all Brazos nodes, however, you must load the module by hand.
- Do choose the following install location.
>$ cd /fdata/hepx/store/user/<username>/DMC/Code
>$ git clone --recursive nero:/data/git/DMC/CDMS_DetectorMC.git
- Determine which version of DetectorMC is tagged to your production. For example, it could be v4.2.3. Checkout the appropriate version in git.
>$ cd /fdata/hepx/store/user/<username>/DMC/Code/CDMS_DetectorMC
>$ git tag #shows the versions you have.
>$ git checkout tags/v4.2.3
- Find out which versions of Gcc and MATLAB are tagged to your production. For example, it could be versions 4.8.2 and R2015a
- Confirm that the modules can be loaded together.
>$ module spider matlab/R2015a
- Load the modules.
>$ module load gcc/4.8.2
>$ module load matlab/R2015a
- Compile using this command. It takes a long time.
>$ mcc -m -v -I CDMS_DMC_Code/CDMS_ChargeMC/ -I CDMS_DMC_Code/CDMS_ChargeMC_HV/
-I CDMS_DMC_Code/CDMS_DMC_Convert/ -I CDMS_DMC_Code/CDMS_DMC_EPotEvolve/
-I CDMS_DMC_Code/CDMS_DMC_Manage/ -I CDMS_DMC_Code/CDMS_DMC_Misc/
-I CDMS_DMC_Code/CDMS_DMC_Movie/ -I CDMS_DMC_Code/CDMS_DMC_PrevParam/
-I CDMS_DMC_Code/CDMS_DMC_Validation/ -I CDMS_DMC_Code/CDMS_FETSim/
-I CDMS_DMC_Code/CDMS_GridParams/ -I CDMS_DMC_Code/CDMS_ManageGrid/
-I CDMS_DMC_Code/CDMS_PhononMC/ -I CDMS_DMC_Code/CDMS_TESSim/
CDMS_DMC_Code/CDMS_DMC.m
TES ODE (more Detector MC)
The source is found in the
TES_ODE Git repository.
>$ cd /fdata/hepx/store/user/<username>/DMC/Code
>$ git clone --recursive nero:/data/git/DMC/TES_ODE.git
Preprocessing
The source is found in the
DMC Pre Bats Git repository. However, the Readme isn't exactly what we need. The steps to follow will come later.
>$ cd /fdata/hepx/store/user/<username>/DMC/Code
>$ git clone --recursive nero:/data/git/DMC/DMCPreBats.git
DMC Production Inputs
The source is found in the
DMC Prod Inputs Git repository. This contains, among other things, the SuperSIM inputs created by other teams.
- Choose an installation location. I recommend the following (assuming you named your production version V1.5 in the steps above).
>$ cd /fdata/hepx/store/user/<username>/DMC/Samples/V1.5
>$ git clone --recursive nero:/data/git/DMC/DMCProdInputs.git
- Determine which version of the Production Inputs is tagged for your production. For example, it could be v1.4
>$ cd /fdata/hepx/store/user/<username>/DMC/Samples/V1.5/ProdInputs
>$ git tag #shows the versions you have.
>$ git checkout tags/v1.4
- Unpack the Production Inputs into your Production Raw area. This creates a directory structure and symbolic links to needed input files. It takes a long time.
>$ ./init_Prod.sh /fdata/hepx/store/user/<username>/DMC/Samples/V1.5/Raw
Running Production
Aaaand I am done for the day.