diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index aa4d4fd..14f6ac7 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -4,12 +4,9 @@ "name": "Mac", "includePath": [ "${workspaceFolder}/**", - "/Applications/root_v6.28.02/include/**" + "/Applications/root_v6.30.06/include/**" ], "defines": [], - "macFrameworkPath": [ - "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks" - ], "compilerPath": "/usr/bin/g++", "cStandard": "c17", "cppStandard": "c++17", diff --git a/Cleopatra/ClassDecay.h b/Cleopatra/ClassDecay.h index 47bb6dd..7aefb40 100644 --- a/Cleopatra/ClassDecay.h +++ b/Cleopatra/ClassDecay.h @@ -168,7 +168,8 @@ Decay::Decay(){ dTheta = TMath::QuietNaN(); isMotherSet = false; - f1 = new TF1("f1", "(1+ROOT::Math::legendre(2,x))/2.", -1, 1); + // f1 = new TF1("f1", "(1+ROOT::Math::legendre(2,x))/2.", -1, 1); //need to compile ROOT with -Dmathmore=ON + f1 = new TF1("f1", "sin(x)", -1, 1); } Decay::~Decay(){ diff --git a/Cleopatra/Cleopatra.C b/Cleopatra/Cleopatra.C index 9c9a646..8649b09 100644 --- a/Cleopatra/Cleopatra.C +++ b/Cleopatra/Cleopatra.C @@ -77,9 +77,14 @@ int main (int argc, char *argv[]) { //TODO add angle range InFileCreator( readFile, ptolemyInFileName, angMin, angMax, angStep); //================= run ptolemy - std::string ptolemyOutFileName = ptolemyInFileName + ".out"; + std::string ptolemyOutFileName = argv[1]; + ptolemyOutFileName += ".out"; std::ostringstream commandStream; - commandStream << "../Cleopatra/ptolemy <" << ptolemyInFileName << " " << ptolemyOutFileName; + #if defined(__linux__) + commandStream << "../Cleopatra/ptolemy <" << ptolemyInFileName << "> " << ptolemyOutFileName; + #elif defined(__APPLE__) && defined(__MACH__) + commandStream << "../Cleopatra/ptolemy_mac <" << ptolemyInFileName << "> " << ptolemyOutFileName; + #endif std::string command = commandStream.str(); printf("=================== Run Ptolemy\n"); diff --git a/Cleopatra/SimTransfer.C b/Cleopatra/SimTransfer.C index 86adc4f..fce53e7 100644 --- a/Cleopatra/SimTransfer.C +++ b/Cleopatra/SimTransfer.C @@ -19,8 +19,6 @@ #include "ClassTransfer.h" #include "ClassHelios.h" - - void PrintEZPlotPara(TransferReaction tran, HELIOS helios){ printf("==================================== E-Z plot slope\n"); @@ -33,7 +31,6 @@ void PrintEZPlotPara(TransferReaction tran, HELIOS helios){ printf(" e-z slope : %f MeV/mm\n", slope); // double intercept = q/gamma - mb; // MeV // printf(" e-z intercept (ground state) : %f MeV\n", intercept); - } void Transfer( @@ -110,7 +107,8 @@ void Transfer( int numEx = dwbaExList->GetListOfLines()->GetSize() - 1 ; - for( int i = 0; i < numTransfer; i++){ transfer[i].GetExList()->Clear(); } + // for( int i = 0; i < numTransfer; i++){ transfer[i].GetExList()->Clear(); } + ExcitedEnergies dwbaExTemp[numTransfer]; for( int i = 1; i <= numEx ; i++){ //Check DWBA reaction is same as transfer setting @@ -123,11 +121,23 @@ void Transfer( dwbaExList_Used.AddLine(temp.c_str()); if( temp[0] == '/' ) continue; std::vector tempStr = AnalysisLib::SplitStr(temp, " "); - transfer[j].GetExList()->Add( atof(tempStr[0].c_str()), atof(tempStr[1].c_str()), 1.0, 0.00); + // transfer[j].GetExList()->Add( atof(tempStr[0].c_str()), atof(tempStr[1].c_str()), 1.0, 0.00); + dwbaExTemp[j].Add( atof(tempStr[0].c_str()), atof(tempStr[1].c_str()), 1.0, 0.00); } } } + for( int i = 0; i < numTransfer; i++ ){ + if( dwbaExTemp[i].ExList.size() > 0 ) { + transfer[i].GetExList()->Clear(); + for( size_t j = 0 ; dwbaExTemp[i].ExList.size(); j ++ ){ + transfer[i].GetExList()->Add( dwbaExTemp[i].ExList[j].Ex, dwbaExTemp[i].ExList[j].xsec, 1.0, 0.00); + } + }else{ + printf("Cannot match %s with DWBA, use Reaction Ex List\n", transfer[i].GetReactionName().Data()); + } + } + }else{ printf("------- no DWBA input. Use the ExList from %s\n", basicConfig.c_str()); } diff --git a/Cleopatra/makefile b/Cleopatra/makefile index af05a8f..82e4473 100644 --- a/Cleopatra/makefile +++ b/Cleopatra/makefile @@ -1,38 +1,41 @@ -CC=g++ +CC = g++ +CFLAG = -O2 + +depend = ClassTransfer.h ClassHelios.h ClassIsotope.h ClassDecay.h constant.h potentials.h ALL = Isotope InFileCreator ExtractXSec ExtractXSecFromText PlotTGraphTObjArray Cleopatra FindThetaCM SimTransfer SimTransfer_single SimAlpha all: $(ALL) Isotope: ClassIsotope.h Isotope.C - $(CC) Isotope.C -o Isotope + $(CC) $(CFLAG) Isotope.C -o Isotope -InFileCreator: InFileCreator.C InFileCreator.h ClassIsotope.h constant.h potentials.h - $(CC) InFileCreator.C -o InFileCreator `root-config --cflags --glibs` +InFileCreator: InFileCreator.C InFileCreator.h $(depend) + $(CC) $(CFLAG) InFileCreator.C -o InFileCreator `root-config --cflags --glibs` ExtractXSec: ExtractXSec.C ExtractXSec.h - $(CC) ExtractXSec.C -o ExtractXSec `root-config --cflags --glibs` + $(CC) $(CFLAG) ExtractXSec.C -o ExtractXSec `root-config --cflags --glibs` ExtractXSecFromText: ExtractXSecFromText.C ExtractXSec.h - $(CC) ExtractXSecFromText.C -o ExtractXSecFromText `root-config --cflags --glibs` + $(CC) $(CFLAG) ExtractXSecFromText.C -o ExtractXSecFromText `root-config --cflags --glibs` PlotTGraphTObjArray: PlotTGraphTObjArray.C PlotTGraphTObjArray.h - $(CC) PlotTGraphTObjArray.C -o PlotTGraphTObjArray `root-config --cflags --glibs` + $(CC) $(CFLAG) PlotTGraphTObjArray.C -o PlotTGraphTObjArray `root-config --cflags --glibs` Cleopatra: Cleopatra.C InFileCreator.h ExtractXSec.h - $(CC) Cleopatra.C -o Cleopatra `root-config --cflags --glibs` + $(CC) $(CFLAG) Cleopatra.C -o Cleopatra `root-config --cflags --glibs` -FindThetaCM: FindThetaCM.C FindThetaCM.h ClassTransfer.h ClassHelios.h ClassIsotope.h constant.h - $(CC) FindThetaCM.C -o FindThetaCM `root-config --cflags --glibs` +FindThetaCM: FindThetaCM.C FindThetaCM.h $(depend) + $(CC) $(CFLAG) FindThetaCM.C -o FindThetaCM `root-config --cflags --glibs` -SimTransfer: SimTransfer.C ClassTransfer.h ClassHelios.h ClassIsotope.h constant.h - $(CC) SimTransfer.C -o SimTransfer `root-config --cflags --glibs` +SimTransfer: SimTransfer.C ClassTransfer.h $(depend) ../Armory/ClassReactionConfig.h ../Armory/ClassDetGeo.h + $(CC) $(CFLAG) SimTransfer.C -o SimTransfer `root-config --cflags --glibs` -SimTransfer_single: SimTransfer_single.C ClassTransfer.h ClassHelios.h ClassIsotope.h constant.h ../Armory/ClassReactionConfig.h ../Armory/ClassDetGeo.h - $(CC) SimTransfer_single.C -o SimTransfer_single `root-config --cflags --glibs` +SimTransfer_single: SimTransfer_single.C $(depend) ../Armory/ClassReactionConfig.h ../Armory/ClassDetGeo.h + $(CC) $(CFLAG) SimTransfer_single.C -o SimTransfer_single `root-config --cflags --glibs` SimAlpha: SimAlpha.C ClassHelios.h - $(CC) SimAlpha.C -o SimAlpha `root-config --cflags --glibs` + $(CC) $(CFLAG) SimAlpha.C -o SimAlpha `root-config --cflags --glibs` clean: /bin/rm -f $(ALL) \ No newline at end of file diff --git a/Cleopatra/test.C b/Cleopatra/test.C deleted file mode 100644 index f1ed7e5..0000000 --- a/Cleopatra/test.C +++ /dev/null @@ -1,17 +0,0 @@ -#include "ClassHelios.h" - -void test() { - - // HELIOS helios("../working/detectorGeo.txt", 1); - // helios.GetDetectorGeometry().Print(true); - - std::vector ID; - { - DetGeo temp("../working/detectorGeo.txt"); - for( size_t i = 0; i < temp.array.size(); i++ ){ - if( temp.array[i].enable ) ID.push_back(i); - } - } - const unsigned short numID = ID.size(); - -} \ No newline at end of file diff --git a/working/DWBA b/working/DWBA index 1051877..d3986eb 100644 --- a/working/DWBA +++ b/working/DWBA @@ -45,6 +45,6 @@ #36Ar(d,a)34Cl 0 4L=2 3+ 0.000 8MeV/u As # (d,a) reaction -32Si(d,p)33Si 0 1s1/2 1/2+ 0.000 10MeV/u AK -32Si(d,p)33Si 0 0d5/2 5/2+ 0.197 10MeV/u AK -32Si(d,3He)31Al 0 0d5/2 5/2+ 0.000 10MeV/u Ax +30Si(d,p)31Si 0 1s1/2 1/2+ 0.000 10MeV/u AK +# 32Si(d,p)33Si 0 0d5/2 5/2+ 0.197 10MeV/u AK +# 32Si(d,3He)31Al 0 0d5/2 5/2+ 0.000 10MeV/u Ax