private double GetInverselyAveragedDecayWidth( double qgpTemperature, double qgpVelocity, double electricFieldStrength, double magneticFieldStrength ) { QQDataFunction lifeTime = temperature => 1 / GetEffectiveDecayWidth( temperature, electricFieldStrength, magneticFieldStrength); return(1 / CalculateAverageDopplerShift(lifeTime, qgpTemperature, qgpVelocity)); }
private double CalculateAverageDopplerShift( QQDataFunction function, double qgpTemperature, double qgpVelocity ) { Func <double, double> integrand = cosine => function( GetDopplerShiftedTemperature(qgpTemperature, qgpVelocity, cosine)); return(0.5 * NewtonCotesTrapeziumRule.IntegrateComposite( integrand, -1, 1, NumberAveragingAngles)); }
private double GetAveragedDecayWidth( double qgpTemperature, double qgpVelocity, double electricFieldStrength, double magneticFieldStrength ) { QQDataFunction decayWidth = temperature => GetEffectiveDecayWidth( temperature, electricFieldStrength, magneticFieldStrength); return(CalculateAverageDopplerShift(decayWidth, qgpTemperature, qgpVelocity)); }