Project

General

Profile

Wiki » History » Version 59

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