model

This module contains the python representations of the functions and algorithms described in the paper “On the partial-wave analysis of mesonic resonances decaying to multiparticle final states produced by polarized photons” by Carlos Salgado and Dennis Weygand.

complexV

pythonPWA.model.complexV.complexV(resonance, wave, waves, normint, mass)

Production amplitude (V) function.

Args:

resonance (pythonPWA.dataTypes.resonance)

wave (pythonPWA.dataTypes.wave)

waves (list)

normint (pythonPWA.model.normInt)

mass (float)

Returns:

A numpy.complex value representing a production amplitude.

getPhi

pythonPWA.model.getPhi.getPhi(mass, resonance)

Returns the value of Phi used in complex production amplitude calculation, and thus number of events (nTrue.nTrue()), for a specified mass and resonance.

Args:

mass (float)

resonance (pythonPWA.dataTypes.resonance)

Returns:

Float representing the value of phi.

intensity

class pythonPWA.model.intensity.intensity(resonances=[], waves=[], productionAmplitudes=[], normint=None, alphaList=[], beamPolarization=0.6)

This represents the intensity function used in the PWA model.

__init__(resonances=[], waves=[], productionAmplitudes=[], normint=None, alphaList=[], beamPolarization=0.6)

Default constructor for the intensity class.

Kwargs:

resonances (list)

waves (list)

productionAmplitudes (list)

normint (pythonPWA.model.normInt)

alphaList (list)

beamPolarization (float)

__weakref__

list of weak references to the object (if defined)

calculate(mass, eventNumber)

Calculate function for the instensity class, returns the value for the instensity for specified mass and event number.

Args:

mass (float)

eventNumber (int)

Returns:

The value of the intensity function as a numpy.complex type.

magV

pythonPWA.model.magV.magV(mass, resonance, wave, waves, normint)

Returns the magnitude of the production amplitued V, for a specified wave, resonance, wave in the set of waves, and normalization integral.

normInt

class pythonPWA.model.normInt.normInt(waves=[], alphaList=[], beamPolarization=0.0)

Represents a normalization integral. To compute the value of the normalization integral call normInt.execute(). To save the normalization integral to a directory call normInt.save()

execute()

Returns the normalization integral for the waves, alphas, and beam polarization. Note that the normalization integral is stored as a numpy ndarray with 4 dimensions. The indexing of the normalization integral is [wave1.epsilon,wave2.epsilon,waves.index(wave1),waves.index(wave2)]. This means that the first 2 dimensions (wave1.epsilon,wave2.epsilon) have length of 2. The last 2 dimensions (waves.index(wave1),waves.index(waves2)) have length equal to the number of waves to be represented in this normalization integral.

save(directory)

Saves the current value of the normalization integral. Note that if this is called before normInt.execute() it will save an ndarray of complex 0’s to the specified file.

writeToAscii(directory)

This function writes the values of the normalization integral to a text file. Make sure to run execute method first.

nTrue

pythonPWA.model.nTrue.calcNTrueError(iSets, covarianceMatrix, rawNormalizationIntegral, vList, waves)

Calculates the total error in nTrue including the systematic and statistical error

pythonPWA.model.nTrue.calcStatSquaredError(covarianceMatrix, rawNormalizationIntegral, vList, waves)

Calculates the square of the statistical error for nTrue

pythonPWA.model.nTrue.calcSysSquaredError(iSets)

Calculates the square of the systematic error for nTrue

pythonPWA.model.nTrue.constructJacobianVector(rawNormalizationIntegral, vList, waves)

Returns a list representing the jacobian vector for specifed set of waves.

pythonPWA.model.nTrue.nTrue(resonances, waves, mass, normint)

Returns the number of events for all resonances and waves for the specified mass and normalization integral.

pythonPWA.model.nTrue.nTrueForFixedV1V2(vList, waves, normint)

calculates the number of events for fitted v1 and v2 values.

pythonPWA.model.nTrue.nTrueForFixedV1V2AndWave(v, waves, wave, normint)

calculates the number of events for fitted v1 and v2 values for a specific wave.

pythonPWA.model.nTrue.nTrueForWave(resonances, waves, wave, mass, normint)

Returns the number of events for all resonances, for a specified wave out of the set of all waves, for the specified mass, and for the nomalization integral.

pythonPWA.model.nTrue.partialDerivativeNTrue(rawNormalizationIntegral, vList, waves, wave, realFlag)

Returns the value of the partial derivative of nTrue

prodAmp

class pythonPWA.model.prodAmp.ProdAmp(gList=[[0, 0.0], [1, 0.4], [2, 1.0], [3, 0.0], [4, 0.0], [5, 0.0], [6, 0.0], [7, 0.0], [8, 0.0]])

This is a recreation of the ProdAmp class written by Dennis Weygand. The algorithmic structuring of this class is as similar to the ProdAmp java version as possible.

spinDensity

pythonPWA.model.spinDensity.spinDensity(beampolarization, alpha)

SpinDensity matrix for specified beam polarization and angle alpha.

Args:

beampolarization (float)

alpha (float)

Returns:

The entire spinDensity matrix for specified beam polarization and angle alpha. Note that the spinDensity matrix is a 2x2 matrix indexed by the wave reflectivity (wave.epsilon).

Table Of Contents