hfsdoc

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@                                                                                                       @
@    @@     @@ @@@@@@@@ @@@@@@@@     @@@@@@@@    @@@     @@@@@@  @@@@@@@@     @@@@@@  @@@@ @@     @@    @
@    @@     @@ @@       @@     @@    @@         @@ @@   @@    @@    @@       @@    @@  @@  @@@   @@@    @
@    @@     @@ @@       @@     @@    @@        @@   @@  @@          @@       @@        @@  @@@@ @@@@    @
@    @@@@@@@@@ @@@@@@   @@@@@@@@     @@@@@@   @@     @@  @@@@@@     @@        @@@@@@   @@  @@ @@@ @@    @
@    @@     @@ @@       @@           @@       @@@@@@@@@       @@    @@             @@  @@  @@     @@    @
@    @@     @@ @@       @@           @@       @@     @@ @@    @@    @@       @@    @@  @@  @@     @@    @
@    @@     @@ @@@@@@@@ @@           @@       @@     @@  @@@@@@     @@        @@@@@@  @@@@ @@     @@    @
@                                                                                                       @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Table of Contents

Introduction

HepFastSim is (supposed to be) a simple-to-use, experiment-independent, stand-alone Fast Simulation Framework. Its purpose is the ability to setup a rough detector geometry in a short time (without too much details needed) and test it for various physics cases without the need for an external generator. The focus is on simplicity and speed rather than on accuracy. The general spirit is, that you do not need to provide many details about the detector specification if you do not have them, but you can specify more details if available to improve accuracy.

An online version of the documentation is located at https://klausgoetzen.github.io/hfsdoc/.

Quick Start

Before we start going into details let us run an example simulation. After unpacking you need to source the file . set_rootinc.sh in the install directory. This tells ROOT to look for include/source files in the src/ directory. There are some example configuration files located in the subfolder cfg/. The default minimalistic demo is the simulation and reconstruction of the signal decay channel anti-p p -> J/psi pi+ pi-. We can run it with (the + at the end of the macro name HepFastSim.C+ compiles the macro when running for the first time, roughly doubling the speed)

> root -l 'HepFastSim.C+(10000,"cfg/demo_mini.cfg")'

Demo run

A ROOT canvas with two pads will pop up, showing the invariant masses of the reconstructed anti-p p system and the J/psi candidates. Per default, the plots will be updated every 1000 events during runtime. After the simulation is finished a brief output summary is printed

Processing HepFastSim.C+(10000,"cfg/demo_mini.cfg")...
HepFastSim - Copyright (C) 2024 (GPLv3) - Author: Klaus Goetzen (GSI) - Distributed WITHOUT ANY WARRANTY.


Running HepFastSim ... 
Event: 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 

Number of events         : 10000
CPU time                 : 2.640 s
Speed                    : 3788 Hz

Let us take a quick look to the configuration file cfg/demo_mini.cfg:

GEN  ;; phsp : p1=10.3 : reaction=anti-p-,p+ 
GEN  ;; phsp : dec = pbarpSystem -> J/psi pi+ pi- ; J/psi -> mu+ mu-

TRK  ;; name=trk : tht=5,160 : eff=0.95 : dp=1.5 : dtht=2 : dphi=2
PID  ;; name=pid : tht=5,160 : eff=0.95 : mres = 0.2

REC  ;; dec = J/psi -> mu+ mu- ; pbarpSystem -> J/psi pi+ pi- : pidmu(mu+-)=0.1 : store(pbarpSystem, ntp0)=cand

HIST ;; tree=ntp0 : title=\bar{p}p mass;m [GeV] : hist=4.2,5.0 
HIST ;; tree=ntp0 : title=J/psi mass;m [GeV]    : hist=2.9,3.3 : var=xd0m

Here we basically see the typical four configuration sections for any simulation analysis:

In the configuration file each line starts with a capital letter keyword separated by a double semicolon (;;), followed by a colon (:) separated list of parameter and configuration settings. For this very simple example this is all the user needs to provide to run the simulation.

Proceed to the next section: General Concept