diff --git a/.gitignore b/.gitignore index df9533dfb676918719a9f65c2306ce93a8ab5fc6..50fc17b1ad6898ddecf78c0b2b2f8b9381d6bc6c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,9 +6,9 @@ *.d .DS_Store *~ -simthm_c11li6n14pd -simthm_c11li6n14pd.?*?.C -root/*.root -figs/*.png -figs/*.pdf -figs/*.ps \ No newline at end of file +simthm +simthm.?*?.C +*/root/*.root +*/figs/*.png +*/figs/*.pdf +*/figs/*.ps \ No newline at end of file diff --git a/Makefile b/Makefile index 10ad4377abf220fdef1a5505a3af298c1a1f05af..fb59831e2feb0055068b68a8f333cdcb955d7b40 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,40 @@ # name of .C program -TARGET = simthm_c11li6n14pd +TARGET = simthm DEP = $(TARGET).d SRCS = $(TARGET).C OBJS = $(addsuffix .o, $(basename $(SRCS))) +ROOTLIBDIR = $(shell root-config --libdir) ROOTCFLAGS = $(shell root-config --cflags) -ROOTLIBS = $(shell root-config --libs) CXXFLAGS = $(ROOTCFLAGS) -Wall -GSLLIBS = -lm -CXXLIBS = $(ROOTLIBS) $(GSLLIBS) -lGeom -lMathMore -CC = g++ -F77=gfortran +F77 = gfortran -ENEWZLIB = /usr/local/lib # where libenewzlib.a locates +# Edit below for your circumstances +ifeq ($(shell uname),Linux) + ROOTLIBS = $(shell root-config --libs) + CXXLIBS = $(ROOTLIBS) -lGeom $(GSLLIBS) -lMathMore + CC = clang++-7 + ENEWZLIB = /usr/local/lib #mac <- used + LFLAGSC = -L$(ENEWZLIB) -lenewzlib \ + /usr/lib/gcc/x86_64-linux-gnu/9/libstdc++.a +else ifeq ($(shell uname),Darwin) + ROOTLIBS = -L$(ROOTLIBDIR) -lCore -lImt -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lROOTVecOps -lTree -lTreePlayer -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMultiProc -lROOTDataFrame -Wl,-rpath,$(ROOTLIBDIR) -lpthread -lm -ldl + CXXLIBS = $(ROOTLIBS) -lGeom -lstdc++ -lc++ $(GSLLIBS) -lMathMore + CC = clang++ +# CC = g++ + ENEWZLIB = /usr/local/lib + LFLAGSC = -L$(ENEWZLIB) -lenewzlib #/usr/local/lib/gcc/11/libstdc++.a +endif -LFLAGSC = -L$(ENEWZLIB) -lenewzlib /usr/lib/gcc/x86_64-linux-gnu/9/libstdc++.a -# where libstdc++.a locates +# cp_prm: all: dep $(TARGET) $(TARGET): $(OBJS) +# cp -p enewz_prm_${ISOTOPE}.C enewz_prm.C $(F77) $(OBJS) -o $@ $(CXXLIBS) ${LFLAGSC} +# $(F77) $(OBJS) -o $@ $(ROOTLIBS) ${LFLAGSC} $(GSLLIBS) .cc.o: $(CC) -c $< $(CXXFLAGS) @@ -34,4 +47,39 @@ dep: -include $(DEP) clean: - rm -f $(TARGET) $(OBJS) + rm -f $(TARGET) $(OBJS) $(DEP) + +# DEP = $(TARGET).d +# SRCS = $(TARGET).C +# OBJS = $(addsuffix .o, $(basename $(SRCS))) + +# ROOTCFLAGS = $(shell root-config --cflags) +# ROOTLIBS = $(shell root-config --libs) +# CXXFLAGS = $(ROOTCFLAGS) -Wall +# GSLLIBS = -lm +# CXXLIBS = $(ROOTLIBS) $(GSLLIBS) -lGeom -lMathMore +# CC = g++ +# F77=gfortran + +# ENEWZLIB = /usr/local/lib # where libenewzlib.a locates + +# LFLAGSC = -L$(ENEWZLIB) -lenewzlib /usr/lib/gcc/x86_64-linux-gnu/9/libstdc++.a +# # where libstdc++.a locates + +# all: dep $(TARGET) + +# $(TARGET): $(OBJS) +# $(F77) $(OBJS) -o $@ $(CXXLIBS) ${LFLAGSC} + +# .cc.o: +# $(CC) -c $< $(CXXFLAGS) + +# .f.o: +# ${F77} -c $< + +# dep: +# $(CC) -MM $(SRCS) > $(DEP) $(CXXFLAGS) +# -include $(DEP) + +# clean: +# rm -f $(TARGET) $(OBJS) $(DEP) diff --git a/figs/.gitignore b/c11li6n14pd/figs/.gitignore similarity index 100% rename from figs/.gitignore rename to c11li6n14pd/figs/.gitignore diff --git a/c11li6n14pd/figs/c11li6n14pd_sim001_cm.png b/c11li6n14pd/figs/c11li6n14pd_sim001_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..4561db60a530508520379c327cdbd901c40e4f97 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim001_cm.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim001_kin.png b/c11li6n14pd/figs/c11li6n14pd_sim001_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..d269aad579f7d2cd93c4351f0a41d380ccb4f67d Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim001_kin.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim001_lab.png b/c11li6n14pd/figs/c11li6n14pd_sim001_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..ad6e2710316362bcad046b152a170228ce8b6449 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim001_lab.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim001_pos.png b/c11li6n14pd/figs/c11li6n14pd_sim001_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..aecc192b80bcddbcb2e83194d7008bdaedfc8f0c Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim001_pos.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim001_rel.png b/c11li6n14pd/figs/c11li6n14pd_sim001_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..2f84709b0a0e365f1d2145ba019e5aee4787805d Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim001_rel.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim002_cm.png b/c11li6n14pd/figs/c11li6n14pd_sim002_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..df4b24f4074328daf10ff3fcde9d8b9147f3dd67 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim002_cm.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim002_kin.png b/c11li6n14pd/figs/c11li6n14pd_sim002_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..17381d9d75ef5a267eea41f63a22fe4fcb25d7fa Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim002_kin.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim002_lab.png b/c11li6n14pd/figs/c11li6n14pd_sim002_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..4a6ca95c55a74230ebffc9de1fa0e0009e30a25b Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim002_lab.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim002_pos.png b/c11li6n14pd/figs/c11li6n14pd_sim002_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..59db7a83ad3209490bc20f2ac5dc69ae9ac2feff Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim002_pos.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim002_rel.png b/c11li6n14pd/figs/c11li6n14pd_sim002_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..da956b81fba691f25c8aeee4c2e05ee8da5de5ad Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim002_rel.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim003_cm.png b/c11li6n14pd/figs/c11li6n14pd_sim003_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..64ecbb0f8a3027e51411a5cd1887280543d22eb6 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim003_cm.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim003_kin.png b/c11li6n14pd/figs/c11li6n14pd_sim003_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..d269aad579f7d2cd93c4351f0a41d380ccb4f67d Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim003_kin.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim003_lab.png b/c11li6n14pd/figs/c11li6n14pd_sim003_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..5ee4ac439c518bec2bf2eadeda35cc2c5341a752 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim003_lab.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim003_pos.png b/c11li6n14pd/figs/c11li6n14pd_sim003_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..aecc192b80bcddbcb2e83194d7008bdaedfc8f0c Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim003_pos.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim003_rel.png b/c11li6n14pd/figs/c11li6n14pd_sim003_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..3f0ddc51e8fe63a3e1514a0d233578f78c1be5b0 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim003_rel.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim004_cm.png b/c11li6n14pd/figs/c11li6n14pd_sim004_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..c97c73588b8f8fbf0cd6bcff2d95aafac140b74d Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim004_cm.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim004_kin.png b/c11li6n14pd/figs/c11li6n14pd_sim004_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..d269aad579f7d2cd93c4351f0a41d380ccb4f67d Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim004_kin.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim004_lab.png b/c11li6n14pd/figs/c11li6n14pd_sim004_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..055ffd715eb6d3b2bf447cf86063518197e9132e Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim004_lab.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim004_pos.png b/c11li6n14pd/figs/c11li6n14pd_sim004_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..b5b07d018356bbfe7bc2bf4e9d695b47fef61c1a Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim004_pos.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim004_rel.png b/c11li6n14pd/figs/c11li6n14pd_sim004_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..5756bc8f834595ad125fe02b324a1217ac98bb22 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim004_rel.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim005_cm.png b/c11li6n14pd/figs/c11li6n14pd_sim005_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..a480848d760e47420f53e560c82bf0ec3db80a33 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim005_cm.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim005_kin.png b/c11li6n14pd/figs/c11li6n14pd_sim005_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..2d4a4391598eeb800b008da9804be93e8da904bb Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim005_kin.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim005_lab.png b/c11li6n14pd/figs/c11li6n14pd_sim005_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..141e9dd684d5122a9c27928d5299805d558c9a0c Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim005_lab.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim005_pos.png b/c11li6n14pd/figs/c11li6n14pd_sim005_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..f6d2ff48a71df2fa5baa0d90fcc75c11ed4bc815 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim005_pos.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim005_rel.png b/c11li6n14pd/figs/c11li6n14pd_sim005_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..274c82a5654585935fc6acaa28ced202b6ed2167 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim005_rel.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim006_cm.png b/c11li6n14pd/figs/c11li6n14pd_sim006_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..14a23f9fd2b2912719a1a1cab2395f8adbcc4118 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim006_cm.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim006_kin.png b/c11li6n14pd/figs/c11li6n14pd_sim006_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..5f031e6eff34553832823b15d109e3c07e9b44f6 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim006_kin.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim006_lab.png b/c11li6n14pd/figs/c11li6n14pd_sim006_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..0922bc2ecc196ceaa68dff5f6141492fcdcc8892 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim006_lab.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim006_pos.png b/c11li6n14pd/figs/c11li6n14pd_sim006_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..3175ce9e1fae10426e57b489b0400ecf733e76ad Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim006_pos.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim006_rel.png b/c11li6n14pd/figs/c11li6n14pd_sim006_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..0d338a2a5bd26607c0c4a37f72611bc21f60a8df Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim006_rel.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim007_cm.png b/c11li6n14pd/figs/c11li6n14pd_sim007_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..d4fa125cd45993e80d40448dfa39965a79c571eb Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim007_cm.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim007_kin.png b/c11li6n14pd/figs/c11li6n14pd_sim007_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..950856a93b2b2aef8eb7a7a66319ffe18f2a589c Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim007_kin.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim007_lab.png b/c11li6n14pd/figs/c11li6n14pd_sim007_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..896bedc0c5ad5fa2caa37b07782ba59c05ffd41d Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim007_lab.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim007_pos.png b/c11li6n14pd/figs/c11li6n14pd_sim007_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..4cb93e9963e22e25d00cc7234ba63cf12594dd48 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim007_pos.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim007_rel.png b/c11li6n14pd/figs/c11li6n14pd_sim007_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..63e63e3940ef9fa94ea210e23fed6089e3af5086 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim007_rel.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim008_cm.png b/c11li6n14pd/figs/c11li6n14pd_sim008_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..f377eb6f4260b223ec9740055ce07b614da57f84 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim008_cm.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim008_kin.png b/c11li6n14pd/figs/c11li6n14pd_sim008_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..2f97cd4832c9a15c809d929b6216890feac14210 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim008_kin.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim008_lab.png b/c11li6n14pd/figs/c11li6n14pd_sim008_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..d2a5b5deebfe2a5b50b049b1c66f1ad85fc5d134 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim008_lab.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim008_pos.png b/c11li6n14pd/figs/c11li6n14pd_sim008_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..877f98d6e6d5f7c326e2099ba73244db9291f275 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim008_pos.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim008_rel.png b/c11li6n14pd/figs/c11li6n14pd_sim008_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..3958b6c94d9445237bb0f28a735136a38ff76095 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim008_rel.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim009_cm.png b/c11li6n14pd/figs/c11li6n14pd_sim009_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..811294154a313d9a601fcab2dad5cefc770d1f2c Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim009_cm.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim009_kin.png b/c11li6n14pd/figs/c11li6n14pd_sim009_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..f6b1f76396d02e45566656e672898b90e72e60e5 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim009_kin.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim009_lab.png b/c11li6n14pd/figs/c11li6n14pd_sim009_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..7163d5a26f60d2586e9b42d08316792b78fd632f Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim009_lab.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim009_pos.png b/c11li6n14pd/figs/c11li6n14pd_sim009_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..c84557b3556b47b9fc91faa7dd9f7a0755a8e56f Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim009_pos.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim009_rel.png b/c11li6n14pd/figs/c11li6n14pd_sim009_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..d6d7e26de224fcd3cf2a2118b11009b4911f6bd4 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim009_rel.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim010_cm.png b/c11li6n14pd/figs/c11li6n14pd_sim010_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..c5396dce5b1f30bb6b2c854ae48a883acec86a47 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim010_cm.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim010_kin.png b/c11li6n14pd/figs/c11li6n14pd_sim010_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..c2d2389e5122f599250334ddd23f164f3268ac82 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim010_kin.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim010_lab.png b/c11li6n14pd/figs/c11li6n14pd_sim010_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..3483544de10101bc48242b35a9ba88b3578e572d Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim010_lab.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim010_pos.png b/c11li6n14pd/figs/c11li6n14pd_sim010_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..3ca2cca93731d9e1139e465c1ba1ecfbdcdd9d06 Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim010_pos.png differ diff --git a/c11li6n14pd/figs/c11li6n14pd_sim010_rel.png b/c11li6n14pd/figs/c11li6n14pd_sim010_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..4375b73ef7e1584148a6fb1f93158faf1019667c Binary files /dev/null and b/c11li6n14pd/figs/c11li6n14pd_sim010_rel.png differ diff --git a/c11li6n14pd/figs/det_arrange.pdf b/c11li6n14pd/figs/det_arrange.pdf new file mode 100644 index 0000000000000000000000000000000000000000..34e053e47867516cf239310d9df1698fb127a9aa Binary files /dev/null and b/c11li6n14pd/figs/det_arrange.pdf differ diff --git a/c11li6n14pd/figs/det_arrange.png b/c11li6n14pd/figs/det_arrange.png new file mode 100644 index 0000000000000000000000000000000000000000..ecd2601865f30babc92c0173d9f4a885f861edd6 Binary files /dev/null and b/c11li6n14pd/figs/det_arrange.png differ diff --git a/c11li6n14pd/figs/det_arrange_c11li6n14pd_sim001.png b/c11li6n14pd/figs/det_arrange_c11li6n14pd_sim001.png new file mode 100644 index 0000000000000000000000000000000000000000..40d9a865a1a03046b84cfdcac53a432041776e01 Binary files /dev/null and b/c11li6n14pd/figs/det_arrange_c11li6n14pd_sim001.png differ diff --git a/c11li6n14pd/figs/det_arrange_c11li6n14pd_sim008.png b/c11li6n14pd/figs/det_arrange_c11li6n14pd_sim008.png new file mode 100644 index 0000000000000000000000000000000000000000..4d3944cf287190840725046c4a9cb19ee3c129e6 Binary files /dev/null and b/c11li6n14pd/figs/det_arrange_c11li6n14pd_sim008.png differ diff --git a/c11li6n14pd/figs/det_arrange_c11li6n14pd_sim009.png b/c11li6n14pd/figs/det_arrange_c11li6n14pd_sim009.png new file mode 100644 index 0000000000000000000000000000000000000000..0cac604a847863510348fe06903158f327e23f54 Binary files /dev/null and b/c11li6n14pd/figs/det_arrange_c11li6n14pd_sim009.png differ diff --git a/c11li6n14pd/figs/det_arrange_c11li6n14pd_sim010.png b/c11li6n14pd/figs/det_arrange_c11li6n14pd_sim010.png new file mode 100644 index 0000000000000000000000000000000000000000..c3ea0963eb8660f0fdea1c561d12811916d2017a Binary files /dev/null and b/c11li6n14pd/figs/det_arrange_c11li6n14pd_sim010.png differ diff --git a/c11li6n14pd/figs/tmp.png b/c11li6n14pd/figs/tmp.png new file mode 100644 index 0000000000000000000000000000000000000000..e38959927598b7cfb53706b0847485b97d48a4de Binary files /dev/null and b/c11li6n14pd/figs/tmp.png differ diff --git a/macro/chk_sim.C b/c11li6n14pd/macro/chk_sim.C similarity index 85% rename from macro/chk_sim.C rename to c11li6n14pd/macro/chk_sim.C index c21fcafda90bcab23015a1b5602fe516e348799c..527ca42905af7ad2dab54457ab2f8938c9d3972e 100644 --- a/macro/chk_sim.C +++ b/c11li6n14pd/macro/chk_sim.C @@ -2,7 +2,7 @@ //TFile *f = new TFile("../root/c11li6n14pd_sim001.root"); Char_t label[50] = "c11li6n14pd"; - Char_t simnum[10] = "sim008"; + Char_t simnum[10] = "sim010"; { gStyle->SetStatW(0.3); @@ -85,7 +85,7 @@ sim->SetMarkerStyle(1); gStyle->SetStatX(0.9); - } //return; + } { @@ -95,18 +95,33 @@ // E.lab c2->cd(1); sim->Draw("E.lab_det[0]:(E.lab_det_MC[0] - E.lab_det[0])" - ">>h21(80,-0.3,0.3,40,0,12)","hit.both",""); + ">>h21(80,-0.3,0.3,40,0,12)","hit.both",""); c2->cd(5); sim->Draw("E.lab_det_MC[0] - E.lab_det[0]" - ">>h23(100,-0.3,0.3)","hit.both"); + ">>h23(100,-0.3,0.3)","hit.both"); c2->cd(2); sim->Draw("E.lab_det[1]:(E.lab_det_MC[1] - E.lab_det[1])" - ">>h22(80,-0.3,0.3,40,0,10)","hit.both",""); + ">>h22(80,-0.3,0.3,40,0,10)","hit.both",""); c2->cd(6); sim->Draw("E.lab_det_MC[1] - E.lab_det[1]" - ">>h24(100,-0.3,0.3)","hit.both"); + ">>h24(100,-0.3,0.3)","hit.both"); + /* c2->cd(1); */ + /* sim->Draw("E.lab[0] - E.lab_det[0]" */ + /* ">>h21(100,-1.,3.)","hit.both",""); */ + /* c2->cd(5); */ + /* sim->Draw("E.lab_MC[0] - E.lab_det_MC[0]" */ + /* ">>h23(100,-1.,3.)","hit.both"); */ + /* c2->cd(2); */ + /* sim->Draw("E.lab[1] - E.lab_det[1]" */ + /* ">>h22(100,-0.3,0.3)","hit.both",""); */ + /* c2->cd(6); */ + /* sim->Draw("E.lab_MC[1] - E.lab_det_MC[1]" */ + /* ">>h24(100,-0.3,0.3)","hit.both"); */ + /* return; */ + + // th.lab c2->cd(3); sim->Draw("th.lab[0]:(th.lab_MC[0] - th.lab[0])" @@ -120,7 +135,7 @@ c2->cd(8); sim->Draw("th.lab_MC[1] - th.lab[1]" ">>h28(100,-3,3)","hit.both"); - } // return; + } //return; { TCanvas *c3=new TCanvas("c3","",1750,100,1600,800); @@ -202,16 +217,16 @@ { - TCanvas *c5=new TCanvas("c5","",1900,200,1200,800); - c5->Divide(3,2); + TCanvas *c5=new TCanvas("c5","",1900,200,1600,800); + c5->Divide(4,2); // E.cm c5->cd(1); sim->Draw("E.cm:(E.cm_MC - E.cm)" ">>h51(80,-0.3,0.3,40,-3,3)","hit.both",""); - c5->cd(4); + c5->cd(5); sim->Draw("E.cm_MC - E.cm" - ">>h54(100,-0.3,0.3)","hit.both"); + ">>h55(100,-0.3,0.3)","hit.both"); sim->SetLineColor(color50); sim->Draw("E.cm_MC - E.cm>>h54_2",pscut50*"hit.both","same"); // h54_2->Fit("gaus"); @@ -223,9 +238,9 @@ c5->cd(2); sim->Draw("th.cm:(th.cm_MC - th.cm)" ">>h52(80,-10,10,40,0,180)","hit.both"); - c5->cd(5); + c5->cd(6); sim->Draw("th.cm_MC - th.cm" - ">>h55(100,-10,10)","hit.both"); + ">>h56(100,-10,10)","hit.both"); sim->SetLineColor(color50); sim->Draw("th.cm_MC - th.cm",pscut50*"hit.both","same"); sim->SetLineColor(kBlack); @@ -233,8 +248,17 @@ // Q value c5->cd(3); sim->Draw("E.Q3_mid>>h53(80,0.,3.)"); - c5->cd(6); - sim->Draw("E.Q3_dec>>h56(80,0.,3.)"); + c5->cd(7); + sim->Draw("E.Q3_dec>>h57(80,0.,3.)"); + + // Q value + c5->cd(4); + sim->Draw("p.spc:(p.spc_MC - p.spc)" + ">>h54(80,-100,100,80,-20-,200)","hit.both"); + c5->cd(8); + sim->Draw("p.spc_MC - p.spc" + ">>h58(100,-100,100)","hit.both"); + } //return; diff --git a/prm/prm_reac.c11li6n14pd_sim001.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim001.C similarity index 89% rename from prm/prm_reac.c11li6n14pd_sim001.C rename to c11li6n14pd/prm/prm_reac.c11li6n14pd_sim001.C index ccd9abb31b5349350a026db45ebba3de0bed14eb..ccaed6d612077178c3ee4ae2828ce941234a7370 100644 --- a/prm/prm_reac.c11li6n14pd_sim001.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim001.C @@ -10,9 +10,10 @@ const Double_t dummy = -1000.; //Long64_t ntot = 2.e9; // number of events //Long64_t ntot = 1.e8; // number of events const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "c11li6n14pd"; // Char_t label[50] = "c11li6n14pd"; // -//Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) -Char_t simnum[10] = "sim002"; // only beam (energy, spacial, PPAC resolution) spread +Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) +//Char_t simnum[10] = "sim002"; // only beam (energy, spacial, PPAC resolution) spread //Char_t simnum[10] = "sim003"; // only SSD energy resolution */ /* Char_t simnum[10] = "sim004"; // only SSD strip width */ /* Char_t simnum[10] = "sim005"; // including beam spread, SSD resolutions */ @@ -59,9 +60,12 @@ float Eaft, Eaft_beam; //Char_t al[34] = "al"; //Char_t ch2[34] = "POLYETHYLENE"; //Char_t cd2[34] = "cd2"; -Char_t lif[34] = "lif"; -Char_t he[34] = "he"; -Char_t si[34] = "si"; +//Char_t lif[34] = "lif"; +//Char_t he[34] = "he"; +//Char_t si[34] = "si"; +//Char_t carbon[34] = "c"; +Char_t mat_tar[34] = "lif"; +Char_t mat_bak[34] = "c"; Int_t unit_pressure = 1; // Torr // float pressure0 = 0.; //dummy float pressure = 0.; //dummy @@ -76,8 +80,9 @@ float temperature = 299.; //float dtemperature = 1.; // sigma Int_t unit_mm = 1; // in mm Int_t unit_mgpcm2 = 2; // in mg/cm^2 -//float thk_tar = 0.; // Target thickness in mg/cm^2 // sim001 -float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim002 +float thk_tar = 0.; // Target thickness in mg/cm^2 // sim001 +//float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim002 +float thk_bak = 0.; float r_sphere = 250.; // radius of the TGeoVolume in mm //float dEbin = 0.05; // energy step for effective thickness calculation float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter @@ -130,5 +135,3 @@ Double_t strip_half[ndet]; ////////////////////////// //Double_t dt = 1.; // TOF resolution in nsec. - - diff --git a/prm/prm_reac.c11li6n14pd_sim002.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim002.C similarity index 96% rename from prm/prm_reac.c11li6n14pd_sim002.C rename to c11li6n14pd/prm/prm_reac.c11li6n14pd_sim002.C index 0581dcd5ce94d68b4e61acece074690a9982c945..692714a288ff66db7b4c8740245c059e4c6b1d2e 100644 --- a/prm/prm_reac.c11li6n14pd_sim002.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim002.C @@ -10,6 +10,7 @@ const Double_t dummy = -1000.; //Long64_t ntot = 2.e9; // number of events //Long64_t ntot = 1.e8; // number of events const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "c11li6n14pd"; // Char_t label[50] = "c11li6n14pd"; // //Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) Char_t simnum[10] = "sim002"; // only beam (energy, spacial, PPAC resolution) spread @@ -59,9 +60,11 @@ float Eaft, Eaft_beam; //Char_t al[34] = "al"; //Char_t ch2[34] = "POLYETHYLENE"; //Char_t cd2[34] = "cd2"; -Char_t lif[34] = "lif"; -Char_t he[34] = "he"; -Char_t si[34] = "si"; +/* Char_t lif[34] = "lif"; */ +/* Char_t he[34] = "he"; */ +/* Char_t si[34] = "si"; */ +Char_t mat_tar[34] = "lif"; +Char_t mat_bak[34] = "c"; Int_t unit_pressure = 1; // Torr // float pressure0 = 0.; //dummy float pressure = 0.; //dummy @@ -78,6 +81,7 @@ Int_t unit_mm = 1; // in mm Int_t unit_mgpcm2 = 2; // in mg/cm^2 //float thk_tar = 0.; // Target thickness in mg/cm^2 // sim001 float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim002 +float thk_bak = 0.; float r_sphere = 250.; // radius of the TGeoVolume in mm //float dEbin = 0.05; // energy step for effective thickness calculation float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter diff --git a/prm/prm_reac.c11li6n14pd_sim003.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim003.C similarity index 96% rename from prm/prm_reac.c11li6n14pd_sim003.C rename to c11li6n14pd/prm/prm_reac.c11li6n14pd_sim003.C index 7f835bc6d6edc683ac88c17885d1c30f192ecbcd..a4302d2e5e224103a9d54aafabb0cf4eec3284b2 100644 --- a/prm/prm_reac.c11li6n14pd_sim003.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim003.C @@ -10,6 +10,7 @@ const Double_t dummy = -1000.; //Long64_t ntot = 2.e9; // number of events //Long64_t ntot = 1.e8; // number of events const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "c11li6n14pd"; // Char_t label[50] = "c11li6n14pd"; // //Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) //Char_t simnum[10] = "sim002"; // only beam (energy, spacial, PPAC resolution) spread @@ -59,9 +60,11 @@ float Eaft, Eaft_beam; //Char_t al[34] = "al"; //Char_t ch2[34] = "POLYETHYLENE"; //Char_t cd2[34] = "cd2"; -Char_t lif[34] = "lif"; -Char_t he[34] = "he"; -Char_t si[34] = "si"; +/* Char_t lif[34] = "lif"; */ +/* Char_t he[34] = "he"; */ +/* Char_t si[34] = "si"; */ +Char_t mat_tar[34] = "lif"; +Char_t mat_bak[34] = "c"; Int_t unit_pressure = 1; // Torr // float pressure0 = 0.; //dummy float pressure = 0.; //dummy @@ -77,6 +80,7 @@ float temperature = 299.; Int_t unit_mm = 1; // in mm Int_t unit_mgpcm2 = 2; // in mg/cm^2 float thk_tar = 0.; // Target thickness in mg/cm^2 // sim001 sim003 +float thk_bak = 0.; //float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim002 float r_sphere = 250.; // radius of the TGeoVolume in mm //float dEbin = 0.05; // energy step for effective thickness calculation diff --git a/prm/prm_reac.c11li6n14pd_sim004.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim004.C similarity index 96% rename from prm/prm_reac.c11li6n14pd_sim004.C rename to c11li6n14pd/prm/prm_reac.c11li6n14pd_sim004.C index f7b15f6520895cc052fa16b4ad8c7de935a2c38e..772b066433467c02f7fc3a257e5f04b00d39050f 100644 --- a/prm/prm_reac.c11li6n14pd_sim004.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim004.C @@ -10,6 +10,7 @@ const Double_t dummy = -1000.; //Long64_t ntot = 2.e9; // number of events //Long64_t ntot = 1.e8; // number of events const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "c11li6n14pd"; // Char_t label[50] = "c11li6n14pd"; // //Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) //Char_t simnum[10] = "sim002"; // only beam (energy, spacial, PPAC resolution) spread @@ -59,9 +60,11 @@ float Eaft, Eaft_beam; //Char_t al[34] = "al"; //Char_t ch2[34] = "POLYETHYLENE"; //Char_t cd2[34] = "cd2"; -Char_t lif[34] = "lif"; -Char_t he[34] = "he"; -Char_t si[34] = "si"; +/* Char_t lif[34] = "lif"; */ +/* Char_t he[34] = "he"; */ +/* Char_t si[34] = "si"; */ +Char_t mat_tar[34] = "lif"; +Char_t mat_bak[34] = "c"; Int_t unit_pressure = 1; // Torr // float pressure0 = 0.; //dummy float pressure = 0.; //dummy @@ -77,6 +80,7 @@ float temperature = 299.; Int_t unit_mm = 1; // in mm Int_t unit_mgpcm2 = 2; // in mg/cm^2 float thk_tar = 0.; // Target thickness in mg/cm^2 // sim001 sim003 sim004 +float thk_bak = 0.; //float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim002 float r_sphere = 250.; // radius of the TGeoVolume in mm //float dEbin = 0.05; // energy step for effective thickness calculation diff --git a/prm/prm_reac.c11li6n14pd_sim005.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim005.C similarity index 96% rename from prm/prm_reac.c11li6n14pd_sim005.C rename to c11li6n14pd/prm/prm_reac.c11li6n14pd_sim005.C index 397f7762fecd72b453cc1f892c0bbbdae1fece24..a09bf3b5595947a39975d81e1bd0a2fc790f8202 100644 --- a/prm/prm_reac.c11li6n14pd_sim005.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim005.C @@ -10,6 +10,7 @@ const Double_t dummy = -1000.; //Long64_t ntot = 2.e9; // number of events //Long64_t ntot = 1.e8; // number of events const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "c11li6n14pd"; // Char_t label[50] = "c11li6n14pd"; // //Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) //Char_t simnum[10] = "sim002"; // only beam (energy, spacial, PPAC resolution) spread @@ -59,9 +60,11 @@ float Eaft, Eaft_beam; //Char_t al[34] = "al"; //Char_t ch2[34] = "POLYETHYLENE"; //Char_t cd2[34] = "cd2"; -Char_t lif[34] = "lif"; -Char_t he[34] = "he"; -Char_t si[34] = "si"; +/* Char_t lif[34] = "lif"; */ +/* Char_t he[34] = "he"; */ +/* Char_t si[34] = "si"; */ +Char_t mat_tar[34] = "lif"; +Char_t mat_bak[34] = "c"; Int_t unit_pressure = 1; // Torr // float pressure0 = 0.; //dummy float pressure = 0.; //dummy @@ -78,6 +81,7 @@ Int_t unit_mm = 1; // in mm Int_t unit_mgpcm2 = 2; // in mg/cm^2 //float thk_tar = 0.; // Target thickness in mg/cm^2 // sim001 sim003 sim004 float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim002 sim005 +float thk_bak = 0.; float r_sphere = 250.; // radius of the TGeoVolume in mm //float dEbin = 0.05; // energy step for effective thickness calculation float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter diff --git a/prm/prm_reac.c11li6n14pd_sim006.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim006.C similarity index 96% rename from prm/prm_reac.c11li6n14pd_sim006.C rename to c11li6n14pd/prm/prm_reac.c11li6n14pd_sim006.C index eae783b0ce7f8fd722f233c9277e01c28ec21030..73fa6e0ad2f82cfc8252bd91e1c2f72acbfad4ad 100644 --- a/prm/prm_reac.c11li6n14pd_sim006.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim006.C @@ -10,6 +10,7 @@ const Double_t dummy = -1000.; //Long64_t ntot = 2.e9; // number of events //Long64_t ntot = 1.e8; // number of events const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "c11li6n14pd"; // Char_t label[50] = "c11li6n14pd"; // //Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) //Char_t simnum[10] = "sim002"; // only beam (energy, spacial, PPAC resolution) spread @@ -59,9 +60,11 @@ float Eaft, Eaft_beam; //Char_t al[34] = "al"; //Char_t ch2[34] = "POLYETHYLENE"; //Char_t cd2[34] = "cd2"; -Char_t lif[34] = "lif"; -Char_t he[34] = "he"; -Char_t si[34] = "si"; +/* Char_t lif[34] = "lif"; */ +/* Char_t he[34] = "he"; */ +/* Char_t si[34] = "si"; */ +Char_t mat_tar[34] = "lif"; +Char_t mat_bak[34] = "c"; Int_t unit_pressure = 1; // Torr // float pressure0 = 0.; //dummy float pressure = 0.; //dummy @@ -78,6 +81,7 @@ Int_t unit_mm = 1; // in mm Int_t unit_mgpcm2 = 2; // in mg/cm^2 float thk_tar = 0.; // Target thickness in mg/cm^2 // sim001 sim003 sim004 sim006 //float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim002 sim005 +float thk_bak = 0.; float r_sphere = 250.; // radius of the TGeoVolume in mm //float dEbin = 0.05; // energy step for effective thickness calculation float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter diff --git a/prm/prm_reac.c11li6n14pd_sim007.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim007.C similarity index 96% rename from prm/prm_reac.c11li6n14pd_sim007.C rename to c11li6n14pd/prm/prm_reac.c11li6n14pd_sim007.C index 12a0273439c3e2cb0682f30d8174267c5ed066fa..65212257c37b57ed7ed5f0364d010fd88714b543 100644 --- a/prm/prm_reac.c11li6n14pd_sim007.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim007.C @@ -10,6 +10,7 @@ const Double_t dummy = -1000.; //Long64_t ntot = 2.e9; // number of events //Long64_t ntot = 1.e8; // number of events const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "c11li6n14pd"; // Char_t label[50] = "c11li6n14pd"; // //Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) //Char_t simnum[10] = "sim002"; // only beam (energy, spacial, PPAC resolution) spread @@ -60,9 +61,11 @@ float Eaft, Eaft_beam; //Char_t al[34] = "al"; //Char_t ch2[34] = "POLYETHYLENE"; //Char_t cd2[34] = "cd2"; -Char_t lif[34] = "lif"; -Char_t he[34] = "he"; -Char_t si[34] = "si"; +/* Char_t lif[34] = "lif"; */ +/* Char_t he[34] = "he"; */ +/* Char_t si[34] = "si"; */ +Char_t mat_tar[34] = "lif"; +Char_t mat_bak[34] = "c"; Int_t unit_pressure = 1; // Torr // float pressure0 = 0.; //dummy float pressure = 0.; //dummy @@ -80,6 +83,7 @@ Int_t unit_mgpcm2 = 2; // in mg/cm^2 //float thk_tar = 0.; // Target thickness in mg/cm^2 // sim001 sim003 sim004 sim006 //float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim002 sim005 float thk_tar = 0.6; // Target thickness in mg/cm^2 // sim007 +float thk_bak = 0.; float r_sphere = 250.; // radius of the TGeoVolume in mm //float dEbin = 0.05; // energy step for effective thickness calculation float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter diff --git a/prm/prm_reac.c11li6n14pd_sim008.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim008.C similarity index 96% rename from prm/prm_reac.c11li6n14pd_sim008.C rename to c11li6n14pd/prm/prm_reac.c11li6n14pd_sim008.C index 716c5d1fc31a58a36b4d5602c4c218044147db46..4955394d271ef2864563b305046b7412c80947e1 100644 --- a/prm/prm_reac.c11li6n14pd_sim008.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim008.C @@ -10,6 +10,7 @@ const Double_t dummy = -1000.; //Long64_t ntot = 2.e9; // number of events //Long64_t ntot = 1.e8; // number of events const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "c11li6n14pd"; // Char_t label[50] = "c11li6n14pd"; // //Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) //Char_t simnum[10] = "sim002"; // only beam (energy, spacial, PPAC resolution) spread @@ -61,9 +62,11 @@ float Eaft, Eaft_beam; //Char_t al[34] = "al"; //Char_t ch2[34] = "POLYETHYLENE"; //Char_t cd2[34] = "cd2"; -Char_t lif[34] = "lif"; -Char_t he[34] = "he"; -Char_t si[34] = "si"; +/* Char_t lif[34] = "lif"; */ +/* Char_t he[34] = "he"; */ +/* Char_t si[34] = "si"; */ +Char_t mat_tar[34] = "lif"; +Char_t mat_bak[34] = "c"; Int_t unit_pressure = 1; // Torr // float pressure0 = 0.; //dummy float pressure = 0.; //dummy @@ -81,6 +84,7 @@ Int_t unit_mgpcm2 = 2; // in mg/cm^2 //float thk_tar = 0.; // Target thickness in mg/cm^2 // sim001 sim003 sim004 sim006 float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim002 sim005 //float thk_tar = 0.6; // Target thickness in mg/cm^2 // sim007 +float thk_bak = 0.; //float dEbin = 0.05; // energy step for effective thickness calculation float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter float Ebfr, Ebfr_beam; // Beam energy E in MeV after energy loss in matter diff --git a/prm/prm_reac.c11li6n14pd_sim009.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim009.C similarity index 96% rename from prm/prm_reac.c11li6n14pd_sim009.C rename to c11li6n14pd/prm/prm_reac.c11li6n14pd_sim009.C index b015e89751e7ca58e075addcb994651736ee008f..56efe87039e7811a7287557fcce02c105abe3276 100644 --- a/prm/prm_reac.c11li6n14pd_sim009.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim009.C @@ -10,6 +10,7 @@ const Double_t dummy = -1000.; //Long64_t ntot = 2.e9; // number of events //Long64_t ntot = 1.e8; // number of events const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "c11li6n14pd"; // Char_t label[50] = "c11li6n14pd"; // //Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) //Char_t simnum[10] = "sim002"; // only beam (energy, spacial, PPAC resolution) spread @@ -62,9 +63,11 @@ float Eaft, Eaft_beam; //Char_t al[34] = "al"; //Char_t ch2[34] = "POLYETHYLENE"; //Char_t cd2[34] = "cd2"; -Char_t lif[34] = "lif"; -Char_t he[34] = "he"; -Char_t si[34] = "si"; +/* Char_t lif[34] = "lif"; */ +/* Char_t he[34] = "he"; */ +/* Char_t si[34] = "si"; */ +Char_t mat_tar[34] = "lif"; +Char_t mat_bak[34] = "c"; Int_t unit_pressure = 1; // Torr // float pressure0 = 0.; //dummy float pressure = 0.; //dummy @@ -82,6 +85,7 @@ Int_t unit_mgpcm2 = 2; // in mg/cm^2 //float thk_tar = 0.; // Target thickness in mg/cm^2 // sim001 sim003 sim004 sim006 float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim002 sim005 //float thk_tar = 0.6; // Target thickness in mg/cm^2 // sim007 +float thk_bak = 0.; //float dEbin = 0.05; // energy step for effective thickness calculation float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter float Ebfr, Ebfr_beam; // Beam energy E in MeV after energy loss in matter diff --git a/prm/prm_reac.c11li6n14pd_sim010.C b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim010.C similarity index 97% rename from prm/prm_reac.c11li6n14pd_sim010.C rename to c11li6n14pd/prm/prm_reac.c11li6n14pd_sim010.C index 9ccca434c1876ef52bf188f25c4d0ab8f45fee4a..c6c56e5b7584150d8acbb4f4c1e71781ac6aa297 100644 --- a/prm/prm_reac.c11li6n14pd_sim010.C +++ b/c11li6n14pd/prm/prm_reac.c11li6n14pd_sim010.C @@ -10,6 +10,7 @@ const Double_t dummy = -1000.; //Long64_t ntot = 2.e9; // number of events //Long64_t ntot = 1.e8; // number of events const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "c11li6n14pd"; // Char_t label[50] = "c11li6n14pd"; // //Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) //Char_t simnum[10] = "sim002"; // only beam (energy, spacial, PPAC resolution) spread @@ -63,9 +64,11 @@ float Eaft, Eaft_beam; //Char_t al[34] = "al"; //Char_t ch2[34] = "POLYETHYLENE"; //Char_t cd2[34] = "cd2"; -Char_t lif[34] = "lif"; -//Char_t he[34] = "he"; -Char_t si[34] = "si"; +/* Char_t lif[34] = "lif"; */ +/* //Char_t he[34] = "he"; */ +/* Char_t si[34] = "si"; */ +Char_t mat_tar[34] = "lif"; +Char_t mat_bak[34] = "c"; Char_t c[34] = "c"; Int_t unit_pressure = 1; // Torr // float pressure0 = 0.; //dummy diff --git a/root/.gitignore b/c11li6n14pd/root/.gitignore similarity index 100% rename from root/.gitignore rename to c11li6n14pd/root/.gitignore diff --git a/c11li6n14pd/root/c11li6n14pd_sim001.root b/c11li6n14pd/root/c11li6n14pd_sim001.root new file mode 100644 index 0000000000000000000000000000000000000000..ad51663c5ff8d2e1be876f4769a625bde51ec119 Binary files /dev/null and b/c11li6n14pd/root/c11li6n14pd_sim001.root differ diff --git a/c11li6n14pd/root/c11li6n14pd_sim002.root b/c11li6n14pd/root/c11li6n14pd_sim002.root new file mode 100644 index 0000000000000000000000000000000000000000..7698d89ad7e9f6d98a2230f88858c11eb7e6767b Binary files /dev/null and b/c11li6n14pd/root/c11li6n14pd_sim002.root differ diff --git a/c11li6n14pd/root/c11li6n14pd_sim003.root b/c11li6n14pd/root/c11li6n14pd_sim003.root new file mode 100644 index 0000000000000000000000000000000000000000..a0c2e9ef774951d53e9fc97aa6296e54500ba056 Binary files /dev/null and b/c11li6n14pd/root/c11li6n14pd_sim003.root differ diff --git a/c11li6n14pd/root/c11li6n14pd_sim004.root b/c11li6n14pd/root/c11li6n14pd_sim004.root new file mode 100644 index 0000000000000000000000000000000000000000..a276ae315f3299ab4814cf7f09b10de1bc5ea8bc Binary files /dev/null and b/c11li6n14pd/root/c11li6n14pd_sim004.root differ diff --git a/c11li6n14pd/root/c11li6n14pd_sim005.root b/c11li6n14pd/root/c11li6n14pd_sim005.root new file mode 100644 index 0000000000000000000000000000000000000000..a37ae3069e828ee6d085243b5133f4859aa5f0bc Binary files /dev/null and b/c11li6n14pd/root/c11li6n14pd_sim005.root differ diff --git a/c11li6n14pd/root/c11li6n14pd_sim006.root b/c11li6n14pd/root/c11li6n14pd_sim006.root new file mode 100644 index 0000000000000000000000000000000000000000..527defae9c867ee247d0b009eb56a2fd1dbe3ef7 Binary files /dev/null and b/c11li6n14pd/root/c11li6n14pd_sim006.root differ diff --git a/c11li6n14pd/root/c11li6n14pd_sim007.root b/c11li6n14pd/root/c11li6n14pd_sim007.root new file mode 100644 index 0000000000000000000000000000000000000000..a42909602788c82b26c804e901e38fc94488b8c5 Binary files /dev/null and b/c11li6n14pd/root/c11li6n14pd_sim007.root differ diff --git a/c11li6n14pd/root/c11li6n14pd_sim008.root b/c11li6n14pd/root/c11li6n14pd_sim008.root new file mode 100644 index 0000000000000000000000000000000000000000..7a356efc90c5aad24110d14de8cc01fe4f59e01f Binary files /dev/null and b/c11li6n14pd/root/c11li6n14pd_sim008.root differ diff --git a/c11li6n14pd/root/c11li6n14pd_sim009.root b/c11li6n14pd/root/c11li6n14pd_sim009.root new file mode 100644 index 0000000000000000000000000000000000000000..9fd66689e0800b56a9592dcee2d03ee2a70443b9 Binary files /dev/null and b/c11li6n14pd/root/c11li6n14pd_sim009.root differ diff --git a/c11li6n14pd/root/c11li6n14pd_sim010.root b/c11li6n14pd/root/c11li6n14pd_sim010.root new file mode 100644 index 0000000000000000000000000000000000000000..2d04051ff0265a2b6c1cd8d2bfccedbd54475a76 Binary files /dev/null and b/c11li6n14pd/root/c11li6n14pd_sim010.root differ diff --git a/c11li6n14pd/root/n14pac11_sim001.root b/c11li6n14pd/root/n14pac11_sim001.root new file mode 100644 index 0000000000000000000000000000000000000000..8fd2017a781e58968008588de3be5779ccdd923d Binary files /dev/null and b/c11li6n14pd/root/n14pac11_sim001.root differ diff --git a/macro/chk_sim.C~ b/macro/chk_sim.C~ deleted file mode 100644 index 9f3b3a43cae89d22b2b1a11858dc1dfeae7dd670..0000000000000000000000000000000000000000 --- a/macro/chk_sim.C~ +++ /dev/null @@ -1,9 +0,0 @@ -{ - //TFile *f = new TFile("../root/c11li6n14pd_sim01.root"); - - - TCanvas *c1=new TCanvas("c1","",0,0,1000,1000); - c1->Divide(); - - // E.beam_mid, E.beam_dec -} diff --git a/n14dc11an/figs/.gitignore b/n14dc11an/figs/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/n14dc11an/figs/.gitignore @@ -0,0 +1 @@ + diff --git a/n14dc11an/figs/det_arrange_n14dc11an_sim001.png b/n14dc11an/figs/det_arrange_n14dc11an_sim001.png new file mode 100644 index 0000000000000000000000000000000000000000..59da962a3c76898512fdce3b7b3dace99158497b Binary files /dev/null and b/n14dc11an/figs/det_arrange_n14dc11an_sim001.png differ diff --git a/n14dc11an/figs/det_arrange_n14dc11an_sim002.png b/n14dc11an/figs/det_arrange_n14dc11an_sim002.png new file mode 100644 index 0000000000000000000000000000000000000000..e420ae1b6c6ca74979e3e7ecc51f7ec48a704c85 Binary files /dev/null and b/n14dc11an/figs/det_arrange_n14dc11an_sim002.png differ diff --git a/n14dc11an/figs/det_arrange_n14dc11an_sim003.png b/n14dc11an/figs/det_arrange_n14dc11an_sim003.png new file mode 100644 index 0000000000000000000000000000000000000000..dcc157af6235aedc24cdfb5250556dce973df490 Binary files /dev/null and b/n14dc11an/figs/det_arrange_n14dc11an_sim003.png differ diff --git a/n14dc11an/figs/det_arrange_n14dc11an_sim004.png b/n14dc11an/figs/det_arrange_n14dc11an_sim004.png new file mode 100644 index 0000000000000000000000000000000000000000..dcc157af6235aedc24cdfb5250556dce973df490 Binary files /dev/null and b/n14dc11an/figs/det_arrange_n14dc11an_sim004.png differ diff --git a/n14dc11an/figs/det_arrange_n14dc11an_sim005.png b/n14dc11an/figs/det_arrange_n14dc11an_sim005.png new file mode 100644 index 0000000000000000000000000000000000000000..99ad17f1bc76a1c03f7a7a2f71283e47707c86a6 Binary files /dev/null and b/n14dc11an/figs/det_arrange_n14dc11an_sim005.png differ diff --git a/n14dc11an/figs/n14dc11an_sim001_cm.png b/n14dc11an/figs/n14dc11an_sim001_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..2b089d4f8d8e0b18f358973a892d9f47d5aaf106 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim001_cm.png differ diff --git a/n14dc11an/figs/n14dc11an_sim001_kin.png b/n14dc11an/figs/n14dc11an_sim001_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..6fc315963730cdea404dad401b08365236d650ab Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim001_kin.png differ diff --git a/n14dc11an/figs/n14dc11an_sim001_lab.png b/n14dc11an/figs/n14dc11an_sim001_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..b363d25b7066b1a4c18e517a82744302ff865788 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim001_lab.png differ diff --git a/n14dc11an/figs/n14dc11an_sim001_pos.png b/n14dc11an/figs/n14dc11an_sim001_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..c416a1ddaa44d088d6da0612b82f7692752c4ac9 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim001_pos.png differ diff --git a/n14dc11an/figs/n14dc11an_sim001_rel.png b/n14dc11an/figs/n14dc11an_sim001_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..76b69a2989890717873313fea178e7b233f804a8 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim001_rel.png differ diff --git a/n14dc11an/figs/n14dc11an_sim002_cm.png b/n14dc11an/figs/n14dc11an_sim002_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..06dca0e65cc508daceb0b53cbbba479506a0cdd6 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim002_cm.png differ diff --git a/n14dc11an/figs/n14dc11an_sim002_kin.png b/n14dc11an/figs/n14dc11an_sim002_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..49692495e8f9b1ec6e6723e8d235339bc62bd55f Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim002_kin.png differ diff --git a/n14dc11an/figs/n14dc11an_sim002_lab.png b/n14dc11an/figs/n14dc11an_sim002_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..34ab348769fbdf0192bef38874ba3e61bbe27aad Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim002_lab.png differ diff --git a/n14dc11an/figs/n14dc11an_sim002_pos.png b/n14dc11an/figs/n14dc11an_sim002_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..b015ab3d19ed72464effe97884bc9d7860214336 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim002_pos.png differ diff --git a/n14dc11an/figs/n14dc11an_sim002_rel.png b/n14dc11an/figs/n14dc11an_sim002_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..fb86e5846d8ad7ee600122ce8e5806ae34c57631 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim002_rel.png differ diff --git a/n14dc11an/figs/n14dc11an_sim003_cm.png b/n14dc11an/figs/n14dc11an_sim003_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..4e3902e0cd7e2310cab02f3a2dcbd9eb98c9c352 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim003_cm.png differ diff --git a/n14dc11an/figs/n14dc11an_sim003_kin.png b/n14dc11an/figs/n14dc11an_sim003_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..1862ec8a554771e9781340d1725172b37279f60e Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim003_kin.png differ diff --git a/n14dc11an/figs/n14dc11an_sim003_lab.png b/n14dc11an/figs/n14dc11an_sim003_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..e90baeb5bf70f8583ae7a9c462c89f8117ef4413 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim003_lab.png differ diff --git a/n14dc11an/figs/n14dc11an_sim003_pos.png b/n14dc11an/figs/n14dc11an_sim003_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..8494e5d481f67d89aed5b4549a95a1fac8203cfa Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim003_pos.png differ diff --git a/n14dc11an/figs/n14dc11an_sim003_rel.png b/n14dc11an/figs/n14dc11an_sim003_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..5eb6ec8e76665040d36dade76db7c65dca5d9d25 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim003_rel.png differ diff --git a/n14dc11an/figs/n14dc11an_sim004_cm.png b/n14dc11an/figs/n14dc11an_sim004_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..207e52c9328fe23555bda11892950bae045d53e4 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim004_cm.png differ diff --git a/n14dc11an/figs/n14dc11an_sim004_kin.png b/n14dc11an/figs/n14dc11an_sim004_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..bc8da82a0b7e41e50cc4bf45076315898043c90a Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim004_kin.png differ diff --git a/n14dc11an/figs/n14dc11an_sim004_lab.png b/n14dc11an/figs/n14dc11an_sim004_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..1567f841cb824f89feaec08891976260a813999e Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim004_lab.png differ diff --git a/n14dc11an/figs/n14dc11an_sim004_pos.png b/n14dc11an/figs/n14dc11an_sim004_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..8cba1e31fe9c244ddde8ed1d250b648e4e9ef980 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim004_pos.png differ diff --git a/n14dc11an/figs/n14dc11an_sim004_rel.png b/n14dc11an/figs/n14dc11an_sim004_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..d5aef893b6356ba8dae5baedd1c8d1e65afce869 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim004_rel.png differ diff --git a/n14dc11an/figs/n14dc11an_sim005_cm.png b/n14dc11an/figs/n14dc11an_sim005_cm.png new file mode 100644 index 0000000000000000000000000000000000000000..4327911da3fd8b5610a6743fae98f5e430cc0569 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim005_cm.png differ diff --git a/n14dc11an/figs/n14dc11an_sim005_kin.png b/n14dc11an/figs/n14dc11an_sim005_kin.png new file mode 100644 index 0000000000000000000000000000000000000000..34d45d9d1fe5ff60d1352b8b7fa49b3a32715eb2 Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim005_kin.png differ diff --git a/n14dc11an/figs/n14dc11an_sim005_lab.png b/n14dc11an/figs/n14dc11an_sim005_lab.png new file mode 100644 index 0000000000000000000000000000000000000000..cddb18276101452181814217cbaf7f459698ceda Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim005_lab.png differ diff --git a/n14dc11an/figs/n14dc11an_sim005_pos.png b/n14dc11an/figs/n14dc11an_sim005_pos.png new file mode 100644 index 0000000000000000000000000000000000000000..7b6b27813755c8c10267bb3526fc20dc4ceda12c Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim005_pos.png differ diff --git a/n14dc11an/figs/n14dc11an_sim005_rel.png b/n14dc11an/figs/n14dc11an_sim005_rel.png new file mode 100644 index 0000000000000000000000000000000000000000..b9602f7d432425a9e759f784df89dad2f64f989c Binary files /dev/null and b/n14dc11an/figs/n14dc11an_sim005_rel.png differ diff --git a/n14dc11an/macro/Makefile b/n14dc11an/macro/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..b3323e43b90c793eb23dc96e0d066d2b7805f0f6 --- /dev/null +++ b/n14dc11an/macro/Makefile @@ -0,0 +1,85 @@ +# name of .C program +TARGET = plot_yield_coin + +DEP = $(TARGET).d +SRCS = $(TARGET).C +OBJS = $(addsuffix .o, $(basename $(SRCS))) + +ROOTLIBDIR = $(shell root-config --libdir) +ROOTCFLAGS = $(shell root-config --cflags) +CXXFLAGS = $(ROOTCFLAGS) -Wall +F77 = gfortran + +# Edit below for your circumstances +ifeq ($(shell uname),Linux) + ROOTLIBS = $(shell root-config --libs) + CXXLIBS = $(ROOTLIBS) -lGeom $(GSLLIBS) -lMathMore + CC = clang++-7 + ENEWZLIB = /usr/local/lib #mac <- used + LFLAGSC = -L$(ENEWZLIB) -lenewzlib \ + /usr/lib/gcc/x86_64-linux-gnu/9/libstdc++.a +else ifeq ($(shell uname),Darwin) + ROOTLIBS = -L$(ROOTLIBDIR) -lCore -lImt -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lROOTVecOps -lTree -lTreePlayer -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMultiProc -lROOTDataFrame -Wl,-rpath,$(ROOTLIBDIR) -lpthread -lm -ldl + CXXLIBS = $(ROOTLIBS) -lGeom -lstdc++ -lc++ $(GSLLIBS) -lMathMore + CC = clang++ +# CC = g++ + ENEWZLIB = /usr/local/lib + LFLAGSC = -L$(ENEWZLIB) -lenewzlib #/usr/local/lib/gcc/11/libstdc++.a +endif + +# cp_prm: + +all: dep $(TARGET) + +$(TARGET): $(OBJS) +# cp -p enewz_prm_${ISOTOPE}.C enewz_prm.C + $(F77) $(OBJS) -o $@ $(CXXLIBS) ${LFLAGSC} +# $(F77) $(OBJS) -o $@ $(ROOTLIBS) ${LFLAGSC} $(GSLLIBS) + +.cc.o: + $(CC) -c $< $(CXXFLAGS) + +.f.o: + ${F77} -c $< + +dep: + $(CC) -MM $(SRCS) > $(DEP) $(CXXFLAGS) +-include $(DEP) + +clean: + rm -f $(TARGET) $(OBJS) $(DEP) + +# DEP = $(TARGET).d +# SRCS = $(TARGET).C +# OBJS = $(addsuffix .o, $(basename $(SRCS))) + +# ROOTCFLAGS = $(shell root-config --cflags) +# ROOTLIBS = $(shell root-config --libs) +# CXXFLAGS = $(ROOTCFLAGS) -Wall +# GSLLIBS = -lm +# CXXLIBS = $(ROOTLIBS) $(GSLLIBS) -lGeom -lMathMore +# CC = g++ +# F77=gfortran + +# ENEWZLIB = /usr/local/lib # where libenewzlib.a locates + +# LFLAGSC = -L$(ENEWZLIB) -lenewzlib /usr/lib/gcc/x86_64-linux-gnu/9/libstdc++.a +# # where libstdc++.a locates + +# all: dep $(TARGET) + +# $(TARGET): $(OBJS) +# $(F77) $(OBJS) -o $@ $(CXXLIBS) ${LFLAGSC} + +# .cc.o: +# $(CC) -c $< $(CXXFLAGS) + +# .f.o: +# ${F77} -c $< + +# dep: +# $(CC) -MM $(SRCS) > $(DEP) $(CXXFLAGS) +# -include $(DEP) + +# clean: +# rm -f $(TARGET) $(OBJS) $(DEP) diff --git a/n14dc11an/macro/chk_sim.C b/n14dc11an/macro/chk_sim.C new file mode 100644 index 0000000000000000000000000000000000000000..a1f8414a74669478f8945f47f86e86d7b3683643 --- /dev/null +++ b/n14dc11an/macro/chk_sim.C @@ -0,0 +1,352 @@ +{ + //TFile *f = new TFile("../root/c11li6n14pd_sim001.root"); + + #include "prm/prm_reac.n14dc11an_sim005.C" + + /* Char_t label[50] = "n14dc11an"; */ + /* Char_t simnum[10] = "sim001"; */ + //TFile *f = new TFile(Form("../root/%s_%s.root",label,sumnum)); + + q2[0] = (m11c+ma - m14n-mh)*u*1000.; + /* cout << q2[0] << endl; */ + /* getchar(); */ + + // { + gStyle->SetStatW(0.3); + gStyle->SetStatH(0.3); + gStyle->SetStatFont(62); + gStyle->SetLabelFont(62,"XY"); + gStyle->SetLabelSize(0.06,"XY"); + gStyle->SetTitleFont(62,"XY"); + gStyle->SetTitleSize(0.06,"XY"); + gStyle->SetTextFont(62); + gStyle->SetTextSize(0.06); + // } + + TCut pscut50 = "abs(p.spc)<50."; + TCut pscut30 = "abs(p.spc)<30."; + Int_t color50 = kOrange-3; + Int_t color30 = kRed; + + Double_t Ecm_min = 0.; + Double_t Ecm_max = 6.; + + Double_t Elab0_min = 20.; + Double_t Elab0_max = 80.; + Double_t Elab1_min = 0.; + Double_t Elab1_max = 50.; + + Double_t thlab0_min = 0.; + Double_t thlab0_max = 15.; + Double_t thlab1_min = 0.; + Double_t thlab1_max = 40.; + + Int_t cn_x0 = 1080; + Int_t cn_y0 = 300; + Int_t cn_dx = 50; + Int_t cn_dy = 50; + + //Double_t Q3 = -5.14649; // Q value of 3-body channel + Double_t Q3 = (mprj+mtrg-mres_gs-mrec-mspc)*u*1000.; + //cout << Q3 << endl; + + // { + TCanvas *c1=new TCanvas("c1","Kinematics",cn_x0,cn_y0,1200,800); + c1->Divide(3,2); + + c1->cd(1); + sim->Draw("E.rel[0]:E.rel[2]>>h11(80,0,6,40,0,6)","",""); + sim->SetMarkerColor(color50); + sim->Draw("E.rel[0]:E.rel[2]",pscut50,"same"); + sim->SetMarkerColor(color30); + sim->Draw("E.rel[0]:E.rel[2]",pscut30,"same"); + sim->SetMarkerColor(kBlack); + + c1->cd(2); + sim->Draw(Form("E.lab[1]:E.lab[0]>>h12(80,%f,%f,40,%f,%f)", + Elab0_min,Elab0_max,Elab1_min,Elab1_max), + "",""); + sim->SetMarkerColor(color50); + sim->Draw("E.lab[1]:E.lab[0]",pscut50,"same"); + sim->SetMarkerColor(color30); + sim->Draw("E.lab[1]:E.lab[0]",pscut30,"same"); + sim->SetMarkerColor(kBlack); + + c1->cd(3); + sim->Draw(Form("th.lab[1]:th.lab[0]>>h13(80,%f,%f,40,%f,%f)", + thlab0_min,thlab0_max,thlab1_min,thlab1_max), + "",""); + sim->SetMarkerColor(color50); + sim->Draw("th.lab[1]:th.lab[0]",pscut50,"same"); + sim->SetMarkerColor(color30); + sim->Draw("th.lab[1]:th.lab[0]",pscut30,"same"); + sim->SetMarkerColor(kCyan); + sim->SetMarkerStyle(6); + sim->Draw("th.lab[1]:th.lab[0]","hit.both","same"); + sim->SetMarkerColor(kBlack); + sim->SetMarkerStyle(1); + + c1->cd(4); + sim->Draw(Form("E.cm-%f:abs(p.spc)>>h14(80,0,200,40,%f,%f)",q2[0],Ecm_min,Ecm_max), + "",""); + sim->SetMarkerColor(color50); + sim->Draw(Form("E.cm-%f:abs(p.spc)",q2[0]),pscut50,"same"); + sim->SetMarkerColor(color30); + sim->Draw(Form("E.cm-%f:abs(p.spc)",q2[0]),pscut30,"same"); + sim->SetMarkerColor(kBlack); + + c1->cd(5); + sim->SetMarkerColor(kBlack); + sim->SetLineColor(kBlack); + sim->Draw(Form("E.cm-%f>>h15(100,%f,%f)",q2[0],Ecm_min,Ecm_max),pscut50*"w.evt","E"); + sim->SetMarkerColor(color50); + sim->SetLineColor(color50); + sim->Draw(Form("E.cm-%f",q2[0]),pscut50*"hit.both&&w.evt","Esame"); + sim->SetMarkerColor(color30); + sim->SetLineColor(color30); + sim->Draw(Form("E.cm-%f",q2[0]),pscut30*"hit.both&&w.evt","Esame"); + gStyle->SetStatX(0.4); + sim->SetLineColor(kBlack); + + c1->cd(6); + sim->SetMarkerColor(color50); + sim->Draw(Form("th.cm:E.cm-%f>>h16(100,%f,%f,100,0,180)",q2[0],Ecm_min,Ecm_max), + pscut50*"w.evt"); + sim->SetMarkerColor(kCyan); + sim->SetMarkerStyle(7); + sim->Draw(Form("th.cm:E.cm-%f>>h16(100,%f,%f,100,0,180)",q2[0],Ecm_min,Ecm_max), + pscut50*"w.evt*hit.both","same"); + sim->SetMarkerColor(kBlack); + sim->SetMarkerStyle(1); + gStyle->SetStatX(0.9); + + // } + + + // { + TCanvas *c2=new TCanvas("c2","E.lab & th.lab", + cn_x0+cn_dx,cn_y0+cn_dy,1600,800); + c2->Divide(4,2); + + // E.lab + c2->cd(1); + sim->Draw(Form("E.lab_det[0]:(E.lab_det_MC[0] - E.lab_det[0])" + ">>h21(80,-0.3,0.3,40,%f,%f)",Elab0_min,Elab0_max), + "hit.both",""); + c2->cd(5); + sim->Draw("E.lab_det_MC[0] - E.lab_det[0]" + ">>h23(100,-0.3,0.3)","hit.both"); + + c2->cd(2); + sim->Draw(Form("E.lab_det[1]:(E.lab_det_MC[1] - E.lab_det[1])" + ">>h22(80,-0.3,0.3,40,%f,%f)",Elab0_min,Elab0_max), + "hit.both",""); + c2->cd(6); + sim->Draw("E.lab_det_MC[1] - E.lab_det[1]" + ">>h24(100,-0.3,0.3)","hit.both"); + /* c2->cd(1); */ + /* sim->Draw("E.lab[0] - E.lab_det[0]" */ + /* ">>h21(100,-1.,3.)","hit.both",""); */ + /* c2->cd(5); */ + /* sim->Draw("E.lab_MC[0] - E.lab_det_MC[0]" */ + /* ">>h23(100,-1.,3.)","hit.both"); */ + + /* c2->cd(2); */ + /* sim->Draw("E.lab[1] - E.lab_det[1]" */ + /* ">>h22(100,-0.3,0.3)","hit.both",""); */ + /* c2->cd(6); */ + /* sim->Draw("E.lab_MC[1] - E.lab_det_MC[1]" */ + /* ">>h24(100,-0.3,0.3)","hit.both"); */ + /* return; */ + + + // th.lab + c2->cd(3); + sim->Draw("th.lab[0]:(th.lab_MC[0] - th.lab[0])" + ">>h25(80,-3,3,40,0,30)","hit.both"); + c2->cd(7); + sim->Draw("th.lab_MC[0] - th.lab[0]" + ">>h27(100,-3,3)","hit.both"); + c2->cd(4); + sim->Draw("th.lab[1]:(th.lab_MC[1] - th.lab[1])" + ">>h26(80,-3,3,40,0,70)","hit.both"); + c2->cd(8); + sim->Draw("th.lab_MC[1] - th.lab[1]" + ">>h28(100,-3,3)","hit.both"); + // } //return; + + // { + TCanvas *c3=new TCanvas("c3","pos", + cn_x0+2*cn_dx,cn_y0+2*cn_dy,1600,800); + c3->Divide(4,2); + + // pos.xhit + c3->cd(1); + // sim->Draw("pos.xhit:(pos.xhit_MC - pos.xhit)" + // ">>h31(200,-4.,4.,200,-30,30)","hit.both","colz"); + sim->Draw("pos.xhit_MC:pos.xhit" + ">>h31(100,-30.,30.,100,-30,30)","hit.both","colz"); + gStyle->SetStatY(0.); + c3->cd(5); + sim->Draw("pos.xhit_MC - pos.xhit" + ">>h33(100,-3.,3.)","hit.both&&abs(pos.xhit)<30"); + + // pos.yhit + c3->cd(2); + sim->Draw("pos.yhit_MC:pos.yhit" + ">>h32(100,-30.,30.,100,-30,30)","hit.both","colz"); + c3->cd(6); + sim->Draw("pos.yhit_MC - pos.yhit" + ">>h34(100,-3.,3.)","hit.both&&abs(pos.yhit)<30"); + + // pos.*tar + sim->SetMarkerStyle(7); + c3->cd(3); + sim->Draw("pos.ytar:pos.xtar" + ">>h35(80,-40,40,40,-40,40)","","colz"); + gStyle->SetStatY(0.9); + c3->cd(4); + sim->Draw("pos.ytar:pos.ytar_MC-pos.ytar" + ">>h36(80,-5,5,40,-40,40)","","colz"); + c3->cd(7); + sim->Draw("pos.xtar_MC-pos.xtar:pos.xtar" + ">>h37(80,-40,40,40,-5,5)","","colz"); + sim->SetMarkerStyle(1); + // } //return; + + + // { + TCanvas *c4=new TCanvas("c4","rel",cn_x0+3*cn_dx,cn_y0+3*cn_dy,1600,800); + c4->Divide(4,2); + + // E.beam + c4->cd(1); + sim->Draw(Form("E.beam_dec:(E.beam_mid - E.beam_dec)" + ">>h41(80,-1.,1.,40,%f,%f)",Ebeam_ref_mid-2,Ebeam_ref_mid+2), + "",""); + c4->cd(5); + sim->Draw("E.beam_mid - E.beam_dec" + ">>h45(100,-1.,1.)",""); + + // E.rel[0] + c4->cd(2); + sim->Draw("E.rel[0]:(E.rel_MC[0] - E.rel[0])" + ">>h42(80,-0.6,0.6,40,0,6)","hit.both",""); + c4->cd(6); + sim->Draw("E.rel_MC[0] - E.rel[0]" + ">>h46(100,-0.6,0.6)","hit.both"); + + // E.rel[1] + c4->cd(3); + sim->Draw("E.rel[1]:(E.rel_MC[1] - E.rel[1])" + ">>h43(80,-0.6,0.6,40,0,6)","hit.both",""); + c4->cd(7); + sim->Draw("E.rel_MC[1] - E.rel[1]" + ">>h47(100,-0.6,0.6)","hit.both"); + + // E.rel[2] + c4->cd(4); + sim->Draw("E.rel[2]:(E.rel_MC[2] - E.rel[2])" + ">>h44(80,-0.6,0.6,40,0,6)","hit.both",""); + c4->cd(8); + sim->Draw("E.rel_MC[2] - E.rel[2]" + ">>h48(100,-0.6,0.6)","hit.both"); + + + // } //return; + + + // { + TCanvas *c5=new TCanvas("c5","cm",cn_x0+4*cn_dx,cn_y0+4*cn_dy,1600,800); + c5->Divide(4,2); + + // E.cm + c5->cd(1); + sim->Draw(Form("E.cm-%f:(E.cm_MC - E.cm)" + ">>h51(80,-0.3,0.3,40,%f,%f)",q2[0],Ecm_min,Ecm_max), + "hit.both",""); + c5->cd(2); + sim->SetLineColor(kBlack); + sim->Draw("E.cm_MC - E.cm" + ">>h55(100,-0.3,0.3)","hit.both"); + gStyle->SetOptFit(1); + /* gStyle->SetStatX(0.5); */ + /* gStyle->SetStatY(0.7); */ + h55->Fit("gaus"); + + c5->cd(3); + sim->SetLineColor(kBlack); + gStyle->SetOptFit(1); + /* gStyle->SetStatX(0.5); */ + /* gStyle->SetStatY(0.7); */ + sim->Draw("E.cm_MC - E.cm>>h54_3(100,-0.3,0.3)", + Form("hit.both&&E.cm-%f>0.9&&E.cm-%f<1.1",q2[0],q2[0]), + ""); + h54_3->Fit("gaus"); + + + + /* sim->SetLineColor(kBlack); */ + /* sim->Draw("E.cm_MC - E.cm" */ + /* ">>h55(100,-0.3,0.3)","hit.both"); */ + //h55->SetStats(0); + /* sim->SetLineColor(color50); */ + /* sim->Draw("E.cm_MC - E.cm>>h54_2",pscut50*"hit.both","same"); */ + /* h54_2->Fit("gaus"); */ + /* gStyle->SetOptFit(1); */ + /* h54_2->Draw("same"); */ + //h54_3->Draw(""); + + + + // th.cm + /* c5->cd(2); */ + /* sim->Draw("th.cm:(th.cm_MC - th.cm)" */ + /* ">>h52(80,-10,10,40,0,180)","hit.both"); */ + /* c5->cd(6); */ + /* sim->Draw("th.cm_MC - th.cm" */ + /* ">>h56(100,-10,10)","hit.both"); */ + /* sim->SetLineColor(color50); */ + /* sim->Draw("th.cm_MC - th.cm",pscut50*"hit.both","same"); */ + /* sim->SetLineColor(kBlack); */ + + /* // Q value */ + /* c5->cd(3); */ + /* sim->Draw(Form("E.Q3_mid>>h53(80,%f,%f)",Q3-1,Q3+1)); */ + /* c5->cd(7); */ + /* sim->Draw(Form("E.Q3_dec>>h57(80,%f,%f)",Q3-1,Q3+1)); */ + + /* // Q value */ + /* c5->cd(4); */ + /* sim->Draw("p.spc:(p.spc_MC - p.spc)" */ + /* ">>h54(80,-100,100,80,-20-,200)","hit.both"); */ + /* c5->cd(8); */ + /* sim->Draw("p.spc_MC - p.spc" */ + /* ">>h58(100,-100,100)","hit.both"); */ + + + // } //return; + + TString fname; + + fname = Form("figs/%s_%s_kin.png",label,simnum); + c1->Update(); + c1->Print(fname.Data()); + + fname = Form("figs/%s_%s_lab.png",label,simnum); + c2->Update(); + c2->Print(fname.Data()); + + fname = Form("figs/%s_%s_pos.png",label,simnum); + c3->Update(); + c3->Print(fname.Data()); + + fname = Form("figs/%s_%s_rel.png",label,simnum); + c4->Update(); + c4->Print(fname.Data()); + + fname = Form("figs/%s_%s_cm.png",label,simnum); + c5->Update(); + c5->Print(fname.Data()); + +} diff --git a/n14dc11an/macro/plot_yield_coin b/n14dc11an/macro/plot_yield_coin new file mode 100755 index 0000000000000000000000000000000000000000..ef35a7d85249adddbf99cea9870bc1dc5fbfed04 Binary files /dev/null and b/n14dc11an/macro/plot_yield_coin differ diff --git a/n14dc11an/macro/plot_yield_coin.C b/n14dc11an/macro/plot_yield_coin.C new file mode 100644 index 0000000000000000000000000000000000000000..fcf1bf4a728b3b28c9945332aacf70bbf786b7f9 --- /dev/null +++ b/n14dc11an/macro/plot_yield_coin.C @@ -0,0 +1,429 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* #include */ +/* #include */ +/* #include */ +#include +#include +#include + +using namespace std; + +#include "Math/Interpolator.h" +//#include "Math/Polynomial.h" +#include "Math/InterpolationTypes.h" + +#include "../prm/prm_reac.f17do14ap_sim001.C" // parameter file <-- + +TFile *f = new TFile(Form("../root/%s_%s.root",label,simnum)); +TTree *tr = (TTree*)f->Get("sim"); +TF1 *fn1 = new TF1("fn1","gaus",-100,100); + +extern "C" { + /* void enewzsub_(int *z1, float *m1, float *bfr_ene, char matter1[33], */ + /* int *unit_pressure, float *pressure, float *temperature, */ + /* int *unit_thick, float *thick1, float *aft_ene); */ + /* void eoldzsub_(int *z1, float *m1, float *aft_ene, char matter1[33], */ + /* int *unit_pressure, float *pressure, float *temperature, */ + /* int *unit_thick, float *thick1, float *bfr_ene); */ + void rangezsub_(int *z1, float *m1, float *bfr_ene, char matter1[33], + float *range); + /* void srhogas_(float *pressure, float *temperature, int *unit_pressure, */ + /* int *unit_temperature, float *mol_weight, */ + /* float *density); */ +} + +// effective thickness // +Double_t eff_thk(Double_t Ecm, Double_t dEcm){ // beam energy in GeV + for(Int_t ichar=0;ichar<33;ichar++){ + if(cd2[ichar]=='\0'){ + cd2[ichar]=' '; + cd2[ichar+1]='\0'; + } + } + float xpu; + float range1, range2, drange; + xpu = (Ecm + dEcm/2.)*(mprj + mtrg)/mprj/mtrg; + rangezsub_(&zprj,&mprj,&xpu,cd2,&range1); + xpu = (Ecm - dEcm/2.)*(mprj + mtrg)/mprj/mtrg; + rangezsub_(&zprj,&mprj,&xpu,cd2,&range2); + drange = fabs(range1 - range2); + + return(drange); +} + + + +int main(){ + const Double_t pi = TMath::Pi(); + const Double_t lbsize = 0.05; + //const Double_t txsize = 0.04; + + TApplication theApp("App", NULL, NULL); + gStyle->SetTextFont(62); + gStyle->SetTextSize(lbsize); + + gStyle->SetLabelFont(62,"XYZt"); + gStyle->SetLabelSize(lbsize,"XYZt"); + + //gStyle->SetTitleFont(62); + gStyle->SetTitleFont(62,"XYZt"); + gStyle->SetTitleSize(lbsize,"XYZt"); + gStyle->SetTitleFontSize(lbsize); + gStyle->SetTitleYOffset(1.2); + + gStyle->SetPadTopMargin(0.06); + gStyle->SetPadRightMargin(0.15); + gStyle->SetPadLeftMargin(0.12); + gStyle->SetPadBottomMargin(0.1); + + // gStyle->SetStatW(0.3); + // gStyle->SetStatH(0.2); + // gStyle->SetStatX(1); + // gStyle->SetStatY(0.4); + gStyle->SetOptStat(0); + + // Reading cross section data + const Int_t ndata = 181; // no. of data + Double_t thdata[ndata], csdata[ndata]; + //ifstream datahf("../../../nonsmoker_cs.txt"); + ifstream fdata("cs_he6pt_green.txt"); + for(Int_t i=0; i> thdata[i] >> csdata[i]; + //cshdata[i] *= 1000./4./pi; // b -> mb/sr + //cout << i << " " << ehf[i] <<" "<< cshf[i] << endl; + } + fdata.close(); + ROOT::Math::Interpolator intercs(ndata, ROOT::Math::Interpolation::kLINEAR); + intercs.SetData(ndata, thdata, csdata); // MeV, mb + + // No. of injected beam particles + const Double_t Ibeam = 5.5e5; // pps + const Double_t Dbeam = 5.; // days + //const Double_t nbeam = 3.e10; // <=> 5e4 pps, 7 days + const Double_t nbeam = Ibeam*Dbeam*24.*60.*60.; + + // No. of injected beam particles + const Double_t Nav = 6.0221e23; // mol^-1 + //const Double_t C_cm2_mb_mg = Nav/mtrg*1.e-30; // molecules/mg * cm^2/mb + const Double_t C_cm2_mb_mg = Nav/(12. + 2.*mtrg)*2.*1.e-30; // CD2 + //cout << C_cm2_mb_mg << endl; + + // Bin deffinition + const Int_t necm = 200; // Ebin = 50 keV + //const Int_t necm = 70; // Ebin = 100 keV + const Double_t ecmmin = 0.; + const Double_t ecmmax = 10.; + const Double_t decm = (ecmmax - ecmmin)/double(necm); + + const Int_t nthcm = 45; + const Double_t thcmmin = 0.; + const Double_t thcmmax = 180.; + + const Double_t samin = 0.; + const Double_t samax = .03; + + const Double_t dthcm = (thcmmax - thcmmin)/double(nthcm); + const Double_t d2r = pi/180.; + + // Cut condition + const char* cut_a_all = + "hit.any[0]&&iex==0"; + const char* cut_o1a4 = + "hit.idet[0]==0&&hit.idet[1]==3&&iex==0&&abs(p.spc)<50*w.evt"; + const char* cut_t_all = + "hit.any[1]&&iex==0"; + const char* cut_o2a3 = + "hit.idet[0]==1&&hit.idet[1]==2&&iex==0&&abs(p.spc)<50*w.evt"; + //Char_t hname[100]; + TString hname; + + // TH2 for Nhit (Ecm vs thcm) + //sprintf(hname,"hhit_a_all"); + hname = "hhit_a_all"; + TH2D *hhit_a_all = new TH2D(hname.Data(),"Events hitting detectors;" + "E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + tr->Draw(Form("th.cm:E.cm>>%s",hname.Data()),cut_a_all); + /* TH2D *hhit_a[ndet]; */ + /* for(Int_t i=0; iDraw(Form("th.cm:E.cm>>%s",hname),Form("hit.idet[0]==%d&&iex==0",i)); */ + /* } */ + //sprintf(hname,"hhit_o1a4"); + hname = "hhit_o1a4"; + TH2D *hhit_o1a4 = new TH2D(hname.Data(),"Events hitting detectors;" + "E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + tr->Draw(Form("th.cm:E.cm>>%s",hname.Data()),cut_o1a4); + //sprintf(hname,"hhit_o2a3"); + hname = "hhit_o2a3"; + TH2D *hhit_o2a3 = new TH2D(hname.Data(),"Events hitting detectors;" + "E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + tr->Draw(Form("th.cm:E.cm>>%s",hname.Data()),cut_o2a3); + + + //sprintf(hname,"hhit_t_all"); + hname = "hhit_t_all"; + TH2D *hhit_t_all = new TH2D(hname.Data(),"Events hitting detectors;" + "E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + tr->Draw(Form("th.cm:E.cm>>%s",hname.Data()),cut_t_all); + /* TH2D *hhit_t[ndet]; */ + /* for(Int_t i=0; iDraw(Form("th.cm:E.cm>>%s",hname),Form("hit.idet[1]==%d&&iex==0",i)); */ + /* } */ + + + // TH2 for Ntot (Ecm vs thcm) + //sprintf(hname,"htot"); + hname = "htot"; + TH2D *htot = new TH2D(hname.Data(),"Total events;" + "E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + tr->Draw(Form("th.cm:E.cm>>%s",hname.Data()),"iex==0"); + + //sprintf(hname,"hsin_int"); + hname = "hsin_int"; + TH2D *hsin_int = new TH2D(hname.Data(), + "Integrated sin(#theta) in #theta bin size;" + "E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + + // dO: TH2 Divide (Ecm vs thcm) + TH2D *hdO_a_all = new TH2D("hdO_a_all","Solid angle #alpha (sr);" + "E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + hdO_a_all->Divide(hhit_a_all,htot); //,4.*pi); + /* TH2D *hdO_a[ndet]; */ + /* for(Int_t i=0; iDivide(hhit_a[i],htot); */ + /* } */ + TH2D *hdO_o1a4 = new TH2D("hdO_o1a4","Solid angle #alpha (sr);" + "E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + hdO_o1a4->Divide(hhit_o1a4,htot); + TH2D *hdO_o2a3 = new TH2D("hdO_o2a3","Solid angle #alpha (sr);" + "E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + hdO_o2a3->Divide(hhit_o2a3,htot); + + + TH2D *hdO_t_all = new TH2D("hdO_t_all","Solid angle t (sr);" + "E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + hdO_t_all->Divide(hhit_t_all,htot); //,4.*pi); + /* TH2D *hdO_t[ndet]; */ + /* for(Int_t i=0; iDivide(hhit_t[i],htot); */ + /* } */ + + /* hdO->Draw("colz"); */ + /* c1->Update(); gSystem->ProcessEvents(); getchar(); */ + + // TH2 Fill: ds/dO: Diff. cross section vs Ecm (vs thcm) + TH2D *hdsdO = new TH2D("hdsdO","Cross section (mb/sr);" + "E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + + // TH2 Fill: thk/dE*dE: Eff. thick. vs Ecm + TH2D *hthk = new TH2D("hthk",";" + "E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + + Double_t ecm = ecmmin + decm/2.; + for(Int_t i=0; iFill(ecm,thcm,w_cs); + hthk->Fill(ecm,thcm,w_efth); + hsin_int->Fill( ecm,thcm, - ( cos(d2r*(thcm+dthcm/2.)) + - cos(d2r*(thcm-dthcm/2.)) ) ); + thcm += dthcm; + } + ecm += decm; + } + + hdO_a_all->Multiply(hdO_a_all,hsin_int,2.*pi); + hdO_t_all->Multiply(hdO_t_all,hsin_int,2.*pi); + /* for(Int_t i=0; iMultiply(hdO_a[i],hsin_int,2.*pi); */ + /* hdO_t[i]->Multiply(hdO_t[i],hsin_int,2.*pi); */ + /* } */ + hdO_o1a4->Multiply(hdO_o1a4,hsin_int,2.*pi); + hdO_o2a3->Multiply(hdO_o2a3,hsin_int,2.*pi); + + // Canvas + TCanvas *c1=new TCanvas("c1","c1",1200,0,1320,600); + c1->Divide(4,2); + + c1->cd(1); + gPad->SetLogz(1); + hdsdO->GetXaxis()->SetNdivisions(502); + hdsdO->GetZaxis()->SetRangeUser(0.1,1.e1); + hdsdO->Draw("colz"); + c1->Update(); gSystem->ProcessEvents(); //getchar(); + + c1->cd(2); + gPad->SetLogz(0); + hthk->GetXaxis()->SetNdivisions(502); + hthk->SetTitle(Form("Effective thickness / %5.3f MeV (mg/cm^2)",decm)); + hthk->SetTitleFont(62); + hthk->SetTitleSize(lbsize); + hthk->Draw("colz"); + c1->Update(); gSystem->ProcessEvents(); //getchar(); + + c1->cd(3); + TH2D *hdO_all_coin = new TH2D("hdO_all_coin",";E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + hdO_all_coin->Add(hdO_all_coin,hdO_o1a4); + hdO_all_coin->Add(hdO_all_coin,hdO_o2a3); + hdO_all_coin->Draw("colz"); + + c1->cd(4); + gPad->SetLogy(0); + TH1D *hdO_all_coin_thcm = hdO_all_coin->ProjectionY("hdO_all_coin_thcm",0,necm); + hdO_all_coin_thcm->Scale(1./necm); + hdO_all_coin_thcm->GetYaxis()->SetRangeUser(samin,samax); + hdO_all_coin_thcm->GetXaxis()->SetTitleOffset(0.96); + hdO_all_coin_thcm->SetLineColor(kBlack); + hdO_all_coin_thcm->SetLineStyle(2); + hdO_all_coin_thcm->Draw("HIST"); + TH1D *hdO_o1a4_thcm = hdO_o1a4->ProjectionY("hdO_o1a4_thcm",0,necm); + hdO_o1a4_thcm->Scale(1./necm); + hdO_o1a4_thcm->SetLineColor(kRed); + //hdO_o1a4_thcm->SetLineStyle(2); + hdO_o1a4_thcm->Draw("HISTsame"); + TH1D *hdO_o2a3_thcm = hdO_o2a3->ProjectionY("hdO_o2a3_thcm",0,necm); + hdO_o2a3_thcm->Scale(1./necm); + hdO_o2a3_thcm->SetLineColor(kBlue); + //hdO_o2a3_thcm->SetLineStyle(2); + hdO_o2a3_thcm->Draw("HISTsame"); + c1->Update(); gSystem->ProcessEvents(); //getchar(); + + c1->cd(5); + TH2D *hyld_o1a4 = new TH2D("hyld",";E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + gPad->SetLogz(1); + hyld_o1a4->Multiply(hdO_o1a4,hdsdO); + hyld_o1a4->Multiply(hyld_o1a4,hthk,nbeam*C_cm2_mb_mg); + hyld_o1a4->GetXaxis()->SetNdivisions(502); + hyld_o1a4->SetTitle(Form("Yield / %5.3f MeV / %3.1f deg.",decm,dthcm)); + hyld_o1a4->SetTitleFont(62); + hyld_o1a4->SetTitleSize(lbsize); + hyld_o1a4->Draw("colz"); + c1->Update(); gSystem->ProcessEvents(); //getchar(); + + /* c1->cd(6); */ + TH2D *hyld_o2a3 = new TH2D("hyld",";E_{c.m.} (MeV);#theta_{c.m.} (deg.)", + necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); + gPad->SetLogz(1); + hyld_o2a3->Multiply(hdO_o2a3,hdsdO); + hyld_o2a3->Multiply(hyld_o2a3,hthk,nbeam*C_cm2_mb_mg); + hyld_o2a3->GetXaxis()->SetNdivisions(502); + hyld_o2a3->SetTitle(Form("Yield / %5.3f MeV / %3.1f deg.",decm,dthcm)); + hyld_o2a3->SetTitleFont(62); + hyld_o2a3->SetTitleSize(lbsize); + hyld_o2a3->Draw("colz"); + c1->Update(); gSystem->ProcessEvents(); //getchar(); + + /* c1->cd(6); */ + /* TH2D *hyld_a2t1 = new TH2D("hyld",";E_{c.m.} (MeV);#theta_{c.m.} (deg.)", */ + /* necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); */ + /* gPad->SetLogz(1); */ + /* hyld_a2t1->Multiply(hdO_a2t1,hdsdO); */ + /* hyld_a2t1->Multiply(hyld_a2t1,hthk,nbeam*C_cm2_mb_mg); */ + /* hyld_a2t1->GetXaxis()->SetNdivisions(502); */ + /* hyld_a2t1->SetTitle(Form("Yield / %5.3f MeV / %3.1f deg.",decm,dthcm)); */ + /* hyld_a2t1->SetTitleFont(62); */ + /* hyld_a2t1->SetTitleSize(lbsize); */ + /* //hyld_a2t1->Draw("colsame"); */ + /* hyld_a2t1->Draw("colz"); */ + /* c1->Update(); gSystem->ProcessEvents(); //getchar(); */ + + /* /\* c1->cd(6); *\/ */ + /* TH2D *hyld_a2t3 = new TH2D("hyld",";E_{c.m.} (MeV);#theta_{c.m.} (deg.)", */ + /* necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); */ + /* /\* gPad->SetLogz(1); *\/ */ + /* /\* hyld_a2t3->Multiply(hdO_a2t3,hdsdO); *\/ */ + /* /\* hyld_a2t3->Multiply(hyld_a2t3,hthk,nbeam*C_cm2_mb_mg); *\/ */ + /* /\* hyld_a2t3->GetXaxis()->SetNdivisions(502); *\/ */ + /* /\* hyld_a2t3->SetTitle(Form("Yield / %5.3f MeV / %3.1f deg.",decm,dthcm)); *\/ */ + /* /\* hyld_a2t3->SetTitleFont(62); *\/ */ + /* /\* hyld_a2t3->SetTitleSize(lbsize); *\/ */ + /* /\* hyld_a2t3->Draw("colz"); *\/ */ + /* /\* c1->Update(); gSystem->ProcessEvents(); //getchar(); *\/ */ + + /* /\* c1->cd(7); *\/ */ + /* TH2D *hyld_a3t2 = new TH2D("hyld",";E_{c.m.} (MeV);#theta_{c.m.} (deg.)", */ + /* necm,ecmmin,ecmmax,nthcm,thcmmin,thcmmax); */ + /* /\* gPad->SetLogz(1); *\/ */ + /* /\* hyld_a3t2->Multiply(hdO_a3t2,hdsdO); *\/ */ + /* /\* hyld_a3t2->Multiply(hyld_a3t2,hthk,nbeam*C_cm2_mb_mg); *\/ */ + /* /\* hyld_a3t2->GetXaxis()->SetNdivisions(502); *\/ */ + /* /\* hyld_a3t2->SetTitle(Form("Yield / %5.3f MeV / %3.1f deg.",decm,dthcm)); *\/ */ + /* /\* hyld_a3t2->SetTitleFont(62); *\/ */ + /* /\* hyld_a3t2->SetTitleSize(lbsize); *\/ */ + /* /\* hyld_a3t2->Draw("colz"); *\/ */ + /* /\* c1->Update(); gSystem->ProcessEvents(); //getchar(); *\/ */ + + c1->cd(8); + TH1D *hyld_o1a4_thcm = hyld_o1a4->ProjectionY("hyld_o1a4_thcm",0,necm); + TH1D *hyld_o2a3_thcm = hyld_o2a3->ProjectionY("hyld_o2a3_thcm",0,necm); + TH1D *hyld_all_thcm = new TH1D("hyld_all_thcm","",nthcm,thcmmin,thcmmax); + hyld_all_thcm->Add(hyld_all_thcm, hyld_o1a4_thcm); + hyld_all_thcm->Add(hyld_all_thcm, hyld_o2a3_thcm); + hyld_all_thcm->SetLineColor(kBlack); + hyld_all_thcm->SetLineStyle(2); + hyld_all_thcm->Draw("HIST"); + + hyld_o1a4_thcm->SetLineColor(kRed); + hyld_o1a4_thcm->Draw("HISTsame"); + hyld_o2a3_thcm->SetLineColor(kBlue); + hyld_o2a3_thcm->Draw("HISTsame"); + Double_t ntot_yld = hyld_all_thcm->Integral(0,nthcm); + //cout << hyld_thcm->Integral(0,nthcm) << endl; + Double_t rate_yld = ntot_yld/Dbeam/24.; // counts/hour + Double_t ymax=hyld_all_thcm->GetMaximum(); + TLatex *t1=new TLatex(80,0.92*ymax,Form("Total: %.1f counts",ntot_yld)); + TLatex *t2=new TLatex(80,0.85*ymax,Form("Rate: %.1f counts/h",rate_yld)); + t1->Draw(); + t2->Draw(); + + c1->Update(); gSystem->ProcessEvents(); //getchar(); + + gSystem->Exec("mkdir -vp ../figs");//Creates figs/ directory if there is not + c1->Print(Form("../figs/sa_coin_%s_%s.png",label,simnum)); + c1->Print(Form("../figs/sa_coin_%s_%s.pdf",label,simnum)); + + + theApp.Run(); +} diff --git a/n14dc11an/prm/prm_reac.n14dc11an_sim001.C b/n14dc11an/prm/prm_reac.n14dc11an_sim001.C new file mode 100644 index 0000000000000000000000000000000000000000..2e26178db32f10aab090a9e09ce0f63c7df11db6 --- /dev/null +++ b/n14dc11an/prm/prm_reac.n14dc11an_sim001.C @@ -0,0 +1,141 @@ +/* Common constants */ +const Double_t u = 931.49432/1000.; // GeV +const Double_t c = 299.7924; // speed of light, mm/ns +const Double_t pi = 4.*atan(1.); +const Double_t d2r = pi/180.; +const Double_t dummy = -1000.; +////////////////////////// + +/* Event information */ +//Long64_t ntot = 2.e9; // number of events +//Long64_t ntot = 1.e8; // number of events +const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "n14dc11an"; // Directory name +Char_t label[50] = "n14dc11an"; // +Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) +//Char_t simnum[10] = "sim003"; // only SSD energy resolution */ +/* Char_t simnum[10] = "sim004"; // only SSD strip width */ +/* Char_t simnum[10] = "sim005"; // including beam spread, SSD resolutions */ +/* Char_t simnum[10] = "sim006"; // Optimization of ... */ +////////////////////////// + + +/* particles information */ +Int_t z1 = 1; +float mh= 1.00782503; +float mn= 1.00866492; +float md= 2.01410178; +//float mt= 3.01604928; +Int_t z2 = 2; +float ma= 4.00260325; +Int_t z3 = 3; +/* float m6li= 6.01512279; */ +/* Int_t z6 = 6; */ +float m14n = 14.00307400425; +Int_t z7 = 7; +float m11c = 11.011432597; +Int_t z6 = 6; +const Int_t Nexci = 1; +Double_t exci[Nexci] = {0.}; // in MeV, 14N +//Double_t exci[Nexci] = {0., 2.312798, 3.94810, 4.9151}; // in MeV, 14N +Int_t zprj = z7; +float mprj = m14n; +Int_t ztrg = z1; +float mtrg = md; +float mprt = mh; +Int_t zres = z6; +float mres[Nexci], q2[Nexci]; +float mres_gs = m11c; +Int_t zrec = z2; +float mrec = ma; +Int_t zspc = 0; +float mspc = mn; +Int_t atom_num[3] = {zres, zrec, zspc} ; // atomic numbers +////////////////////////// + + +/* parameters for eoldz */ +float Eaftpu, Eaftpu_beam; +float Eaft, Eaft_beam; +//Char_t al[34] = "al"; +//Char_t ch2[34] = "POLYETHYLENE"; +Char_t cd2[34] = "cd2"; +Char_t carbon[34] = "c"; +Char_t lif[34] = "lif"; +Char_t he[34] = "he"; +Char_t si[34] = "si"; +//Char_t mat_tar[34], mat_bak[34]; +Char_t mat_tar[34] = "cd2"; +Char_t mat_bak[34] = "c"; +/* strcpy(mat_tar, cd2); */ +/* strcpy(mat_bak, carbon); */ +Int_t unit_pressure = 1; // Torr +// float pressure0 = 0.; //dummy +float pressure = 0.; //dummy +// float dpressure = 0.; // sigma +//float dpressure = 1.; // sigma +//float pressure, temperature; // sigma +Int_t unit_temperature = 1; // K, for srho_gas +//float temperature0 = 293.; +//float temperature0 = 299.; +float temperature = 299.; +//float dtemperature = 0.; // sigma +//float dtemperature = 1.; // sigma +Int_t unit_mm = 1; // in mm +Int_t unit_mgpcm2 = 2; // in mg/cm^2 +//float thk_tar = 0.; // Target thickness in mg/cm^2 // sim001 +float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim002 +float thk_bak = 0.; +float r_sphere = 350.; // radius of the TGeoVolume in mm +//float dEbin = 0.05; // energy step for effective thickness calculation +float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter +float Ebfr, Ebfr_beam; // Beam energy E in MeV after energy loss in matter +////////////////////////// + + +/* Beam condition */ +// 24.4 MeV --(2xPPACs 19 um Mylar)--(1/2 LiF target 75 ug/cm^2)-- 11 MeV +// 24.4 * 2 *10/16/100 * 0.68(1 sigma) = 0.21 MeV +// Monte Carlo reaction depth in target +// |---x---| Reference: middle -> E.beam_mid = (eprj_mid +/- deprj)*1000. +// |---|-x-| Practice: -1/2 thk_tar -- +1/2 thk_tar -> E.beam_MC +// -1------1 +Double_t Ebeam_ref_mid = 80.; // Mean beam energy at middle (MeV) +Double_t dEbeam = 0.; // Beam energy spread (MeV) // sim001 +//Double_t dEbeam = 0.21; // Beam energy spread (MeV) // sim002 +Double_t depe2 = 0.; // Relative proton energy resolution DE/E // sim001, sim002 +//Double_t depe2 = 0.01; // Relative proton energy resolution DE/E +Double_t xtar0 = 0.; // mm +Double_t ytar0 = 0.; // mm +Double_t xtar0_sgm = 0.; // mm sim001 +Double_t ytar0_sgm = 0.; // mm sim001 +/* Double_t xtar0_sgm = 5.; // sim002 */ +/* Double_t ytar0_sgm = 10.; // sim002 */ +// +Double_t za = - 600.; // mm, PPAC a z position +Double_t zb = za + 500.; // mm, PPAC b z position +Double_t sgm_ppac_a = 0.; // mm, PPAC a intrinsic resolution // sim001 +Double_t sgm_ppac_b = 0.; // mm, PPAC b intrinsic resolution // sim001 +/* Double_t sgm_ppac_a = 0.5; // mm, PPAC a intrinsic resolution sim002 */ +/* Double_t sgm_ppac_b = 0.5; // mm, PPAC b intrinsic resolution sim002 */ +////////////////////////// + + +/* Detector arrangement */ +const Int_t ndet = 4; +Double_t thdet[ndet] = {-8.2, 8.2, -17.8, 17.8}; // in deg +Double_t ldet[ndet] = {340., 340.,300., 300.}; +Double_t xdet_off[ndet] = {0., 0., 0., 0.}; +Double_t zdet_off[ndet] = {0., 0., 0., 0.}; +// float int_det = 10.; // interval between DE and E layers (mm) +// float de_thick = 0.02; // DE thickness (mm) +Double_t psd_half[ndet] = {25., 25., 25., 25.}; +//Int_t n_strip[ndet] = {0}; // sim001 sim002 +Int_t n_strip[ndet] = {16, 16, 16, 16}; // sim001 +Double_t strip_half[ndet]; +//Double_t dth[ndet]; // 03-04-2018 +////////////////////////// + +//Double_t dt = 1.; // TOF resolution in nsec. + + diff --git a/n14dc11an/prm/prm_reac.n14dc11an_sim002.C b/n14dc11an/prm/prm_reac.n14dc11an_sim002.C new file mode 100644 index 0000000000000000000000000000000000000000..b33b3e555ca4b53076f40f5030a8f380ceddefba --- /dev/null +++ b/n14dc11an/prm/prm_reac.n14dc11an_sim002.C @@ -0,0 +1,141 @@ +/* Common constants */ +const Double_t u = 931.49432/1000.; // GeV +const Double_t c = 299.7924; // speed of light, mm/ns +const Double_t pi = 4.*atan(1.); +const Double_t d2r = pi/180.; +const Double_t dummy = -1000.; +////////////////////////// + +/* Event information */ +//Long64_t ntot = 2.e9; // number of events +//Long64_t ntot = 1.e8; // number of events +const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "n14dc11an"; // Directory name +Char_t label[50] = "n14dc11an"; // +//Char_t simnum[10] = "sim001"; // no spread +//Char_t simnum[10] = "sim002"; // only DSSD energy and position resolution +//Char_t simnum[10] = "sim003"; // DSSD resolution, target thickness +//Char_t simnum[10] = "sim004"; // DSSD resoul., target thick., collimation + Char_t simnum[10] = "sim005"; // Distance optimization */ +////////////////////////// + + +/* particles information */ +Int_t z1 = 1; +float mh= 1.00782503; +float mn= 1.00866492; +float md= 2.01410178; +//float mt= 3.01604928; +Int_t z2 = 2; +float ma= 4.00260325; +Int_t z3 = 3; +/* float m6li= 6.01512279; */ +/* Int_t z6 = 6; */ +float m14n = 14.00307400425; +Int_t z7 = 7; +float m11c = 11.011432597; +Int_t z6 = 6; +const Int_t Nexci = 1; +Double_t exci[Nexci] = {0.}; // in MeV, 14N +//Double_t exci[Nexci] = {0., 2.312798, 3.94810, 4.9151}; // in MeV, 14N +Int_t zprj = z7; +float mprj = m14n; +Int_t ztrg = z1; +float mtrg = md; +float mprt = mh; +Int_t zres = z6; +float mres[Nexci], q2[Nexci]; +float mres_gs = m11c; +Int_t zrec = z2; +float mrec = ma; +Int_t zspc = 0; +float mspc = mn; +Int_t atom_num[3] = {zres, zrec, zspc} ; // atomic numbers +////////////////////////// + + +/* parameters for eoldz */ +float Eaftpu, Eaftpu_beam; +float Eaft, Eaft_beam; +//Char_t al[34] = "al"; +//Char_t ch2[34] = "POLYETHYLENE"; +Char_t cd2[34] = "cd2"; +Char_t carbon[34] = "c"; +Char_t lif[34] = "lif"; +Char_t he[34] = "he"; +Char_t si[34] = "si"; +//Char_t mat_tar[34], mat_bak[34]; +Char_t mat_tar[34] = "cd2"; +Char_t mat_bak[34] = "c"; +/* strcpy(mat_tar, cd2); */ +/* strcpy(mat_bak, carbon); */ +Int_t unit_pressure = 1; // Torr +// float pressure0 = 0.; //dummy +float pressure = 0.; //dummy +// float dpressure = 0.; // sigma +//float dpressure = 1.; // sigma +//float pressure, temperature; // sigma +Int_t unit_temperature = 1; // K, for srho_gas +//float temperature0 = 293.; +//float temperature0 = 299.; +float temperature = 299.; +//float dtemperature = 0.; // sigma +//float dtemperature = 1.; // sigma +Int_t unit_mm = 1; // in mm +Int_t unit_mgpcm2 = 2; // in mg/cm^2 +//float thk_tar = 0.; // Target thickness in mg/cm^2 // sim002 +float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim003 +float thk_bak = 0.; +float r_sphere = 350.; // radius of the TGeoVolume in mm +//float dEbin = 0.05; // energy step for effective thickness calculation +float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter +float Ebfr, Ebfr_beam; // Beam energy E in MeV after energy loss in matter +////////////////////////// + + +/* Beam condition */ +// 24.4 MeV --(2xPPACs 19 um Mylar)--(1/2 LiF target 75 ug/cm^2)-- 11 MeV +// 24.4 * 2 *10/16/100 * 0.68(1 sigma) = 0.21 MeV +// Monte Carlo reaction depth in target +// |---x---| Reference: middle -> E.beam_mid = (eprj_mid +/- deprj)*1000. +// |---|-x-| Practice: -1/2 thk_tar -- +1/2 thk_tar -> E.beam_MC +// -1------1 +Double_t Ebeam_ref_mid = 80.; // Mean beam energy at middle (MeV) +Double_t dEbeam = 0.; // Beam energy spread (MeV) // sim001 +//Double_t dEbeam = 0.21; // Beam energy spread (MeV) // sim002 +//Double_t depe2 = 0.; // Relative proton energy resolution DE/E // sim001, sim002 +Double_t depe2 = 0.2; // Relative proton energy resolution DE/E +Double_t xtar0 = 0.; // mm +Double_t ytar0 = 0.; // mm +Double_t xtar0_sgm = 0.; // mm sim001 +Double_t ytar0_sgm = 0.; // mm sim001 +/* Double_t xtar0_sgm = 5.; // sim002 */ +/* Double_t ytar0_sgm = 10.; // sim002 */ +// +Double_t za = - 400.; // mm, PPAC a z position +Double_t zb = za + 300.; // mm, PPAC b z position +/* Double_t sgm_ppac_a = 0.; // mm // sim001 */ +/* Double_t sgm_ppac_b = 0.; // mm // sim001 */ +Double_t sgm_ppac_a = 0.682*1.5; // mm, phi1-mm collimator sim004 +Double_t sgm_ppac_b = 0.682*1.; // mm, phi1-mm collimator sim004 +////////////////////////// + + +/* Detector arrangement */ +const Int_t ndet = 4; +Double_t thdet[ndet] = {-8.2, 8.2, -17.8, 17.8}; // in deg +Double_t ldet[ndet] = {340., 340.,300., 300.}; +Double_t xdet_off[ndet] = {0., 0., 0., 0.}; +Double_t zdet_off[ndet] = {0., 0., 0., 0.}; +// float int_det = 10.; // interval between DE and E layers (mm) +// float de_thick = 0.02; // DE thickness (mm) +Double_t psd_half[ndet] = {25., 25., 25., 25.}; +//Int_t n_strip[ndet] = {0}; // sim001 sim002 +Int_t n_strip[ndet] = {16, 16, 16, 16}; // sim001 +Double_t strip_half[ndet]; +//Double_t dth[ndet]; // 03-04-2018 +////////////////////////// + +//Double_t dt = 1.; // TOF resolution in nsec. + + diff --git a/n14dc11an/prm/prm_reac.n14dc11an_sim003.C b/n14dc11an/prm/prm_reac.n14dc11an_sim003.C new file mode 100644 index 0000000000000000000000000000000000000000..92d63320887257024fa538a2492cc5aced467a6c --- /dev/null +++ b/n14dc11an/prm/prm_reac.n14dc11an_sim003.C @@ -0,0 +1,141 @@ +/* Common constants */ +const Double_t u = 931.49432/1000.; // GeV +const Double_t c = 299.7924; // speed of light, mm/ns +const Double_t pi = 4.*atan(1.); +const Double_t d2r = pi/180.; +const Double_t dummy = -1000.; +////////////////////////// + +/* Event information */ +//Long64_t ntot = 2.e9; // number of events +//Long64_t ntot = 1.e8; // number of events +const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "n14dc11an"; // Directory name +Char_t label[50] = "n14dc11an"; // +//Char_t simnum[10] = "sim001"; // no spread +//Char_t simnum[10] = "sim002"; // only DSSD energy and position resolution +Char_t simnum[10] = "sim003"; // DSSD resolution, target thickness +//Char_t simnum[10] = "sim004"; // DSSD resoul., target thick., collimation +// Char_t simnum[10] = "sim005"; // Distance optimization */ +////////////////////////// + + +/* particles information */ +Int_t z1 = 1; +float mh= 1.00782503; +float mn= 1.00866492; +float md= 2.01410178; +//float mt= 3.01604928; +Int_t z2 = 2; +float ma= 4.00260325; +Int_t z3 = 3; +/* float m6li= 6.01512279; */ +/* Int_t z6 = 6; */ +float m14n = 14.00307400425; +Int_t z7 = 7; +float m11c = 11.011432597; +Int_t z6 = 6; +const Int_t Nexci = 1; +Double_t exci[Nexci] = {0.}; // in MeV, 14N +//Double_t exci[Nexci] = {0., 2.312798, 3.94810, 4.9151}; // in MeV, 14N +Int_t zprj = z7; +float mprj = m14n; +Int_t ztrg = z1; +float mtrg = md; +float mprt = mh; +Int_t zres = z6; +float mres[Nexci], q2[Nexci]; +float mres_gs = m11c; +Int_t zrec = z2; +float mrec = ma; +Int_t zspc = 0; +float mspc = mn; +Int_t atom_num[3] = {zres, zrec, zspc} ; // atomic numbers +////////////////////////// + + +/* parameters for eoldz */ +float Eaftpu, Eaftpu_beam; +float Eaft, Eaft_beam; +//Char_t al[34] = "al"; +//Char_t ch2[34] = "POLYETHYLENE"; +Char_t cd2[34] = "cd2"; +Char_t carbon[34] = "c"; +Char_t lif[34] = "lif"; +Char_t he[34] = "he"; +Char_t si[34] = "si"; +//Char_t mat_tar[34], mat_bak[34]; +Char_t mat_tar[34] = "cd2"; +Char_t mat_bak[34] = "c"; +/* strcpy(mat_tar, cd2); */ +/* strcpy(mat_bak, carbon); */ +Int_t unit_pressure = 1; // Torr +// float pressure0 = 0.; //dummy +float pressure = 0.; //dummy +// float dpressure = 0.; // sigma +//float dpressure = 1.; // sigma +//float pressure, temperature; // sigma +Int_t unit_temperature = 1; // K, for srho_gas +//float temperature0 = 293.; +//float temperature0 = 299.; +float temperature = 299.; +//float dtemperature = 0.; // sigma +//float dtemperature = 1.; // sigma +Int_t unit_mm = 1; // in mm +Int_t unit_mgpcm2 = 2; // in mg/cm^2 +//float thk_tar = 0.; // Target thickness in mg/cm^2 // sim002 +float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim003 +float thk_bak = 0.; +float r_sphere = 350.; // radius of the TGeoVolume in mm +//float dEbin = 0.05; // energy step for effective thickness calculation +float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter +float Ebfr, Ebfr_beam; // Beam energy E in MeV after energy loss in matter +////////////////////////// + + +/* Beam condition */ +// 24.4 MeV --(2xPPACs 19 um Mylar)--(1/2 LiF target 75 ug/cm^2)-- 11 MeV +// 24.4 * 2 *10/16/100 * 0.68(1 sigma) = 0.21 MeV +// Monte Carlo reaction depth in target +// |---x---| Reference: middle -> E.beam_mid = (eprj_mid +/- deprj)*1000. +// |---|-x-| Practice: -1/2 thk_tar -- +1/2 thk_tar -> E.beam_MC +// -1------1 +Double_t Ebeam_ref_mid = 80.; // Mean beam energy at middle (MeV) +Double_t dEbeam = 0.; // Beam energy spread (MeV) // sim001 +//Double_t dEbeam = 0.21; // Beam energy spread (MeV) // sim002 +//Double_t depe2 = 0.; // Relative proton energy resolution DE/E // sim001, sim002 +Double_t depe2 = 0.006; // Relative proton energy resolution DE/E +Double_t xtar0 = 0.; // mm +Double_t ytar0 = 0.; // mm +Double_t xtar0_sgm = 0.; // mm sim001 +Double_t ytar0_sgm = 0.; // mm sim001 +/* Double_t xtar0_sgm = 5.; // sim002 */ +/* Double_t ytar0_sgm = 10.; // sim002 */ +// +Double_t za = - 600.; // mm, PPAC a z position +Double_t zb = za + 500.; // mm, PPAC b z position +Double_t sgm_ppac_a = 0.; // mm, PPAC a intrinsic resolution // sim001 +Double_t sgm_ppac_b = 0.; // mm, PPAC b intrinsic resolution // sim001 +/* Double_t sgm_ppac_a = 0.5; // mm, PPAC a intrinsic resolution sim002 */ +/* Double_t sgm_ppac_b = 0.5; // mm, PPAC b intrinsic resolution sim002 */ +////////////////////////// + + +/* Detector arrangement */ +const Int_t ndet = 4; +Double_t thdet[ndet] = {-8.2, 8.2, -17.8, 17.8}; // in deg +Double_t ldet[ndet] = {340., 340.,300., 300.}; +Double_t xdet_off[ndet] = {0., 0., 0., 0.}; +Double_t zdet_off[ndet] = {0., 0., 0., 0.}; +// float int_det = 10.; // interval between DE and E layers (mm) +// float de_thick = 0.02; // DE thickness (mm) +Double_t psd_half[ndet] = {25., 25., 25., 25.}; +//Int_t n_strip[ndet] = {0}; // sim001 sim002 +Int_t n_strip[ndet] = {16, 16, 16, 16}; // sim001 +Double_t strip_half[ndet]; +//Double_t dth[ndet]; // 03-04-2018 +////////////////////////// + +//Double_t dt = 1.; // TOF resolution in nsec. + + diff --git a/n14dc11an/prm/prm_reac.n14dc11an_sim004.C b/n14dc11an/prm/prm_reac.n14dc11an_sim004.C new file mode 100644 index 0000000000000000000000000000000000000000..ce3e135cf75fc4a9b5021e4e3e6c8bdbae4b2f09 --- /dev/null +++ b/n14dc11an/prm/prm_reac.n14dc11an_sim004.C @@ -0,0 +1,141 @@ +/* Common constants */ +const Double_t u = 931.49432/1000.; // GeV +const Double_t c = 299.7924; // speed of light, mm/ns +const Double_t pi = 4.*atan(1.); +const Double_t d2r = pi/180.; +const Double_t dummy = -1000.; +////////////////////////// + +/* Event information */ +//Long64_t ntot = 2.e9; // number of events +//Long64_t ntot = 1.e8; // number of events +const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "n14dc11an"; // Directory name +Char_t label[50] = "n14dc11an"; // +//Char_t simnum[10] = "sim001"; // no spread +//Char_t simnum[10] = "sim002"; // only DSSD energy and position resolution +//Char_t simnum[10] = "sim003"; // DSSD resolution, target thickness +Char_t simnum[10] = "sim004"; // DSSD resoul., target thick., collimation +// Char_t simnum[10] = "sim005"; // Distance optimization */ +////////////////////////// + + +/* particles information */ +Int_t z1 = 1; +float mh= 1.00782503; +float mn= 1.00866492; +float md= 2.01410178; +//float mt= 3.01604928; +Int_t z2 = 2; +float ma= 4.00260325; +Int_t z3 = 3; +/* float m6li= 6.01512279; */ +/* Int_t z6 = 6; */ +float m14n = 14.00307400425; +Int_t z7 = 7; +float m11c = 11.011432597; +Int_t z6 = 6; +const Int_t Nexci = 1; +Double_t exci[Nexci] = {0.}; // in MeV, 14N +//Double_t exci[Nexci] = {0., 2.312798, 3.94810, 4.9151}; // in MeV, 14N +Int_t zprj = z7; +float mprj = m14n; +Int_t ztrg = z1; +float mtrg = md; +float mprt = mh; +Int_t zres = z6; +float mres[Nexci], q2[Nexci]; +float mres_gs = m11c; +Int_t zrec = z2; +float mrec = ma; +Int_t zspc = 0; +float mspc = mn; +Int_t atom_num[3] = {zres, zrec, zspc} ; // atomic numbers +////////////////////////// + + +/* parameters for eoldz */ +float Eaftpu, Eaftpu_beam; +float Eaft, Eaft_beam; +//Char_t al[34] = "al"; +//Char_t ch2[34] = "POLYETHYLENE"; +Char_t cd2[34] = "cd2"; +Char_t carbon[34] = "c"; +Char_t lif[34] = "lif"; +Char_t he[34] = "he"; +Char_t si[34] = "si"; +//Char_t mat_tar[34], mat_bak[34]; +Char_t mat_tar[34] = "cd2"; +Char_t mat_bak[34] = "c"; +/* strcpy(mat_tar, cd2); */ +/* strcpy(mat_bak, carbon); */ +Int_t unit_pressure = 1; // Torr +// float pressure0 = 0.; //dummy +float pressure = 0.; //dummy +// float dpressure = 0.; // sigma +//float dpressure = 1.; // sigma +//float pressure, temperature; // sigma +Int_t unit_temperature = 1; // K, for srho_gas +//float temperature0 = 293.; +//float temperature0 = 299.; +float temperature = 299.; +//float dtemperature = 0.; // sigma +//float dtemperature = 1.; // sigma +Int_t unit_mm = 1; // in mm +Int_t unit_mgpcm2 = 2; // in mg/cm^2 +//float thk_tar = 0.; // Target thickness in mg/cm^2 // sim002 +float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim003 +float thk_bak = 0.; +float r_sphere = 350.; // radius of the TGeoVolume in mm +//float dEbin = 0.05; // energy step for effective thickness calculation +float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter +float Ebfr, Ebfr_beam; // Beam energy E in MeV after energy loss in matter +////////////////////////// + + +/* Beam condition */ +// 24.4 MeV --(2xPPACs 19 um Mylar)--(1/2 LiF target 75 ug/cm^2)-- 11 MeV +// 24.4 * 2 *10/16/100 * 0.68(1 sigma) = 0.21 MeV +// Monte Carlo reaction depth in target +// |---x---| Reference: middle -> E.beam_mid = (eprj_mid +/- deprj)*1000. +// |---|-x-| Practice: -1/2 thk_tar -- +1/2 thk_tar -> E.beam_MC +// -1------1 +Double_t Ebeam_ref_mid = 80.; // Mean beam energy at middle (MeV) +Double_t dEbeam = 0.; // Beam energy spread (MeV) // sim001 +//Double_t dEbeam = 0.21; // Beam energy spread (MeV) // sim002 +//Double_t depe2 = 0.; // Relative proton energy resolution DE/E // sim001, sim002 +Double_t depe2 = 0.006; // Relative proton energy resolution DE/E +Double_t xtar0 = 0.; // mm +Double_t ytar0 = 0.; // mm +Double_t xtar0_sgm = 0.; // mm sim001 +Double_t ytar0_sgm = 0.; // mm sim001 +/* Double_t xtar0_sgm = 5.; // sim002 */ +/* Double_t ytar0_sgm = 10.; // sim002 */ +// +Double_t za = - 400.; // mm, PPAC a z position +Double_t zb = za + 300.; // mm, PPAC b z position +/* Double_t sgm_ppac_a = 0.; // mm // sim001 */ +/* Double_t sgm_ppac_b = 0.; // mm // sim001 */ +Double_t sgm_ppac_a = 0.682*1.5; // mm, phi1-mm collimator sim004 +Double_t sgm_ppac_b = 0.682*1.; // mm, phi1-mm collimator sim004 +////////////////////////// + + +/* Detector arrangement */ +const Int_t ndet = 4; +Double_t thdet[ndet] = {-8.2, 8.2, -17.8, 17.8}; // in deg +Double_t ldet[ndet] = {340., 340.,300., 300.}; +Double_t xdet_off[ndet] = {0., 0., 0., 0.}; +Double_t zdet_off[ndet] = {0., 0., 0., 0.}; +// float int_det = 10.; // interval between DE and E layers (mm) +// float de_thick = 0.02; // DE thickness (mm) +Double_t psd_half[ndet] = {25., 25., 25., 25.}; +//Int_t n_strip[ndet] = {0}; // sim001 sim002 +Int_t n_strip[ndet] = {16, 16, 16, 16}; // sim001 +Double_t strip_half[ndet]; +//Double_t dth[ndet]; // 03-04-2018 +////////////////////////// + +//Double_t dt = 1.; // TOF resolution in nsec. + + diff --git a/n14dc11an/prm/prm_reac.n14dc11an_sim005.C b/n14dc11an/prm/prm_reac.n14dc11an_sim005.C new file mode 100644 index 0000000000000000000000000000000000000000..4ef042911d0e32d0c918c1ac9313df83651779c7 --- /dev/null +++ b/n14dc11an/prm/prm_reac.n14dc11an_sim005.C @@ -0,0 +1,142 @@ +/* Common constants */ +const Double_t u = 931.49432/1000.; // GeV +const Double_t c = 299.7924; // speed of light, mm/ns +const Double_t pi = 4.*atan(1.); +const Double_t d2r = pi/180.; +const Double_t dummy = -1000.; +////////////////////////// + +/* Event information */ +//Long64_t ntot = 2.e9; // number of events +//Long64_t ntot = 1.e8; // number of events +const Long64_t ntot = 2.e5; // number of events +Char_t dir[50] = "n14dc11an"; // Directory name +Char_t label[50] = "n14dc11an"; // +//Char_t simnum[10] = "sim001"; // no spread +//Char_t simnum[10] = "sim002"; // only DSSD energy and position resolution +//Char_t simnum[10] = "sim003"; // DSSD resolution, target thickness +//Char_t simnum[10] = "sim004"; // DSSD resoul., target thick., collimation + Char_t simnum[10] = "sim005"; // Distance optimization */ +////////////////////////// + + +/* particles information */ +Int_t z1 = 1; +float mh= 1.00782503; +float mn= 1.00866492; +float md= 2.01410178; +//float mt= 3.01604928; +Int_t z2 = 2; +float ma= 4.00260325; +Int_t z3 = 3; +/* float m6li= 6.01512279; */ +/* Int_t z6 = 6; */ +float m14n = 14.00307400425; +Int_t z7 = 7; +float m11c = 11.011432597; +Int_t z6 = 6; +const Int_t Nexci = 1; +Double_t exci[Nexci] = {0.}; // in MeV, 14N +//Double_t exci[Nexci] = {0., 2.312798, 3.94810, 4.9151}; // in MeV, 14N +Int_t zprj = z7; +float mprj = m14n; +Int_t ztrg = z1; +float mtrg = md; +float mprt = mh; +Int_t zres = z6; +float mres[Nexci], q2[Nexci]; +float mres_gs = m11c; +Int_t zrec = z2; +float mrec = ma; +Int_t zspc = 0; +float mspc = mn; +Int_t atom_num[3] = {zres, zrec, zspc} ; // atomic numbers +////////////////////////// + + +/* parameters for eoldz */ +float Eaftpu, Eaftpu_beam; +float Eaft, Eaft_beam; +//Char_t al[34] = "al"; +//Char_t ch2[34] = "POLYETHYLENE"; +Char_t cd2[34] = "cd2"; +Char_t carbon[34] = "c"; +Char_t lif[34] = "lif"; +Char_t he[34] = "he"; +Char_t si[34] = "si"; +//Char_t mat_tar[34], mat_bak[34]; +Char_t mat_tar[34] = "cd2"; +Char_t mat_bak[34] = "c"; +/* strcpy(mat_tar, cd2); */ +/* strcpy(mat_bak, carbon); */ +Int_t unit_pressure = 1; // Torr +// float pressure0 = 0.; //dummy +float pressure = 0.; //dummy +// float dpressure = 0.; // sigma +//float dpressure = 1.; // sigma +//float pressure, temperature; // sigma +Int_t unit_temperature = 1; // K, for srho_gas +//float temperature0 = 293.; +//float temperature0 = 299.; +float temperature = 299.; +//float dtemperature = 0.; // sigma +//float dtemperature = 1.; // sigma +Int_t unit_mm = 1; // in mm +Int_t unit_mgpcm2 = 2; // in mg/cm^2 +//float thk_tar = 0.; // Target thickness in mg/cm^2 // sim002 +float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim003 +float thk_bak = 0.; +float r_sphere = 350.; // radius of the TGeoVolume in mm +//float dEbin = 0.05; // energy step for effective thickness calculation +float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter +float Ebfr, Ebfr_beam; // Beam energy E in MeV after energy loss in matter +////////////////////////// + + +/* Beam condition */ +// 24.4 MeV --(2xPPACs 19 um Mylar)--(1/2 LiF target 75 ug/cm^2)-- 11 MeV +// 24.4 * 2 *10/16/100 * 0.68(1 sigma) = 0.21 MeV +// Monte Carlo reaction depth in target +// |---x---| Reference: middle -> E.beam_mid = (eprj_mid +/- deprj)*1000. +// |---|-x-| Practice: -1/2 thk_tar -- +1/2 thk_tar -> E.beam_MC +// -1------1 +Double_t Ebeam_ref_mid = 80.; // Mean beam energy at middle (MeV) +Double_t dEbeam = 0.; // Beam energy spread (MeV) // sim001 +//Double_t dEbeam = 0.21; // Beam energy spread (MeV) // sim002 +//Double_t depe2 = 0.; // Relative proton energy resolution DE/E // sim001, sim002 +Double_t depe2 = 0.006; // Relative proton energy resolution DE/E +Double_t xtar0 = 0.; // mm +Double_t ytar0 = 0.; // mm +Double_t xtar0_sgm = 0.; // mm sim001 +Double_t ytar0_sgm = 0.; // mm sim001 +/* Double_t xtar0_sgm = 5.; // sim002 */ +/* Double_t ytar0_sgm = 10.; // sim002 */ +// +Double_t za = - 400.; // mm, PPAC a z position +Double_t zb = za + 300.; // mm, PPAC b z position +/* Double_t sgm_ppac_a = 0.; // mm // sim001 */ +/* Double_t sgm_ppac_b = 0.; // mm // sim001 */ +Double_t sgm_ppac_a = 0.682*1.5; // mm, phi1-mm collimator sim004 +Double_t sgm_ppac_b = 0.682*1.; // mm, phi1-mm collimator sim004 +////////////////////////// + + +/* Detector arrangement */ +const Int_t ndet = 4; +Double_t thdet[ndet] = {-8.2, 8.2, -17.8, 17.8}; // in deg +Double_t ldet[ndet] = {340., 340.,300., 300.}; +Double_t xdet_off[ndet] = {0., 0., 0., 0.}; +Double_t zdet_off[ndet] = {0., 0., 0., 0.}; +// float int_det = 10.; // interval between DE and E layers (mm) +// float de_thick = 0.02; // DE thickness (mm) +Double_t psd_half[ndet] = {25., 25., 25., 25.}; +//Int_t n_strip[ndet] = {0}; // sim001 sim002 +//Int_t n_strip[ndet] = {16, 16, 16, 16}; // sim001 +Int_t n_strip[ndet] = {32, 32, 32, 32}; // sim005 +Double_t strip_half[ndet]; +//Double_t dth[ndet]; // 03-04-2018 +////////////////////////// + +//Double_t dt = 1.; // TOF resolution in nsec. + + diff --git a/n14dc11an/root/n14dc11an_sim001.root b/n14dc11an/root/n14dc11an_sim001.root new file mode 100644 index 0000000000000000000000000000000000000000..a4577a598f866523f57a5837bb5efb4cea296c62 Binary files /dev/null and b/n14dc11an/root/n14dc11an_sim001.root differ diff --git a/n14dc11an/root/n14dc11an_sim002.root b/n14dc11an/root/n14dc11an_sim002.root new file mode 100644 index 0000000000000000000000000000000000000000..1f0f8335b14967780f419a1fd28d6a0f737d83e8 Binary files /dev/null and b/n14dc11an/root/n14dc11an_sim002.root differ diff --git a/n14dc11an/root/n14dc11an_sim003.root b/n14dc11an/root/n14dc11an_sim003.root new file mode 100644 index 0000000000000000000000000000000000000000..02a36a98318b6f80505573973cce1d56f9b71a4d Binary files /dev/null and b/n14dc11an/root/n14dc11an_sim003.root differ diff --git a/n14dc11an/root/n14dc11an_sim004.root b/n14dc11an/root/n14dc11an_sim004.root new file mode 100644 index 0000000000000000000000000000000000000000..bc0dc025e29d975440b16ce6ec259e953a750d5b Binary files /dev/null and b/n14dc11an/root/n14dc11an_sim004.root differ diff --git a/n14dc11an/root/n14dc11an_sim005.root b/n14dc11an/root/n14dc11an_sim005.root new file mode 100644 index 0000000000000000000000000000000000000000..86f2442b7e4f11287a3205b4a423dac20eff4090 Binary files /dev/null and b/n14dc11an/root/n14dc11an_sim005.root differ diff --git a/prm_reac.C b/prm_reac.C deleted file mode 100644 index 9ccca434c1876ef52bf188f25c4d0ab8f45fee4a..0000000000000000000000000000000000000000 --- a/prm_reac.C +++ /dev/null @@ -1,151 +0,0 @@ -/* Common constants */ -const Double_t u = 931.49432/1000.; // GeV -//const Double_t c = 299.7924; // speed of light, mm/ns -const Double_t pi = 4.*atan(1.); -const Double_t d2r = pi/180.; -const Double_t dummy = -1000.; -////////////////////////// - -/* Event information */ -//Long64_t ntot = 2.e9; // number of events -//Long64_t ntot = 1.e8; // number of events -const Long64_t ntot = 2.e5; // number of events -Char_t label[50] = "c11li6n14pd"; // -//Char_t simnum[10] = "sim001"; // No beam spread, detector resolutions (in energy, space) -//Char_t simnum[10] = "sim002"; // only beam (energy, spacial, PPAC resolution) spread -//Char_t simnum[10] = "sim003"; // only SSD energy resolution */ -// Char_t simnum[10] = "sim004"; // only SSD strip width */ -/* Char_t simnum[10] = "sim005"; // including beam spread, SSD resolutions */ -//Char_t simnum[10] = "sim006"; // Only target thickness and beam energy spread are off -//Char_t simnum[10] = "sim007"; // same as sim005 but the target thickness is x4 -//Char_t simnum[10] = "sim008"; // same as sim005 but different forward detector setting -//Char_t simnum[10] = "sim009"; // same as sim005 but W no. of strips -Char_t simnum[10] = "sim010"; // better beam energy spread, W no. of strips -////////////////////////// - - -/* particles information */ -Int_t z1 = 1; -float mh= 1.00782503; -float mn= 1.00866492; -float md= 2.01410178; -//float mt= 3.01604928; -Int_t z2 = 2; -float ma= 4.00260325; -Int_t z3 = 3; -float m6li= 6.01512279; -Int_t z6 = 6; -float m11c = 11.01143361; -Int_t z7 = 7; -float m14n = 14.00307400; -const Int_t Nexci = 1; -Double_t exci[Nexci] = {0.}; // in MeV, 14N -//Double_t exci[Nexci] = {0., 2.312798, 3.94810, 4.9151}; // in MeV, 14N -Int_t zprj = z6; -float mprj = m11c; -Int_t ztrg = z3; -float mtrg = m6li; -Int_t zres = z7; -float mprt = ma; -float mres[Nexci], q2[Nexci]; -float mres_gs = m14n; -Int_t zrec = z1; -float mrec = mh; -Int_t zspc = z1; -float mspc = md; -Int_t atom_num[3] = {zres, zrec, zspc} ; // atomic numbers -////////////////////////// - - -/* parameters for eoldz */ -float Eaftpu, Eaftpu_beam; -float Eaft, Eaft_beam; -//Char_t al[34] = "al"; -//Char_t ch2[34] = "POLYETHYLENE"; -//Char_t cd2[34] = "cd2"; -Char_t lif[34] = "lif"; -//Char_t he[34] = "he"; -Char_t si[34] = "si"; -Char_t c[34] = "c"; -Int_t unit_pressure = 1; // Torr -// float pressure0 = 0.; //dummy -float pressure = 0.; //dummy -// float dpressure = 0.; // sigma -//float dpressure = 1.; // sigma -//float pressure, temperature; // sigma -Int_t unit_temperature = 1; // K, for srho_gas -//float temperature0 = 293.; -//float temperature0 = 299.; -float temperature = 299.; -//float dtemperature = 0.; // sigma -//float dtemperature = 1.; // sigma -Int_t unit_mm = 1; // in mm -Int_t unit_mgpcm2 = 2; // in mg/cm^2 -//float thk_tar = 0.; // Target thickness in mg/cm^2 // sim001 sim003 sim004 sim006 -//float thk_tar = 0.15; // Target thickness in mg/cm^2 // sim002 sim005 -float thk_tar = 0.1; // Target thickness in mg/cm^2 // sim010 -float thk_bak = 0.1; // Backing thickness in mg/cm^2 // sim010 -//float thk_tar = 0.6; // Target thickness in mg/cm^2 // sim007 -//float dEbin = 0.05; // energy step for effective thickness calculation -float Ebfrpu, Ebfrpu_beam; // Beam energy E in MeV/u after energy loss in matter -float Ebfr, Ebfr_beam; // Beam energy E in MeV after energy loss in matter -////////////////////////// - - -/* Beam condition */ -// 24.4 MeV --(2xPPACs 19 um Mylar)--(1/2 LiF target 75 ug/cm^2)-- 11 MeV -// 24.4 * 2 *10/16/100 * 0.68(1 sigma) = 0.21 MeV -// Monte Carlo reaction depth in target -// |---x---| Reference: middle -> E.beam_mid = (eprj_mid +/- deprj)*1000. -// |---|-x-| Practice: -1/2 thk_tar -- +1/2 thk_tar -> E.beam_MC -// -1------1 -Double_t Ebeam_ref_mid = 11.; // Mean beam energy at middle in MeV -//Double_t dEbeam = 0.; // Beam energy spread (GeV) // sim001 sim003 sim004 -//Double_t dEbeam = 0.21; // Beam energy spread (MeV) -Double_t dEbeam = 0.5; // Beam energy spread (MeV) // sim010 -//Double_t depe2 = 0.; // Relative energy resolution DE/E @5MeV sim001, sim002 sim004 -Double_t depe2 = 0.006; // Relative energy resolution DE/E @5MeV sim003 sim005 sim006 -Double_t xtar0 = 0.; // mm -Double_t ytar0 = 0.; // mm -/* Double_t xtar0_sgm = 0.; // mm sim001 sim003 sim004 */ -/* Double_t ytar0_sgm = 0.; // mm sim001 sim003 sim004 */ -Double_t xtar0_sgm = 5.; // sim002 sim005 sim006 -Double_t ytar0_sgm = 10.; // sim002 sim005 sim006 -// -Double_t za = - 600.; // mm, PPAC a z position -Double_t zb = za + 500.; // mm, PPAC b z position -/* Double_t sgm_ppac_a = 0.; // mm, PPAC a intrinsic resolution // sim001 sim003 sim004 */ -/* Double_t sgm_ppac_b = 0.; // mm, PPAC b intrinsic resolution // sim001 sim003 sim004 */ -Double_t sgm_ppac_a = 0.5; // mm, PPAC a intrinsic resolution sim002 sim005 sim006 -Double_t sgm_ppac_b = 0.5; // mm, PPAC b intrinsic resolution sim002 sim005 sim006 -/* ////////////////////////// */ - - -/* Detector arrangement */ -const Int_t ndet = 6; -//Double_t thdet[ndet] = {-56., -34., -12., 12., 34., 56.}; // in deg -//Double_t thdet[ndet] = {-60., -40., -12., 12., 40., 60.}; // in deg sim001-008 -Double_t thdet[ndet] = {-60., -40., -11., 11., 40., 60.}; // in deg sim010 -//Double_t thdet[ndet] = {-60., -40., -9., 9., 40., 60.}; // in deg sim008 -//Double_t ldet[ndet] = {200., 200., 200., 200., 200., 200.}; //sim001-007 -//Double_t ldet[ndet] = {200., 200., 300., 300., 200., 200.}; // sim008 -Double_t ldet[ndet] = {200., 200., 200., 200., 200., 200.}; //sim010 -Double_t xdet_off[ndet] = {0., 0., 0., 0., 0., 0.}; -Double_t zdet_off[ndet] = {0., 0., 0., 0., 0., 0.}; -// float int_det = 10.; // interval between DE and E layers (mm) -// float de_thick = 0.02; // DE thickness (mm) -Double_t psd_half[ndet] = {25., 25., 25., 25., 25., 25.}; //sim001-007 -//Double_t psd_half[ndet] = {25., 25., 20., 20., 25., 25.}; //sim008 -//Int_t n_strip[ndet] = {0}; // sim001 sim002 sim003 -//Int_t n_strip[ndet] = {16, 16, 16, 16, 16, 16}; // sim004 sim005 sim006 sim007 -//Int_t n_strip[ndet] = {16, 16, 40, 40, 16, 16}; // sim008 -Int_t n_strip[ndet] = {32, 32, 32, 32, 32, 32}; // sim009 -Double_t strip_half[ndet]; -//Double_t dth[ndet]; // 03-04-2018 -float r_sphere = 250.; // radius of the TGeoVolume in mm -//float r_sphere = 320.; // radius of the TGeoVolume in mm -////////////////////////// - -//Double_t dt = 1.; // TOF resolution in nsec. - - diff --git a/prm_reac.C b/prm_reac.C new file mode 120000 index 0000000000000000000000000000000000000000..b16c767f2443639740dd2672daead45e74aa7303 --- /dev/null +++ b/prm_reac.C @@ -0,0 +1 @@ +n14dc11an/prm/prm_reac.n14dc11an_sim005.C \ No newline at end of file diff --git a/simthm_c11li6n14pd.C b/simthm.C similarity index 87% rename from simthm_c11li6n14pd.C rename to simthm.C index 09c950c6922de45e41069f90bfac7d7351a66f28..91693aca16a2dd84f0373eb5747f5b460dbbef35 100644 --- a/simthm_c11li6n14pd.C +++ b/simthm.C @@ -57,11 +57,11 @@ extern "C" { void eoldzsub_etot_(int *z1, float *m1, float *aft_ene, char matter1[33], int *unit_pressure, float *pressure, float *temperature, int *unit_thick, float *thick1, float *bfr_ene); - void rangezsub_etot_(int *z1, float *m1, float *bfr_ene, char matter1[33], - float *range); - void srhogas_(float *pressure, float *temperature, int *unit_pressure, - int *unit_temperature, float *mol_weight, - float *density); + /* void rangezsub_etot_(int *z1, float *m1, float *bfr_ene, char matter1[33], */ + /* float *range); */ + /* void srhogas_(float *pressure, float *temperature, int *unit_pressure, */ + /* int *unit_temperature, float *mol_weight, */ + /* float *density); */ } Double_t sgm_ppac_ab(Double_t z){ @@ -111,29 +111,37 @@ int main() { TApplication theApp("App", NULL, NULL); // For enewz - for(Int_t ichar=0;ichar<33;ichar++){ + for(Int_t ichar=0;ichar<33;ichar++){ /* if(he[ichar]=='\0'){ */ /* he[ichar]=' '; */ /* he[ichar+1]='\0'; */ /* } */ - if(si[ichar]=='\0'){ - si[ichar]=' '; - si[ichar+1]='\0'; - } - if(lif[ichar]=='\0'){ - lif[ichar]=' '; - lif[ichar+1]='\0'; + /* if(si[ichar]=='\0'){ */ + /* si[ichar]=' '; */ + /* si[ichar+1]='\0'; */ + /* } */ + /* if(cd2[ichar]=='\0'){ */ + /* cd2[ichar]=' '; */ + /* cd2[ichar+1]='\0'; */ + /* } */ + /* if(lif[ichar]=='\0'){ */ + /* lif[ichar]=' '; */ + /* lif[ichar+1]='\0'; */ + /* } */ + if(mat_tar[ichar]=='\0'){ + mat_tar[ichar]=' '; + mat_tar[ichar+1]='\0'; } - if(c[ichar]=='\0'){ - c[ichar]=' '; - c[ichar+1]='\0'; + if(mat_bak[ichar]=='\0'){ + mat_bak[ichar]=' '; + mat_bak[ichar+1]='\0'; } + /* if(c[ichar]=='\0'){ */ + /* c[ichar]=' '; */ + /* c[ichar+1]='\0'; */ + /* } */ } - // to store the parameter file - gROOT->ProcessLine(Form(".! cp -pv prm_reac.C prm/prm_reac.%s_%s.C", - label,simnum)); - ////////////////////////////////////// // Geometrical definitions gStyle->SetPalette(1); @@ -174,27 +182,34 @@ int main() { top->SetLineColor(kRed); gGeoManager->SetTopVisible(); - /* TCanvas *c0 = new TCanvas("c0","c0",1450,0,800,800); */ - /* top->Draw(); */ - /* TView3D *view = (TView3D*)TView::CreateView(1); */ - /* view->SetRange(-r_sphere,-r_sphere,-r_sphere,r_sphere,r_sphere,r_sphere); */ - /* view->Front(); */ - /* view->ShowAxis(); */ - /* c0->Update(); */ - /* gSystem->ProcessEvents(); */ - /* gSystem->Exec("mkdir -vp figs"); // Creates figs/ directory if there is not */ - /* c0->Print(Form("figs/det_arrange_%s_%s.png",label,simnum)); */ + TCanvas *c0 = new TCanvas("c0","c0",1450,0,800,800); + top->Draw(); + TView3D *view = (TView3D*)TView::CreateView(1); + view->SetRange(-r_sphere,-r_sphere,-r_sphere,r_sphere,r_sphere,r_sphere); + view->Front(); + view->ShowAxis(); + c0->Update(); + gSystem->ProcessEvents(); + gSystem->Exec(Form("mkdir -vp %s/figs",dir)); // Creates figs/ directory if there is not + c0->Print(Form("%s/figs/det_arrange_%s_%s.png",dir,label,simnum)); ////////////////////////////////////// // Output tree file - gSystem->Exec("mkdir -vp root"); // Creates root/ directory if there is not - Char_t fname[200]; - sprintf(fname,"root/%s_%s.root",label,simnum); - cout << "Output file name: " << fname << endl; + gSystem->Exec(Form("mkdir -vp %s/root",dir)); // Creates root/ directory if there is not + //Char_t fname[200]; + TString fname; + //sprintf(fname,"%s/root/%s_%s.root",dir,label,simnum); + fname = Form("%s/root/%s_%s.root",dir,label,simnum); + cout << "Output file name: " << fname.Data() << endl; cout << "OK to run?" << endl; getchar(); - TFile *fl2 = new TFile(fname,"RECREATE"); - TTree* sim = new TTree("sim",""); + // to store the parameter file + gSystem->Exec(Form("mkdir -vp %s/prm",dir)); // Creates prm/ directory if there is not + gROOT->ProcessLine(Form(".! cp -pv prm_reac.C %s/prm/prm_reac.%s_%s.C", + dir,label,simnum)); + + TFile *fl2 = new TFile(fname.Data(),"RECREATE"); + TTree* sim = new TTree("sim",""); // variables for tree // E.beam_mid: fixed beam energy at the middle of the target // E.beam_mid_MC: same as _mid but deviated according to energy spread @@ -313,14 +328,14 @@ int main() { hit.any = hit.both = false; pos = {dummy,dummy,dummy,dummy, dummy,dummy,dummy, - dummy,dummy, dummy,dummy, dummy,dummy, - dummy,dummy, dummy,dummy, dummy,dummy, - dummy,dummy, dummy,dummy, dummy,dummy, - dummy,dummy, dummy,dummy, dummy,dummy, - dummy,dummy, dummy,dummy, dummy,dummy, - dummy,dummy, dummy,dummy, dummy,dummy, - dummy,dummy, dummy,dummy, dummy,dummy, - dummy,dummy, dummy,dummy, dummy,dummy}; + dummy,dummy, dummy,dummy, + dummy,dummy, dummy,dummy, + dummy,dummy, dummy,dummy, + dummy,dummy, dummy,dummy, + dummy,dummy, dummy,dummy, + dummy,dummy, dummy,dummy, + dummy,dummy, dummy,dummy, + dummy,dummy, dummy,dummy}; //pos = {0}; w = {0}; iex = -1; @@ -341,7 +356,7 @@ int main() { E.beam_mid_MC = ran->Gaus(Ebeam_ref_mid,dEbeam); // energy at middle with initial beam spread float fthk_mid_dec = thk_tar/2.*ran->Uniform(-1.,1.); // distance from the middle Ebfr = E.beam_mid_MC; - enewzsub_etot_(&zprj, &mprj, &Ebfr, lif, &unit_pressure, &pressure, + enewzsub_etot_(&zprj, &mprj, &Ebfr, mat_tar, &unit_pressure, &pressure, &temperature, &unit_mgpcm2, &fthk_mid_dec, &Eaft); E.beam_dec = Eaft; @@ -456,11 +471,11 @@ int main() { float fthk_dec_end = (thk_tar/2. - fthk_mid_dec)/cos(th.lab[iprt]*d2r); // Dist. reaction point <-> detector hit Ebfr = E.lab[iprt]; // MeV float fmass = mass[iprt]/u; - enewzsub_etot_(&atom_num[iprt], &fmass, &Ebfr, lif, &unit_pressure, &pressure, + enewzsub_etot_(&atom_num[iprt], &fmass, &Ebfr, mat_tar, &unit_pressure, &pressure, &temperature, &unit_mgpcm2, &fthk_dec_end, &Eaft); float fthk_bak = thk_bak/cos(th.lab[iprt]*d2r); Ebfr = Eaft; - enewzsub_etot_(&atom_num[iprt], &fmass, &Ebfr, c, &unit_pressure, &pressure, + enewzsub_etot_(&atom_num[iprt], &fmass, &Ebfr, mat_bak, &unit_pressure, &pressure, &temperature, &unit_mgpcm2, &fthk_bak, &Eaft); E.lab_det[iprt] = Eaft; // MeV @@ -495,11 +510,11 @@ int main() { Eaft = E.lab_det_MC[iprt]; float fthk_bak_MC = thk_bak/cos(th.lab_MC[iprt]*d2r); fmass = mass[iprt]/u; - eoldzsub_etot_(&atom_num[iprt], &fmass, &Eaft, c, &unit_pressure, &pressure, + eoldzsub_etot_(&atom_num[iprt], &fmass, &Eaft, mat_bak, &unit_pressure, &pressure, &temperature, &unit_mgpcm2, &fthk_bak_MC, &Ebfr); Eaft = Ebfr; float fthk_mid_end_MC = (thk_tar/2.)/cos(th.lab_MC[iprt]*d2r); - eoldzsub_etot_(&atom_num[iprt], &fmass, &Eaft, lif, &unit_pressure, &pressure, + eoldzsub_etot_(&atom_num[iprt], &fmass, &Eaft, mat_tar, &unit_pressure, &pressure, &temperature, &unit_mgpcm2, &fthk_mid_end_MC, &Ebfr); // -> E.lab_MC[0,1] E.lab_MC[iprt] = Ebfr; // MeV @@ -548,9 +563,9 @@ int main() { cout << "Total number of events =" << ntot << endl; cout << "Done!" << endl; //return 0; - - theApp.Run(); + //theApp.Run(); + getchar(); return 0;