170 Bool_t success =
true;
173 Int_t fitType = (*
fMsrInfo->GetMsrRunList())[runNo].GetFitType();
175 fitType = (*
fMsrInfo->GetMsrGlobal()).GetFitType();
355 Double_t chisq = 0.0;
376 Double_t chisq = 0.0;
404 Double_t chisq = 0.0;
425 Double_t chisq = 0.0;
446 Double_t chisq = 0.0;
467 Double_t chisq = 0.0;
488 Double_t chisq = 0.0;
510 Double_t expectedChisq = 0.0;
512 if (idx >
fMsrInfo->GetMsrRunList()->size()) {
513 std::cerr <<
">> PRunListCollection::GetSingleRunChisqExpected() **ERROR** idx=" << idx <<
" is out of range [0.." <<
fMsrInfo->GetMsrRunList()->size() <<
"[" << std::endl << std::endl;
514 return expectedChisq;
518 Int_t type =
fMsrInfo->GetMsrRunList()->at(idx).GetFitType();
520 type =
fMsrInfo->GetMsrGlobal()->GetFitType();
524 for (UInt_t i=0; i<idx; i++) {
525 if (
fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type)
558 return expectedChisq;
575 Double_t chisq = 0.0;
577 if (idx >
fMsrInfo->GetMsrRunList()->size()) {
578 std::cerr <<
">> PRunListCollection::GetSingleRunChisq() **ERROR** idx=" << idx <<
" is out of range [0.." <<
fMsrInfo->GetMsrRunList()->size() <<
"[" << std::endl << std::endl;
583 Int_t type =
fMsrInfo->GetMsrRunList()->at(idx).GetFitType();
585 type =
fMsrInfo->GetMsrGlobal()->GetFitType();
589 for (UInt_t i=0; i<idx; i++) {
590 if (
fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type)
790 Double_t expected_mlh = 0.0;
792 if (idx >
fMsrInfo->GetMsrRunList()->size()) {
793 std::cerr <<
">> PRunListCollection::GetSingleRunMaximumLikelihoodExpected() **ERROR** idx=" << idx <<
" is out of range [0.." <<
fMsrInfo->GetMsrRunList()->size() <<
"[" << std::endl << std::endl;
798 Int_t type =
fMsrInfo->GetMsrRunList()->at(idx).GetFitType();
800 type =
fMsrInfo->GetMsrGlobal()->GetFitType();
804 for (UInt_t i=0; i<idx; i++) {
805 if (
fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type)
838 if (idx >
fMsrInfo->GetMsrRunList()->size()) {
839 std::cerr <<
">> PRunListCollection::GetSingleRunMaximumLikelihood() **ERROR** idx=" << idx <<
" is out of range [0.." <<
fMsrInfo->GetMsrRunList()->size() <<
"[" << std::endl << std::endl;
844 Int_t type =
fMsrInfo->GetMsrRunList()->at(idx).GetFitType();
846 type =
fMsrInfo->GetMsrGlobal()->GetFitType();
850 for (UInt_t i=0; i<idx; i++) {
851 if (
fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type)
884 if (idx >
fMsrInfo->GetMsrRunList()->size()) {
885 std::cerr <<
">> PRunListCollection::GetNoOfBinsFitted() **ERROR** idx=" << idx <<
" is out of range [0.." <<
fMsrInfo->GetMsrRunList()->size() <<
"[" << std::endl << std::endl;
890 Int_t type =
fMsrInfo->GetMsrRunList()->at(idx).GetFitType();
892 type =
fMsrInfo->GetMsrGlobal()->GetFitType();
896 for (UInt_t i=0; i<idx; i++) {
897 if (
fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type)
990 std::cerr << std::endl <<
">> PRunListCollection::GetSingleHisto(): **ERROR** index = " << index <<
" out of bounds";
991 std::cerr << std::endl;
1033 std::cerr << std::endl <<
">> PRunListCollection::GetSingleHistoRRF(): **ERROR** index = " << index <<
" out of bounds";
1034 std::cerr << std::endl;
1076 std::cerr << std::endl <<
">> PRunListCollection::GetAsymmetry(): **ERROR** index = " << index <<
" out of bounds";
1077 std::cerr << std::endl;
1119 std::cerr << std::endl <<
">> PRunListCollection::GetAsymmetryBNMR(): **ERROR** index = " << index <<
" out of bounds";
1120 std::cerr << std::endl;
1162 std::cerr << std::endl <<
">> PRunListCollection::GetAsymmetryRRF(): **ERROR** index = " << index <<
" out of bounds";
1163 std::cerr << std::endl;
1205 std::cerr << std::endl <<
">> PRunListCollection::GetMuMinus(): **ERROR** index = " << index <<
" out of bounds";
1206 std::cerr << std::endl;
1247 std::cerr << std::endl <<
">> PRunListCollection::GetNonMusr(): **ERROR** index = " << index <<
" out of bounds";
1248 std::cerr << std::endl;
1280 return fData->GetRunData(runName)->GetTemperature();
1296 return fData->GetRunData(runName)->GetField();
1312 return fData->GetRunData(runName)->GetEnergy();
1328 return fData->GetRunData(runName)->GetSetup()->Data();
1347 const Char_t *result =
nullptr;
1380 const Char_t *result =
nullptr;
#define PRUN_ASYMMETRY
Asymmetry fit using forward and backward detectors.
#define PRUN_MU_MINUS
Negative muon (μ-) single histogram fit.
#define PRUN_ASYMMETRY_RRF
Asymmetry fit in rotating reference frame (RRF)
#define PRUN_SINGLE_HISTO_RRF
Single histogram fit in rotating reference frame (RRF)
std::vector< PDoublePair > PDoublePairVector
#define PRUN_NON_MUSR
Non-μSR data fit (general x-y data)
#define PRUN_SINGLE_HISTO
Single histogram fit (e.g., forward or backward detector)
#define PRUN_ASYMMETRY_BNMR
Beta-detected NMR asymmetry fit.
MSR file parser and manager for the musrfit framework.
virtual const PStringVector * GetLabels()
Returns pointer to vector of axis/column labels.
virtual Bool_t FromAscii()
Returns true if data was loaded from ASCII file, false for db/dat format.
PNonMusrRawRunData fDataNonMusr
keeps all ascii- or db-file info in case of nonMusr fit
Class for handling β-NMR asymmetry fits.
Class for handling μSR asymmetry fits in the Rotating Reference Frame (RRF).
Class for handling standard μSR asymmetry fits.
Raw data file reader and format converter for μSR data.
virtual Double_t GetSingleRunMaximumLikelihood(const std::vector< Double_t > &par, const UInt_t idx) const
Calculates maximum likelihood for a single run.
virtual Double_t GetField(const TString &runName) const
Retrieves magnetic field value for a specific run.
virtual void SetFitRange(const PDoublePairVector fitRange)
Sets fit range for all runs (time-based or bin-based).
virtual PRunData * GetSingleHisto(UInt_t index, EDataSwitch tag=kIndex)
Retrieves processed data for a single histogram run.
virtual Double_t GetAsymmetryBNMRMaximumLikelihood(const std::vector< Double_t > &par) const
Calculates total maximum likelihood for all β-NMR asymmetry runs.
std::vector< PRunNonMusr * > fRunNonMusrList
Collection of non-μSR run objects.
virtual Double_t GetAsymmetryBNMRChisq(const std::vector< Double_t > &par) const
Calculates total χ² for all β-NMR asymmetry runs.
virtual Double_t GetMuMinusMaximumLikelihood(const std::vector< Double_t > &par) const
Calculates total maximum likelihood for all μ⁻ runs.
virtual PRunData * GetSingleHistoRRF(UInt_t index, EDataSwitch tag=kIndex)
Retrieves processed data for a single histogram RRF run.
virtual const Char_t * GetSetup(const TString &runName) const
Retrieves experimental setup identifier for a specific run.
virtual PRunData * GetNonMusr(UInt_t index, EDataSwitch tag=kIndex)
Retrieves processed data for a non-μSR run.
virtual const PDoublePairVector * GetTemp(const TString &runName) const
Retrieves temperature information for a specific run.
std::vector< PRunAsymmetry * > fRunAsymmetryList
Collection of asymmetry run objects.
virtual Double_t GetAsymmetryRRFMaximumLikelihood(const std::vector< Double_t > &par) const
Calculates total maximum likelihood for all asymmetry RRF runs.
EDataSwitch
Enumeration for data access mode.
virtual UInt_t GetNoOfBinsFitted(const UInt_t idx) const
Returns the number of bins fitted for a specific run.
virtual ~PRunListCollection()
Virtual destructor that cleans up all run objects.
virtual const Char_t * GetXAxisTitle(const TString &runName, const UInt_t idx) const
Retrieves x-axis label for plotting.
std::vector< PRunAsymmetryRRF * > fRunAsymmetryRRFList
Collection of asymmetry RRF run objects.
std::vector< PRunMuMinus * > fRunMuMinusList
Collection of μ⁻ (negative muon) run objects.
virtual Double_t GetNonMusrChisq(const std::vector< Double_t > &par) const
Calculates total χ² for all non-μSR runs.
virtual Double_t GetSingleHistoMaximumLikelihood(const std::vector< Double_t > &par) const
Calculates total maximum likelihood for all single histogram runs.
virtual Double_t GetEnergy(const TString &runName) const
Retrieves beam energy for a specific run.
virtual Double_t GetSingleHistoChisq(const std::vector< Double_t > &par) const
Calculates total χ² for all single histogram runs.
PRunDataHandler * fData
Pointer to raw data handler (not owned).
virtual Double_t GetSingleRunChisqExpected(const std::vector< Double_t > &par, const UInt_t idx) const
Calculates expected χ² for a single run by index.
virtual PRunData * GetAsymmetry(UInt_t index, EDataSwitch tag=kIndex)
Retrieves processed data for an asymmetry run.
std::vector< PRunSingleHistoRRF * > fRunSingleHistoRRFList
Collection of single histogram RRF run objects.
virtual Double_t GetSingleRunChisq(const std::vector< Double_t > &par, const UInt_t idx) const
Calculates χ² for a single run by index.
virtual Double_t GetAsymmetryRRFChisq(const std::vector< Double_t > &par) const
Calculates total χ² for all asymmetry RRF runs.
virtual Double_t GetSingleHistoRRFMaximumLikelihood(const std::vector< Double_t > &par) const
Calculates total maximum likelihood for all single histogram RRF runs.
virtual Double_t GetSingleHistoRRFChisq(const std::vector< Double_t > &par) const
Calculates total χ² for all single histogram RRF runs.
std::vector< PRunAsymmetryBNMR * > fRunAsymmetryBNMRList
Collection of β-NMR asymmetry run objects.
PMsrHandler * fMsrInfo
Pointer to MSR file handler (not owned).
virtual const Char_t * GetYAxisTitle(const TString &runName, const UInt_t idx) const
Retrieves y-axis label for plotting.
virtual Double_t GetAsymmetryChisq(const std::vector< Double_t > &par) const
Calculates total χ² for all asymmetry runs.
virtual UInt_t GetTotalNoOfBinsFitted() const
Returns total number of bins fitted across all runs.
Bool_t fTheoAsData
Theory calculation mode flag.
virtual Double_t GetSingleRunMaximumLikelihoodExpected(const std::vector< Double_t > &par, const UInt_t idx) const
Calculates expected maximum likelihood for a single run (theoretical expectation).
virtual PRunData * GetMuMinus(UInt_t index, EDataSwitch tag=kIndex)
Retrieves processed data for a μ⁻ run.
virtual Double_t GetMuMinusChisq(const std::vector< Double_t > &par) const
Calculates total χ² for all mu-minus runs.
PRunListCollection(PMsrHandler *msrInfo, PRunDataHandler *data, Bool_t theoAsdata=false)
Constructor that initializes the collection.
virtual Double_t GetNonMusrMaximumLikelihood(const std::vector< Double_t > &par) const
Calculates total maximum likelihood for all non-μSR runs.
std::vector< PRunSingleHisto * > fRunSingleHistoList
Collection of single histogram run objects.
virtual Double_t GetAsymmetryMaximumLikelihood(const std::vector< Double_t > &par) const
Calculates total maximum likelihood for all asymmetry runs.
virtual PRunData * GetAsymmetryRRF(UInt_t index, EDataSwitch tag=kIndex)
Retrieves processed data for an asymmetry RRF run.
virtual PRunData * GetAsymmetryBNMR(UInt_t index, EDataSwitch tag=kIndex)
Retrieves processed data for a β-NMR asymmetry run.
virtual Bool_t Add(Int_t runNo, EPMusrHandleTag tag)
Adds a run to the appropriate list based on fit type.
Class for handling negative muon (μ⁻) histogram fits.
Class for fitting general x-y data sets (non-μSR time series).
Class for fitting single histogram data in a Rotating Reference Frame (RRF).
Class for fitting single detector histograms (basic time-differential μSR).