From fbcd90736a27a949c9d837bf18e6b33ad1c55dcf Mon Sep 17 00:00:00 2001 From: "Ryan@Home" Date: Thu, 4 Jul 2024 20:46:22 -0400 Subject: [PATCH] fixed SimTransfer when no DWBA match with ReactionConfig.txt --- .vscode/c_cpp_properties.json | 2 +- Cleopatra/SimTransfer.C | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 14f6ac7..8ca9a6b 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -29,7 +29,7 @@ "name": "WinLinux", "includePath": [ "${workspaceFolder}/**", - "/home/ryan/Downloads/root/include/**" + "/home/ryan/root_v6.30.06/include/**" ], "defines": [], "compilerPath": "/usr/bin/gcc", diff --git a/Cleopatra/SimTransfer.C b/Cleopatra/SimTransfer.C index fce53e7..a7b68ca 100644 --- a/Cleopatra/SimTransfer.C +++ b/Cleopatra/SimTransfer.C @@ -95,10 +95,13 @@ void Transfer( TMacro dwbaExList_Used; TMacro dwbaReactList_Used; + + bool useDWBA[numTransfer]; if( distFile->IsOpen() ) { printf("\e[32m#################################### Load DWBA input : %s \e[0m\n", ptolemyRoot.Data()); - printf("--------- Found DWBA thetaCM distributions. Use the ExList from DWBA.\n"); + printf("--------- Found DWBA thetaCM distributions.\n"); + printf(" Checking DWBA matches withe %s.\n", basicConfig.c_str()); distList = (TObjArray *) distFile->FindObjectAny("thetaCM_TF1"); // the function List dwbaExList = (TMacro *) distFile->FindObjectAny("ExList"); @@ -133,8 +136,10 @@ void Transfer( 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); } + useDWBA[i] = true; }else{ printf("Cannot match %s with DWBA, use Reaction Ex List\n", transfer[i].GetReactionName().Data()); + useDWBA[i] = false; } } @@ -520,7 +525,7 @@ void Transfer( // } //==== Calculate thetaCM, phiCM - if( distFile->IsOpen()){ + if( distFile->IsOpen() && useDWBA[rID] ){ angDist = (TF1 *) distList->At(ExID); thetaCM = angDist->GetRandom() / 180. * TMath::Pi(); }else{