diff --git a/Makefile b/Makefile index 94192b3ac2d74d4e803286611e9cd95adce2d110..dd9524cbe121ab71697ce8637889696db1766f6b 100644 --- a/Makefile +++ b/Makefile @@ -35,18 +35,18 @@ all: $(TESTS) .PHONY: clean -clean: - rm -f bin/* - $(MAKE) -C $(CODE_DIR) clean - run: $(MAKE) -C $(SIM_DIR) -fullclean: +clean: rm -f bin/* $(MAKE) -C $(CODE_DIR) clean + +simclean: $(MAKE) -C $(SIM_DIR) clean +fullclean: clean simclean + check-lago: ifndef LAGO_EASY $(info LAGO_EASY is not set.) diff --git a/README.md b/README.md index 9cdcfbd29b1a2d3d2564fd82a834dc180bd08ce8..570a628f204fbf417179f0199d43f76ccf95725d 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,26 @@ make run in the parent directory. It will provide a <kbd>.root</kbd> file with a specific name depending on the parameters defined in the <kbd>default.inp</kbd> file. It is then converted into ASCII, extracting the FADC traces, producing a <kbd>.dat</kbd> ASCII file. +#### Data analysis + +The output data is quite simple. In the resulting ASCII file, the expected ADC values for the first 100 temporal bins of the FADC traces (~2.5 us) are given for each injected particle. A simple awk script to produce a charge histogram could be: +```bash +for i in *.dat; do + u=$(basename $i .dat) + echo $i + awk '{t[$1]+=$4}END{for (i in t) {print t[i] }}' $i | sort -n | uniq -c | awk '{if ($2) {print $2,$1}}' > $u.hst +``` +producing a file containing a two column file: <kbd>charge counts</kbd>. + +#### Housekeeping + +We include three leves of data and binary cleaning: +```bash +make clean # clean binaries and libraries +make simclean # erase simulated data from previous runs +make fullclean # executes clean and simclean directives +``` + ### Additional package An additional tool, <kbd>Trace</kbd> is included. It can be used to calculate the trace lenght distribution of muons going thought the detector. To configure it, two blocks inside the main code should be modified. So: diff --git a/sim/default.inp b/sim/default.inp index e9e494a68e1481fd113b60aa2f434017ac73f0db..95fea1d9676c676df66eb8e3fb8a362c8213c43f 100644 --- a/sim/default.inp +++ b/sim/default.inp @@ -7,7 +7,7 @@ ################################################ # # number of events (Number of particles injected in station) -NEvents 10000 +NEvents 100000 # runnumber (Used for File naming, can be any string) RunNumber 01 # partmode (VEM| FIXEDTHETA| RANDOM| SCINTILLATOR| HORIZONTAL) @@ -57,10 +57,10 @@ PartTheta 0 # # simmode (FAST | DETAILED | SAMPLE) # recommended: DETAILED -#SimMode DETAILED +SimMode DETAILED # muemmode (DEFAULT | MUEM) (if MUEM, mu and em traces) # recommended: DEFAULT -#MuEmMode DEFAULT +MuEmMode DEFAULT # elecmode (DEFAULT | FULL | PM | SHOWSAT)(if FULL intermediate elecsim written) # recommended: PM -#ElecMode PM +ElecMode PM