go-hep.org/x/hep@v0.38.1/fads/README.md (about)

     1  fads
     2  ====
     3  
     4  [![GoDoc](https://godoc.org/go-hep.org/x/hep/fads?status.svg)](https://godoc.org/go-hep.org/x/hep/fads)
     5  
     6  `fads`, a FAst Detector Simulation, is a Go-based detector simulation including a tracking system embedded into a magnetic field, calorimeters and a muon system.
     7  
     8  ## Installation
     9  
    10  Is done via `go get`:
    11  
    12  ```sh
    13  $ go get go-hep.org/x/hep/fads/...
    14  ```
    15  
    16  ## Documentation
    17  
    18  Is available on `godoc`: https://godoc.org/go-hep.org/x/hep/fads
    19  
    20  ## Example
    21  
    22  A test application is available over there:
    23  
    24  https://go-hep.org/x/hep/fads/blob/main/cmd/fads-app/main.go
    25  
    26  A more in-depth tutorial is available at [go-hep/tutos](https://codeberg.org/go-hep/tutos) but, in a nutshell:
    27  
    28  ```sh
    29  $ fads-app -help
    30  Usage: fads-app [options] <hepmc-input-file>
    31  
    32  ex:
    33   $ fads-app -l=INFO -evtmax=-1 ./testdata/hepmc.data
    34  
    35  options:
    36    -cpu-prof=false: enable CPU profiling
    37    -evtmax=-1: number of events to process
    38    -l="INFO": log level (DEBUG|INFO|WARN|ERROR)
    39    -nprocs=0: number of concurrent events to process
    40  
    41  $ fads-app $GOPATH/src/go-hep.org/x/hep/fads/testdata/hepmc.data
    42  ::: fads-app...
    43  app                  INFO >>> running evt=0...
    44  app                  INFO >>> running evt=1...
    45  app                  INFO >>> running evt=2...
    46  app                  INFO >>> running evt=3...
    47  app                  INFO >>> running evt=4...
    48  app                  INFO >>> running evt=5...
    49  app                  INFO cpu: 1.212611252s
    50  app                  INFO mem: alloc:           3219 kB
    51  app                  INFO mem: tot-alloc:      26804 kB
    52  app                  INFO mem: n-mallocs:      53058
    53  app                  INFO mem: n-frees:        52419
    54  app                  INFO mem: gc-pauses:         36 ms
    55  ::: fads-app... [done] (time=1.216341021s)
    56  ```
    57  
    58  ## Using the execution tracer
    59  
    60  It is now possible to run `fads-app` with the `runtime/trace` execution tracer
    61  enabled:
    62  
    63  ```sh
    64  $ fads-app -trace=foo.out ./testdata/hepmc.data
    65  ```
    66  
    67  The traces are then analyzed and displayed via `trace-viewer` from the
    68  `catapult` project:
    69  
    70  ```sh
    71  $ go tool trace `which fads-app` ./foo.out
    72  ```
    73  
    74  See: [catapult-tracing](https://github.com/catapult-project/catapult/tree/master/tracing#readme)