Project

General

Profile

Wiki » History » Version 53

Robert Hatcher, 06/29/2016 02:46 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 53 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@ + @proto3-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 1 Robert Hatcher
40 53 Robert Hatcher
|_. branch     |_. purpose                 |_. origin               |_. date      |
41 53 Robert Hatcher
| minerva      | minerva (geant4)          | forked from minos repo                                         
42 53 Robert Hatcher
                                             (re-integrated)        | ?           |
43 53 Robert Hatcher
| nova         | nova (flugg)              | forked from minos repo
44 53 Robert Hatcher
                                             (re-integrated)        | ?           |
45 53 Robert Hatcher
| proto1-numix | numi-x geant4 development | minerva                | 2013-08-19  |
46 53 Robert Hatcher
| proto2-numix | numi-x flugg  development | nova                   | 2013-03-23  |
47 53 Robert Hatcher
| proto3-numix | numi-x geant4 development | minerva                | 2016-06-29  |
48 53 Robert Hatcher
49 53 Robert Hatcher
!{width:500px}NuMI-X-2015-03-05-RepoPlans.jpg!
50 48 Robert Hatcher
51 18 Robert Hatcher
h2. Build instructions
52 18 Robert Hatcher
53 51 Robert Hatcher
* [[How to build the Geant4 code]] (@proto1-numix@ branch)
54 51 Robert Hatcher
* [[minerva-sw:G4NuMI_instructions| How to build the Geant4 code - minerva branch]] 
55 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.
56 51 Robert Hatcher
* [[How to build the FLUGG code]] (@proto2-numix@ branch)
57 18 Robert Hatcher
58 43 Robert Hatcher
h3. Building enough so that geometry can be extracted to GDML file
59 19 Robert Hatcher
60 20 Robert Hatcher
[[Geometry with G4StandAlone]]
61 19 Robert Hatcher
62 28 Gareth Kafka
[[GDML Overlap Script]]
63 28 Gareth Kafka
64 29 Gareth Kafka
[[GDML Ray Tracing Script]]
65 29 Gareth Kafka
66 52 Robert Hatcher
h2. Processing output files
67 52 Robert Hatcher
68 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.
69 52 Robert Hatcher
70 52 Robert Hatcher
h3. hints for using files on PNFS
71 52 Robert Hatcher
72 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:
73 52 Robert Hatcher
74 52 Robert Hatcher
<pre>
75 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`
76 52 Robert Hatcher
</pre>
77 52 Robert Hatcher
78 52 Robert Hatcher
where @pnfs2xrootd@ is a translation script along the lines of:
79 52 Robert Hatcher
80 52 Robert Hatcher
@/grid/fermiapp/products/nova/externals/novaproduction/v01.06/NULL/bin/pnfs2xrootd@
81 52 Robert Hatcher
<pre>
82 52 Robert Hatcher
#!/bin/sh
83 52 Robert Hatcher
84 52 Robert Hatcher
# This is a cousin to samweb2xrootd. It takes a path that you could "ls" in
85 52 Robert Hatcher
# /pnfs and puts it in a format that ROOT or ART can understand. Can accept
86 52 Robert Hatcher
# multiple arguments.
87 52 Robert Hatcher
88 52 Robert Hatcher
while true
89 52 Robert Hatcher
do
90 52 Robert Hatcher
echo -n `readlink -f $1` | sed -e 's%/pnfs%root://fndca1.fnal.gov:1094//pnfs/fnal.gov/usr%'
91 52 Robert Hatcher
shift
92 52 Robert Hatcher
if [ x$1 == x ]; then break; fi
93 52 Robert Hatcher
echo -n ' '
94 52 Robert Hatcher
done
95 52 Robert Hatcher
96 52 Robert Hatcher
echo ' '
97 52 Robert Hatcher
98 52 Robert Hatcher
# end-of-script
99 52 Robert Hatcher
</pre>
100 52 Robert Hatcher
101 52 Robert Hatcher
If you there are authentication issues you might try:
102 52 Robert Hatcher
103 52 Robert Hatcher
<pre>
104 52 Robert Hatcher
kx509
105 52 Robert Hatcher
kxlist -p
106 52 Robert Hatcher
voms-proxy-init --rfc --voms=fermilab:/fermilab/nova/Role=Analysis --noregen
107 52 Robert Hatcher
</pre>
108 52 Robert Hatcher
109 15 Robert Hatcher
h2. Resources
110 15 Robert Hatcher
111 15 Robert Hatcher
h3. NuMI Beamline 
112 15 Robert Hatcher
113 15 Robert Hatcher
h4. "NuMI Technical Design Handbook":http://www-numi.fnal.gov/numwork/tdh/tdh_index.html 
114 15 Robert Hatcher
115 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.
116 15 Robert Hatcher
117 41 Michael Kordosky
h4. "Drawings Database":http://www-admscad.fnal.gov/  *Note: not available from offsite...*
118 15 Robert Hatcher
119 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]
120 16 Robert Hatcher
121 27 Gareth Kafka
[[Table of document numbers in the drawings database]]
122 22 Gareth Kafka
123 16 Robert Hatcher
h4. [[Other Drawing Sources]]
124 21 Robert Hatcher
125 21 Robert Hatcher
https://numix-docdb.fnal.gov:440/cgi-bin/ShowDocument?docid=21
126 30 Raphael Schroeter
127 42 Robert Hatcher
h4. Other Documentation
128 42 Robert Hatcher
129 42 Robert Hatcher
https://cdcvs.fnal.gov/redmine/projects/numi-beam/wiki/NuMI_beamline_documentation
130 42 Robert Hatcher
131 30 Raphael Schroeter
h2. Task List
132 30 Raphael Schroeter
133 40 Raphael Schroeter
[[Task List#NumiSoft Tag Release|NumiSoft Tag Release]]
134 38 Raphael Schroeter
[[Task List#Geometry|Geometry]]
135 38 Raphael Schroeter
[[Task List#DK2NU|DK2NU]]
136 38 Raphael Schroeter
[[Task List#FluxReader|FluxReader]]
137 47 Robert Hatcher
138 47 Robert Hatcher
----
139 47 Robert Hatcher
140 47 Robert Hatcher
{{collapse(View wiki structure...)
141 47 Robert Hatcher
  bq. {{child_pages}}
142 47 Robert Hatcher
}}