From bcebf5b289f27082481e7fd741fe8d65ee82eaf2 Mon Sep 17 00:00:00 2001 From: cipriangal Date: Tue, 6 Jun 2017 10:45:33 -0400 Subject: [PATCH 01/10] major reconfiguration of the readme Separate the information into separate sections. Add some structure and table of contents. Remove obsolete information. --- README | 148 +++++++++++++++++++++++++-------------------------------- 1 file changed, 64 insertions(+), 84 deletions(-) diff --git a/README b/README index 145578b..48f2a6e 100644 --- a/README +++ b/README @@ -1,112 +1,92 @@ +*PREX simulation package + +**Table of Contents** +- [[#getting-code][Getting the code]] + - [[#workflow][Workflow]] + - [[#compiling-code][Compiling the code]] + - [[#running-code][Running the code]] + - [[#analyzing-output][Analyzing output]] + - [[#anaRad][anaRad]] + - [[#dose-estimate][Does Estimates]] +- [[#package-contents][Package contents]] +- [[#output-tree][Output format]] + +**Getting the code** + `git clone git@github.com:cipriangal/prexSim` + +***Workflow*** +If you intend to make changes to the code and contribute it is suggested that you fork this repository into your own github account. (There is a button for that on the top right of the page). You will then have a backup for your local repository on github. To get your own repository run the same line as above but change "cipriangal" to your username. + +Before you start working on the code make sure you update your local repository from the remote: + `git pull` + +After you are done editing a file (or at the end of the day) you should: +`git commit -m "clear message of changes" changedFile1.ext ... changedFileN.ext` (this saves the instance of these files into your local copy of the repository) +`git push` (this takes all the saved instances you have in your local repository and send them to the remote repository) + +If you have a feature in your fork and you would like to make it available to other you can create a pull request. [[https://help.github.com/articles/creating-a-pull-request/][Pull Request Documentation]] + +This repository contains multiple branches for working on different issues. You can see the list of branches at the top of the file list. If you want to create your own branch follow instrucations at [[https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging][basic branching]]. + +***Compiling the code*** + ``` + mkdir build + cd build + cmake ../ + make + cd - + ``` +***Running the code*** + build/prexsim macros/prex_prerunCiprian.mac (to visualize) + build/prexsim macros/prex_prerunCiprian.mac macros/myRun.mac (for batch mode) + +These two .mac files need to be modified in order to run exactly what you want. Make sure you change the number of detectors when changing from prex1 to prex2 configurations. + +***Analyzing output*** + +****anaRad**** + ``` + mkdir output + build/anaRad + ``` + +The last line will give you instructions on what is needed as input for the executable. This will produce tables of flux and power in each detector separated by energy. The output rootfile will have additional granularity. -Updated PREX simulation. - -To compile: -mkdir build; cd build -cmake ../ -cd - - -To run the simulation: -build/prexsim macros/prex_prerunCiprian.mac (to visualize) -build/prexsim macros/prex_prerunCiprian.mac macros/myRun.mac (for batch mode) - These two .mac files need to be modified in order to run exactly what you want. Make sure you change the number of detectors when changing from prex1 to prex2 configurations. - -To analyzize the output: -mkdir output -build/anaRad [sensitive detector - for this study only 10008 and 10009 currently make sense] [output file name] - - - - - -/*G4 Simulation program for Moller Spectrometer*/ -/*Developed by Luis Mercado with contributions */ -/*by Dustin McNulty (generators) */ -/*and Mark Dalton (toroid fields) */ -/*University of Massachusetts - Amherst, JLAB */ - -/*This file updated 1-25-2011 by. J. Mammei */ -/*to reflect current usage and major svn */ -/*revision. */ -/*This file updated on 06-20-2012 by l.Zana */ -/*to reflect update with cmake build and geant4*/ -/* version 4.9.5p01 */ - - - +****Dose estimates**** + `build/hallRad` + +The last line will give you instructions on what is needed as input for the executable. +This analysis executable will run over sensitive detectors and will calculate a 1MeV neutron equivalent and a radiation dose rate measured in mili-rem. A series of detectors are hardcoded as being kryptonite ( [10008,100013], 10101, 10102 ) while the rest are assumed to be vacuum. This is important because the energy being used in the routine to estimate the radiation damage/dose will be either the deposited energy (kryptonite) or the kinetic energy (vacuum). +**Package contents** This folder contains: prex_sim.cc: Main Routine for Simulation. -CMakeLists.txt cmake contruct for Makefile (see later note for how to use it) +CMakeLists.txt cmake contruct for Makefile vis.mac: Can be called from the simulation prompt in order to run visualization. WARNING: Analysis and visualization cannot run concurrently. -moller_###.root: ROOT Output file created at end of simulation. The ### - refers to the date and time the simulation took place. - The default save location is ~/scratch/ROOTfiles/ - - -bin/, src/, tmp/: This is where the Makefile compiles and installs the - program. - include/: Header files for Simulation Classes. src/: Source files for Simulation Classes. -null/: Trash folder. Things that didn't quite work out. +scripts/: Folder with scripts to submit large number of jobs to farms. -plots/: Plots of results made by ROOT. +rootScripts/: Folder for small analysis scripts that can be run from the root prompt. -output/: Root output. - - -HOW TO COMPILE WITH CMAKE (geant4.9.5p01) - -cmake version >=2.6 needed (ifarm does not have it) - -source env_jlabcue495p01 (this will set up the correct env variables for building) -Create a building directory (for example mkdir build) -Go to the building directory (for example cd build) -Create the makefile with cmake, where you point cmake to the directory where is CMakeLists.txt (for example cmake ../ ) -(Because ifarm does have an old version of cmake, I installed a newer version in the work disk, so use: - /work/halla/parity/disk2/zana/Cmake/cmake-2.8.8/bin/cmake ../ from the build directory) -Now you have the new Makefile created in the build directory: Type make and "prexsim", the new binary file will be created in -$PREXDIR/bin/Linux-g++/ - - -HOW TO COMPILE FOR geant4.9.4p02 - -source env_jlabcue494p02 (this will set up the correct env variables for building) -in the $PREXDIR directory type make: -the mollersim binary will be created in $PREXDIR/bin/Linux-g++/ - - - - - -To run the program type, for example, 'bin/Linux-g++/moller_sim runsim_ee.csh' from the G4WORKDIR. +**Output tree** The data structure of the NTuple is as follows: - -ion:x:y:z:x0:y0:z0:kineE:px:py:pz:kineE0:px0:py0:pz0:kineE1:px1:py1:pz1:kineE2:px2:py2:pz2:type:volume:theta0:theta1:theta2:ev_num:process:event:creator:hit:kineE_org:theta_org:track:diffXS:totXS:rate - - - -NOTE: -Moller interactions are defined as a beam particle (Moller0) -coming from the beam and splitting into Moller1 -(with energy > 5.5GeV) and Moller2 (with energy < 5.5GeV) + `ion:x:y:z:x0:y0:z0:kineE:px:py:pz:kineE0:px0:py0:pz0:kineE1:px1:py1:pz1:kineE2:px2:py2:pz2:type:volume:theta0:theta1:theta2:ev_num:process:event:creator:hit:kineE_org:theta_org:track:diffXS:totXS:rate` During an event, very time that a particle hits a Sensitive Detector, it creates a Hit with the following data: - ion -if using Geant, ion is 1 if the particle was created by the process of "eIoni", which is how Geant defines Moller Scattering. Using this as a cut will give you only the From 135b70bc61806abb5f83d3850ed020a53d27ec38 Mon Sep 17 00:00:00 2001 From: cipriangal Date: Tue, 6 Jun 2017 10:55:27 -0400 Subject: [PATCH 02/10] formatting start the process to format this how i want. --- README | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README b/README index 48f2a6e..4e41887 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ -*PREX simulation package +#PREX simulation package -**Table of Contents** +##Table of Contents - [[#getting-code][Getting the code]] - [[#workflow][Workflow]] - [[#compiling-code][Compiling the code]] @@ -11,10 +11,10 @@ - [[#package-contents][Package contents]] - [[#output-tree][Output format]] -**Getting the code** +##Getting the code `git clone git@github.com:cipriangal/prexSim` -***Workflow*** +###Workflow If you intend to make changes to the code and contribute it is suggested that you fork this repository into your own github account. (There is a button for that on the top right of the page). You will then have a backup for your local repository on github. To get your own repository run the same line as above but change "cipriangal" to your username. Before you start working on the code make sure you update your local repository from the remote: @@ -28,7 +28,7 @@ If you have a feature in your fork and you would like to make it available to ot This repository contains multiple branches for working on different issues. You can see the list of branches at the top of the file list. If you want to create your own branch follow instrucations at [[https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging][basic branching]]. -***Compiling the code*** +###Compiling the code ``` mkdir build cd build @@ -36,15 +36,15 @@ This repository contains multiple branches for working on different issues. You make cd - ``` -***Running the code*** +###Running the code build/prexsim macros/prex_prerunCiprian.mac (to visualize) build/prexsim macros/prex_prerunCiprian.mac macros/myRun.mac (for batch mode) These two .mac files need to be modified in order to run exactly what you want. Make sure you change the number of detectors when changing from prex1 to prex2 configurations. -***Analyzing output*** +###Analyzing output -****anaRad**** +####anaRad ``` mkdir output build/anaRad @@ -52,14 +52,14 @@ These two .mac files need to be modified in order to run exactly what you want. The last line will give you instructions on what is needed as input for the executable. This will produce tables of flux and power in each detector separated by energy. The output rootfile will have additional granularity. -****Dose estimates**** +####Dose estimates `build/hallRad` The last line will give you instructions on what is needed as input for the executable. This analysis executable will run over sensitive detectors and will calculate a 1MeV neutron equivalent and a radiation dose rate measured in mili-rem. A series of detectors are hardcoded as being kryptonite ( [10008,100013], 10101, 10102 ) while the rest are assumed to be vacuum. This is important because the energy being used in the routine to estimate the radiation damage/dose will be either the deposited energy (kryptonite) or the kinetic energy (vacuum). -**Package contents** +##Package contents This folder contains: prex_sim.cc: Main Routine for Simulation. @@ -78,7 +78,7 @@ scripts/: Folder with scripts to submit large number of jobs to farms. rootScripts/: Folder for small analysis scripts that can be run from the root prompt. -**Output tree** +##Output tree The data structure of the NTuple is as follows: From 6039639f92b2711ad090144079cd04cc34c3f7f1 Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Tue, 6 Jun 2017 10:56:09 -0400 Subject: [PATCH 03/10] add extension to readme --- README.md | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4e41887 --- /dev/null +++ b/README.md @@ -0,0 +1,182 @@ +#PREX simulation package + +##Table of Contents +- [[#getting-code][Getting the code]] + - [[#workflow][Workflow]] + - [[#compiling-code][Compiling the code]] + - [[#running-code][Running the code]] + - [[#analyzing-output][Analyzing output]] + - [[#anaRad][anaRad]] + - [[#dose-estimate][Does Estimates]] +- [[#package-contents][Package contents]] +- [[#output-tree][Output format]] + +##Getting the code + `git clone git@github.com:cipriangal/prexSim` + +###Workflow +If you intend to make changes to the code and contribute it is suggested that you fork this repository into your own github account. (There is a button for that on the top right of the page). You will then have a backup for your local repository on github. To get your own repository run the same line as above but change "cipriangal" to your username. + +Before you start working on the code make sure you update your local repository from the remote: + `git pull` + +After you are done editing a file (or at the end of the day) you should: +`git commit -m "clear message of changes" changedFile1.ext ... changedFileN.ext` (this saves the instance of these files into your local copy of the repository) +`git push` (this takes all the saved instances you have in your local repository and send them to the remote repository) + +If you have a feature in your fork and you would like to make it available to other you can create a pull request. [[https://help.github.com/articles/creating-a-pull-request/][Pull Request Documentation]] + +This repository contains multiple branches for working on different issues. You can see the list of branches at the top of the file list. If you want to create your own branch follow instrucations at [[https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging][basic branching]]. + +###Compiling the code + ``` + mkdir build + cd build + cmake ../ + make + cd - + ``` +###Running the code + build/prexsim macros/prex_prerunCiprian.mac (to visualize) + build/prexsim macros/prex_prerunCiprian.mac macros/myRun.mac (for batch mode) + +These two .mac files need to be modified in order to run exactly what you want. Make sure you change the number of detectors when changing from prex1 to prex2 configurations. + +###Analyzing output + +####anaRad + ``` + mkdir output + build/anaRad + ``` + +The last line will give you instructions on what is needed as input for the executable. This will produce tables of flux and power in each detector separated by energy. The output rootfile will have additional granularity. + +####Dose estimates + `build/hallRad` + +The last line will give you instructions on what is needed as input for the executable. + +This analysis executable will run over sensitive detectors and will calculate a 1MeV neutron equivalent and a radiation dose rate measured in mili-rem. A series of detectors are hardcoded as being kryptonite ( [10008,100013], 10101, 10102 ) while the rest are assumed to be vacuum. This is important because the energy being used in the routine to estimate the radiation damage/dose will be either the deposited energy (kryptonite) or the kinetic energy (vacuum). + +##Package contents +This folder contains: + +prex_sim.cc: Main Routine for Simulation. + +CMakeLists.txt cmake contruct for Makefile + +vis.mac: Can be called from the simulation prompt in order to + run visualization. WARNING: Analysis and visualization + cannot run concurrently. + +include/: Header files for Simulation Classes. + +src/: Source files for Simulation Classes. + +scripts/: Folder with scripts to submit large number of jobs to farms. + +rootScripts/: Folder for small analysis scripts that can be run from the root prompt. + +##Output tree + +The data structure of the NTuple is as follows: + + `ion:x:y:z:x0:y0:z0:kineE:px:py:pz:kineE0:px0:py0:pz0:kineE1:px1:py1:pz1:kineE2:px2:py2:pz2:type:volume:theta0:theta1:theta2:ev_num:process:event:creator:hit:kineE_org:theta_org:track:diffXS:totXS:rate` + +During an event, very time that a particle hits a Sensitive +Detector, it creates a Hit with the following data: + +ion -if using Geant, ion is 1 if the particle was created + by the process of "eIoni", which is how Geant defines + Moller Scattering. Using this as a cut will give you only the + Moller2 particles, as defined above. + +x -x-position where the particle hit the Sensitive Detector +y -y-position where the particle hit the Sensitive Detector +z -z-position where the particle hit the Sensitive Detector +x0 -x-position where the Moller interaction occurred +y0 -y-position where the Moller interaction occurred +z0 -z-position where the Moller interaction occurred + +kineE -Energy of the particle when it hit the Sensitive Detector +px -Unit vector of momentum in x-direction at the Sensitive Detector +py -Unit vector of momentum in y-direction at the Sensitive Detector +pz -Unit vector of momentum in z-direction at the Sensitive Detector + +kineE0 -Kinetic Energy of the original electron which interacted + inside the target and created particle Moller1 and Moller2 at the + interaction point (x0,y0,z0) + +px0 -Unit vector of momentum in x-direction of Moller0 right before + interacting +py0 -Unit vector of momentum in y-direction of Moller0 right before + interacting +pz0 -Unit vector of momentum in z-direction of Moller0 right before + interacting + +kineE1 -Kinetic Energy of the original electron which interacted inside + the target and created particle Moller1 and Moller2 at the + interaction point (x1,y1,z1) + +px1 -Unit vector of momentum in x-direction of Moller1 right after + interacting +py1 -Unit vector of momentum in y-direction of Moller1 right after + interacting +pz1 -Unit vector of momentum in z-direction of Moller1 right after + interacting + +kineE2 -Kinetic Energy of the original electron which interacted inside + the target and created particle Moller1 and Moller2 at the + interaction point (x2,y2,z2) + +px2 -Unit vector of momentum in x-direction of Moller2 right after + interacting. +py2 -Unit vector of momentum in y-direction of Moller2 right after + interacting. +pz2 -Unit vector of momentum in z-direction of Moller2 right after + interacting. + +type -Particle type( electron=0, positron=1, proton=2, antiproton=3, + gamma=4, other=5 ) + +volume -Volume number of the Sensitive Detector that recorded this Hit. + +theta0 -Angle with respect to the beam axis of Moller0 right before + interacting. +theta1 -Angle with respect to the beam axis of Moller1 right after interacting. +theta2 -Angle with respect to the beam axis of Moller2 right after interacting. + +ev_num -Event number, as assigned by Geant. An event is defined as the + set of particles and interactions that happen after the Particle + Genarator 'throws' a particle into the spectrometer. + +process -Not properly defined at the moment +event -Not properly defined at the moment. + +creator -Process that created this particle, as assigned by G4 + eIoni-> 0 + conv-> 1 + Decay-> 2 + annihil-> 3 + Brem-> 4 + phot-> 5 + compt-> 6 + Transportation->7 + msc-> 8 + All Others-> 9 + +hit -Same as trackID (see below). + +kineE_org - Vertex energy of THIS particle. +theta_org - Scattering Angle of THIS particle. + +track -Track number as assigned by GEANT. Each particle created in + an Event is given an incremental trackID number. In this case, + Moller1 has track=1 and Moller2 has track=2. + +diffXS -Differential cross-section calculated in generator. +totXS -Total cross-section calculated in generator. + +rate -Rate calculated in generator. + From 9b2cdb58e9453fdb3b37c80a5021338f42f22a1e Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Tue, 6 Jun 2017 10:56:47 -0400 Subject: [PATCH 04/10] copied readme to .md file --- README | 182 --------------------------------------------------------- 1 file changed, 182 deletions(-) delete mode 100644 README diff --git a/README b/README deleted file mode 100644 index 4e41887..0000000 --- a/README +++ /dev/null @@ -1,182 +0,0 @@ -#PREX simulation package - -##Table of Contents -- [[#getting-code][Getting the code]] - - [[#workflow][Workflow]] - - [[#compiling-code][Compiling the code]] - - [[#running-code][Running the code]] - - [[#analyzing-output][Analyzing output]] - - [[#anaRad][anaRad]] - - [[#dose-estimate][Does Estimates]] -- [[#package-contents][Package contents]] -- [[#output-tree][Output format]] - -##Getting the code - `git clone git@github.com:cipriangal/prexSim` - -###Workflow -If you intend to make changes to the code and contribute it is suggested that you fork this repository into your own github account. (There is a button for that on the top right of the page). You will then have a backup for your local repository on github. To get your own repository run the same line as above but change "cipriangal" to your username. - -Before you start working on the code make sure you update your local repository from the remote: - `git pull` - -After you are done editing a file (or at the end of the day) you should: -`git commit -m "clear message of changes" changedFile1.ext ... changedFileN.ext` (this saves the instance of these files into your local copy of the repository) -`git push` (this takes all the saved instances you have in your local repository and send them to the remote repository) - -If you have a feature in your fork and you would like to make it available to other you can create a pull request. [[https://help.github.com/articles/creating-a-pull-request/][Pull Request Documentation]] - -This repository contains multiple branches for working on different issues. You can see the list of branches at the top of the file list. If you want to create your own branch follow instrucations at [[https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging][basic branching]]. - -###Compiling the code - ``` - mkdir build - cd build - cmake ../ - make - cd - - ``` -###Running the code - build/prexsim macros/prex_prerunCiprian.mac (to visualize) - build/prexsim macros/prex_prerunCiprian.mac macros/myRun.mac (for batch mode) - -These two .mac files need to be modified in order to run exactly what you want. Make sure you change the number of detectors when changing from prex1 to prex2 configurations. - -###Analyzing output - -####anaRad - ``` - mkdir output - build/anaRad - ``` - -The last line will give you instructions on what is needed as input for the executable. This will produce tables of flux and power in each detector separated by energy. The output rootfile will have additional granularity. - -####Dose estimates - `build/hallRad` - -The last line will give you instructions on what is needed as input for the executable. - -This analysis executable will run over sensitive detectors and will calculate a 1MeV neutron equivalent and a radiation dose rate measured in mili-rem. A series of detectors are hardcoded as being kryptonite ( [10008,100013], 10101, 10102 ) while the rest are assumed to be vacuum. This is important because the energy being used in the routine to estimate the radiation damage/dose will be either the deposited energy (kryptonite) or the kinetic energy (vacuum). - -##Package contents -This folder contains: - -prex_sim.cc: Main Routine for Simulation. - -CMakeLists.txt cmake contruct for Makefile - -vis.mac: Can be called from the simulation prompt in order to - run visualization. WARNING: Analysis and visualization - cannot run concurrently. - -include/: Header files for Simulation Classes. - -src/: Source files for Simulation Classes. - -scripts/: Folder with scripts to submit large number of jobs to farms. - -rootScripts/: Folder for small analysis scripts that can be run from the root prompt. - -##Output tree - -The data structure of the NTuple is as follows: - - `ion:x:y:z:x0:y0:z0:kineE:px:py:pz:kineE0:px0:py0:pz0:kineE1:px1:py1:pz1:kineE2:px2:py2:pz2:type:volume:theta0:theta1:theta2:ev_num:process:event:creator:hit:kineE_org:theta_org:track:diffXS:totXS:rate` - -During an event, very time that a particle hits a Sensitive -Detector, it creates a Hit with the following data: - -ion -if using Geant, ion is 1 if the particle was created - by the process of "eIoni", which is how Geant defines - Moller Scattering. Using this as a cut will give you only the - Moller2 particles, as defined above. - -x -x-position where the particle hit the Sensitive Detector -y -y-position where the particle hit the Sensitive Detector -z -z-position where the particle hit the Sensitive Detector -x0 -x-position where the Moller interaction occurred -y0 -y-position where the Moller interaction occurred -z0 -z-position where the Moller interaction occurred - -kineE -Energy of the particle when it hit the Sensitive Detector -px -Unit vector of momentum in x-direction at the Sensitive Detector -py -Unit vector of momentum in y-direction at the Sensitive Detector -pz -Unit vector of momentum in z-direction at the Sensitive Detector - -kineE0 -Kinetic Energy of the original electron which interacted - inside the target and created particle Moller1 and Moller2 at the - interaction point (x0,y0,z0) - -px0 -Unit vector of momentum in x-direction of Moller0 right before - interacting -py0 -Unit vector of momentum in y-direction of Moller0 right before - interacting -pz0 -Unit vector of momentum in z-direction of Moller0 right before - interacting - -kineE1 -Kinetic Energy of the original electron which interacted inside - the target and created particle Moller1 and Moller2 at the - interaction point (x1,y1,z1) - -px1 -Unit vector of momentum in x-direction of Moller1 right after - interacting -py1 -Unit vector of momentum in y-direction of Moller1 right after - interacting -pz1 -Unit vector of momentum in z-direction of Moller1 right after - interacting - -kineE2 -Kinetic Energy of the original electron which interacted inside - the target and created particle Moller1 and Moller2 at the - interaction point (x2,y2,z2) - -px2 -Unit vector of momentum in x-direction of Moller2 right after - interacting. -py2 -Unit vector of momentum in y-direction of Moller2 right after - interacting. -pz2 -Unit vector of momentum in z-direction of Moller2 right after - interacting. - -type -Particle type( electron=0, positron=1, proton=2, antiproton=3, - gamma=4, other=5 ) - -volume -Volume number of the Sensitive Detector that recorded this Hit. - -theta0 -Angle with respect to the beam axis of Moller0 right before - interacting. -theta1 -Angle with respect to the beam axis of Moller1 right after interacting. -theta2 -Angle with respect to the beam axis of Moller2 right after interacting. - -ev_num -Event number, as assigned by Geant. An event is defined as the - set of particles and interactions that happen after the Particle - Genarator 'throws' a particle into the spectrometer. - -process -Not properly defined at the moment -event -Not properly defined at the moment. - -creator -Process that created this particle, as assigned by G4 - eIoni-> 0 - conv-> 1 - Decay-> 2 - annihil-> 3 - Brem-> 4 - phot-> 5 - compt-> 6 - Transportation->7 - msc-> 8 - All Others-> 9 - -hit -Same as trackID (see below). - -kineE_org - Vertex energy of THIS particle. -theta_org - Scattering Angle of THIS particle. - -track -Track number as assigned by GEANT. Each particle created in - an Event is given an incremental trackID number. In this case, - Moller1 has track=1 and Moller2 has track=2. - -diffXS -Differential cross-section calculated in generator. -totXS -Total cross-section calculated in generator. - -rate -Rate calculated in generator. - From 5c8dd2b838aaa5c2e7ccfcfef913ab88ff25e6df Mon Sep 17 00:00:00 2001 From: cipriangal Date: Tue, 6 Jun 2017 11:02:46 -0400 Subject: [PATCH 05/10] format2 --- README.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 4e41887..66827ec 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -#PREX simulation package +# PREX simulation package -##Table of Contents +## Table of Contents - [[#getting-code][Getting the code]] - [[#workflow][Workflow]] - [[#compiling-code][Compiling the code]] @@ -11,10 +11,10 @@ - [[#package-contents][Package contents]] - [[#output-tree][Output format]] -##Getting the code +## Getting the code `git clone git@github.com:cipriangal/prexSim` -###Workflow +### Workflow If you intend to make changes to the code and contribute it is suggested that you fork this repository into your own github account. (There is a button for that on the top right of the page). You will then have a backup for your local repository on github. To get your own repository run the same line as above but change "cipriangal" to your username. Before you start working on the code make sure you update your local repository from the remote: @@ -24,11 +24,11 @@ After you are done editing a file (or at the end of the day) you should: `git commit -m "clear message of changes" changedFile1.ext ... changedFileN.ext` (this saves the instance of these files into your local copy of the repository) `git push` (this takes all the saved instances you have in your local repository and send them to the remote repository) -If you have a feature in your fork and you would like to make it available to other you can create a pull request. [[https://help.github.com/articles/creating-a-pull-request/][Pull Request Documentation]] +If you have a feature in your fork and you would like to make it available to other you can create a pull request. https://help.github.com/articles/creating-a-pull-request/ -This repository contains multiple branches for working on different issues. You can see the list of branches at the top of the file list. If you want to create your own branch follow instrucations at [[https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging][basic branching]]. +This repository contains multiple branches for working on different issues. You can see the list of branches at the top of the file list. If you want to create your own branch follow instrucations at https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging -###Compiling the code +### Compiling the code ``` mkdir build cd build @@ -36,15 +36,15 @@ This repository contains multiple branches for working on different issues. You make cd - ``` -###Running the code - build/prexsim macros/prex_prerunCiprian.mac (to visualize) - build/prexsim macros/prex_prerunCiprian.mac macros/myRun.mac (for batch mode) +### Running the code + `build/prexsim macros/prex_prerunCiprian.mac` (to visualize) + `build/prexsim macros/prex_prerunCiprian.mac macros/myRun.mac` (for batch mode) These two .mac files need to be modified in order to run exactly what you want. Make sure you change the number of detectors when changing from prex1 to prex2 configurations. -###Analyzing output +### Analyzing output -####anaRad +#### anaRad ``` mkdir output build/anaRad @@ -52,14 +52,14 @@ These two .mac files need to be modified in order to run exactly what you want. The last line will give you instructions on what is needed as input for the executable. This will produce tables of flux and power in each detector separated by energy. The output rootfile will have additional granularity. -####Dose estimates +#### Dose estimates `build/hallRad` The last line will give you instructions on what is needed as input for the executable. This analysis executable will run over sensitive detectors and will calculate a 1MeV neutron equivalent and a radiation dose rate measured in mili-rem. A series of detectors are hardcoded as being kryptonite ( [10008,100013], 10101, 10102 ) while the rest are assumed to be vacuum. This is important because the energy being used in the routine to estimate the radiation damage/dose will be either the deposited energy (kryptonite) or the kinetic energy (vacuum). -##Package contents +## Package contents This folder contains: prex_sim.cc: Main Routine for Simulation. From 0bb456b1409dde1064c50bc8986e69b89acf5f33 Mon Sep 17 00:00:00 2001 From: cipriangal Date: Tue, 6 Jun 2017 11:03:25 -0400 Subject: [PATCH 06/10] figure out tocs later --- README.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/README.md b/README.md index 66827ec..7812d7d 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,5 @@ # PREX simulation package -## Table of Contents -- [[#getting-code][Getting the code]] - - [[#workflow][Workflow]] - - [[#compiling-code][Compiling the code]] - - [[#running-code][Running the code]] - - [[#analyzing-output][Analyzing output]] - - [[#anaRad][anaRad]] - - [[#dose-estimate][Does Estimates]] -- [[#package-contents][Package contents]] -- [[#output-tree][Output format]] - ## Getting the code `git clone git@github.com:cipriangal/prexSim` From 9f68031b73236645bbaf86262c4b7f9ae943ee6f Mon Sep 17 00:00:00 2001 From: cipriangal Date: Tue, 6 Jun 2017 11:12:10 -0400 Subject: [PATCH 07/10] format3 --- README.md | 180 +++++++++++++++++++++--------------------------------- 1 file changed, 68 insertions(+), 112 deletions(-) diff --git a/README.md b/README.md index 7812d7d..549e5f0 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,18 @@ If you intend to make changes to the code and contribute it is suggested that you fork this repository into your own github account. (There is a button for that on the top right of the page). You will then have a backup for your local repository on github. To get your own repository run the same line as above but change "cipriangal" to your username. Before you start working on the code make sure you update your local repository from the remote: - `git pull` - + ``` + git pull + ``` After you are done editing a file (or at the end of the day) you should: -`git commit -m "clear message of changes" changedFile1.ext ... changedFileN.ext` (this saves the instance of these files into your local copy of the repository) -`git push` (this takes all the saved instances you have in your local repository and send them to the remote repository) +``` +git commit -m "clear message of changes" changedFile1.ext ... changedFileN.ext +``` +(this saves the instance of these files into your local copy of the repository) +``` +git push +``` +(this takes all the saved instances you have in your local repository and send them to the remote repository) If you have a feature in your fork and you would like to make it available to other you can create a pull request. https://help.github.com/articles/creating-a-pull-request/ @@ -27,6 +34,7 @@ This repository contains multiple branches for working on different issues. You ``` ### Running the code `build/prexsim macros/prex_prerunCiprian.mac` (to visualize) + `build/prexsim macros/prex_prerunCiprian.mac macros/myRun.mac` (for batch mode) These two .mac files need to be modified in order to run exactly what you want. Make sure you change the number of detectors when changing from prex1 to prex2 configurations. @@ -51,21 +59,13 @@ This analysis executable will run over sensitive detectors and will calculate a ## Package contents This folder contains: -prex_sim.cc: Main Routine for Simulation. - -CMakeLists.txt cmake contruct for Makefile - -vis.mac: Can be called from the simulation prompt in order to - run visualization. WARNING: Analysis and visualization - cannot run concurrently. - -include/: Header files for Simulation Classes. - -src/: Source files for Simulation Classes. - -scripts/: Folder with scripts to submit large number of jobs to farms. - -rootScripts/: Folder for small analysis scripts that can be run from the root prompt. +* **prex_sim.cc:** Main Routine for Simulation. +* **CMakeLists.txt** cmake contruct for Makefile +* **vis.mac:** Can be called from the simulation prompt in order to run visualization. WARNING: Analysis and visualization cannot run concurrently. +* **include/:** Header files for Simulation Classes. +* **src/:** Source files for Simulation Classes. +* **scripts/:** Folder with scripts to submit large number of jobs to farms. +* **rootScripts/:** Folder for small analysis scripts that can be run from the root prompt. ##Output tree @@ -76,96 +76,52 @@ The data structure of the NTuple is as follows: During an event, very time that a particle hits a Sensitive Detector, it creates a Hit with the following data: -ion -if using Geant, ion is 1 if the particle was created - by the process of "eIoni", which is how Geant defines - Moller Scattering. Using this as a cut will give you only the - Moller2 particles, as defined above. - -x -x-position where the particle hit the Sensitive Detector -y -y-position where the particle hit the Sensitive Detector -z -z-position where the particle hit the Sensitive Detector -x0 -x-position where the Moller interaction occurred -y0 -y-position where the Moller interaction occurred -z0 -z-position where the Moller interaction occurred - -kineE -Energy of the particle when it hit the Sensitive Detector -px -Unit vector of momentum in x-direction at the Sensitive Detector -py -Unit vector of momentum in y-direction at the Sensitive Detector -pz -Unit vector of momentum in z-direction at the Sensitive Detector - -kineE0 -Kinetic Energy of the original electron which interacted - inside the target and created particle Moller1 and Moller2 at the - interaction point (x0,y0,z0) - -px0 -Unit vector of momentum in x-direction of Moller0 right before - interacting -py0 -Unit vector of momentum in y-direction of Moller0 right before - interacting -pz0 -Unit vector of momentum in z-direction of Moller0 right before - interacting - -kineE1 -Kinetic Energy of the original electron which interacted inside - the target and created particle Moller1 and Moller2 at the - interaction point (x1,y1,z1) - -px1 -Unit vector of momentum in x-direction of Moller1 right after - interacting -py1 -Unit vector of momentum in y-direction of Moller1 right after - interacting -pz1 -Unit vector of momentum in z-direction of Moller1 right after - interacting - -kineE2 -Kinetic Energy of the original electron which interacted inside - the target and created particle Moller1 and Moller2 at the - interaction point (x2,y2,z2) - -px2 -Unit vector of momentum in x-direction of Moller2 right after - interacting. -py2 -Unit vector of momentum in y-direction of Moller2 right after - interacting. -pz2 -Unit vector of momentum in z-direction of Moller2 right after - interacting. - -type -Particle type( electron=0, positron=1, proton=2, antiproton=3, - gamma=4, other=5 ) - -volume -Volume number of the Sensitive Detector that recorded this Hit. - -theta0 -Angle with respect to the beam axis of Moller0 right before - interacting. -theta1 -Angle with respect to the beam axis of Moller1 right after interacting. -theta2 -Angle with respect to the beam axis of Moller2 right after interacting. - -ev_num -Event number, as assigned by Geant. An event is defined as the - set of particles and interactions that happen after the Particle - Genarator 'throws' a particle into the spectrometer. - -process -Not properly defined at the moment -event -Not properly defined at the moment. - -creator -Process that created this particle, as assigned by G4 - eIoni-> 0 - conv-> 1 - Decay-> 2 - annihil-> 3 - Brem-> 4 - phot-> 5 - compt-> 6 - Transportation->7 - msc-> 8 - All Others-> 9 - -hit -Same as trackID (see below). - -kineE_org - Vertex energy of THIS particle. -theta_org - Scattering Angle of THIS particle. - -track -Track number as assigned by GEANT. Each particle created in - an Event is given an incremental trackID number. In this case, - Moller1 has track=1 and Moller2 has track=2. - -diffXS -Differential cross-section calculated in generator. -totXS -Total cross-section calculated in generator. - -rate -Rate calculated in generator. - +* **ion** -if using Geant, ion is 1 if the particle was created by the process of "eIoni", which is how Geant defines Moller Scattering. Using this as a cut will give you only the Moller2 particles, as defined above. +* **x** -x-position where the particle hit the Sensitive Detector +* **y** -y-position where the particle hit the Sensitive Detector +* **z** -z-position where the particle hit the Sensitive Detector +* **x0** -x-position where the Moller interaction occurred +* **y0** -y-position where the Moller interaction occurred +* **z0** -z-position where the Moller interaction occurred +* **kineE** -Energy of the particle when it hit the Sensitive Detector +* **px** -Unit vector of momentum in x-direction at the Sensitive Detector +* **py** -Unit vector of momentum in y-direction at the Sensitive Detector +* **pz** -Unit vector of momentum in z-direction at the Sensitive Detector +* **kineE0** -Kinetic Energy of the original electron which interacted inside the target and created particle Moller1 and Moller2 at the interaction point (x0,y0,z0) +* **px0** -Unit vector of momentum in x-direction of Moller0 right before interacting +* **py0** -Unit vector of momentum in y-direction of Moller0 right before interacting +* **pz0** -Unit vector of momentum in z-direction of Moller0 right before interacting +* **kineE1** -Kinetic Energy of the original electron which interacted inside the target and created particle Moller1 and Moller2 at the interaction point (x1,y1,z1) +* **px1** -Unit vector of momentum in x-direction of Moller1 right after interacting +* **py1** -Unit vector of momentum in y-direction of Moller1 right after interacting +* **pz1** -Unit vector of momentum in z-direction of Moller1 right after interacting +* **kineE2** -Kinetic Energy of the original electron which interacted inside the target and created particle Moller1 and Moller2 at the interaction point (x2,y2,z2) +* **px2** -Unit vector of momentum in x-direction of Moller2 right after interacting. +* **py2** -Unit vector of momentum in y-direction of Moller2 right after interacting. +* **pz2** -Unit vector of momentum in z-direction of Moller2 right after interacting. +* **type** -Particle type( electron=0, positron=1, proton=2, antiproton=3, gamma=4, other=5 ) +* **volume** -Volume number of the Sensitive Detector that recorded this Hit. +* **theta0** -Angle with respect to the beam axis of Moller0 right before interacting. +* **theta1** -Angle with respect to the beam axis of Moller1 right after interacting. +* **theta2** -Angle with respect to the beam axis of Moller2 right after interacting. +* **ev_num** -Event number, as assigned by Geant. An event is defined as the set of particles and interactions that happen after the Particle Genarator 'throws' a particle into the spectrometer. +* **process** -Not properly defined at the moment +* **event** -Not properly defined at the moment. +* **creator** -Process that created this particle, as assigned by G4 + * eIoni-> 0 + * conv-> 1 + * Decay-> 2 + * annihil-> 3 + * Brem-> 4 + * phot-> 5 + * compt-> 6 + * Transportation->7 + * msc-> 8 + * All Others-> 9 +* **hit** -Same as trackID (see below). +* **kineE_org** - Vertex energy of THIS particle. +* **theta_org** - Scattering Angle of THIS particle. +* **track** -Track number as assigned by GEANT. Each particle created in an Event is given an incremental trackID number. In this case, Moller1 has track=1 and Moller2 has track=2. +* **diffXS** -Differential cross-section calculated in generator. +* **totXS** -Total cross-section calculated in generator. +* **rate* -Rate calculated in generator. From 0a2818b096e7d7c51646e27b727ab0b33b481bf3 Mon Sep 17 00:00:00 2001 From: cipriangal Date: Tue, 6 Jun 2017 11:13:23 -0400 Subject: [PATCH 08/10] format4 --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 549e5f0..cc3b372 100644 --- a/README.md +++ b/README.md @@ -108,16 +108,16 @@ Detector, it creates a Hit with the following data: * **process** -Not properly defined at the moment * **event** -Not properly defined at the moment. * **creator** -Process that created this particle, as assigned by G4 - * eIoni-> 0 + * eIoni-> 0 * conv-> 1 * Decay-> 2 * annihil-> 3 * Brem-> 4 * phot-> 5 - * compt-> 6 - * Transportation->7 - * msc-> 8 - * All Others-> 9 + * compt-> 6 + * Transportation->7 + * msc-> 8 + * All Others-> 9 * **hit** -Same as trackID (see below). * **kineE_org** - Vertex energy of THIS particle. * **theta_org** - Scattering Angle of THIS particle. From fe186a8e4acfb453b57738ef381329f847dd64b3 Mon Sep 17 00:00:00 2001 From: cipriangal Date: Tue, 6 Jun 2017 11:13:45 -0400 Subject: [PATCH 09/10] format5 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cc3b372..b641db2 100644 --- a/README.md +++ b/README.md @@ -124,4 +124,4 @@ Detector, it creates a Hit with the following data: * **track** -Track number as assigned by GEANT. Each particle created in an Event is given an incremental trackID number. In this case, Moller1 has track=1 and Moller2 has track=2. * **diffXS** -Differential cross-section calculated in generator. * **totXS** -Total cross-section calculated in generator. -* **rate* -Rate calculated in generator. +* **rate** -Rate calculated in generator. From 4bf3ccca98c9378f02e843d9347cdf5febdfdd10 Mon Sep 17 00:00:00 2001 From: cipriangal Date: Tue, 6 Jun 2017 11:14:45 -0400 Subject: [PATCH 10/10] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b641db2..f5dda2e 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ If you have a feature in your fork and you would like to make it available to ot This repository contains multiple branches for working on different issues. You can see the list of branches at the top of the file list. If you want to create your own branch follow instrucations at https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging ### Compiling the code +This code has been known to compile with G4 version up to 4.10.2.3. ``` mkdir build cd build