diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..bf54090 Binary files /dev/null and b/.DS_Store differ diff --git a/Armory/.DS_Store b/Armory/.DS_Store new file mode 100644 index 0000000..dda6d32 Binary files /dev/null and b/Armory/.DS_Store differ diff --git a/Armory/AnasenMS.dSYM/Contents/Info.plist b/Armory/AnasenMS.dSYM/Contents/Info.plist new file mode 100644 index 0000000..c58285d --- /dev/null +++ b/Armory/AnasenMS.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.AnasenMS + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Armory/AnasenMS.dSYM/Contents/Resources/Relocations/aarch64/AnasenMS.yml b/Armory/AnasenMS.dSYM/Contents/Resources/Relocations/aarch64/AnasenMS.yml new file mode 100644 index 0000000..7341803 --- /dev/null +++ b/Armory/AnasenMS.dSYM/Contents/Resources/Relocations/aarch64/AnasenMS.yml @@ -0,0 +1,5 @@ +--- +triple: 'arm64-apple-darwin' +binary-path: AnasenMS +relocations: [] +... diff --git a/Armory/Makefile b/Armory/Makefile index 31a4ecf..dab515d 100644 --- a/Armory/Makefile +++ b/Armory/Makefile @@ -1,40 +1,74 @@ ######################################################################## -# -# -######################################################################### +# Cross-platform Makefile (macOS + Linux) +######################################################################## -CC = g++ +UNAME_S := $(shell uname -s) -#COPTS = -fPIC -DLINUX -O2 -std=c++17 -lpthread -COPTS = -fPIC -DLINUX -g -O0 -Wall -std=c++17 -lpthread +######################################################################## +# Defaults +######################################################################## -ROOTCFLAGS := $(shell root-config --cflags) -ROOTLIBS := $(shell root-config --libs) +ifeq ($(UNAME_S),Darwin) + +######################################################################## +# macOS (Homebrew + Apple Clang) +######################################################################## + +SDKROOT := $(shell xcrun --show-sdk-path) + +CXX := clang++ + +ROOTCFLAGS := $(shell root-config --cflags | sed 's/-stdlib=libc++//g') +ROOTLIBS := $(shell root-config --libs | sed 's/-stdlib=libc++//g') + +CXXFLAGS := -g -O0 -Wall -std=c++17 -fPIC +CXXFLAGS += $(ROOTCFLAGS) +CXXFLAGS += -isysroot $(SDKROOT) +CXXFLAGS += -I$(SDKROOT)/usr/include/c++/v1 + +LDFLAGS := $(shell root-config --glibs) -lGeom -lEve -lGui + +else + +######################################################################## +# Linux (system g++) +######################################################################## CXX := g++ -CXXFLAGS := -O2 $(ROOTCFLAGS) -ALL = Mapper EventBuilder#AnasenMS +COPTS := -fPIC -DLINUX -g -O0 -Wall -std=c++17 -pthread -######################################################################### +ROOTCFLAGS := $(shell root-config --cflags) +ROOTLIBS := $(shell root-config --libs) -all : $(ALL) +CXXFLAGS := $(COPTS) $(ROOTCFLAGS) +LDFLAGS := $(ROOTLIBS) -lGeom -lEve -lGui -clean : - /bin/rm -f $(OBJS) $(ALL) +endif -Mapper : Mapper.cpp ../mapping.h ClassDet.h - @echo "--------- making Mapper" - $(CC) $(COPTS) $(ROOTCFLAGS) -o Mapper Mapper.cpp $(ROOTLIBS) +######################################################################## +# Targets +######################################################################## -AnasenMS : constant.h Isotope.h ClassTransfer.h ClassSX3.h ClassPW.h ClassAnasen.h anasenMS.cpp - @echo "--------- making ANASEN Monte Carlo" - $(CC) $(COPTS) $(ROOTCFLAGS) -o AnasenMS anasenMS.cpp $(ROOTLIBS) -lEve -lGui -lGeom +ALL = Mapper EventBuilder AnasenMS -EventBuilder : EventBuilder.cpp ClassData.h fsuReader.h Hit.h - @echo "--------- making EventBuilder" - $(CC) $(COPTS) -o EventBuilder EventBuilder.cpp $(ROOTLIBS) +all: $(ALL) -#anasenMS: anasenMS.cpp -# $(CXX) $(CXXFLAGS) anasenMS.cpp -o anasenMS $(ROOTLIBS) +clean: + /bin/rm -f $(ALL) +######################################################################## +# Build rules +######################################################################## + +Mapper: Mapper.cpp ../mapping.h ClassDet.h + @echo "--------- making Mapper" + $(CXX) $(CXXFLAGS) Mapper.cpp -o Mapper $(LDFLAGS) + +EventBuilder: EventBuilder.cpp ClassData.h fsuReader.h Hit.h + @echo "--------- making EventBuilder" + $(CXX) $(CXXFLAGS) EventBuilder.cpp -o EventBuilder $(LDFLAGS) + +AnasenMS: anasenMS.cpp constant.h Isotope.h ClassTransfer.h ClassSX3.h ClassPW.h ClassAnasen.h + @echo "--------- making ANASEN Monte Carlo" + $(CXX) $(CXXFLAGS) anasenMS.cpp -o AnasenMS $(LDFLAGS) \ No newline at end of file diff --git a/Armory/Mapper.dSYM/Contents/Info.plist b/Armory/Mapper.dSYM/Contents/Info.plist new file mode 100644 index 0000000..320a174 --- /dev/null +++ b/Armory/Mapper.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.Mapper + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Armory/Mapper.dSYM/Contents/Resources/Relocations/aarch64/Mapper.yml b/Armory/Mapper.dSYM/Contents/Resources/Relocations/aarch64/Mapper.yml new file mode 100644 index 0000000..29e4f66 --- /dev/null +++ b/Armory/Mapper.dSYM/Contents/Resources/Relocations/aarch64/Mapper.yml @@ -0,0 +1,5 @@ +--- +triple: 'arm64-apple-darwin' +binary-path: Mapper +relocations: [] +... diff --git a/Armory/anasenMS.cpp b/Armory/anasenMS.cpp index 25b344d..564c4dc 100644 --- a/Armory/anasenMS.cpp +++ b/Armory/anasenMS.cpp @@ -45,7 +45,7 @@ bool IsDeadSX3(int id){ return dead.count(id); } -static std::set> ReactionProductb = { {1,1} }; // add reaction product b (light particle) A,Z pairs here, e.g. {1,1} for proton, {4,2} for alpha +static std::set> ReactionProductb = { {4,2} }; // add reaction product b (light particle) A,Z pairs here, e.g. {1,1} for proton, {4,2} for alpha int main(int argc, char **argv){ @@ -88,7 +88,7 @@ int main(int argc, char **argv){ transfer.SetIncidentEnergyAngle((42.82/14.0), 0, 0); // arguments are KEA in MeV/u, theta and phi in degree transfer.Seta( 4, 2); // identify reaction product a in internal indexing e.g., 4He (alpha) transfer.Setb(ReactionProductb.begin()->first, ReactionProductb.begin()->second); // identify reaction product b e.g., 1H (proton) - transfer.SetB(17, 8); // identify reaction product B e.g., 23Na (Z=11) + transfer.SetB(14, 7); // identify reaction product B e.g., 23Na (Z=11) // TODO add alpha source or alternative reaction channel selection diff --git a/ELoss/.DS_Store b/ELoss/.DS_Store new file mode 100644 index 0000000..82df7d9 Binary files /dev/null and b/ELoss/.DS_Store differ