implemented compact detector grouping in musrview
This commit is contained in:
parent
ad14d62117
commit
b7418623e5
@ -4502,7 +4502,7 @@ void PMsrHandler::FillParameterInUse(PMsrLines &theory, PMsrLines &funcs, PMsrLi
|
|||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckRunBlockIntegrity (private)
|
// CheckRunBlockIntegrity (public)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Checks the consistency of each RUN block, i.e. are the necessary parameters
|
* <p>Checks the consistency of each RUN block, i.e. are the necessary parameters
|
||||||
@ -4646,7 +4646,7 @@ Bool_t PMsrHandler::CheckRunBlockIntegrity()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckUniquenessOfParamNames (private)
|
// CheckUniquenessOfParamNames (public)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <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
|
||||||
@ -4678,7 +4678,7 @@ Bool_t PMsrHandler::CheckUniquenessOfParamNames(UInt_t &parX, UInt_t &parY)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckMaps (private)
|
// CheckMaps (public)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <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
|
||||||
@ -4788,7 +4788,7 @@ Bool_t PMsrHandler::CheckMaps()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckFuncs (private)
|
// CheckFuncs (public)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <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
|
||||||
@ -4880,7 +4880,7 @@ Bool_t PMsrHandler::CheckFuncs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckHistoGrouping (private)
|
// CheckHistoGrouping (public)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <p>Checks if histogram grouping makes any sense.
|
* <p>Checks if histogram grouping makes any sense.
|
||||||
@ -4935,7 +4935,7 @@ Bool_t PMsrHandler::CheckHistoGrouping()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckAddRunParameters (private)
|
// CheckAddRunParameters (public)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <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.
|
||||||
@ -4967,7 +4967,7 @@ Bool_t PMsrHandler::CheckAddRunParameters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// CheckMaxLikelihood (private)
|
// CheckMaxLikelihood (public)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* <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.
|
||||||
@ -4989,6 +4989,36 @@ void PMsrHandler::CheckMaxLikelihood()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
// GetGroupingString (public)
|
||||||
|
//--------------------------------------------------------------------------
|
||||||
|
/**
|
||||||
|
* <p>returns the forward/backward grouping string.
|
||||||
|
*
|
||||||
|
* \param runNo msr-file run block number
|
||||||
|
* \param detector tag telling which set to be used. Possible are: 'forward' and 'backward'
|
||||||
|
* \param groupingStr compressed grouping information.
|
||||||
|
*/
|
||||||
|
void PMsrHandler::GetGroupingString(Int_t runNo, TString detector, TString &groupingStr)
|
||||||
|
{
|
||||||
|
PIntVector grouping;
|
||||||
|
|
||||||
|
if (!detector.CompareTo("forward", TString::kIgnoreCase)) {
|
||||||
|
for (UInt_t i=0; i<fRuns[runNo].GetForwardHistoNoSize(); i++)
|
||||||
|
grouping.push_back(fRuns[runNo].GetForwardHistoNo(i));
|
||||||
|
MakeDetectorGroupingString("forward", grouping, groupingStr, false);
|
||||||
|
} else if (!detector.CompareTo("backward", TString::kIgnoreCase)) {
|
||||||
|
for (UInt_t i=0; i<fRuns[runNo].GetBackwardHistoNoSize(); i++)
|
||||||
|
grouping.push_back(fRuns[runNo].GetBackwardHistoNo(i));
|
||||||
|
MakeDetectorGroupingString("backward", grouping, groupingStr, false);
|
||||||
|
} else {
|
||||||
|
groupingStr = "**ERROR** unkown detector. Allow forward/backward.";
|
||||||
|
}
|
||||||
|
|
||||||
|
// clean up
|
||||||
|
grouping.clear();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
// NeededPrecision (private)
|
// NeededPrecision (private)
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
@ -5152,13 +5182,18 @@ Bool_t PMsrHandler::ParseDetectorGrouping(TString str, PIntVector &group)
|
|||||||
*
|
*
|
||||||
* \param str 'forward' or 'backward'
|
* \param str 'forward' or 'backward'
|
||||||
* \param group detector grouping vector to be encoded
|
* \param group detector grouping vector to be encoded
|
||||||
* \param result encoded dtector grouping string
|
* \param result encoded detector grouping string
|
||||||
|
* \param includeDetector if true, the detector information is included
|
||||||
*/
|
*/
|
||||||
void PMsrHandler::MakeDetectorGroupingString(TString str, PIntVector &group, TString &result)
|
void PMsrHandler::MakeDetectorGroupingString(TString str, PIntVector &group, TString &result, Bool_t includeDetector)
|
||||||
{
|
{
|
||||||
result = str + TString(" ");
|
if (includeDetector) {
|
||||||
if (str == TString("forward"))
|
result = str + TString(" ");
|
||||||
result += " ";
|
if (str == TString("forward"))
|
||||||
|
result += " ";
|
||||||
|
} else {
|
||||||
|
str = "";
|
||||||
|
}
|
||||||
|
|
||||||
UInt_t i=0, j=0;
|
UInt_t i=0, j=0;
|
||||||
do {
|
do {
|
||||||
|
@ -705,25 +705,19 @@ void PMusrCanvas::UpdateInfoPad()
|
|||||||
// histo info (depending on the fittype
|
// histo info (depending on the fittype
|
||||||
if (runs[runNo].GetFitType() == MSR_FITTYPE_SINGLE_HISTO) {
|
if (runs[runNo].GetFitType() == MSR_FITTYPE_SINGLE_HISTO) {
|
||||||
tstr += TString("h:");
|
tstr += TString("h:");
|
||||||
tstr += runs[runNo].GetForwardHistoNo();
|
TString grouping;
|
||||||
for (UInt_t j=1; j<runs[runNo].GetForwardHistoNoSize(); j++) {
|
fMsrHandler->GetGroupingString(runNo, "forward", grouping);
|
||||||
tstr += TString("+");
|
tstr += grouping;
|
||||||
tstr += runs[runNo].GetForwardHistoNo(j);
|
|
||||||
}
|
|
||||||
tstr += TString(",");
|
tstr += TString(",");
|
||||||
} else if (runs[runNo].GetFitType() == MSR_FITTYPE_ASYM) {
|
} else if (runs[runNo].GetFitType() == MSR_FITTYPE_ASYM) {
|
||||||
tstr += TString("h:");
|
tstr += TString("h:");
|
||||||
tstr += runs[runNo].GetForwardHistoNo();
|
TString grouping;
|
||||||
for (UInt_t j=1; j<runs[runNo].GetForwardHistoNoSize(); j++) {
|
fMsrHandler->GetGroupingString(runNo, "forward", grouping);
|
||||||
tstr += TString("+");
|
tstr += grouping;
|
||||||
tstr += runs[runNo].GetForwardHistoNo(j);
|
|
||||||
}
|
|
||||||
tstr += TString("/");
|
tstr += TString("/");
|
||||||
tstr += runs[runNo].GetBackwardHistoNo();
|
grouping = "";
|
||||||
for (UInt_t j=1; j<runs[runNo].GetBackwardHistoNoSize(); j++) {
|
fMsrHandler->GetGroupingString(runNo, "backward", grouping);
|
||||||
tstr += TString("+");
|
tstr += grouping;
|
||||||
tstr += runs[runNo].GetBackwardHistoNo(j);
|
|
||||||
}
|
|
||||||
tstr += TString(",");
|
tstr += TString(",");
|
||||||
}
|
}
|
||||||
// temperature if present
|
// temperature if present
|
||||||
|
@ -105,6 +105,8 @@ class PMsrHandler
|
|||||||
virtual Bool_t CheckAddRunParameters();
|
virtual Bool_t CheckAddRunParameters();
|
||||||
virtual void CheckMaxLikelihood();
|
virtual void CheckMaxLikelihood();
|
||||||
|
|
||||||
|
virtual void GetGroupingString(Int_t runNo, TString detector, TString &groupingStr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Bool_t fWriteExpectedChisq; ///< flag shows if expected chisq shall be written to the msr-file
|
Bool_t fWriteExpectedChisq; ///< flag shows if expected chisq shall be written to the msr-file
|
||||||
|
|
||||||
@ -147,7 +149,7 @@ class PMsrHandler
|
|||||||
virtual UInt_t LastSignificant(Double_t dval, UInt_t precLimit=6);
|
virtual UInt_t LastSignificant(Double_t dval, UInt_t precLimit=6);
|
||||||
|
|
||||||
virtual Bool_t ParseDetectorGrouping(TString str, PIntVector &group);
|
virtual Bool_t ParseDetectorGrouping(TString str, PIntVector &group);
|
||||||
virtual void MakeDetectorGroupingString(TString str, PIntVector &group, TString &result);
|
virtual void MakeDetectorGroupingString(TString str, PIntVector &group, TString &result, Bool_t includeDetector = true);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _PMSRHANDLER_H_
|
#endif // _PMSRHANDLER_H_
|
||||||
|
Loading…
x
Reference in New Issue
Block a user