/******************************************************************************************** * Constructors ********************************************************************************************/ public SimpleFireballField( FireballFieldType type, CoordinateSystem system ) : base(type, system) { Values = new double[XDimension, YDimension]; }
public SimpleFireballField( FireballFieldType type, CoordinateSystem system, SimpleFireballFieldFunction function ) : this(type, system) { SetValues(function); }
public SimpleFireballField( FireballFieldType type, CoordinateSystem system, double[,] values ) : this(type, system) { SetValues(values); }
private static bool IsPTDependent( FireballFieldType fieldType ) { return(fieldType == FireballFieldType.DampingFactor || fieldType == FireballFieldType.DecayWidth || fieldType == FireballFieldType.UnscaledSuppression); }
public StateSpecificFireballField( FireballFieldType type, CoordinateSystem system, IList <double> transverseMomenta, StateSpecificFireballFieldFunction function ) : this(type, system, transverseMomenta) { SetValues(function); }
/******************************************************************************************** * Constructors ********************************************************************************************/ public StateSpecificFireballField( FireballFieldType type, CoordinateSystem system, IList <double> transverseMomenta ) : base(type, system) { TransverseMomenta = new ReadOnlyCollection <double>(transverseMomenta); InitValues(out Values); }
/******************************************************************************************** * Constructors ********************************************************************************************/ public FireballField( FireballFieldType type, CoordinateSystem system ) { Type = type; System = system; AssertValidMembers(); }
public double IntegrateFireballField( FireballFieldType fieldType, BottomiumState state = BottomiumState.Y1S, int pTIndex = 0 ) { SimpleFireballField field = GetFireballField(fieldType, state, pTIndex); return(field.IntegrateValues()); }
public static FireballElectromagneticField CreateZeroField( FireballFieldType type, CoordinateSystem system ) { Func <double, double, double, double, double> fieldFunction = (tau, x, y, sigma) => 0; return(new FireballElectromagneticField( type, system, fieldFunction, double.PositiveInfinity)); }
/******************************************************************************************** * Constructors ********************************************************************************************/ protected FireballElectromagneticField( FireballFieldType type, CoordinateSystem system, Func <double, double, double, double, double> fieldFunction, double fieldUpdateInterval ) : base(type, system) { FieldFunction = fieldFunction; UpdateInterval = fieldUpdateInterval; CurrentTime = 0; }
private void AssertThrowsWhenGivenParams( Type exceptionType, FireballFieldType fireballFieldType, SimpleFireballFieldFunction function ) { bool threwException = false; try { new SimpleFireballField(fireballFieldType, CoordinateSystem, function); } catch (Exception ex) { Assert.IsInstanceOfType(ex, exceptionType); threwException = true; } Assert.IsTrue(threwException, "No Exception was thrown, expected: " + exceptionType.ToString() + "."); }
private void AssertThrowsWhenGivenParams( Type exceptionType, FireballFieldType fireballFieldType, IList <double> transverseMomenta, StateSpecificFireballFieldFunction function ) { bool threwException = false; try { new StateSpecificFireballField( fireballFieldType, CoordinateSystem, transverseMomenta, function); } catch (Exception ex) { Assert.IsInstanceOfType(ex, exceptionType); threwException = true; } Assert.IsTrue(threwException, "No Exception was thrown, expected: " + exceptionType.ToString() + "."); }
public InvalidFireballFieldTypeException( FireballFieldType type ) : base("Invalid FireballFieldType: \"" + type.ToString() + "\"") { }
private SimpleFireballField GetFireballField( FireballFieldType fieldType, BottomiumState state = BottomiumState.Y1S, int pTIndex = 0 ) { if (pTIndex >= Param.TransverseMomenta_GeV.Count || pTIndex < 0) { throw new Exception("pTIndex is invalid."); } switch (fieldType) { case FireballFieldType.ColumnDensityA: return(GlauberCalculation.NucleonNumberColumnDensityFieldA); case FireballFieldType.ColumnDensityB: return(GlauberCalculation.NucleonNumberColumnDensityFieldB); case FireballFieldType.DampingFactor: return(DampingFactor.GetSimpleFireballField(pTIndex, state)); case FireballFieldType.DecayWidth: return(DecayWidth.GetSimpleFireballField(pTIndex, state)); case FireballFieldType.NucleonDensityA: return(GlauberCalculation.NucleonNumberDensityFieldA); case FireballFieldType.NucleonDensityB: return(GlauberCalculation.NucleonNumberDensityFieldB); case FireballFieldType.NumberCollisions: return(GlauberCalculation.NumberCollisionsField); case FireballFieldType.NumberParticipants: return(GlauberCalculation.NumberParticipantsField); case FireballFieldType.Overlap: return(GlauberCalculation.OverlapField); case FireballFieldType.Temperature: return(Temperature); case FireballFieldType.TemperatureScaling: return(GlauberCalculation.TemperatureScalingField); case FireballFieldType.TemperatureNormalization: return(Temperature.TemperatureNormalizationField); case FireballFieldType.VelocityX: return(VelocityX); case FireballFieldType.VelocityY: return(VelocityY); case FireballFieldType.UnscaledSuppression: return(GetUnscaledSuppression(state, pTIndex)); case FireballFieldType.ElectricFieldStrength: return(ElectricField); case FireballFieldType.MagneticFieldStrength: return(MagneticField); default: throw new Exception("Unknown FireballField."); } }