fix the beta/fun bug in Asymmetry, Asymmetry RRF, and beta-NMR Asymmetry Fit.
Build and Deploy Documentation / build-and-deploy (push) Successful in 24s
Build and Deploy Documentation / build-and-deploy (push) Successful in 24s
This commit is contained in:
@@ -1345,7 +1345,7 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const std::string &
|
||||
}
|
||||
}
|
||||
tempPar = msrRunList->at(i).GetAlphaParamNo();
|
||||
if (tempPar > 0) {
|
||||
if ((tempPar > 0) && (tempPar < MSR_PARAM_FUN_OFFSET)) { // if alpha is given by a function we do not have to care about it here!
|
||||
if (msrParamList->at(tempPar-1).fIsGlobal) { // alpha of RUN block i is global
|
||||
msrRunList->at(i).SetParGlobal(alpha, 1);
|
||||
} else {
|
||||
@@ -1353,7 +1353,7 @@ bool PMsr2Data::PrepareGlobalInputFile(unsigned int tempRun, const std::string &
|
||||
}
|
||||
}
|
||||
tempPar = msrRunList->at(i).GetBetaParamNo();
|
||||
if (tempPar > 0) {
|
||||
if ((tempPar > 0) && (tempPar < MSR_PARAM_FUN_OFFSET)) { // if beta is given by a function we do not have to care about it here!
|
||||
if (msrParamList->at(tempPar-1).fIsGlobal) { // beta of RUN block i is global
|
||||
msrRunList->at(i).SetParGlobal(beta, 1);
|
||||
} else {
|
||||
|
||||
@@ -161,6 +161,15 @@ PRunAsymmetry::PRunAsymmetry(PMsrHandler *msrInfo, PRunDataHandler *rawData, UIn
|
||||
Bool_t betaFixedToOne = false;
|
||||
if (fRunInfo->GetBetaParamNo() == -1) { // no beta given hence assuming beta == 1
|
||||
betaFixedToOne = true;
|
||||
} else if (fRunInfo->GetBetaParamNo() >= MSR_PARAM_FUN_OFFSET) { // beta seems to be a function
|
||||
if ((fRunInfo->GetBetaParamNo()-MSR_PARAM_FUN_OFFSET < 0) ||
|
||||
(fRunInfo->GetBetaParamNo()-MSR_PARAM_FUN_OFFSET > msrInfo->GetNoOfFuncs())) {
|
||||
std::cerr << std::endl << ">> PRunAsymmetry::PRunAsymmetry(): **ERROR** beta parameter is a function with no = " << fRunInfo->GetBetaParamNo();
|
||||
std::cerr << std::endl << ">> This is out of bound, since there are only " << msrInfo->GetNoOfFuncs() << " functions.";
|
||||
std::cerr << std::endl;
|
||||
fValid = false;
|
||||
return;
|
||||
}
|
||||
} else if ((fRunInfo->GetBetaParamNo() < 0) || (fRunInfo->GetBetaParamNo() > static_cast<Int_t>(param->size()))) { // check if beta parameter is within proper bounds
|
||||
std::cerr << std::endl << ">> PRunAsymmetry::PRunAsymmetry(): **ERROR** beta parameter no = " << fRunInfo->GetBetaParamNo();
|
||||
std::cerr << std::endl << ">> This is out of bound, since there are only " << param->size() << " parameters.";
|
||||
|
||||
@@ -136,6 +136,15 @@ PRunAsymmetryBNMR::PRunAsymmetryBNMR(PMsrHandler *msrInfo, PRunDataHandler *rawD
|
||||
// fValid = false;
|
||||
// return;
|
||||
alphaSetDefault = true;
|
||||
} else if (fRunInfo->GetAlphaParamNo() >= MSR_PARAM_FUN_OFFSET) { // alpha seems to be a function
|
||||
if ((fRunInfo->GetAlphaParamNo()-MSR_PARAM_FUN_OFFSET < 0) ||
|
||||
(fRunInfo->GetAlphaParamNo()-MSR_PARAM_FUN_OFFSET > msrInfo->GetNoOfFuncs())) {
|
||||
std::cerr << std::endl << ">> PRunAsymmetryBNMR::PRunAsymmetryBNMR(): **ERROR** alpha parameter is a function with no = " << fRunInfo->GetAlphaParamNo();
|
||||
std::cerr << std::endl << ">> This is out of bound, since there are only " << msrInfo->GetNoOfFuncs() << " functions.";
|
||||
std::cerr << std::endl;
|
||||
fValid = false;
|
||||
return;
|
||||
}
|
||||
} else if ((fRunInfo->GetAlphaParamNo() < 0) || (fRunInfo->GetAlphaParamNo() > (Int_t)param->size())) { // check if alpha parameter is within proper bounds
|
||||
std::cerr << std::endl << ">> PRunAsymmetryBNMR::PRunAsymmetryBNMR(): **ERROR** alpha parameter no = " << fRunInfo->GetAlphaParamNo();
|
||||
std::cerr << std::endl << ">> This is out of bound, since there are only " << param->size() << " parameters.";
|
||||
@@ -147,11 +156,20 @@ PRunAsymmetryBNMR::PRunAsymmetryBNMR(PMsrHandler *msrInfo, PRunDataHandler *rawD
|
||||
((*param)[fRunInfo->GetAlphaParamNo()-1].fValue == 1.0))
|
||||
alphaFixedToOne = true;
|
||||
}
|
||||
|
||||
|
||||
// check if beta is given
|
||||
Bool_t betaFixedToOne = false;
|
||||
if (fRunInfo->GetBetaParamNo() == -1) { // no beta given hence assuming beta == 1
|
||||
betaFixedToOne = true;
|
||||
} else if (fRunInfo->GetBetaParamNo() >= MSR_PARAM_FUN_OFFSET) { // beta seems to be a function
|
||||
if ((fRunInfo->GetBetaParamNo()-MSR_PARAM_FUN_OFFSET < 0) ||
|
||||
(fRunInfo->GetBetaParamNo()-MSR_PARAM_FUN_OFFSET > msrInfo->GetNoOfFuncs())) {
|
||||
std::cerr << std::endl << ">> PRunAsymmetryBNMR::PRunAsymmetryBNMR(): **ERROR** beta parameter is a function with no = " << fRunInfo->GetBetaParamNo();
|
||||
std::cerr << std::endl << ">> This is out of bound, since there are only " << msrInfo->GetNoOfFuncs() << " functions.";
|
||||
std::cerr << std::endl;
|
||||
fValid = false;
|
||||
return;
|
||||
}
|
||||
} else if ((fRunInfo->GetBetaParamNo() < 0) || (fRunInfo->GetBetaParamNo() > (Int_t)param->size())) { // check if beta parameter is within proper bounds
|
||||
std::cerr << std::endl << ">> PRunAsymmetryBNMR::PRunAsymmetryBNMR(): **ERROR** beta parameter no = " << fRunInfo->GetBetaParamNo();
|
||||
std::cerr << std::endl << ">> This is out of bound, since there are only " << param->size() << " parameters.";
|
||||
|
||||
@@ -128,7 +128,16 @@ PRunAsymmetryRRF::PRunAsymmetryRRF(PMsrHandler *msrInfo, PRunDataHandler *rawDat
|
||||
return;
|
||||
}
|
||||
// check if alpha parameter is within proper bounds
|
||||
if ((fRunInfo->GetAlphaParamNo() < 0) || (fRunInfo->GetAlphaParamNo() > static_cast<Int_t>(param->size()))) {
|
||||
if (fRunInfo->GetAlphaParamNo() >= MSR_PARAM_FUN_OFFSET) { // alpha seems to be a function
|
||||
if ((fRunInfo->GetAlphaParamNo()-MSR_PARAM_FUN_OFFSET < 0) ||
|
||||
(fRunInfo->GetAlphaParamNo()-MSR_PARAM_FUN_OFFSET > msrInfo->GetNoOfFuncs())) {
|
||||
std::cerr << std::endl << ">> PRunAsymmetryRRF::PRunAsymmetryRRF(): **ERROR** alpha parameter is a function with no = " << fRunInfo->GetAlphaParamNo();
|
||||
std::cerr << std::endl << ">> This is out of bound, since there are only " << msrInfo->GetNoOfFuncs() << " functions.";
|
||||
std::cerr << std::endl;
|
||||
fValid = false;
|
||||
return;
|
||||
}
|
||||
} else if ((fRunInfo->GetAlphaParamNo() < 0) || (fRunInfo->GetAlphaParamNo() > static_cast<Int_t>(param->size()))) {
|
||||
std::cerr << std::endl << ">> PRunAsymmetryRRF::PRunAsymmetryRRF(): **ERROR** alpha parameter no = " << fRunInfo->GetAlphaParamNo();
|
||||
std::cerr << std::endl << ">> This is out of bound, since there are only " << param->size() << " parameters.";
|
||||
std::cerr << std::endl;
|
||||
@@ -137,14 +146,25 @@ PRunAsymmetryRRF::PRunAsymmetryRRF(PMsrHandler *msrInfo, PRunDataHandler *rawDat
|
||||
}
|
||||
// check if alpha is fixed
|
||||
Bool_t alphaFixedToOne = false;
|
||||
if (((*param)[fRunInfo->GetAlphaParamNo()-1].fStep == 0.0) &&
|
||||
((*param)[fRunInfo->GetAlphaParamNo()-1].fValue == 1.0))
|
||||
alphaFixedToOne = true;
|
||||
if (fRunInfo->GetAlphaParamNo() < MSR_PARAM_FUN_OFFSET) { // alpha is a parameter
|
||||
if (((*param)[fRunInfo->GetAlphaParamNo()-1].fStep == 0.0) &&
|
||||
((*param)[fRunInfo->GetAlphaParamNo()-1].fValue == 1.0))
|
||||
alphaFixedToOne = true;
|
||||
}
|
||||
|
||||
// check if beta is given
|
||||
Bool_t betaFixedToOne = false;
|
||||
if (fRunInfo->GetBetaParamNo() == -1) { // no beta given hence assuming beta == 1
|
||||
betaFixedToOne = true;
|
||||
} else if (fRunInfo->GetBetaParamNo() >= MSR_PARAM_FUN_OFFSET) { // beta seems to be a function
|
||||
if ((fRunInfo->GetBetaParamNo()-MSR_PARAM_FUN_OFFSET < 0) ||
|
||||
(fRunInfo->GetBetaParamNo()-MSR_PARAM_FUN_OFFSET > msrInfo->GetNoOfFuncs())) {
|
||||
std::cerr << std::endl << ">> PRunAsymmetryRRF::PRunAsymmetryRRF(): **ERROR** beta parameter is a function with no = " << fRunInfo->GetBetaParamNo();
|
||||
std::cerr << std::endl << ">> This is out of bound, since there are only " << msrInfo->GetNoOfFuncs() << " functions.";
|
||||
std::cerr << std::endl;
|
||||
fValid = false;
|
||||
return;
|
||||
}
|
||||
} else if ((fRunInfo->GetBetaParamNo() < 0) || (fRunInfo->GetBetaParamNo() > static_cast<Int_t>(param->size()))) { // check if beta parameter is within proper bounds
|
||||
std::cerr << std::endl << ">> PRunAsymmetryRRF::PRunAsymmetryRRF(): **ERROR** beta parameter no = " << fRunInfo->GetBetaParamNo();
|
||||
std::cerr << std::endl << ">> This is out of bound, since there are only " << param->size() << " parameters.";
|
||||
|
||||
Reference in New Issue
Block a user