musrfit 1.10.0
PMusr.h File Reference
#include <vector>
#include <map>
#include <TString.h>
#include "fftw3.h"
Include dependency graph for PMusr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PMetaData
 
class  PRunData
 
class  PNonMusrRawRunData
 
class  PRawRunDataSet
 
class  PRawRunDataVector
 
class  PRawRunData
 
struct  PMsrLineStructure
 
struct  PMsrParamStructure
 
class  PMsrGlobalBlock
 
class  PMsrRunBlock
 
struct  PMsrFourierStructure
 
struct  PMsrPlotStructure
 
struct  PMsrStatisticStructure
 
struct  PAny2ManyInfo
 
struct  PStartupOptions
 
class  PStringNumberList
 
struct  PRunNameTemplate
 

Macros

#define PMUSR_SUCCESS   0
 Successful operation completion.
 
#define PMUSR_SYNTAX_REQUEST   -1
 Syntax help was requested via command line.
 
#define PMUSR_WRONG_STARTUP_SYNTAX   -2
 Incorrect startup command syntax provided.
 
#define PMUSR_MSR_FILE_NOT_FOUND   -3
 MSR file could not be found at specified path.
 
#define PMUSR_MSR_ALLOCATION_ERROR   -4
 Memory allocation error while processing MSR file.
 
#define PMUSR_MSR_SYNTAX_ERROR   -5
 Syntax error detected in MSR file content.
 
#define PMUSR_TOKENIZE_ERROR   -6
 Error during tokenization/parsing of input.
 
#define PMUSR_MSR_LOG_FILE_WRITE_ERROR   -7
 Failed to write to MSR log file.
 
#define PMUSR_MSR_FILE_WRITE_ERROR   -8
 Failed to write MSR file.
 
#define PMUSR_DATA_FILE_READ_ERROR   -9
 Error reading data file (ROOT, NeXus, MUD, etc.)
 
#define PMUSR_MSR_RUN_ERROR   -10
 Error during run processing or fitting.
 
#define PMUSR_UNSUPPORTED_FEATURE   -11
 Requested feature is not yet supported.
 
#define PRUN_SINGLE_HISTO   0
 Single histogram fit (e.g., forward or backward detector)
 
#define PRUN_SINGLE_HISTO_RRF   1
 Single histogram fit in rotating reference frame (RRF)
 
#define PRUN_ASYMMETRY   2
 Asymmetry fit using forward and backward detectors.
 
#define PRUN_ASYMMETRY_RRF   3
 Asymmetry fit in rotating reference frame (RRF)
 
#define PRUN_MU_MINUS   4
 Negative muon (μ-) single histogram fit.
 
#define PRUN_ASYMMETRY_BNMR   5
 Beta-detected NMR asymmetry fit.
 
#define PRUN_NON_MUSR   8
 Non-μSR data fit (general x-y data)
 
#define PMUON_LIFETIME   2.1969811
 
#define GAMMA_BAR_MUON   1.355388094e-2
 
#define ACCEL_PERIOD_PSI   0.01975
 PSI (Paul Scherrer Institute) accelerator cycle: 19.75 ns.
 
#define ACCEL_PERIOD_TRIUMF   0.04337
 TRIUMF accelerator cycle: 43.37 ns.
 
#define ACCEL_PERIOD_RAL   0.0
 RAL (Rutherford Appleton Lab) - pulsed beam.
 
#define POST_PILEUP_HISTO_OFFSET   20
 
#define PMUSR_UNDEFINED   -9.9e99
 
#define MSR_TAG_TITLE   0
 TITLE block - describes the experiment.
 
#define MSR_TAG_FITPARAMETER   1
 FITPARAMETER block - defines fit parameters with initial values and constraints.
 
#define MSR_TAG_THEORY   2
 THEORY block - specifies the theory function(s) to fit.
 
#define MSR_TAG_FUNCTIONS   3
 FUNCTIONS block - user-defined mathematical functions.
 
#define MSR_TAG_GLOBAL   4
 GLOBAL block - global fit settings (RRF, fit type, etc.)
 
#define MSR_TAG_RUN   5
 RUN block - run-specific settings and data file information.
 
#define MSR_TAG_COMMANDS   6
 COMMANDS block - post-fit commands (e.g., parameter output)
 
#define MSR_TAG_FOURIER   7
 FOURIER block - Fourier transform settings.
 
#define MSR_TAG_PLOT   8
 PLOT block - plotting configuration for data visualization.
 
#define MSR_TAG_STATISTIC   9
 STATISTIC block - fit statistics and results (generated after fit)
 
#define MSR_FITTYPE_SINGLE_HISTO   0
 Fit single histogram (e.g., positron counts vs. time)
 
#define MSR_FITTYPE_SINGLE_HISTO_RRF   1
 Fit single histogram in rotating reference frame.
 
#define MSR_FITTYPE_ASYM   2
 Fit asymmetry A(t) = (F-αB)/(F+αB)
 
#define MSR_FITTYPE_ASYM_RRF   3
 Fit asymmetry in rotating reference frame.
 
#define MSR_FITTYPE_MU_MINUS   4
 Fit negative muon (μ-) single histogram.
 
#define MSR_FITTYPE_BNMR   5
 Fit beta-detected NMR asymmetry.
 
#define MSR_FITTYPE_NON_MUSR   8
 Fit non-μSR data (general x-y data)
 
#define MSR_PLOT_SINGLE_HISTO   0
 Plot single histogram.
 
#define MSR_PLOT_SINGLE_HISTO_RRF   1
 Plot single histogram in rotating reference frame.
 
#define MSR_PLOT_ASYM   2
 Plot asymmetry.
 
#define MSR_PLOT_ASYM_RRF   3
 Plot asymmetry in rotating reference frame.
 
#define MSR_PLOT_MU_MINUS   4
 Plot negative muon (μ-) data.
 
#define MSR_PLOT_BNMR   5
 Plot beta-detected NMR data.
 
#define MSR_PLOT_NON_MUSR   8
 Plot non-μSR data.
 
#define MSR_PARAM_MAP_OFFSET   10000
 Offset added to map indices for parameter parsing.
 
#define MSR_PARAM_FUN_OFFSET   20000
 Offset added to function indices for parameter parsing.
 
#define PERIOD_HISTO_OFFSET   10000
 
#define FOURIER_UNIT_NOT_GIVEN   0
 Units not specified.
 
#define FOURIER_UNIT_GAUSS   1
 Magnetic field in Gauss (G)
 
#define FOURIER_UNIT_TESLA   2
 Magnetic field in Tesla (T)
 
#define FOURIER_UNIT_FREQ   3
 Frequency in MHz.
 
#define FOURIER_UNIT_CYCLES   4
 Angular frequency in Mc/s (Mega-cycles per second)
 
#define FOURIER_APOD_NOT_GIVEN   0
 Apodization not specified.
 
#define FOURIER_APOD_NONE   1
 No apodization (rectangular window)
 
#define FOURIER_APOD_WEAK   2
 Weak apodization (gentle windowing)
 
#define FOURIER_APOD_MEDIUM   3
 Medium apodization (moderate windowing)
 
#define FOURIER_APOD_STRONG   4
 Strong apodization (heavy windowing for best frequency resolution)
 
#define FOURIER_PLOT_NOT_GIVEN   0
 Plot type not specified.
 
#define FOURIER_PLOT_REAL   1
 Plot real component only.
 
#define FOURIER_PLOT_IMAG   2
 Plot imaginary component only.
 
#define FOURIER_PLOT_REAL_AND_IMAG   3
 Plot both real and imaginary components (default)
 
#define FOURIER_PLOT_POWER   4
 Plot power spectrum |F(ω)|²
 
#define FOURIER_PLOT_PHASE   5
 Plot phase spectrum arg(F(ω))
 
#define FOURIER_PLOT_PHASE_OPT_REAL   6
 Plot phase-optimized real component.
 
#define RRF_UNIT_UNDEF   -1
 RRF unit undefined.
 
#define RRF_UNIT_kHz   0
 Frequency in kHz (kilohertz)
 
#define RRF_UNIT_MHz   1
 Frequency in MHz (megahertz)
 
#define RRF_UNIT_Mcs   2
 Angular frequency in Mc/s (Mega-cycles per second)
 
#define RRF_UNIT_G   3
 Equivalent magnetic field in Gauss (G)
 
#define RRF_UNIT_T   4
 Equivalent magnetic field in Tesla (T)
 
#define RRF_FREQ_UNDEF   1.0e10
 

Typedefs

typedef std::vector< Bool_t > PBoolVector
 
typedef std::vector< UInt_t > PUIntVector
 
typedef std::vector< Int_t > PIntVector
 
typedef std::pair< Int_t, Int_t > PIntPair
 
typedef std::vector< PIntPairPIntPairVector
 
typedef std::vector< Double_t > PDoubleVector
 
typedef std::pair< Double_t, Double_t > PDoublePair
 
typedef std::vector< PDoublePairPDoublePairVector
 
typedef std::vector< TString > PStringVector
 
typedef std::vector< PRawRunDataPRawRunDataList
 
typedef std::vector< PMsrLineStructurePMsrLines
 
typedef std::vector< PMsrParamStructurePMsrParamList
 
typedef std::vector< PMsrRunBlockPMsrRunList
 
typedef std::vector< PMsrPlotStructurePMsrPlotList
 
typedef std::vector< PRunNameTemplatePRunNameTemplateList
 

Enumerations

enum  EPMusrHandleTag { kEmpty , kFit , kView }
 

Macro Definition Documentation

◆ ACCEL_PERIOD_PSI

#define ACCEL_PERIOD_PSI   0.01975

PSI (Paul Scherrer Institute) accelerator cycle: 19.75 ns.

Accelerator cycle periods in microseconds (μs).

These constants define the beam structure period for different μSR facilities, which is needed for proper background determination in pulsed beam experiments.

Definition at line 154 of file PMusr.h.

Referenced by PRunSingleHisto::EstimateBkg(), PRunSingleHistoRRF::EstimateBkg(), PRunAsymmetry::SubtractEstimatedBkg(), PRunAsymmetryBNMR::SubtractEstimatedBkg(), and PRunAsymmetryRRF::SubtractEstimatedBkg().

◆ ACCEL_PERIOD_RAL

#define ACCEL_PERIOD_RAL   0.0

◆ ACCEL_PERIOD_TRIUMF

#define ACCEL_PERIOD_TRIUMF   0.04337

◆ FOURIER_APOD_MEDIUM

#define FOURIER_APOD_MEDIUM   3

Medium apodization (moderate windowing)

Definition at line 310 of file PMusr.h.

Referenced by PMsrHandler::HandleFourierEntry(), main(), PStartupHandler::OnCharacters(), PMsrHandler::WriteMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ FOURIER_APOD_NONE

#define FOURIER_APOD_NONE   1

◆ FOURIER_APOD_NOT_GIVEN

#define FOURIER_APOD_NOT_GIVEN   0

Apodization not specified.

Fourier transform apodization tags.

Apodization (windowing) reduces spectral leakage in Fourier transforms by applying a window function to the time-domain data. Stronger apodization improves frequency resolution but reduces signal amplitude accuracy.

Definition at line 304 of file PMusr.h.

Referenced by PMsrHandler::InitFourierParameterStructure(), and PMusrCanvas::SetMsrHandler().

◆ FOURIER_APOD_STRONG

#define FOURIER_APOD_STRONG   4

Strong apodization (heavy windowing for best frequency resolution)

Definition at line 312 of file PMusr.h.

Referenced by PMsrHandler::HandleFourierEntry(), main(), PStartupHandler::OnCharacters(), PMsrHandler::WriteMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ FOURIER_APOD_WEAK

#define FOURIER_APOD_WEAK   2

Weak apodization (gentle windowing)

Definition at line 308 of file PMusr.h.

Referenced by PMsrHandler::HandleFourierEntry(), main(), PStartupHandler::OnCharacters(), PMsrHandler::WriteMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ FOURIER_PLOT_IMAG

◆ FOURIER_PLOT_NOT_GIVEN

#define FOURIER_PLOT_NOT_GIVEN   0

Plot type not specified.

Fourier transform plot type tags.

These constants specify which component(s) of the complex Fourier transform should be displayed.

Definition at line 322 of file PMusr.h.

Referenced by ClassImpQ(), PMsrHandler::InitFourierParameterStructure(), main(), and PMusrCanvas::SetMsrHandler().

◆ FOURIER_PLOT_PHASE

◆ FOURIER_PLOT_PHASE_OPT_REAL

◆ FOURIER_PLOT_POWER

◆ FOURIER_PLOT_REAL

◆ FOURIER_PLOT_REAL_AND_IMAG

◆ FOURIER_UNIT_CYCLES

◆ FOURIER_UNIT_FREQ

◆ FOURIER_UNIT_GAUSS

◆ FOURIER_UNIT_NOT_GIVEN

#define FOURIER_UNIT_NOT_GIVEN   0

Units not specified.

Fourier transform unit tags.

These constants specify the units for Fourier transform output in the FOURIER block of MSR files.

Definition at line 284 of file PMusr.h.

Referenced by PMsrHandler::InitFourierParameterStructure(), main(), and PMusrCanvas::SetMsrHandler().

◆ FOURIER_UNIT_TESLA

◆ GAMMA_BAR_MUON

#define GAMMA_BAR_MUON   1.355388094e-2

Muon gyromagnetic ratio γ_μ/(2π) in MHz/G.

The muon gyromagnetic ratio relates the muon spin precession frequency to the applied magnetic field: ν = γ_μ/(2π) × B

Value: 0.013553880 94(30) MHz/G = 135.53880 94(30) MHz/T

Calculated from: γ_μ = 2.0 × μ_μ / ℏ where

  • μ_μ = -4.490 448 30(10) × 10^-26 J/T (muon magnetic moment)
  • ℏ = 1.054 571 817... × 10^-34 J·s (reduced Planck constant)

Reference: E. Tiesinga et al., Rev. Mod. Phys. 93, 025010 (2021). https://doi.org/10.1103/RevModPhys.93.025010 https://physics.nist.gov/cuu/Constants/index.html

Definition at line 143 of file PMusr.h.

Referenced by PMsrGlobalBlock::GetRRFFreq(), PFunction::EvalVisitor::operator()(), PFourier::PFourier(), PRunAsymmetry::PrepareRRFViewData(), and PRunSingleHisto::PrepareViewData().

◆ MSR_FITTYPE_ASYM

#define MSR_FITTYPE_ASYM   2

◆ MSR_FITTYPE_ASYM_RRF

◆ MSR_FITTYPE_BNMR

◆ MSR_FITTYPE_MU_MINUS

#define MSR_FITTYPE_MU_MINUS   4

◆ MSR_FITTYPE_NON_MUSR

#define MSR_FITTYPE_NON_MUSR   8

◆ MSR_FITTYPE_SINGLE_HISTO

#define MSR_FITTYPE_SINGLE_HISTO   0

Fit single histogram (e.g., positron counts vs. time)

MSR file fit type tags.

These constants specify the fit type in the GLOBAL or RUN blocks of an MSR file. The fit type determines how raw data is converted into the quantity to be fitted (single histogram, asymmetry, etc.).

Definition at line 217 of file PMusr.h.

Referenced by PMsrHandler::CheckMaxLikelihood(), PMsrHandler::HandleGlobalEntry(), PMsrHandler::HandleRunEntry(), main(), PMusrCanvas::UpdateDataTheoryPad(), PMusrCanvas::UpdateInfoPad(), PMsrHandler::WriteMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_FITTYPE_SINGLE_HISTO_RRF

#define MSR_FITTYPE_SINGLE_HISTO_RRF   1

◆ MSR_PARAM_FUN_OFFSET

#define MSR_PARAM_FUN_OFFSET   20000

Offset added to function indices for parameter parsing.

Definition at line 265 of file PMusr.h.

Referenced by PTheory::Abragam(), PTheory::Asymmetry(), PTheory::Bessel(), PRunAsymmetry::CalcChiSquare(), PRunAsymmetryBNMR::CalcChiSquare(), PRunAsymmetryRRF::CalcChiSquare(), PRunSingleHisto::CalcChiSquare(), PRunSingleHisto::CalcChiSquareExpected(), PRunSingleHisto::CalcMaxLikelihood(), PRunSingleHisto::CalcMaxLikelihoodExpected(), PRunAsymmetry::CalcTheory(), PRunAsymmetryBNMR::CalcTheory(), PRunAsymmetryRRF::CalcTheory(), PRunSingleHisto::CalcTheory(), PMsrHandler::CheckFuncs(), PMsrHandler::CheckRunBlockIntegrity(), PTheory::CombiLGKT(), PTheory::Constant(), PTheory::DynamicGauLorKTLF(), PTheory::DynamicGauLorKTLFFast(), PTheory::DynamicGauLorKTZFFast(), PTheory::DynamicGaussKTLF(), PTheory::DynamicLorentzKTLF(), PTheory::DynamicNKTF(), PTheory::DynamicNKZF(), PMsrHandler::FillParameterInUse(), PTheory::GeneralExp(), PMsrHandler::GetNoOfFitParameters(), PMsrHandler::HandleRunEntry(), PTheory::InternalBessel(), PTheory::InternalField(), PTheory::InternalFieldGK(), PTheory::InternalFieldLL(), PMsr2Data::PrepareGlobalInputFile(), PRunSingleHisto::PrepareRawViewData(), PRunAsymmetry::PrepareRRFViewData(), PRunAsymmetry::PrepareViewData(), PRunAsymmetryBNMR::PrepareViewData(), PRunAsymmetryRRF::PrepareViewData(), PRunSingleHisto::PrepareViewData(), PRunAsymmetry::PRunAsymmetry(), PTheory::PTheory(), PTheory::RandomAnisotropicHyperfine(), PTheory::SimpleExp(), PTheory::SimpleGauss(), PTheory::SkewedGauss(), PTheory::SpinGlass(), PTheory::StaticGaussKT(), PTheory::StaticGaussKTLF(), PTheory::StaticLorentzKT(), PTheory::StaticLorentzKTLF(), PTheory::StaticNKTF(), PTheory::StaticNKZF(), PTheory::StrKT(), PTheory::TFCos(), PMsrHandler::WriteMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_PARAM_MAP_OFFSET

#define MSR_PARAM_MAP_OFFSET   10000

Offset added to map indices for parameter parsing.

Offsets for parameter parsing in MSR files.

When parameters are referenced via map functions or user-defined functions, these offsets are added to distinguish them from direct parameter references (which use indices 1, 2, 3, ...).

Definition at line 263 of file PMusr.h.

Referenced by PMsrHandler::CheckMaps(), and PMsrHandler::FillParameterInUse().

◆ MSR_PLOT_ASYM

◆ MSR_PLOT_ASYM_RRF

#define MSR_PLOT_ASYM_RRF   3

Plot asymmetry in rotating reference frame.

Definition at line 246 of file PMusr.h.

Referenced by PMusrCanvas::ExportData(), PMsrHandler::HandlePlotEntry(), PMusrCanvas::PlotData(), PMsrHandler::WriteMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_PLOT_BNMR

◆ MSR_PLOT_MU_MINUS

#define MSR_PLOT_MU_MINUS   4

◆ MSR_PLOT_NON_MUSR

◆ MSR_PLOT_SINGLE_HISTO

#define MSR_PLOT_SINGLE_HISTO   0

Plot single histogram.

MSR file plot type tags.

These constants specify the plot type in the PLOT block of an MSR file, determining how data should be displayed in musrview or other visualization tools.

Definition at line 240 of file PMusr.h.

Referenced by PMusrCanvas::ExportData(), PMsrHandler::HandlePlotEntry(), PMusrCanvas::PlotAverage(), PMusrCanvas::PlotData(), PMsrHandler::WriteMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_PLOT_SINGLE_HISTO_RRF

#define MSR_PLOT_SINGLE_HISTO_RRF   1

Plot single histogram in rotating reference frame.

Definition at line 242 of file PMusr.h.

Referenced by PMusrCanvas::ExportData(), PMsrHandler::HandlePlotEntry(), PMusrCanvas::PlotData(), PMsrHandler::WriteMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_TAG_COMMANDS

#define MSR_TAG_COMMANDS   6

COMMANDS block - post-fit commands (e.g., parameter output)

Definition at line 200 of file PMusr.h.

Referenced by PMsrHandler::ReadMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_TAG_FITPARAMETER

#define MSR_TAG_FITPARAMETER   1

FITPARAMETER block - defines fit parameters with initial values and constraints.

Definition at line 190 of file PMusr.h.

Referenced by main(), msr2msr_finalize_theory(), PMsrHandler::ReadMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_TAG_FOURIER

#define MSR_TAG_FOURIER   7

FOURIER block - Fourier transform settings.

Definition at line 202 of file PMusr.h.

Referenced by PMsrHandler::ReadMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_TAG_FUNCTIONS

#define MSR_TAG_FUNCTIONS   3

FUNCTIONS block - user-defined mathematical functions.

Definition at line 194 of file PMusr.h.

Referenced by PMsrHandler::ReadMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_TAG_GLOBAL

#define MSR_TAG_GLOBAL   4

GLOBAL block - global fit settings (RRF, fit type, etc.)

Definition at line 196 of file PMusr.h.

Referenced by PMsrHandler::ReadMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_TAG_PLOT

#define MSR_TAG_PLOT   8

PLOT block - plotting configuration for data visualization.

Definition at line 204 of file PMusr.h.

Referenced by PMsrHandler::ReadMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_TAG_RUN

#define MSR_TAG_RUN   5

RUN block - run-specific settings and data file information.

Definition at line 198 of file PMusr.h.

Referenced by main(), PMsrHandler::ReadMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_TAG_STATISTIC

#define MSR_TAG_STATISTIC   9

STATISTIC block - fit statistics and results (generated after fit)

Definition at line 206 of file PMusr.h.

Referenced by main(), PMsrHandler::ReadMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_TAG_THEORY

#define MSR_TAG_THEORY   2

THEORY block - specifies the theory function(s) to fit.

Definition at line 192 of file PMusr.h.

Referenced by main(), msr2msr_finalize_theory(), PMsrHandler::ReadMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ MSR_TAG_TITLE

#define MSR_TAG_TITLE   0

TITLE block - describes the experiment.

MSR file block header tags.

These constants identify the different sections in a musrfit MSR (Muon Spin Rotation) file. Each tag corresponds to a specific block that defines different aspects of the fit configuration.

Definition at line 188 of file PMusr.h.

Referenced by PMsrHandler::WriteMsrLogFile().

◆ PERIOD_HISTO_OFFSET

#define PERIOD_HISTO_OFFSET   10000

Offset used to encode the period (Red/Green mode) into the histogram number, i.e. histoNo = period*PERIOD_HISTO_OFFSET + histo, with histo starting at 1 and period starting at 0. Currently used for NeXus IDF V2 (ISIS) data which are organized as counts[period][histo][bin].

Definition at line 274 of file PMusr.h.

Referenced by PRawRunData::GetDeadTimeParam(), and PRunDataHandler::ReadNexusFileIdf2().

◆ PMUON_LIFETIME

#define PMUON_LIFETIME   2.1969811

Physical constants for muon experiments.

These fundamental constants are used throughout the framework for lifetime corrections, field-frequency conversions, and other physics calculations.

Muon lifetime in microseconds (μs).

The mean lifetime of the positive muon (μ+) is 2.1969811 μs. This value is used for lifetime corrections in single histogram fits.

Reference: P. A. Zyla et al. (Particle Data Group), Prog. Theor. Exp. Phys. 2020, 083C01 (2020). https://doi.org/10.1093/ptep/ptaa104 https://pdg.lbl.gov/2021/

Definition at line 124 of file PMusr.h.

Referenced by PRunSingleHisto::CalcChiSquare(), PRunSingleHisto::CalcChiSquareExpected(), PRunSingleHisto::CalcMaxLikelihood(), PRunSingleHisto::CalcMaxLikelihoodExpected(), PRunSingleHisto::CalcTheory(), PPrepFourier::DoLifeTimeCorrection(), PRunSingleHisto::EstimateN0(), PRunSingleHistoRRF::PrepareFitData(), PRunSingleHisto::PrepareRawViewData(), and PRunSingleHisto::PrepareViewData().

◆ PMUSR_DATA_FILE_READ_ERROR

#define PMUSR_DATA_FILE_READ_ERROR   -9

Error reading data file (ROOT, NeXus, MUD, etc.)

Definition at line 76 of file PMusr.h.

Referenced by main(), and main().

◆ PMUSR_MSR_ALLOCATION_ERROR

#define PMUSR_MSR_ALLOCATION_ERROR   -4

Memory allocation error while processing MSR file.

Definition at line 66 of file PMusr.h.

Referenced by main(), and main().

◆ PMUSR_MSR_FILE_NOT_FOUND

#define PMUSR_MSR_FILE_NOT_FOUND   -3

MSR file could not be found at specified path.

Definition at line 64 of file PMusr.h.

Referenced by PMsr2Data::GetSingleRunMsrFile(), main(), main(), PMsr2Data::ReadMsrFile(), and PMsrHandler::ReadMsrFile().

◆ PMUSR_MSR_FILE_WRITE_ERROR

#define PMUSR_MSR_FILE_WRITE_ERROR   -8

Failed to write MSR file.

Definition at line 74 of file PMusr.h.

Referenced by PMsrHandler::WriteMsrFile().

◆ PMUSR_MSR_LOG_FILE_WRITE_ERROR

#define PMUSR_MSR_LOG_FILE_WRITE_ERROR   -7

Failed to write to MSR log file.

Definition at line 72 of file PMusr.h.

Referenced by main(), and PMsrHandler::WriteMsrLogFile().

◆ PMUSR_MSR_RUN_ERROR

#define PMUSR_MSR_RUN_ERROR   -10

Error during run processing or fitting.

Definition at line 78 of file PMusr.h.

Referenced by main().

◆ PMUSR_MSR_SYNTAX_ERROR

#define PMUSR_MSR_SYNTAX_ERROR   -5

Syntax error detected in MSR file content.

Definition at line 68 of file PMusr.h.

Referenced by PMsr2Data::GetSingleRunMsrFile(), main(), main(), PMsr2Data::ReadMsrFile(), PMsrHandler::ReadMsrFile(), and PMsrHandler::WriteMsrLogFile().

◆ PMUSR_SUCCESS

#define PMUSR_SUCCESS   0

Successful operation completion.

Return code constants for musrfit framework operations.

These constants define the return values for various operations in the musrfit framework, where 0 indicates success and negative values indicate different types of errors.

Definition at line 58 of file PMusr.h.

Referenced by PMsr2Data::GetSingleRunMsrFile(), main(), main(), PMsr2Data::PrepareGlobalInputFile(), PMsr2Data::PrepareNewSortedInputFile(), PMsr2Data::ReadMsrFile(), PMsrHandler::ReadMsrFile(), PMsrHandler::WriteMsrFile(), PMsrHandler::WriteMsrLogFile(), and PMsr2Data::WriteOutput().

◆ PMUSR_SYNTAX_REQUEST

#define PMUSR_SYNTAX_REQUEST   -1

Syntax help was requested via command line.

Definition at line 60 of file PMusr.h.

Referenced by main().

◆ PMUSR_TOKENIZE_ERROR

#define PMUSR_TOKENIZE_ERROR   -6

Error during tokenization/parsing of input.

Definition at line 70 of file PMusr.h.

Referenced by main().

◆ PMUSR_UNDEFINED

#define PMUSR_UNDEFINED   -9.9e99

Sentinel value indicating undefined or uninitialized parameters.

This large negative value (-9.9×10^99) is used throughout the framework to indicate that a parameter has not been set or is invalid.

Definition at line 177 of file PMusr.h.

Referenced by PRunSingleHisto::CalcChiSquare(), PRunSingleHisto::CalcChiSquareExpected(), PRunSingleHisto::CalcMaxLikelihood(), PRunSingleHisto::CalcMaxLikelihoodExpected(), PRunSingleHisto::CalcTheory(), PMsrHandler::CheckRunBlockIntegrity(), PMsrRunBlock::CleanUp(), PFitter::ExecuteSave(), PMsrRunBlock::GetBkgEstimated(), PMsrRunBlock::GetBkgFix(), PMsrGlobalBlock::GetFitRange(), PMsrRunBlock::GetFitRange(), PRunAsymmetry::GetProperFitRange(), PRunAsymmetryBNMR::GetProperFitRange(), PRunAsymmetryRRF::GetProperFitRange(), PRunMuMinus::GetProperFitRange(), PRunSingleHisto::GetProperFitRange(), PRunSingleHistoRRF::GetProperFitRange(), PRawRunData::GetRingAnode(), PRawRunDataVector::GetT0BinEstimated(), PRawRunData::GetTemperature(), PRawRunData::GetTempError(), PSectorChisq::GetTimeRangeFirst(), PMusrCanvas::HandleDataSet(), musrFT_getMetaInfo(), PFitter::PFitter(), PMsrGlobalBlock::PMsrGlobalBlock(), PMsrRunBlock::PMsrRunBlock(), PRawRunData::PRawRunData(), PRunAsymmetry::PrepareData(), PRunAsymmetryBNMR::PrepareData(), PRunAsymmetryRRF::PrepareData(), PRunNonMusr::PrepareData(), PRunSingleHisto::PrepareFitData(), PRunSingleHistoRRF::PrepareFitData(), PRunSingleHisto::PrepareRawViewData(), PRunSingleHisto::PrepareViewData(), PRunBase::PRunBase(), PRunBase::PRunBase(), PRunData::PRunData(), PRunDataHandler::ReadAsciiFile(), PRunDataHandler::ReadMudFile(), PRunDataHandler::ReadNexusFileIdf1(), PRunDataHandler::ReadNexusFileIdf2(), PRunDataHandler::ReadPsiBinFile(), PRawRunData::SetTempError(), PRunAsymmetry::SubtractFixBkg(), PMusrCanvas::UpdateInfoPad(), PRunDataHandler::WriteAsciiFile(), PMsrHandler::WriteMsrFile(), PMsrHandler::WriteMsrLogFile(), PMsr2Data::WriteOutput(), and PRunDataHandler::WriteWkmFile().

◆ PMUSR_UNSUPPORTED_FEATURE

#define PMUSR_UNSUPPORTED_FEATURE   -11

Requested feature is not yet supported.

Definition at line 80 of file PMusr.h.

Referenced by main().

◆ PMUSR_WRONG_STARTUP_SYNTAX

#define PMUSR_WRONG_STARTUP_SYNTAX   -2

Incorrect startup command syntax provided.

Definition at line 62 of file PMusr.h.

Referenced by main(), and main().

◆ POST_PILEUP_HISTO_OFFSET

#define POST_PILEUP_HISTO_OFFSET   20

Histogram offset for pileup-corrected data in ROOT files.

Post-pileup-corrected histograms are stored with an offset of 20 added to the original histogram number to distinguish them from uncorrected data.

Definition at line 168 of file PMusr.h.

Referenced by PRunDataHandler::ReadRootFile().

◆ PRUN_ASYMMETRY

#define PRUN_ASYMMETRY   2

◆ PRUN_ASYMMETRY_BNMR

◆ PRUN_ASYMMETRY_RRF

#define PRUN_ASYMMETRY_RRF   3

◆ PRUN_MU_MINUS

◆ PRUN_NON_MUSR

◆ PRUN_SINGLE_HISTO

#define PRUN_SINGLE_HISTO   0

Single histogram fit (e.g., forward or backward detector)

Run type identifiers for different μSR measurement configurations.

These constants specify the type of μSR experiment and determine how raw histogram data should be processed and fitted.

Definition at line 90 of file PMusr.h.

Referenced by PRunListCollection::Add(), PMsrHandler::CheckRunBlockIntegrity(), PRunListCollection::GetNoOfBinsFitted(), PRunListCollection::GetSingleRunChisq(), PRunListCollection::GetSingleRunChisqExpected(), PRunListCollection::GetSingleRunMaximumLikelihood(), and PRunListCollection::GetSingleRunMaximumLikelihoodExpected().

◆ PRUN_SINGLE_HISTO_RRF

#define PRUN_SINGLE_HISTO_RRF   1

◆ RRF_FREQ_UNDEF

#define RRF_FREQ_UNDEF   1.0e10

Sentinel value indicating undefined RRF frequency.

This large value (10^10) marks an RRF frequency as uninitialized or invalid.

Definition at line 363 of file PMusr.h.

Referenced by PMsrHandler::CheckRRFSettings(), PMsrGlobalBlock::GetRRFFreq(), PMsrHandler::HandleGlobalEntry(), and PMsrGlobalBlock::PMsrGlobalBlock().

◆ RRF_UNIT_G

◆ RRF_UNIT_kHz

◆ RRF_UNIT_Mcs

◆ RRF_UNIT_MHz

◆ RRF_UNIT_T

◆ RRF_UNIT_UNDEF

#define RRF_UNIT_UNDEF   -1

RRF unit undefined.

Rotating Reference Frame (RRF) unit tags.

In RRF analysis, data is transformed into a frame rotating at a specified frequency/field. These tags specify the units for the RRF frequency, which can be given as frequency or equivalent field.

Definition at line 345 of file PMusr.h.

Referenced by PMsrHandler::CheckRunBlockIntegrity(), PMsrGlobalBlock::GetRRFFreq(), PMsrGlobalBlock::GetRRFUnit(), PMsrGlobalBlock::PMsrGlobalBlock(), and PMsrGlobalBlock::SetRRFFreq().

Typedef Documentation

◆ PBoolVector

typedef std::vector<Bool_t> PBoolVector

typedef to make to code more readable. Definition of a bool vector.

Definition at line 369 of file PMusr.h.

◆ PDoublePair

typedef std::pair<Double_t, Double_t> PDoublePair

typedef to make to code more readable. Definition of a double pair

Definition at line 405 of file PMusr.h.

◆ PDoublePairVector

typedef std::vector<PDoublePair> PDoublePairVector

typedef to make to code more readable. Definition of a double pair vector

Definition at line 411 of file PMusr.h.

◆ PDoubleVector

typedef std::vector<Double_t> PDoubleVector

typedef to make to code more readable. Definition of a double vector

Definition at line 399 of file PMusr.h.

◆ PIntPair

typedef std::pair<Int_t, Int_t> PIntPair

typedef to make to code more readable. Definition of an int pair

Definition at line 387 of file PMusr.h.

◆ PIntPairVector

typedef std::vector<PIntPair> PIntPairVector

typedef to make to code more readable. Definition of an int pair vector

Definition at line 393 of file PMusr.h.

◆ PIntVector

typedef std::vector<Int_t> PIntVector

typedef to make to code more readable. Definition of an int vector

Definition at line 381 of file PMusr.h.

◆ PMsrLines

typedef std::vector<PMsrLineStructure> PMsrLines

typedef to make to code more readable: list of msr-file lines.

Definition at line 1007 of file PMusr.h.

◆ PMsrParamList

typedef std::vector<PMsrParamStructure> PMsrParamList

typedef to make to code more readable: vector of fit parameters.

Definition at line 1040 of file PMusr.h.

◆ PMsrPlotList

typedef std::vector<PMsrPlotStructure> PMsrPlotList

typedef to make to code more readable: list of plots.

Definition at line 1330 of file PMusr.h.

◆ PMsrRunList

typedef std::vector<PMsrRunBlock> PMsrRunList

typedef to make to code more readable: list of runs with its parameters.

Definition at line 1263 of file PMusr.h.

◆ PRawRunDataList

typedef std::vector<PRawRunData> PRawRunDataList

typedef to make to code more readable. A vector of a raw musr run.

Definition at line 988 of file PMusr.h.

◆ PRunNameTemplateList

typedef std::vector<PRunNameTemplate> PRunNameTemplateList

typedef to make to code more readable: list of run name templates.

Definition at line 1472 of file PMusr.h.

◆ PStringVector

typedef std::vector<TString> PStringVector

typedef to make to code more readable. Definition of a string vector

Definition at line 417 of file PMusr.h.

◆ PUIntVector

typedef std::vector<UInt_t> PUIntVector

typedef to make to code more readable. Definition of an unsigned int vector

Definition at line 375 of file PMusr.h.

Enumeration Type Documentation

◆ EPMusrHandleTag

Data handling mode tag for musrfit operations.

This enumeration specifies the operational mode of the musrfit framework, determining whether data should be fitted, viewed, or if no operation is active.

Enumerator
kEmpty 

No operation active.

kFit 

Fitting mode - perform least-squares fit to data.

kView 

Viewing mode - display data and theory without fitting.

Definition at line 427 of file PMusr.h.