musredit 1.0.0
Loading...
Searching...
No Matches
PGetAsymmetryRunBlockDialog Class Reference

Dialog for creating asymmetry-type RUN blocks in msr files. More...

#include <PGetAsymmetryRunBlockDialog.h>

Inheritance diagram for PGetAsymmetryRunBlockDialog:
Collaboration diagram for PGetAsymmetryRunBlockDialog:

Public Member Functions

 PGetAsymmetryRunBlockDialog (const QString helpUrl)
 Constructs the asymmetry RUN block dialog.
 
RUN Block Generators

Methods to generate formatted msr-file text for each parameter.

QString getRunHeaderInfo ()
 Generates the RUN header line for the asymmetry block.
 
QString getAlphaParameter (bool &present)
 Generates the alpha parameter line for the asymmetry block.
 
QString getBetaParameter (bool &present)
 Generates the beta parameter line for the asymmetry block.
 
QString getMap (bool &valid)
 Generates the parameter map line for the asymmetry block.
 
QString getForward ()
 Get the forward histogram specification line.
 
QString getBackward ()
 Get the backward histogram specification line.
 
QString getBackground (bool &valid)
 Generates the background specification for the asymmetry block.
 
QString getData (bool &valid)
 Generates the data range specification for the asymmetry block.
 
QString getT0 (bool &present)
 Generates the T0 (time zero) specification for the asymmetry block.
 
QString getFitRange (bool &valid)
 Generates the fit range specification for the asymmetry block.
 
QString getPacking (bool &present)
 Generates the packing (rebinning) specification for the asymmetry block.
 

Private Slots

void helpContent ()
 Opens the online help for asymmetry RUN blocks.
 

Private Attributes

QString fHelpUrl
 URL to the online documentation for asymmetry RUN blocks.
 

Detailed Description

Dialog for creating asymmetry-type RUN blocks in msr files.

This dialog collects all parameters needed to generate an asymmetry RUN block for muon spin rotation data analysis. Asymmetry fitting uses the ratio of forward and backward detector counts to extract the muon spin polarization signal.

RUN Block Parameters:
  • Run file name, beamline, institute, and file format
  • Forward and backward histogram numbers
  • Alpha parameter (detector efficiency ratio)
  • Beta parameter (detector phase correction)
  • Parameter map
  • Background specification (fixed or fitted)
  • Data range (in bins)
  • T0 (time zero) values
  • Fit range (in microseconds)
  • Packing/binning factor
Generated Output Format:
The dialog generates msr-file formatted text blocks such as:
RUN data001 GPS PSI ROOT (name beamline institute data-file-format)
alpha 1
beta 1
map 1 2 3
forward 1
backward 2
background 50 150 50 150
fit 0.0 10.0
packing 1
See also
PGetSingleHistoRunBlockDialog For single histogram fitting
PGetNonMusrRunBlockDialog For non-muSR data

Definition at line 91 of file PGetAsymmetryRunBlockDialog.h.

Constructor & Destructor Documentation

◆ PGetAsymmetryRunBlockDialog()

PGetAsymmetryRunBlockDialog::PGetAsymmetryRunBlockDialog ( const QString helpUrl)

Constructs the asymmetry RUN block dialog.

Initializes the dialog UI and sets up input validators for all numeric fields. The dialog is created as modal.

Input Validators:
  • Integer validators: histogram numbers, data ranges, background ranges, t0 values, packing, alpha, beta
  • Double validators: fixed background values, fit range
Parameters
helpUrlURL to the online documentation for asymmetry RUN blocks.

Definition at line 66 of file PGetAsymmetryRunBlockDialog.cpp.

Member Function Documentation

◆ getAlphaParameter()

QString PGetAsymmetryRunBlockDialog::getAlphaParameter ( bool & present)

Generates the alpha parameter line for the asymmetry block.

Alpha is the detector efficiency ratio correction parameter used in asymmetry calculations: A = (N_F - alpha * N_B) / (N_F + alpha * N_B). The parameter typically references a fit parameter number.

Parameters
[out]presentSet to true if an alpha value was entered, false if empty (default alpha=1 will be used).
Returns
Formatted alpha parameter string, e.g.: "alpha 1\n"

Definition at line 129 of file PGetAsymmetryRunBlockDialog.cpp.

◆ getBackground()

QString PGetAsymmetryRunBlockDialog::getBackground ( bool & valid)

Generates the background specification for the asymmetry block.

Creates either a "background" line (bin ranges for background estimation) or a "backgr.fix" line (fixed background values). Only one type should be specified.

Background Types:
  • background: Four integers specifying bin ranges [forward_start, forward_end, backward_start, backward_end]
  • backgr.fix: Two doubles specifying fixed background counts for forward and backward detectors
Parameters
[out]validSet to true if valid background info is provided, false if no background info given (a default "background 0 10 0 10" is returned).
Returns
Formatted background string, e.g.: "background 50 150 50 150\n" or "backgr.fix 15.3 14.8\n"

Definition at line 213 of file PGetAsymmetryRunBlockDialog.cpp.

◆ getBackward()

QString PGetAsymmetryRunBlockDialog::getBackward ( )
inline

Get the backward histogram specification line.

Returns
Formatted "backward" line for the msr file.

Definition at line 117 of file PGetAsymmetryRunBlockDialog.h.

◆ getBetaParameter()

QString PGetAsymmetryRunBlockDialog::getBetaParameter ( bool & present)

Generates the beta parameter line for the asymmetry block.

Beta is the detector phase correction parameter, typically used for correcting phase differences between forward and backward detectors. The parameter typically references a fit parameter number.

Parameters
[out]presentSet to true if a beta value was entered, false if empty (default beta=1 will be used).
Returns
Formatted beta parameter string, e.g.: "beta 1\n"

Definition at line 154 of file PGetAsymmetryRunBlockDialog.cpp.

◆ getData()

QString PGetAsymmetryRunBlockDialog::getData ( bool & valid)

Generates the data range specification for the asymmetry block.

Creates the "data" line specifying the histogram bin ranges to be used for fitting. Four values are required: start and end bins for both forward and backward histograms.

Parameters
[out]validSet to true if all four data range values are provided, false if any are missing.
Returns
Formatted data range string, e.g.: "data 100 8000 100 8000\n" Returns empty string if values are missing.

Definition at line 257 of file PGetAsymmetryRunBlockDialog.cpp.

◆ getFitRange()

QString PGetAsymmetryRunBlockDialog::getFitRange ( bool & valid)

Generates the fit range specification for the asymmetry block.

Creates the "fit" line specifying the time range (in microseconds) over which the fit will be performed.

Parameters
[out]validSet to true if both fit range values are provided, false if missing (a default range [0.0, 10.0] is returned).
Returns
Formatted fit range string, e.g.: "fit 0.5 9.5\n"

Definition at line 316 of file PGetAsymmetryRunBlockDialog.cpp.

◆ getForward()

QString PGetAsymmetryRunBlockDialog::getForward ( )
inline

Get the forward histogram specification line.

Returns
Formatted "forward" line for the msr file.

Definition at line 111 of file PGetAsymmetryRunBlockDialog.h.

◆ getMap()

QString PGetAsymmetryRunBlockDialog::getMap ( bool & valid)

Generates the parameter map line for the asymmetry block.

The map line defines the mapping between theory function parameters and the fit parameters defined in the FITPARAMETER block. It should contain only space-separated integers.

Parameters
[out]validSet to true if the map contains only digits and spaces, false if invalid characters are found.
Returns
Formatted map string, e.g.: "map 1 2 3 4\n"

Definition at line 179 of file PGetAsymmetryRunBlockDialog.cpp.

◆ getPacking()

QString PGetAsymmetryRunBlockDialog::getPacking ( bool & present)

Generates the packing (rebinning) specification for the asymmetry block.

Creates the "packing" line specifying how many histogram bins should be combined into one. A packing of 1 means no rebinning, 2 means combine pairs of bins, etc.

Parameters
[out]presentSet to true if a packing value was provided, false if missing (a default packing of 1 is returned).
Returns
Formatted packing string, e.g.: "packing 10\n"

Definition at line 346 of file PGetAsymmetryRunBlockDialog.cpp.

◆ getRunHeaderInfo()

QString PGetAsymmetryRunBlockDialog::getRunHeaderInfo ( )

Generates the RUN header line for the asymmetry block.

Creates the first line of the RUN block containing the run file name, beamline identifier, institute name, and data file format. The beamline is converted to uppercase.

Returns
Formatted RUN header string, e.g.: "RUN data001 GPS PSI ROOT (name beamline institute data-file-format)\n"

Definition at line 104 of file PGetAsymmetryRunBlockDialog.cpp.

◆ getT0()

QString PGetAsymmetryRunBlockDialog::getT0 ( bool & present)

Generates the T0 (time zero) specification for the asymmetry block.

Creates the "t0" line specifying the time zero bin for both forward and backward histograms. T0 is the bin corresponding to muon implantation time.

Parameters
[out]presentSet to true if both t0 values are provided, false otherwise.
Returns
Formatted t0 string, e.g.: "t0 250 250\n" Returns empty string if values are missing.

Definition at line 288 of file PGetAsymmetryRunBlockDialog.cpp.

◆ helpContent

void PGetAsymmetryRunBlockDialog::helpContent ( )
privateslot

Opens the online help for asymmetry RUN blocks.

Opens the online help documentation for asymmetry RUN blocks.

Attempts to open the help URL in the system's default web browser using QDesktopServices. If the URL is empty, displays an informational message. If the browser fails to open, displays an error message with a clickable link.

Definition at line 369 of file PGetAsymmetryRunBlockDialog.cpp.

Member Data Documentation

◆ fHelpUrl

QString PGetAsymmetryRunBlockDialog::fHelpUrl
private

URL to the online documentation for asymmetry RUN blocks.

Definition at line 133 of file PGetAsymmetryRunBlockDialog.h.


The documentation for this class was generated from the following files: