(i) make most internal checking functions in the msr handler private. (ii) improved checking of real Fourier for consistency.
This commit is contained in:
@ -316,14 +316,10 @@ Int_t PMsrHandler::ReadMsrFile()
|
|||||||
CheckLegacyLifetimecorrection(); // check if lifetimecorrection is found in RUN blocks, if yes transfer it to PLOT blocks
|
CheckLegacyLifetimecorrection(); // check if lifetimecorrection is found in RUN blocks, if yes transfer it to PLOT blocks
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if the given phases in the Fourier block are in agreement with the Plot block settings
|
if (result == PMUSR_SUCCESS) {
|
||||||
if ((fFourier.fPhase.size() > 1) && (fPlots.size() > 0)) {
|
if (!CheckRealFFT())
|
||||||
if (fFourier.fPhase.size() != fPlots[0].fRuns.size()) {
|
|
||||||
std::cerr << std::endl << ">> PMsrHandler::ReadMsrFile: **ERROR** if more than one phase is given in the Fourier block,";
|
|
||||||
std::cerr << std::endl << ">> it needs to correspond to the number of runs in the Plot block!" << std::endl;
|
|
||||||
result = PMUSR_MSR_SYNTAX_ERROR;
|
result = PMUSR_MSR_SYNTAX_ERROR;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// clean up
|
// clean up
|
||||||
fit_parameter.clear();
|
fit_parameter.clear();
|
||||||
@ -6070,7 +6066,7 @@ Bool_t PMsrHandler::CheckRunBlockIntegrity()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckUniquenessOfParamNames (public)
|
// CheckUniquenessOfParamNames (private)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Checks if all the fit parameters are unique. If not parX, parY will show
|
* <p>Checks if all the fit parameters are unique. If not parX, parY will show
|
||||||
@ -6102,7 +6098,7 @@ Bool_t PMsrHandler::CheckUniquenessOfParamNames(UInt_t &parX, UInt_t &parY)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckMaps (public)
|
// CheckMaps (private)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Checks if map entries found in the theory- or function-block are also
|
* <p>Checks if map entries found in the theory- or function-block are also
|
||||||
@ -6224,7 +6220,7 @@ Bool_t PMsrHandler::CheckMaps()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckFuncs (public)
|
// CheckFuncs (private)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Checks if fun entries found in the theory- and run-block are also
|
* <p>Checks if fun entries found in the theory- and run-block are also
|
||||||
@ -6319,7 +6315,7 @@ Bool_t PMsrHandler::CheckFuncs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckHistoGrouping (public)
|
// CheckHistoGrouping (private)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Checks if histogram grouping makes any sense.
|
* <p>Checks if histogram grouping makes any sense.
|
||||||
@ -6365,7 +6361,7 @@ Bool_t PMsrHandler::CheckHistoGrouping()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckAddRunParameters (public)
|
// CheckAddRunParameters (private)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>In case addrun is present check that if addt0's are given there are as many addt0's than addrun's.
|
* <p>In case addrun is present check that if addt0's are given there are as many addt0's than addrun's.
|
||||||
@ -6397,7 +6393,7 @@ Bool_t PMsrHandler::CheckAddRunParameters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckMaxLikelihood (public)
|
// CheckMaxLikelihood (private)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>If log max likelihood is requested, make sure that all run blocks are of single histogram type.
|
* <p>If log max likelihood is requested, make sure that all run blocks are of single histogram type.
|
||||||
@ -6421,7 +6417,7 @@ void PMsrHandler::CheckMaxLikelihood()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckRRFSettings (public)
|
// CheckRRFSettings (private)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Make sure that if RRF settings are found in the GLOBAL section, the fit types
|
* <p>Make sure that if RRF settings are found in the GLOBAL section, the fit types
|
||||||
@ -6517,6 +6513,48 @@ Bool_t PMsrHandler::CheckRRFSettings()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// CheckRealFFT (private)
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>Checks for FOURIER plot REAL, if all necessary parameters are given.
|
||||||
|
*
|
||||||
|
* @return true if all necessary parameters are given; false otherwise.
|
||||||
|
*/
|
||||||
|
Bool_t PMsrHandler::CheckRealFFT()
|
||||||
|
{
|
||||||
|
// check
|
||||||
|
if (fFourier.fPlotTag == FOURIER_PLOT_POWER)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
// check if the given phases in the Fourier block are in agreement with the Plot block settings
|
||||||
|
if ((fFourier.fPhase.size() > 1) && (fPlots.size() > 0)) {
|
||||||
|
if (fFourier.fPhase.size() != fPlots[0].fRuns.size()) {
|
||||||
|
std::cerr << std::endl << ">> PMsrHandler::ReadMsrFile: **ERROR** if more than one phase is given in the Fourier block,";
|
||||||
|
std::cerr << std::endl << ">> it needs to correspond to the number of runs in the Plot block!" << std::endl;
|
||||||
|
std::cerr << std::endl << ">> currently:";
|
||||||
|
std::cerr << std::endl << ">> number of runs in the PLOT block: " << fPlots[0].fRuns.size();
|
||||||
|
std::cerr << std::endl << ">> number of phases in the FOURIER block: " << fFourier.fPhase.size();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// make sure that FOURIER phases are defined
|
||||||
|
if ((fFourier.fPhase.size() == 0) && (fFourier.fPhaseParamNo.size() == 0)) {
|
||||||
|
std::cerr << std::endl << ">> PMsrHandler::ReadMsrFile: **ERROR** for FOURIER plot != POWER,";
|
||||||
|
std::cerr << std::endl << ">> phases need to be defined in the FOURIER block!";
|
||||||
|
std::cerr << std::endl << ">> Examples:";
|
||||||
|
std::cerr << std::endl << ">> phase parR7 par9 par13 par16";
|
||||||
|
std::cerr << std::endl << ">> where parR7 is the reference phase, and the others the relative phases.";
|
||||||
|
std::cerr << std::endl << ">> I.e. phase of run 2: parR7 + par9, etc.";
|
||||||
|
std::cerr << std::endl << ">> For further details see the docu.";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// GetGroupingString (public)
|
// GetGroupingString (public)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
@ -100,14 +100,6 @@ class PMsrHandler
|
|||||||
{ return fFuncHandler->Eval(i, map, param, metaData); }
|
{ return fFuncHandler->Eval(i, map, param, metaData); }
|
||||||
virtual UInt_t GetNoOfFitParameters(UInt_t idx);
|
virtual UInt_t GetNoOfFitParameters(UInt_t idx);
|
||||||
virtual Int_t ParameterInUse(UInt_t paramNo);
|
virtual Int_t ParameterInUse(UInt_t paramNo);
|
||||||
virtual Bool_t CheckRunBlockIntegrity();
|
|
||||||
virtual Bool_t CheckUniquenessOfParamNames(UInt_t &parX, UInt_t &parY);
|
|
||||||
virtual Bool_t CheckMaps();
|
|
||||||
virtual Bool_t CheckFuncs();
|
|
||||||
virtual Bool_t CheckHistoGrouping();
|
|
||||||
virtual Bool_t CheckAddRunParameters();
|
|
||||||
virtual Bool_t CheckRRFSettings();
|
|
||||||
virtual void CheckMaxLikelihood();
|
|
||||||
|
|
||||||
virtual void GetGroupingString(Int_t runNo, TString detector, TString &groupingStr);
|
virtual void GetGroupingString(Int_t runNo, TString detector, TString &groupingStr);
|
||||||
virtual Bool_t EstimateN0();
|
virtual Bool_t EstimateN0();
|
||||||
@ -170,6 +162,15 @@ class PMsrHandler
|
|||||||
virtual TString BeautifyFourierPhaseParameterString();
|
virtual TString BeautifyFourierPhaseParameterString();
|
||||||
|
|
||||||
virtual void CheckLegacyLifetimecorrection();
|
virtual void CheckLegacyLifetimecorrection();
|
||||||
|
virtual Bool_t CheckRunBlockIntegrity();
|
||||||
|
virtual Bool_t CheckUniquenessOfParamNames(UInt_t &parX, UInt_t &parY);
|
||||||
|
virtual Bool_t CheckMaps();
|
||||||
|
virtual Bool_t CheckFuncs();
|
||||||
|
virtual Bool_t CheckHistoGrouping();
|
||||||
|
virtual Bool_t CheckAddRunParameters();
|
||||||
|
virtual Bool_t CheckRRFSettings();
|
||||||
|
virtual Bool_t CheckRealFFT();
|
||||||
|
virtual void CheckMaxLikelihood();
|
||||||
|
|
||||||
virtual void HandleTheoryArguments(const TString theo, PStringVector &args);
|
virtual void HandleTheoryArguments(const TString theo, PStringVector &args);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user