\(\renewcommand\AA{\unicode{x212B}}\)

AlphaCalc v1

../_images/AlphaCalc-v1_dlg.png

AlphaCalc dialog.

Summary

Muon algorithm for calculating the detector efficiency between two groups of detectors.

See Also

AsymmetryCalc, CalculateMuonAsymmetry

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

MatrixWorkspace

Mandatory

Name of the input workspace

ForwardSpectra

Input

int list

1

The spectra numbers of the forward group (default to 1)

BackwardSpectra

Input

int list

2

The spectra numbers of the backward group (default to 2)

FirstGoodValue

Input

number

Optional

First good value (default lowest value of x)

LastGoodValue

Input

number

Optional

Last good value (default highest value of x)

Alpha

Output

number

The alpha efficiency (default to 1.0)

Description

Returns the relative efficiency of the forward detector group compared to the backward detector group. If Alpha is larger than 1 more counts has been collected in the forward group.

Note

This algorithm leaves the input workspace unchanged. To group detectors in a workspace use MuonGroupDetectors v1.

Usage

Example - Calculating Alpha:

y = [1,1,1,1,1] + [2,2,2,2,2]
x = [1,2,3,4,5,6] * 2
input = CreateWorkspace(x,y, NSpec=2)

alpha = AlphaCalc(input)

print('Alpha value: {0:.3f}'.format(alpha))

Output:

Alpha value: 0.500

Example - Calculating Alpha, reversing forward and backward spectra:

y = [1,1,1,1,1] + [2,2,2,2,2]
x = [1,2,3,4,5,6] * 2
input = CreateWorkspace(x,y, NSpec=2)

alpha = AlphaCalc(input,
                  ForwardSpectra=[2],
                  BackwardSpectra=[1])

print('Alpha value: {0:.3f}'.format(alpha))

Output:

Alpha value: 2.000

Categories: AlgorithmIndex | Muon

Source

C++ header: AlphaCalc.h

C++ source: AlphaCalc.cpp