Skip to content

TiagoTAlves/ND_LAr_Detector_Systematics_framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ND LAr Detector Systematics Framework

This repository contains code, documentation, and resources related to the study and implementation of detector systematic uncertainties for the Near Detector Liquid Argon (ND LAr) component of DUNE.

Overview

The goal of this project is to develop, organize, and document tools and workflows for handling systematics in ND LAr analyses.

Getting Started

  1. Clone the repository:
    git clone https://github.com/TiagoTAlves/ND_LAr_Detector_Systematics_framework.git
  2. Install dependencies:
    See the requirements section below.

Requirements

  • Python 3.8+

Install dependencies with:

pip install -r requirements.txt

Repository Structure

.
├──📂 edep-sim-truth-studies/
|  ├─📂 edep-sim/
|  ├─📂 edep-sim-tools/
|  |  └─point_walk.C
|  ├─📂 outputs/
|  ├─📂 plots/
|  ├─ edep_cafmaker_plotting.py
|  ├─ edep_faux_cafmaker.py
|  ├─ edep_funcs.py
|  ├─ edep_plotting.py
|  ├─ edep_read.py
|  ├─ run_edep_faux_cafmaker.sh
|  ├─ run_edep_read.sh
|  ├─ setup.sh
|  ├─ submit_edep_faux_cafmaker.sub
|  └─ submit_edep_read.sub 
├──📂 caf-studies
|  ├─📂 duneanaobj/
|  ├─📂 outputs/
|  ├─ caf_funcs.py
|  ├─ caf_read.py
|  └─ setup.sh 
├──📂 input-root-files/
|  ├─📂 CAF
|  └─📂 EDEP-SIM
├── .gitignore
├── README.md
└── requirements.txt

CAF Studies

This directory was not nessecerily made to analyse and make plots. Instead it is used to store data in an output root file so plotting can be made easier and much quicker for finding correct binnings for various particles. For now this is still a work in progress.

To make these root files you must clone the duneanaobj repository and then build it. This can be done very easily using the setup.sh bash script.

$ cd caf-studies
$ source setup.sh

This both clones the duneanaobj repo and builds it so that reading EDep-Sim files can be done using the python script. Now to create the output root file you can simply run:

$ python3 caf_read.py --chunk=0 --chunksize=1

EDep Sim Truth Studies

For analysis

This directory was not nessecerily made to analyse and make plots. Instead it is used to store data in an output root file so plotting can be made easier and much quicker for finding correct binnings for various particles. For now this is still a work in progress.

To make these root files you must clone the EDep-Sim repository and then build it. This can be done very easily using the setup.sh bash script.

$ cd edep-sim-truth-studies
$ source setup.sh

This both clones the EDep-Sim repo and builds it so that reading EDep-Sim files can be done using the python script. Now to create the output root file you can simply run:

$ python3 edep_read.py --chunk=0 --chunksize=1

And then to plot:

$ python3 edep_plotting.py

For now, if you run both functions as is, it will create 2 directories within edep-sim-truth-studies; plots and outputs.

The plots/ directory will eventually be discontinued but for now gives us a tool to make changes whilst these tools are still in development. The outputs/ diretory will deposit the output directory file. For now the output files will be written over each other so if there is a file you would like, please rename it in the python script or after creating it.

Using edep-sim-tools

There is currently only one tool within edep-sim-tools which is the point_walk.C. This allows you to see the different materials that compose the current ND materials in use through sending a point through the whole complex and see the different materials that are interacted with. This is how we managed to get the exact measurements to find distance to wall in edep_read.py.

To run it you must go into the file

void point_walk(double  x=0, double  y=0, double  z=100000,
                double px=0, double py=0, double pz=-1,

Here you can change the position and direction you start from to take the point walk.

Once you have made these changes you then run it.

root point_walk.C

Which should give you an output that looks like this:

------------------------------------------------------------------------------------------------------------------------------------------
start[  0] {   0.00000,10000.00000, 11403.00000} ds=    0.00000 enter volWorld_PV_1          of Rock            [in no-mom                ]
point[  1] {   0.00000,10000.00000, 11403.00000} ds=    0.00000 enter volDetEnclosure_PV_0   of Air             [in rockBox_lv_PV_0       ]
point[  2] {   0.00000,1247.77000, 11403.00000} ds= 8752.23000 enter volTMS_PV_0            of Air             [in volDetEnclosure_PV_0  ]
point[  3] {   0.00000,1158.77000, 11403.00000} ds=   89.00000 enter modulelayervol2_PV_0   of Air             [in volTMS_PV_0           ]
point[  4] {   0.00000,-3863.23000, 11403.00000} ds= 5022.00000 enter volTMS_PV_0            of Air             [in volDetEnclosure_PV_0  ]
point[  5] {   0.00000,-5652.23000, 11403.00000} ds= 1789.00000 enter volDetEnclosure_PV_0   of Air             [in rockBox_lv_PV_0       ]
point[  6] {   0.00000,-6614.73000, 11403.00000} ds=  962.50000 enter rockBox_lv_PV_0        of Rock            [in volWorld_PV_1         ]
point[  7] {   0.00000,-11614.73000, 11403.00000} ds= 5000.00000 enter volWorld_PV_1          of Rock            [in no-mom                ]
point[  8] {   0.00000,-300000.00000, 11403.00000} ds=288385.27000 enter volWorld_PV_1          of Rock            [in no-mom                ]
------------------------------------------------------------------------------------------------------------------------------------------

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors