Project

General

Profile

Wiki » History » Version 52

Robert Hatcher, 02/09/2016 12:24 PM

1 2 Robert Hatcher
{{toc}}
2 2 Robert Hatcher
3 1 Robert Hatcher
h1. NuMI Beam Simulations
4 1 Robert Hatcher
5 4 Robert Hatcher
This area is devoted to work on the simulation of the NuMI Beamline.  This wiki should serve to facilitate those efforts by documenting how to get, configure and run the code.
6 4 Robert Hatcher
7 4 Robert Hatcher
h2. Simulations
8 4 Robert Hatcher
9 14 Robert Hatcher
| [[g4numi]]  | a pure @Geant4@ based simulation of the beamline |
10 13 Robert Hatcher
| [[flugg]]      | uses the same @g4numi@ geometry, but interfaces to "fluka":http://www.fluka.org/fluka.php for the actual particle physics |
11 14 Robert Hatcher
| [[gnumi]]    | the obsolete @GEANT3@ based simulation |
12 14 Robert Hatcher
| [[pbeam]]    | a fast FORTRAN based simulation (also obsolete) |
13 14 Robert Hatcher
| [[mars]]       | an alternative simulation (while @mars@ itself is kept up-to-date, the NuMI code to use it has probably fallen into disrepair). |
14 1 Robert Hatcher
15 1 Robert Hatcher
h2. Data Products
16 1 Robert Hatcher
17 1 Robert Hatcher
The most commonly used output of the first three of the simulations is an ntuple that represents hadrons and muons that decay to give neutrinos.  At present these give 4 different variants of the ntuple (Minerva's version of @g4numi@ is not reflected in the mainline branch of the code).  These ntuples are very similar in form but not exactly interchangeable in general.   The "@GENIE@":https://cdcvs.fnal.gov/redmine/projects/genie/wiki neutrino interaction generator can by default read all three (but not the Minerva variant without modification).  Ongoing work is has a long-term goal of migrating the first two simulations (@g4numi@ and @flugg@) to a common, extensible  ntuple format: "Dk2nu":https://cdcvs.fnal.gov/redmine/projects/nusoftart/wiki/Dk2nu 
18 8 Robert Hatcher
19 10 Robert Hatcher
h3. Naming Convention
20 10 Robert Hatcher
21 11 Robert Hatcher
The names of simulation configurations take the following form:  [l/m][e/n][nnn]z[nnn]i
22 10 Robert Hatcher
23 10 Robert Hatcher
* [l/m]: l = low energy horn 2 position, m = medium energy horn 2 position
24 10 Robert Hatcher
* [e/n]: e = MINOS target, n = NOvA target.  In the event of target design changes, we have 24 letters left in the alphabet
25 10 Robert Hatcher
* [nnn]z = pull back (unchanged for MINOS target, relative to nominal pos. for NOvA target)
26 10 Robert Hatcher
* [nnn]i = horn current in kA (same as for MINOS)
27 10 Robert Hatcher
28 10 Robert Hatcher
A standard MINOS run would have been le010z185i; a standard NOvA run will be mn000z200i.
29 10 Robert Hatcher
30 9 Robert Hatcher
h3. Files, Files, Files
31 9 Robert Hatcher
32 9 Robert Hatcher
[[Locations of shared files]]
33 9 Robert Hatcher
34 50 Robert Hatcher
h2. NuMI-X code repository
35 8 Robert Hatcher
36 8 Robert Hatcher
Instructions for:   [[Access to the repository]]
37 15 Robert Hatcher
38 50 Robert Hatcher
The current CVS repository used by NuMI-X is a re-integration of the original code and two separate forks (that didn't retain development history).  At this time the @proto2-numix@ branch is used for @flugg@ development, and @proto1-numix@ for @g4numi@ development, with @minerva@ still developing on their branch as well.  The long term goal is to eventually get a consistent set of code merged back onto the @trunk@ / @HEAD@ branch that reflects the combined best of all improvements and is provides consistency between @flugg@ and @g4numi@.
39 48 Robert Hatcher
40 49 Robert Hatcher
!{width:400px}NuMI-X-2015-03-05-RepoPlans.jpg!
41 48 Robert Hatcher
42 18 Robert Hatcher
h2. Build instructions
43 18 Robert Hatcher
44 51 Robert Hatcher
* [[How to build the Geant4 code]] (@proto1-numix@ branch)
45 51 Robert Hatcher
* [[minerva-sw:G4NuMI_instructions| How to build the Geant4 code - minerva branch]] 
46 51 Robert Hatcher
  Note that while there are instructions there, they lead with the following: _Note, it is difficult to keep the Wiki up to date. Modern versions of the building and running instructions may be found inside of the g4numi package in the repository: build_instructions.txt, running_instructions.txt._  It is recommended that one follow that advice if unable to access the Minerva redmine wiki.
47 51 Robert Hatcher
* [[How to build the FLUGG code]] (@proto2-numix@ branch)
48 18 Robert Hatcher
49 43 Robert Hatcher
h3. Building enough so that geometry can be extracted to GDML file
50 19 Robert Hatcher
51 20 Robert Hatcher
[[Geometry with G4StandAlone]]
52 19 Robert Hatcher
53 28 Gareth Kafka
[[GDML Overlap Script]]
54 28 Gareth Kafka
55 29 Gareth Kafka
[[GDML Ray Tracing Script]]
56 29 Gareth Kafka
57 52 Robert Hatcher
h2. Processing output files
58 52 Robert Hatcher
59 52 Robert Hatcher
Ideally the output files of these beamline generations are of the project:dk2nu format.  These files can be used by GENIE via the  [[dk2nu:Dk2nu_GENIE_FluxDriver]].  Outside of GENIE event generation, studies can done using the project:FluxReader.
60 52 Robert Hatcher
61 52 Robert Hatcher
h3. hints for using files on PNFS
62 52 Robert Hatcher
63 52 Robert Hatcher
In some instances the contents of files on PNFS can't be directly accessed (i.e. the file system isn't perfectly normal) even though they can be listed with @ls@.  In such cases one can use the @xroot@ interface to access them:
64 52 Robert Hatcher
65 52 Robert Hatcher
<pre>
66 52 Robert Hatcher
root -b `pnfs2xrootd /pnfs/numix/....../flugg_mn000z200i_rp11_lowth_pnut_f112c0f093bbird/Run0000/flugg_mn000z200i_rp11_bs1.1_pnut_lowth_f112c0f093bbird_0000.root`
67 52 Robert Hatcher
</pre>
68 52 Robert Hatcher
69 52 Robert Hatcher
where @pnfs2xrootd@ is a translation script along the lines of:
70 52 Robert Hatcher
71 52 Robert Hatcher
@/grid/fermiapp/products/nova/externals/novaproduction/v01.06/NULL/bin/pnfs2xrootd@
72 52 Robert Hatcher
<pre>
73 52 Robert Hatcher
#!/bin/sh
74 52 Robert Hatcher
75 52 Robert Hatcher
# This is a cousin to samweb2xrootd. It takes a path that you could "ls" in
76 52 Robert Hatcher
# /pnfs and puts it in a format that ROOT or ART can understand. Can accept
77 52 Robert Hatcher
# multiple arguments.
78 52 Robert Hatcher
79 52 Robert Hatcher
while true
80 52 Robert Hatcher
do
81 52 Robert Hatcher
echo -n `readlink -f $1` | sed -e 's%/pnfs%root://fndca1.fnal.gov:1094//pnfs/fnal.gov/usr%'
82 52 Robert Hatcher
shift
83 52 Robert Hatcher
if [ x$1 == x ]; then break; fi
84 52 Robert Hatcher
echo -n ' '
85 52 Robert Hatcher
done
86 52 Robert Hatcher
87 52 Robert Hatcher
echo ' '
88 52 Robert Hatcher
89 52 Robert Hatcher
# end-of-script
90 52 Robert Hatcher
</pre>
91 52 Robert Hatcher
92 52 Robert Hatcher
If you there are authentication issues you might try:
93 52 Robert Hatcher
94 52 Robert Hatcher
<pre>
95 52 Robert Hatcher
kx509
96 52 Robert Hatcher
kxlist -p
97 52 Robert Hatcher
voms-proxy-init --rfc --voms=fermilab:/fermilab/nova/Role=Analysis --noregen
98 52 Robert Hatcher
</pre>
99 52 Robert Hatcher
100 15 Robert Hatcher
h2. Resources
101 15 Robert Hatcher
102 15 Robert Hatcher
h3. NuMI Beamline 
103 15 Robert Hatcher
104 15 Robert Hatcher
h4. "NuMI Technical Design Handbook":http://www-numi.fnal.gov/numwork/tdh/tdh_index.html 
105 15 Robert Hatcher
106 15 Robert Hatcher
is the followup on the TDR; contains later information; section 4.4 has diagrams, photos and references to CAD drawing numbers that might be of particular interest.
107 15 Robert Hatcher
108 41 Michael Kordosky
h4. "Drawings Database":http://www-admscad.fnal.gov/  *Note: not available from offsite...*
109 15 Robert Hatcher
110 17 Robert Hatcher
is a source of "released" CAD drawings; try this, but it is an incomplete source.   To access drawings click on "query" on left; enter a search string.  If you have a drawing number try that; otherwise try strings involving names such as "numi" and "horn", etc.  [VPN in to access]
111 16 Robert Hatcher
112 27 Gareth Kafka
[[Table of document numbers in the drawings database]]
113 22 Gareth Kafka
114 16 Robert Hatcher
h4. [[Other Drawing Sources]]
115 21 Robert Hatcher
116 21 Robert Hatcher
https://numix-docdb.fnal.gov:440/cgi-bin/ShowDocument?docid=21
117 30 Raphael Schroeter
118 42 Robert Hatcher
h4. Other Documentation
119 42 Robert Hatcher
120 42 Robert Hatcher
https://cdcvs.fnal.gov/redmine/projects/numi-beam/wiki/NuMI_beamline_documentation
121 42 Robert Hatcher
122 30 Raphael Schroeter
h2. Task List
123 30 Raphael Schroeter
124 40 Raphael Schroeter
[[Task List#NumiSoft Tag Release|NumiSoft Tag Release]]
125 38 Raphael Schroeter
[[Task List#Geometry|Geometry]]
126 38 Raphael Schroeter
[[Task List#DK2NU|DK2NU]]
127 38 Raphael Schroeter
[[Task List#FluxReader|FluxReader]]
128 47 Robert Hatcher
129 47 Robert Hatcher
----
130 47 Robert Hatcher
131 47 Robert Hatcher
{{collapse(View wiki structure...)
132 47 Robert Hatcher
  bq. {{child_pages}}
133 47 Robert Hatcher
}}