def processMultiGroup(self, style, tempInfo, indent): from fudge.processing import group as groupModule from fudge.processing.deterministic import transferMatrices as transferMatricesModule verbosity = tempInfo['verbosity'] indent2 = indent + tempInfo['incrementalIndent'] productLabel = tempInfo['productLabel'] outputChannel = tempInfo['reaction'].outputChannel if (verbosity > 2): print '%sGrouping %s' % (indent, self.moniker) angularSubform = self.angularSubform if (isinstance(angularSubform, recoil)): angularSubform = angularSubform.getNumericalDistribution() Q = outputChannel.Q['eval'] Q = Q.evaluate(Q.domainMin) # BRBBRB residual = outputChannel.products[1] if (tempInfo['productIndex'] == '1'): residual = outputChannel.products[0] residualMass = tempInfo['masses']['Residual'] tempInfo['masses']['Residual'] = residual.getMass(tempInfo['massUnit']) TM_1, TM_E = transferMatricesModule.twoBodyTransferMatrix( style, tempInfo, self.productFrame, tempInfo['crossSection'], angularSubform, Q, comment=tempInfo['transferMatrixComment'] + ' outgoing data for %s' % productLabel) tempInfo['masses']['Residual'] = residualMass return (groupModule.TMs2Form(style, tempInfo, TM_1, TM_E))
def processSnMultiGroup( self, style, tempInfo, indent ) : from fudge.processing import group as groupModule from fudge.processing.deterministic import transferMatrices as transferMatricesModule verbosity = tempInfo['verbosity'] indent2 = indent + tempInfo['incrementalIndent'] projectile = tempInfo['reactionSuite'].projectile target = tempInfo['reactionSuite'].target product = tempInfo['product'].particle productLabel = tempInfo['productLabel'] energyUnit = tempInfo['incidentEnergyUnit'] massUnit = energyUnit + '/c**2' if( verbosity > 2 ) : print '%sGrouping %s' % ( verbosityIndent, self.moniker ) projectileZA = projectile.getZ_A_SuffixAndZA( )[-1] targetZA = target.getZ_A_SuffixAndZA( )[-1] productZA = product.getZ_A_SuffixAndZA( )[-1] compoundZA = projectileZA + targetZA residualZA = compoundZA - productZA particlesData = { 'projectile' : { 'ZA' : projectileZA }, 'target' : { 'ZA' : targetZA }, 'product' : { 'ZA' : productZA }, # The next line is wrong. 'residual' : { 'ZA' : residualZA }, # ??????? This is wrong! 'compound' : { 'ZA' : compoundZA, 'mass' : projectile.getMass( massUnit ) + target.getMass( massUnit ) } } residualMass = tempInfo['masses']['Residual'] tempInfo['masses']['Residual'] = target.getMass( massUnit ) # ??????? This is wrong! TM_1, TM_E = transferMatricesModule.KalbachMann_TransferMatrix( style, tempInfo, tempInfo['crossSection'], particlesData, self, tempInfo['multiplicity'], comment = tempInfo['transferMatrixComment'] + ' outgoing data for %s' % tempInfo['productLabel'] ) tempInfo['masses']['Residual'] = residualMass return( groupModule.TMs2Form( style, tempInfo, TM_1, TM_E ) )
def processMultiGroup( self, style, tempInfo, indent ) : from fudge.processing.deterministic import transferMatrices as transferMatricesModule from fudge.processing import group as groupModule verbosity = tempInfo['verbosity'] if( verbosity > 2 ) : print '%sGrouping %s' % ( indent, self.moniker ) TM_1, TM_E = transferMatricesModule.comptonScattering( style, tempInfo, self.productFrame, self.scatteringFunction, comment = tempInfo['transferMatrixComment'] + ' outgoing data for %s' % tempInfo['productLabel'] ) return( groupModule.TMs2Form( style, tempInfo, TM_1, TM_E ) )
def processMultiGroup( self, style, tempInfo, indent ) : from fudge.processing.deterministic import transferMatrices as transferMatricesModule verbosity = tempInfo['verbosity'] productFrame = tempInfo['productFrame'] if( verbosity > 2 ) : print '%sGrouping %s' % ( indent, self.moniker ) TM_1, TM_E = transferMatricesModule.ENDFEMuEpP_TransferMatrix( style, tempInfo, productFrame, tempInfo['crossSection'], self, tempInfo['multiplicity'], comment = tempInfo['transferMatrixComment'] + ' outgoing data for %s' % tempInfo['productLabel'] ) return( groupModule.TMs2Form( style, tempInfo, TM_1, TM_E ) )
def processMultiGroup( self, style, tempInfo, indent ) : from fudge.processing.deterministic import transferMatrices as transferMatricesModule from fudge.processing import group as groupModule verbosity = tempInfo['verbosity'] if( verbosity > 2 ) : print '%sGrouping %s' % ( indent, self.moniker ) print type( self.anomalousScatteringFactor_imaginaryPart.data ) TM_1, TM_E = transferMatricesModule.wholeAtomScattering( style, tempInfo, self.productFrame, self.formFactor.data, realAnomalousFactor = self.anomalousScatteringFactor_realPart.data, imaginaryAnomalousFactor = self.anomalousScatteringFactor_imaginaryPart.data, comment = tempInfo['transferMatrixComment'] + ' outgoing data for %s' % tempInfo['productLabel'] ) return( groupModule.TMs2Form( style, tempInfo, TM_1, TM_E ) )
def processSnMultiGroup( self, style, tempInfo, indent ) : from fudge.processing import group as groupModule from fudge.processing.deterministic import transferMatrices as transferMatricesModule verbosity = tempInfo['verbosity'] indent2 = indent + tempInfo['incrementalIndent'] productLabel = tempInfo['productLabel'] angularSubform = self.angularSubform.data energySubform = self.energySubform.data energyUnit = tempInfo['incidentEnergyUnit'] massUnit = energyUnit + '/c**2' if( verbosity > 2 ) : print '%sGrouping %s' % ( indent, self.moniker ) crossSection = tempInfo['crossSection'] product = tempInfo['product'] if( isinstance( energySubform, energyModule.constant ) ) : if( product.name == 'gamma' ) : Ep = float( energySubform.value ) TM_1, TM_E = transferMatricesModule.discreteGammaAngularData( style, tempInfo, Ep, crossSection, angularSubform, 1., comment = tempInfo['transferMatrixComment'] + ' outgoing data for %s' % productLabel ) else : raise Exception( 'See Bret' ) else : if( isinstance( energySubform, energyModule.NBodyPhaseSpace ) ) : totalMass = energySubform.numberOfProductsMasses.getValueAs( massUnit ) Q = tempInfo['reaction'].getQ( energyUnit, final = False, groundStateQ = True ) TM_1, TM_E = transferMatricesModule.NBodyPhaseSpace( style, tempInfo, crossSection, energySubform.numberOfProducts, totalMass, Q, tempInfo['multiplicity'], comment = tempInfo['transferMatrixComment'] + ' outgoing data for %s' % productLabel ) else : TM_1, TM_E = transferMatricesModule.uncorrelated_EMuP_EEpP_TransferMatrix( style, tempInfo, crossSection, self.productFrame, angularSubform, energySubform, tempInfo['multiplicity'], comment = tempInfo['transferMatrixComment'] + ' outgoing data for %s' % productLabel ) return( groupModule.TMs2Form( style, tempInfo, TM_1, TM_E ) )
def processMultiGroup(self, style, tempInfo, indent): from fudge.processing import group as groupModule from fudge.processing.deterministic import transferMatrices as transferMatricesModule verbosity = tempInfo['verbosity'] indent2 = indent + tempInfo['incrementalIndent'] reactionSuite = tempInfo['reactionSuite'] product = reactionSuite.PoPs[tempInfo['product'].id] productLabel = tempInfo['productLabel'] energyUnit = tempInfo['incidentEnergyUnit'] massUnit = energyUnit + '/c**2' # BRB6 hardwired mass2MeVFactor = PQUModule.PQU(1, energyUnit).getValueAs('MeV') if (verbosity > 2): print '%sGrouping %s' % (indent, self.moniker) projectileZA = tempInfo['projectileZA'] targetZA = tempInfo['targetZA'] if (targetZA == 6000): targetZA = 6012 print ' Kludge for C_natural: changing targetZA from 6000 to %d' % targetZA productZA = miscPoPsModule.ZA(product) compoundZA = projectileZA + targetZA residualZA = compoundZA - productZA particlesData = { 'projectile': { 'ZA': projectileZA }, 'target': { 'ZA': targetZA }, 'product': { 'ZA': productZA }, 'residual': { 'ZA': residualZA }, 'compound': { 'ZA': compoundZA, 'mass': tempInfo['projectileMass'] + tempInfo['targetMass'] } } residualMass = tempInfo['masses']['Residual'] # Save old value. Why? residual = None compound = None residualSymbol = chemicalElementModule.symbolFromZ[residualZA // 1000] residualID = isotopeModule.isotopeIDFromElementIDAndA( residualSymbol, str(residualZA % 1000)) if (residualID in reactionSuite.PoPs): residual = reactionSuite.PoPs[residualID] compoundSymbol = chemicalElementModule.symbolFromZ[compoundZA // 1000] compoundID = isotopeModule.isotopeIDFromElementIDAndA( compoundSymbol, str(compoundZA % 1000)) if (compoundID in reactionSuite.PoPs): compound = reactionSuite.PoPs[compoundID] try: residual.getMass(massUnit) except: residual = None try: compound.getMass(massUnit) except: compound = None if (residual is None): if (compound is None): _residualMass = particlesData['compound'][ 'mass'] - product.getMass(massUnit) else: _residualMass = compound.getMass(massUnit) - product.getMass( massUnit) tempInfo['masses']['Residual'] = _residualMass print 'Could not find residual in particle database: ZA = %d, using mass %s %s' % ( residualZA, _residualMass, massUnit) else: tempInfo['masses']['Residual'] = residual.getMass(massUnit) masses = tempInfo['masses'] tempInfo['masses'] = {} for particle in masses: tempInfo['masses'][particle] = masses[particle] * mass2MeVFactor particlesData['compound']['mass'] *= mass2MeVFactor try: TM_1, TM_E = transferMatricesModule.KalbachMann_TransferMatrix( style, tempInfo, tempInfo['crossSection'], particlesData, self, tempInfo['multiplicity'], comment=tempInfo['transferMatrixComment'] + ' outgoing data for %s' % tempInfo['productLabel']) except: tempInfo['masses'] = masses raise tempInfo['masses'] = masses tempInfo['masses']['Residual'] = residualMass return (groupModule.TMs2Form(style, tempInfo, TM_1, TM_E))