Presentation is loading. Please wait.

Presentation is loading. Please wait.

L. Pandola INFN, Gran Sasso National Laboratories

Similar presentations


Presentation on theme: "L. Pandola INFN, Gran Sasso National Laboratories"— Presentation transcript:

1 New aspects and new user requirements: geometries and materials from files
L. Pandola INFN, Gran Sasso National Laboratories MaGe workshop, Munich, February 15th-16th, 2007 MaGe Workshop Luciano Pandola

2 User requirements for new MaGe functionalities
Requirements have been placed by various users to improve the functionality and the flexibility of the MaGe framework MaGe has been used to simulate the response of HP-Ge detectors and to evaluate the efficiency for screening purposes. Requirement: avoid C++ complications for geometries and materials. Namely: define them without editing and compiling the code Typical example: material of the sample to be measured. It changes every time and it would be good if it had not to be hard-coded in MaGe, but defined through an external file Same for geometry, although it is difficult to define a complex geometry without C++ coding MaGe Workshop Luciano Pandola

3 Material definition on-the-fly
MaGe already contains an list of commonly-used materials (hard-coded or Majorana database) New materials (arbitrary number) can be defined on-the-fly using external user ASCII files /MG/geometry/addMaterial myfile.def /MG/geometry/addMaterial myfile2.def ... Advantage: materials can be defined/changed without editing and recompiling the code. Warning: it not possible to re-define a material already existing in MaGe (a different name must be set) MaGe Workshop Luciano Pandola

4 Example of material definition
Material name Density (g/cm3) Number of components Material declaration SodiumIodide Sodium Na Iodine I Components definition Element name Mass fraction User must take care that sum=1! Symbol Z A Warning: the isotopic composition of elements must be the natural one. If the element is already defined in MaGe only the mass fraction information is considered MaGe Workshop Luciano Pandola

5 nested volumes (= holes)
Geometry definition Simple geometries can be defined using external files instead of selecting one of the hard-coded geometries available set the geometry definition as “from file” Two commands for initialization: /MG/geometry/detector GeometryFile /MG/geometry/geometryFileName mygeometry.def set the name of the file to be read Possible to define an arbitrary number of cylinders, boxes and spheres, with given position and rotation. Volumes can be daughters of the World or of an other volume nested volumes (= holes) Dimensions cannot exceed 5 m (size of the world volume) MaGe Workshop Luciano Pandola

6 Geometry definition from file
Each single volume is defined in four lines: Ordering number Name Shape code Sensitive/not Mother volume Material 1 Crystal SodiumIodide 2 Hole Air Coordinates w.r.t. mother (cm) Dimensions (cm) Euler angles (deg) Shape = 1 (box), 2 (cylinder) or 3 (sphere) Mother volume = 0 corresponds to the world MaGe Workshop Luciano Pandola

7 Geometry definition from file (2)
This is the simple geometry defined by the file given in the previous slide: 2.55 cm sensitive volume (NaI) 1.43 cm 5.1 cm 3.8 cm air hole (not sensitive) (displaced by 0.65 cm with respect to the center of the sensitive volume) 2.55 cm See user full user manual in the CVS repository: doc/LaTeXDocuments/geometryFromFile MaGe Workshop Luciano Pandola

8 set the name of the output file
Efficiency analysis A common application of MaGe users is to evaluate the full-energy efficiency for gamma-rays. A simple ASCII-based output scheme is provided for this set the output scheme /MG/eventaction/rootschema DetectorEfficiency /MG/eventaction/rootfilename myoutput.def set the name of the output file Output file with four columns: energy of primary particles total number of generated primary tracks number of events with energy deposition in the detector number of events with full-energy deposition in the detector MaGe Workshop Luciano Pandola

9 A working test macro can be found in the CVS repository
Some simple results A working test macro can be found in the CVS repository macros/GeometryFromFile_Test.mac It calculates the efficiency vs. energy for a point-like gamma source placed in the hole of the detector defined in the file Results in good agreement with respect to the code TEFF (by V. Tretyak) One can couple this feature of MaGe with all the others (e.g. distribute a source over a given volume, etc.) MaGe Workshop Luciano Pandola

10 Conclusions It is now possible in MaGe to define new materials and (simple) geometries using external ASCII files Development triggered by user requests coming from the material screening group The main advantage is that it is not necessary to edit the C++ code and to recompile MaGe  more friendly An output class is also available for the (common) task of evaluating a detector efficiency vs. energy User manual and a working test macro are available in the CVS repository It would be good to have some more general interface for external geometries (GDML)  to be explored MaGe Workshop Luciano Pandola


Download ppt "L. Pandola INFN, Gran Sasso National Laboratories"

Similar presentations


Ads by Google