irena-arm/idata/Makefile

93 lines
2.6 KiB
Makefile
Raw Permalink Normal View History

PARSER=idef-x_parser
include ../irena/libirena.make
%.I: %.dat idef-x_parser
./idef-x_parser < $< > $@
resV=1
%.hist: tarenahist.awk %.I
$< resV=$(resV) $(word 2, $^) > $@
%_single.hist: multiplicity.py tarenahist.awk %.I
$< -s 1 $(word 3, $^) | $(word 2, $^) resV=$(resV) > $@
%.phist: findpeaks.py %.hist
$< -s 12 -w plots $(word 2, $^) > $@
%.peaks: findpeaks.py %.hist
$< -s 12 -N 100 -L 8e-3 -P 0.5 -m -4000 -M 0 -w peaks $(word 2, $^) > $@
%.ehist: findedges.py %.hist
$< -s 20 -w plots $(word 2, $^) > $@
%.edges: findedges.py %.hist
$< -s 20 -N 100 -L 0.02 -P 0.01 -w edges $(word 2, $^) > $@
%_ba133am241fit.gpt: idef-x-ba133am241fit.py %.peaks %.edges
$< $(word 2, $^) $(word 3, $^) > $@
%.calhist: calhist.awk %.hist
$< $*_ch*.fitresult $*.hist | sort -k1n -k2n -k4n > $@
%.x1hist: %.I IX.awk
$(word 2,$^) 'isPHA(){doHIST()}' $< > $@
%.x1hist1: %.I IX.awk
$(word 2,$^) 'isPHA(){if (D>950) doHIST(); DD=D}' $< > $@
%.x1hist2: %.I IX.awk
$(word 2,$^) 'isPHA(){if (DD>950 && D<50) doHIST(); DD=D}' $< > $@
%.x1hist3: %.I IX.awk
$(word 2,$^) 'isPHA(){if (DD<50 && D<50) doHIST(); DD=D}' $< > $@
%.aoutscan2dhist: %.I
./IX.awk '/aout/{B=$$(NF-1)}; \
isPHA() && B && C=26 && A>-1500 && A<4000 && D<50 {do2DHIST(B)}' \
$< > $@
DD_1 = && D>950
DD_2 = && D<50
DD_3 = && D>50 && D<950
DD_11 = && D>950 && DD>950
DD_12 = && D>950 && DD<50
DD_13 = && D>950 && DD>50 && DD<950
DD_21 = && D<50 && DD>950
DD_22 = && D<50 && DD<50
DD_23 = && D<50 && DD>50 && DD<950
DD_31 = && D<950 && D>50 && DD>950
DD_32 = && D<950 && D>50 && DD<50
DD_33 = && D<950 && D>50 && DD>50 && DD<950
%.pulserscan2dhist$(DD): %.I
./IX.awk '/pulser/{B=$$(NF-3)/10; CC=$$NF}; \
isPHA() { \
if (B && C==CC && A>-1500 && A<3000 $(DD_$(DD))) do2DHIST(B); \
DD=D; \
}' \
$< > $@
%.filtergain: %.I
./IX.awk '/filter/{FF=$$(NF-5); BB=$$(NF-3)/10; CC=$$NF}; \
isPHA() && C==CC && A > 10*BB-1400 {doMEAN(A,C,BB,FF)}' \
$< > $@
%.II: %.I
awk '/pulse/{L=""};{L=L "\n" $$0};/^H/{print L;L=""}' $< > $@
%.filterscan2dhist: %.I
./IX.awk '/filter/{FF=$$(NF-5); BB=$$(NF-3)/10; CC=$$NF}; \
isPHA() && C==CC && A>-2000 && A<3000 {do2DHIST(8*CC+FF)}' \
$< > $@
CH=24
SF=1
PU=100
DT=
_ghosts = && D<50
_late = && D>1001
%_ch$(CH)_filter$(SF)_pu$(PU)$(DT).2dhist: %.I
./IX.awk '/filter/{RR=$$(NF-7); FF=$$(NF-5); BB=$$(NF-3)/10; CC=$$NF; \
GO = FF==$(SF) && CC=$(CH) }; \
GO && isPHA() && C==CC && A>-2000 && A<2000 && BB==$(PU) $($(DT)) {do2DHIST(RR)}' \
$< > $@