From 1b10e71694788c9fed76e83a01cd3d2891b2bcd5 Mon Sep 17 00:00:00 2001 From: Paul van Schayck Date: Fri, 14 Feb 2020 15:15:21 +0100 Subject: [PATCH] Update README with authors and license --- LICENSE | 21 ++++++++ README => README.md | 123 ++++++++++++++++++++------------------------ 2 files changed, 78 insertions(+), 66 deletions(-) create mode 100644 LICENSE rename README => README.md (55%) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..841c178 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 A. Schübel, David Kraphol, Erik Fröjdh, Maastricht University + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README b/README.md similarity index 55% rename from README rename to README.md index 09ae8b7..b0c3681 100644 --- a/README +++ b/README.md @@ -1,16 +1,10 @@ -------------------------------------------------------------------- - - ========================================================= - Geant4 - an Object-Oriented Toolkit for Simulation in HEP - ========================================================= - - Geant4Medipix - ------------- +Geant4Medipix +------------- Pixel based Medipix geometry with digitiser for simulating Monte Carlo and charge transport simulation as well as chip electronics. - 0- REFERENCES +## REFERENCES Feel free to use and modify the code. If you intend to publish, please use these references: @@ -18,15 +12,21 @@ detector simulation,” J. Instrum., vol. 9, no. 12, 2014. http://dx.doi.org/10.1088/1748-0221/9/12/C12018 - [2] D. Krapohl, A. Schubel, E. Frojdh, G. Thungstrom, and C. Frojdh, “Validation of Geant4 Pixel Detector + [2] D. Krapohl, A. Schubel, E. Fröjdh, G. Thungstrom, and C. Fröjdh, “Validation of Geant4 Pixel Detector Simulation Framework by Measurements with the Medipix Family Detectors,” IEEE Trans. Nucl. Sci., vol. 63, no. 3, pp. 1874–1881, 2016. http://dx.doi.org/10.1109/TNS.2016.2555958 - - 1- GEOMETRY DEFINITION +## Authors +A. Schübel, David Kraphol, Erik Fröjdh, Lucas Roussel, Paul van Schayck + +## License +MIT + +## GEOMETRY DEFINITION standard setup +``` ╔═════════════════════════════════════════════════════════════════════════════╗ ║ ║ ║ ║ ░:█║ ║ @@ -41,38 +41,39 @@ standard setup ║ ░:█║ ║ ║ ║ ║ ╚═════════════════════════════════════════════════════════════════════════════╝ - +``` The definition of the Medipix detector is flexible in terms of pixel size and number of pixels - 2- REQUIREMENTS +## REQUIREMENTS - Geant4-10.00 or higher is required in order to profit from multi-threading - The Boost library is used to read ini-files - HDF5 is optional - CAD libraries are optional +Geant4-10.00 or higher is required in order to profit from multi-threading +The Boost library is used to read ini-files +HDF5 is used to write output files + +CAD libraries are optional - 3- PHYSICS LISTS +## PHYSICS LISTS - Physics lists can be local (eg. in this example) or from G4 kernel - physics_lists subdirectory. +Physics lists can be local (eg. in this example) or from G4 kernel +physics_lists subdirectory. + +From geant4/source/physics_lists/builders: +- "emstandard_opt0" recommended standard EM physics for LHC +- "emstandard_opt1" best CPU performance standard physics for LHC +- "emstandard_opt2" +- "emstandard_opt3" best current advanced EM options. +- "emlivermore" low-energy EM physics using Livermore data +- "empenelope" low-energy EM physics implementing Penelope models +- "dna" low-energe DNA physics +Physics lists and options can be (re)set with UI commands - From geant4/source/physics_lists/builders: - - "emstandard_opt0" recommended standard EM physics for LHC - - "emstandard_opt1" best CPU performance standard physics for LHC - - "emstandard_opt2" - - "emstandard_opt3" best current advanced EM options. - - "emlivermore" low-energy EM physics using Livermore data - - "empenelope" low-energy EM physics implementing Penelope models - - "dna" low-energe DNA physics - Physics lists and options can be (re)set with UI commands - - Please, notice that options set through G4EmProcessOPtions are global, eg - for all particle types. In G4 builders, it is shown how to set options per - particle type. +Please, notice that options set through G4EmProcessOPtions are global, eg +for all particle types. In G4 builders, it is shown how to set options per +particle type. - 4- VISUALIZATION +## VISUALIZATION The Visualization Manager is set in the main(). The initialisation of the drawing is done via the commands : @@ -85,44 +86,34 @@ and number of pixels Optionaly one can choose to draw all particles, only the charged one, or none. This command is defined in EventActionMessenger class. - 5- HOW TO START ? +## HOW TO START ? - Install Geant4 and configure the environment (source pathto/geant4.sh) - Create a build folder and execute + ``` % cmake .. % make -j +``` - Execute G4Medipix in 'batch' mode from macro files - % G4Medipix -m gamma.mac -t + ``` + % G4Medipix -m gamma.mac -t +``` - Execute G4Medipix in 'interactive mode' with visualization - % G4Medipix - .... - Idle> type your commands. For instance: - Idle> /control/execute gamma.mac - .... - Idle> exit - - There are example mac files in the macro folder as well as tube spectra + ``` +% G4Medipix +.... +Idle> type your commands. For instance: +Idle> /control/execute gamma.mac +.... +Idle> exit + ``` +There are example mac files in the macro folder as well as tube spectra - - 6- OUTPUT FILES +## OUTPUT FILES - G4Medipix can produce HDF5 files containing the HitCollection : - void Add( G4double de, G4double dl, G4ThreeVector pos, G4int column, G4int line, G4int event, G4int particleID ) - - energy deposition - - track length - - position - - column - - line - - eventID - - particleID: 0 : gamma, - 1 : electron - 2 : proton - 3 : alpha - -1 : positron - 9999 : all others if any +G4Medipix can produce HDF5 files containing a `/g4medipix` and `/trajectories` group containing the pixel output +matrix and full trajectories of the incident particle. + - The most useful output format is sparse formatted as: - Event, X-pixel, Y-pixel, Energy, ToT, ToA - which translates to the following python datatype: - dt = np.dtype([('event', 'u4'), ('X', 'u4'), ('Y', 'u4'), - ('E', 'float64'),('ToT','float64'), ('ToA','float64')]) \ No newline at end of file + + \ No newline at end of file