Project

General

Profile

GENIEHelper Geometry

Basics

to be written

Configuring a geometry volume selection

When GENIE interprets neutrino rays running through the geometry it must find path segments in various volumes that are considered for possible interactions. Unless otherwise configured GENIE will consider all material from the ray origin (generally the flux window) through the entire ROOT geometry to the point of exit. Generally a geometry has a representation of the detector's environment (detector hall, buildings, floor, etc) and interactions outside the detector itself might be of no interest. A simple means of limiting volumes to be considered is to set the TopVolume string. This tells GENIE to look only in that volume and subvolumes contained within. A further refinement is to set the FiducialCut string. The FiducialCut allows one to define a simple selection volume (box, sphere, cylinder along z, polygon along z) independent of any shape/volume defined in the ROOT geometry. This is separate from the TopVolume; any TopVolume selection will limit what is considered -- that is, if the specified FiducialCut extends beyond the chosen TopVolume no events will be generated in that part of the FiducialCut (one might then want to set the TopVolume to the "world").

FiducialCut strings

The configuration string takes the form of: [0][M]<SHAPE>:val1,val2,..., where parts in brackets are optional and the <SHAPE> must be one of the predefined names: zcyl, box, zpoly, or sphere. The different shapes need different numbers of values to fully specify them.

  • zcyl:x0,y0,radius,zmin,zmax
    defines a cylinder along z at (x0,y0) capped at the two z limits.
  • box:xmin,ymin,zmin,xmax,ymax,zmax
    defines a box with upper and lower extremes.
  • zpoly:nfaces,x0,y0,r_in,phi,zmin,zmax
    defines a nface polygon in the x-y plane with a inscribed radius r_in capped at the two z limits.
  • sphere:x0,y0,z0,radius
    defines a sphere of fixed radius centered at (x0,y0,z0)
  • rockbox:...
    see below

Values should be in the natural units of the ROOT geometry in use (cm).

If there is a M preceding the shape name then the values are given in the master or world coordinates, otherwise they are relative to the TopVolume. If the leading 0 (zero) is present then rather than limited to the defined volume the selection is to exclude the volume by reversing the cut. Various punctuation (parentheses, braces, etc) can be used to improve readability, but are not actually used in parsing the values; upper/lower case doesn't matter.

Examples:
  1. 0mbox:0,0,0.25,1,1,8.75
    exclude (i.e. reverse) a box in master coordinates w/ corners (0,0,0.25) (1,1,8.75)
  2. mzpoly:6,(2,-1),1.75,0,{0.25,8.75}
    six sided polygon in x-y plane, centered at x,y=(2,-1) w/ inscribed radius 1.75, no rotation (so first face is in y-z plane +r from center, i.e. hex sits on point) limited to the z range of {0.25,8.75} in the master ROOT geom coordinates
  3. zcly:(3,4),5.5,-2,10
    a cylinder oriented parallel to the z axis in the "top vol" coordinates at x,y=(3,4) with radius 5.5 and z range of {-2,10}

Special case: RockBox FiducialCut strings

Configuring the selection for the case to efficiently handle events in the "rock" surrounding the detector take some extra explanation. When generating events outside of the detector proper one is interested in events that have the potential for a particle (e.g. μ) to eventually make its way into the detector in order to give a signal that can be read out. To do this more efficiently then blindly throwing the whole of the geometry at GENIE, we introduce the concept of a flexible "rock box". The box has a minimum size and then scales upwards depending on the individual neutrino in question. Thus for a representative 2 GeV neutrino one might be interested in interactions that occur in the few meters of surrounding medium on all sides and 10's of meters upstream of the detector. The size upstream will need to be larger for a 10 GeV neutrino. This is the philosophy of the GENIE GeomVolSelectorRockBox class. By default events are not generated within the minimum box size.

   rockbox:(xmin,ymin,zmin)(xmax,ymax,zmax),rockonly,wallmin,dedx,fudge,efromw
   asymrock:(xmin,ymin,zmin)(xmax,ymax,zmax),rockonly,(xmin',ymin',zmin')(xmax',ymax',zmax')dedx,fudge,efromw
Interpretation:
  • (xmin,ymin,zmin)(xmax,ymax,zmax) define the extent of the (inner) reference box in master world coordinates (always)
  • rockonly
    • 1 = generate only outside the reference box [default]
    • 0 = also generate events within the reference box (i.e. the detector) by only excluding minuscule bubble
  • wallmin minimum size (geometry natural units) beyond reference box size [default=800]
  • dedx estimated dE/dx losses, used to convert energy into box size extension [default=2.5*1.7e-3]
  • fudge extra fudge factor for box size [default=1.05]
  • efromw expand from wall (or outer box) rather than wall just setting a minimum size [default=0 or off]

In the second format asymrock the inner (exclusion) box and the outer box needn't be concentric. this feature not yet implemented in tagged genie releases

Only the 6 extent values are required; if others are supplied they must be in the listed order. Punctuation is flexible, everything after the rockbox: needs to be parsed into individual floating point values separated by spaces, commas, parentheses, etc.

GENIE maximum pathlength

In order to correctly calculate the event rate normalization the geometry must be scanned to determine maximum pathlengths in the various materials. The default approach by genie::geometry::ROOTGeomAnalyzer is to run a select a number of points on three (orthogonal) faces of a bounding box for the specified TopVolume of the geometry, and run a number of randomly directed rays from each point. The alternative approach is to pull a specified number of rays from the flux generator and run those through the geometry. In each case a PathLengthList is accumulated recording the maximum distance * fraction * density seen for each PDG target isotope. A safety factor (default 1.1) is then applied. If during event generation production a path length is seen that exceeds this corresponding maximum then GENIE will be very unhappy and BadThings™ happen.

Scanning the geometry

The GeomScan string can configure how this scan occurs:

  • box: npoints nrays [ safety [ 1 ] ]
  • flux: nparticles [ safety [ 1 ] ]
Examples:
  1. box: 200 200 1.1
  2. flux: 10000 1.1

If the optional 1 is given after the safety factor GENIEHelper will, on completion, write out a file named maxpathlength.xml. This max path length file can be used to bypass the same calculation in future runs of the simulation. But it mustn't be used for significantly different configurations (e.g. different TopVolume or FiducialCut values, or and obviously not for different geometries or flux orientations). The file should be renamed to something descriptive of the configuration (details are written inside the file).

Note: if nparticles is negative when using flux: then the flux ray's energy will be set to the maximum supplied by the flux driver while retaining the original direction.

Using a predetermined set of path lengths

For the GeomScan string use:

  • file: mySpecialMaxPathLength.xml

where the file contents are those generated by one of the previous methods (or adjusted upwards, never down).