fixed SimTransfer when no DWBA match with ReactionConfig.txt
This commit is contained in:
parent
41c475918b
commit
fbcd90736a
2
.vscode/c_cpp_properties.json
vendored
2
.vscode/c_cpp_properties.json
vendored
|
@ -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",
|
||||
|
|
|
@ -96,9 +96,12 @@ 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{
|
||||
|
|
Loading…
Reference in New Issue
Block a user