Skip to content

Commit

Permalink
Update README with authors and license
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulVanSchayck committed Feb 14, 2020
1 parent c0d4941 commit 1b10e71
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 66 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
123 changes: 57 additions & 66 deletions README → README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
-------------------------------------------------------------------

=========================================================
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:

[1] A. Schübel, D. Krapohl, E. Fröjdh, C. Fröjdh, and G. Thungström, “A Geant4 based framework for pixel
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
```
╔═════════════════════════════════════════════════════════════════════════════╗
║ ║ ║
║ ░:█║ ║
Expand All @@ -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 :
Expand All @@ -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 <nothreads>
```
- Execute G4Medipix in 'batch' mode from macro files
% G4Medipix -m gamma.mac -t <nothreads>
```
% G4Medipix -m gamma.mac -t <nothreads>
```

- 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')])


0 comments on commit 1b10e71

Please sign in to comment.