diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 9688a03..d6f7003 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.6","generation_timestamp":"2024-11-05T22:20:52","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.6","generation_timestamp":"2024-11-11T17:14:55","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/generated/particles/index.html b/dev/generated/particles/index.html index eccc00c..e3b8a43 100644 --- a/dev/generated/particles/index.html +++ b/dev/generated/particles/index.html @@ -8,12 +8,12 @@ @assert !is_boson(Electron()) @assert !is_anti_particle(Electron()) @assert !is_fermion(Photon())

These functions are part of QEDbase.jl's particle interface.

ParticleStateful

ParticleStateful is the implementation of QEDbase's QEDbase.AbstractParticleStateful interface. It represents a particle with a direction (as used in the context of scattering processes, QEDbase.Incoming, QEDbase.Outgoing, or QEDbase.UnknownDirection), a particle species (Electron, Positron, Photon, ...), and a 4-momentum vector.

ps = ParticleStateful(Incoming(), Electron(), rand(SFourMomentum))
ParticleStateful: incoming electron
-    momentum: [0.47703174926171565, 0.19460163162039423, 0.9151576843508751, 0.003738391918556183]
+    momentum: [0.5124300336542875, 0.7400217661008659, 0.2351508149844419, 0.48646193706840823]
 

The relevant accessor functions for the interface are implemented:

particle_direction(ps)
incoming
particle_species(ps)
electron
momentum(ps)
4-element SFourMomentum with indices SOneTo(4):
- 0.47703174926171565
- 0.19460163162039423
- 0.9151576843508751
- 0.003738391918556183

Phase Space Points

A PhaseSpacePoint is the combination of incoming and outgoing ParticleStatefuls. It also contains information about the scattering process, model, and phase space that it is created for.

Constructors

psp = PhaseSpacePoint(
+ 0.5124300336542875
+ 0.7400217661008659
+ 0.2351508149844419
+ 0.48646193706840823

Phase Space Points

A PhaseSpacePoint is the combination of incoming and outgoing ParticleStatefuls. It also contains information about the scattering process, model, and phase space that it is created for.

Constructors

psp = PhaseSpacePoint(
     Compton(),                      # scattering process
     PerturbativeQED(),              # physics model
     PhasespaceDefinition(           # phase space definition
@@ -33,11 +33,11 @@
     model: perturbative QED
     phasespace definition: spherical coordinates in electron rest frame
     incoming particles:
-     -> incoming electron: [0.8899378446541081, 0.004042153604023158, 0.397980274465378, 0.9610450439858487]
-     -> incoming photon: [0.6637061172891727, 0.01462410761335109, 0.10090752719904517, 0.20802200980715757]
+     -> incoming electron: [0.19364840415165618, 0.24713276973982545, 0.9822832773674299, 0.5638418824042442]
+     -> incoming photon: [0.47325619402520813, 0.7797770507299893, 0.4210694557748539, 0.9689293691848972]
     outgoing particles:
-     -> outgoing electron: [0.0696772754527597, 0.7641012166594603, 0.5686140488697503, 0.2563191730085329]
-     -> outgoing photon: [0.5659818523982115, 0.24166991346480982, 0.6278900175446048, 0.4592090607795496]
+     -> outgoing electron: [0.918573794862195, 0.7892778303161222, 0.6605951799243333, 0.9791779741049096]
+     -> outgoing photon: [0.9450018883849867, 0.28221344002700044, 0.13643028665632917, 0.20100520986150583]
 

This version of the constructor automatically creates ParticleStateful obejcts from the momenta, matching the particles of the process. In the case of Compton, this is means an incoming electron and photon, and outgoing electron and photon.

Automatic checks make sure that the number of 4-momenta given matches the necessary number of 4-momenta for the process (this adds 0 overhead at runtime because it is inferred from type information alone).

    PhaseSpacePoint(
         Compton(),
         PerturbativeQED(),
@@ -65,11 +65,11 @@
     model: perturbative QED
     phasespace definition: spherical coordinates in electron rest frame
     incoming particles:
-     -> incoming electron: [0.6429611412493572, 0.7837700675283127, 0.2619477240927065, 0.4841195234855733]
-     -> incoming photon: [0.643802296078773, 0.02287745011387987, 0.7548684149523159, 0.09984651940294875]
+     -> incoming electron: [0.5674869193331556, 0.2024874623404207, 0.921436568429739, 0.5504496842704256]
+     -> incoming photon: [0.38137571150850036, 0.9043507373617743, 0.47898427197873894, 0.13326362720199847]
     outgoing particles:
-     -> outgoing electron: [0.3271902398635579, 0.061495145276687424, 0.7367392725723305, 0.34471658447863296]
-     -> outgoing photon: [0.5611987883342415, 0.7228200282378292, 0.8151759715010839, 0.43435743141580496]
+     -> outgoing electron: [0.45647920499745265, 0.013441466367441368, 0.3817364383240517, 0.9195676098173129]
+     -> outgoing photon: [0.7878063900891932, 0.265257473337417, 0.14226328024077395, 0.3535591839985033]
 

Similar to the constructor from momenta, this checks that the given ParticleStatefuls fit to the given process and throws otherwise. Again, since this can be infered from type information alone, it adds no overhead.

    PhaseSpacePoint(
         Compton(),
         PerturbativeQED(),
@@ -84,19 +84,19 @@
         ),
     )
┌ Error: InvalidInputError("expected incoming electron but got incoming positron")
 └ @ Main particles.md:162
Note

While these constructors check that the given types make sense and work together, they do not check whether the given momenta make a physical phase space point or that the incoming or outgoing particles have on-shell 4-momenta.

Accessors

The phase space point provides some convenient accessors to the stateful particles within:

psp[Incoming(), 1]  # the first incoming particle
ParticleStateful: incoming electron
-    momentum: [0.6429611412493572, 0.7837700675283127, 0.2619477240927065, 0.4841195234855733]
+    momentum: [0.5674869193331556, 0.2024874623404207, 0.921436568429739, 0.5504496842704256]
 
psp[Outgoing(), 2]  # the second outgoing particle
ParticleStateful: outgoing photon
-    momentum: [0.5611987883342415, 0.7228200282378292, 0.8151759715010839, 0.43435743141580496]
-
particles(psp, Incoming()) # all incoming particles as a tuple
(incoming electron: [0.6429611412493572, 0.7837700675283127, 0.2619477240927065, 0.4841195234855733], incoming photon: [0.643802296078773, 0.02287745011387987, 0.7548684149523159, 0.09984651940294875])

Momentum accessors:

momentum(psp, Incoming(), Electron(), 1) # the momentum of the first incoming electron
4-element SFourMomentum with indices SOneTo(4):
- 0.6429611412493572
- 0.7837700675283127
- 0.2619477240927065
- 0.4841195234855733

When only one particle of the species exists in the particle set, the 1 can be ommitted for convenience.

@assert ans == momentum(psp, Incoming(), Electron())
Note

This method throws when multiple (or zero) particles of the given direction and species exist in the phase space point.

When the index of the required momentum is known at compile time, a Val(N) can be used instead of N. This performs bounds checks at compile time and removes loops from the runtime execution

using BenchmarkTools
+    momentum: [0.7878063900891932, 0.265257473337417, 0.14226328024077395, 0.3535591839985033]
+
particles(psp, Incoming()) # all incoming particles as a tuple
(incoming electron: [0.5674869193331556, 0.2024874623404207, 0.921436568429739, 0.5504496842704256], incoming photon: [0.38137571150850036, 0.9043507373617743, 0.47898427197873894, 0.13326362720199847])

Momentum accessors:

momentum(psp, Incoming(), Electron(), 1) # the momentum of the first incoming electron
4-element SFourMomentum with indices SOneTo(4):
+ 0.5674869193331556
+ 0.2024874623404207
+ 0.921436568429739
+ 0.5504496842704256

When only one particle of the species exists in the particle set, the 1 can be ommitted for convenience.

@assert ans == momentum(psp, Incoming(), Electron())
Note

This method throws when multiple (or zero) particles of the given direction and species exist in the phase space point.

When the index of the required momentum is known at compile time, a Val(N) can be used instead of N. This performs bounds checks at compile time and removes loops from the runtime execution

using BenchmarkTools
 judge(
     median(@benchmark momentum($psp, Incoming(), Photon(), Val(1))),
     median(@benchmark momentum($psp, Incoming(), Photon(), 1)),
 )
BenchmarkTools.TrialJudgement: 
-  time:   -89.72% => improvement (5.00% tolerance)
+  time:   -87.64% => improvement (5.00% tolerance)
   memory: -100.00% => improvement (1.00% tolerance)
 
Note

This is only faster when N is actually known at compile time, for example when it is a literal integer or a function's type parameter. For dynamic values of N, prefer the Int variant or in case of loops, directly loop over the tuple of momenta.

Some more overloads for the momentum function exist, for a complete list please refer to its documentation: QEDbase.momentum, QEDbase.momenta.

Finally, process, model, and phase_space_definition can be used to request the object in question:

process(psp)
one-photon Compton scattering
     incoming: electron (all spins), photon (all polarizations)
@@ -116,10 +116,10 @@
 )
 
 in_sum(psp)
4-element SFourMomentum with indices SOneTo(4):
- 0.9685983876831324
- 0.9507606576104933
- 1.5851315567486823
- 1.0679407986175447

Every full PhaseSpacePoint is both an InPhaseSpacePoint and an OutPhaseSpacePoint, too. For example, the in_sum function defined above still works with a full PhaseSpacePoint:

psp = PhaseSpacePoint(
+ 0.6412279295996643
+ 1.2870828853705887
+ 1.3228101063204138
+ 1.1965772413832587

Every full PhaseSpacePoint is both an InPhaseSpacePoint and an OutPhaseSpacePoint, too. For example, the in_sum function defined above still works with a full PhaseSpacePoint:

psp = PhaseSpacePoint(
     Compton(),
     PerturbativeQED(),
     PhasespaceDefinition(SphericalCoordinateSystem(), ElectronRestFrame()),
@@ -128,10 +128,10 @@
 )
 
 in_sum(psp)
4-element SFourMomentum with indices SOneTo(4):
- 0.6866388172481368
- 1.265007772859199
- 1.5841141730166584
- 1.072191214970697

But an InPhaseSpacePoint is not an OutPhaseSpacePoint and vice versa. We cannot call in_sum on an OutPhaseSpacePoint:

psp = OutPhaseSpacePoint(
+ 1.6850747517134694
+ 0.8931521290356832
+ 1.311106328053985
+ 0.7693022922954273

But an InPhaseSpacePoint is not an OutPhaseSpacePoint and vice versa. We cannot call in_sum on an OutPhaseSpacePoint:

psp = OutPhaseSpacePoint(
     Compton(),
     PerturbativeQED(),
     PhasespaceDefinition(SphericalCoordinateSystem(), ElectronRestFrame()),
@@ -139,4 +139,4 @@
 )
 
     in_sum(psp)
┌ Error: MethodError(Main.in_sum, (PhaseSpacePoint of one-photon Compton scattering,), 0x0000000000007b40)
-└ @ Main particles.md:280

This page was generated using Literate.jl.

+└ @ Main particles.md:280

This page was generated using Literate.jl.

diff --git a/dev/generated/ps_def/index.html b/dev/generated/ps_def/index.html index 005f155..8b6e7b0 100644 --- a/dev/generated/ps_def/index.html +++ b/dev/generated/ps_def/index.html @@ -3,4 +3,4 @@ ps_def = PhasespaceDefinition(SphericalCoordinateSystem(), ElectronRestFrame())
PhasespaceDefinition
     coordinate system: spherical coordinates
     frame: electron rest frame
-

The phase space definition is used in PhaseSpacePoints for dispatching in some of the cross-section interface functions.


This page was generated using Literate.jl.

+

The phase space definition is used in PhaseSpacePoints for dispatching in some of the cross-section interface functions.


This page was generated using Literate.jl.

diff --git a/dev/generated/vectors/index.html b/dev/generated/vectors/index.html index 46d2c1d..391d057 100644 --- a/dev/generated/vectors/index.html +++ b/dev/generated/vectors/index.html @@ -1,18 +1,18 @@ Matrix and Vector Types · QEDcore.jl

Vector and Matrix Types

TBW

using QEDcore

Lorentz Vectors

lv = rand(SLorentzVector)
4-element SLorentzVector{Float64} with indices SOneTo(4):
- 0.24236444121334033
- 0.6391376857319616
- 0.3579473250987263
- 0.9812629152538076

Bispinors and Adjoint Bispinors

bs = rand(BiSpinor)
4-element BiSpinor with indices SOneTo(4):
- 0.16266343171463282 + 0.39781276020471723im
-  0.3898703179615076 + 0.688697530851377im
-  0.5014835390364512 + 0.9574848949667961im
-  0.7610115114949229 + 0.3190012400616381im
abs = rand(AdjointBiSpinor)
4-element AdjointBiSpinor with indices SOneTo(4):
- 0.041562058618322184 + 0.1831831618083677im
-  0.35851068252673857 + 0.5999598935299681im
-  0.07970829118397527 + 0.7920997675829757im
-   0.9183822435413531 + 0.026482217648545303im
abs * bs
-0.3675297634285666 + 1.313805921835989im

Dirac and Gamma Matrices

gm = rand(DiracMatrix)
4×4 DiracMatrix with indices SOneTo(4)×SOneTo(4):
- 0.951955+0.680856im   0.367873+0.147163im  …  0.670667+0.645976im
- 0.835196+0.0355848im   0.84511+0.658165im     0.525778+0.636683im
-  0.66869+0.214142im   0.166647+0.954917im     0.556827+0.983779im
- 0.170725+0.280409im   0.681167+0.779661im      0.49302+0.404638im
abs * gm * bs
-4.5053780090021505 + 3.180583672697105im

This page was generated using Literate.jl.

+ 0.6898706730059716 + 0.9497200121094976 + 0.7347703761179765 + 0.06971625539356274

Bispinors and Adjoint Bispinors

bs = rand(BiSpinor)
4-element BiSpinor with indices SOneTo(4):
+ 0.059979213615885096 + 0.5654354586372555im
+   0.6772399020689832 + 0.7084739862205124im
+   0.7789630672622218 + 0.18455226328208896im
+  0.07910382007786487 + 0.3375551411648158im
abs = rand(AdjointBiSpinor)
4-element AdjointBiSpinor with indices SOneTo(4):
+ 0.07224917236478556 + 0.9419672209712744im
+  0.8211669156427549 + 0.9402496162141518im
+ 0.24086474620058473 + 0.9252560145785232im
+ 0.04883636719494855 + 0.13151640798213082im
abs * bs
-0.6619678577458139 + 2.1079814674330017im

Dirac and Gamma Matrices

gm = rand(DiracMatrix)
4×4 DiracMatrix with indices SOneTo(4)×SOneTo(4):
+  0.749968+0.906041im  0.799362+0.357477im   …  0.329876+0.430853im
+  0.985028+0.117199im  0.330441+0.255369im      0.274491+0.104286im
+ 0.0605429+0.373808im  0.343195+0.0033193im     0.512458+0.11829im
+  0.113548+0.787755im  0.709438+0.998444im       0.44538+0.845511im
abs * gm * bs
-4.180775810583916 + 2.8005862643872352im

This page was generated using Literate.jl.

diff --git a/dev/index.html b/dev/index.html index 6ded163..b21bebe 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · QEDcore.jl

QEDcore.jl

Stable Dev Code Style: Blue

This package is part of the QuantumElectrodynamics.jl library. For the description of the interoperability with other packages of QuantumElectrodynamics.jl see docs.

This package's main purpose is to provide implementations of the basic interfaces defined in QEDbase.jl, such as various particle types, PhasespaceDefinition, PhaseSpacePoint, and various vector and matrix types. These types are used across most of the QEDjl-project repositories. For detailed information on these types, please refer to the respective pages in the docs.

Contributing

Contributions are welcome! If you'd like to report a bug, suggest an enhancement, or contribute code, please feel free to open an issue or submit a pull request.

To ensure consistency across the QuantumElectrodynamics.jl ecosystem, we encourage all contributors to review the QuantumElectrodynamics.jl contribution guide.

Credits and contributors

This work was partly funded by the Center for Advanced Systems Understanding (CASUS) that is financed by Germany’s Federal Ministry of Education and Research (BMBF) and by the Saxon Ministry for Science, Culture and Tourism (SMWK) with tax funds on the basis of the budget approved by the Saxon State Parliament.

The core code of the package QEDcore.jl is developed by a small team at the Center for Advanced Systems Understanding (CASUS), namely

Core Contributors

  • Uwe Hernandez Acosta (CASUS/HZDR, u.hernandez@hzdr.de)
  • Anton Reinhard (CASUS/HZDR)
  • Simeon Ehrig (CASUS/HZDR)

Former Contributors

We extend our sincere thanks to all contributors who have supported this project.

Acknowledgements

We extend our gratitude for the support received through direct and indirect funding for this project, especially

  • Michael Bussmann
  • Tobias Dornheim

License

MIT © Uwe Hernandez Acosta

+Home · QEDcore.jl

QEDcore.jl

Stable Dev Code Style: Blue

This package is part of the QuantumElectrodynamics.jl library. For the description of the interoperability with other packages of QuantumElectrodynamics.jl see docs.

This package's main purpose is to provide implementations of the basic interfaces defined in QEDbase.jl, such as various particle types, PhasespaceDefinition, PhaseSpacePoint, and various vector and matrix types. These types are used across most of the QEDjl-project repositories. For detailed information on these types, please refer to the respective pages in the docs.

Contributing

Contributions are welcome! If you'd like to report a bug, suggest an enhancement, or contribute code, please feel free to open an issue or submit a pull request.

To ensure consistency across the QuantumElectrodynamics.jl ecosystem, we encourage all contributors to review the QuantumElectrodynamics.jl contribution guide.

Credits and contributors

This work was partly funded by the Center for Advanced Systems Understanding (CASUS) that is financed by Germany’s Federal Ministry of Education and Research (BMBF) and by the Saxon Ministry for Science, Culture and Tourism (SMWK) with tax funds on the basis of the budget approved by the Saxon State Parliament.

The core code of the package QEDcore.jl is developed by a small team at the Center for Advanced Systems Understanding (CASUS), namely

Core Contributors

  • Uwe Hernandez Acosta (CASUS/HZDR, u.hernandez@hzdr.de)
  • Anton Reinhard (CASUS/HZDR)
  • Simeon Ehrig (CASUS/HZDR)

Former Contributors

We extend our sincere thanks to all contributors who have supported this project.

Acknowledgements

We extend our gratitude for the support received through direct and indirect funding for this project, especially

  • Michael Bussmann
  • Tobias Dornheim

License

MIT © Uwe Hernandez Acosta

diff --git a/dev/library/coordinates/index.html b/dev/library/coordinates/index.html index b98075f..cfcc9bf 100644 --- a/dev/library/coordinates/index.html +++ b/dev/library/coordinates/index.html @@ -1,2 +1,2 @@ -Coordinates · QEDcore.jl

Coordinates

Coordinate Interface

QEDcore.AbstractCoordinateSetType
AbstractCoordinateSet{N}

An abstract type representing a set of coordinates with N elements.

Subtypes of AbstractCoordinateSet used to define specific coordinate systems or layouts used to describe physical processes, such as phase-space parametrizations for scattering events. The parameter N specifies the number of coordinates in the set, where N can be one for univariate coordinates (e.g., energy, rapidity) or higher for more complex systems.

Type Parameters

  • N: The number of coordinates in the set.

Intended Usage

Subtypes of AbstractCoordinateSet{N} implement the structure and behavior for specific coordinate systems. Functions like coordinate_names and coordinate_name are used to retrieve human-readable names for the coordinates in the set.

source
QEDcore.coordinate_namesFunction
coordinate_names(coord_set::AbstractCoordinateSet)

Retrieve the names of all coordinates in a given coordinate set.

Arguments

  • coord_set::AbstractCoordinateSet: A coordinate set, which is a container for multiple

coordinates.

Returns

  • A tuple of strings, where each string is the name of a coordinate in the set, including its particle index if available.

This function is typically implemented for subtypes of AbstractCoordinateSet and is used to return human-readable names for each coordinate in the set.

source
QEDcore.coordinate_nameFunction
coordinate_name(coord::AbstractUnivariateCoordinate)

Retrieve the name of a single univariate coordinate.

Arguments

  • coord::AbstractUnivariateCoordinate: A single univariate coordinate, which is a subtype of AbstractCoordinateSet{1} representing a coordinate system with one degree of freedom.

Returns

  • A string representing the name of the coordinate.

This function provides a human-readable label for a single coordinate and is generally used for naming individual coordinates in a scattering process or phase space.

source
QEDcore.AbstractSingleParticleCoordinateType
AbstractSingleParticleCoordinate{IDX} <: AbstractUnivariateCoordinate

An abstract type representing a coordinate associated with a single particle. The type parameter IDX indicates the index of the particle in an AbstractProcessDefintion, either for the in- or out-channel, depending on the phase phase layout. Specific types that inherit from this abstract type define various coordinates (e.g., energy, rapidity, etc.) for the particle.

source
QEDcore.particle_indexFunction
particle_index(coord::AbstractSingleParticleCoordinate{IDX})

Return the index of the particle the coord is related to, i.e. IDX.

source

Univariate Coordinates

QEDcore.CenterOfMomentumEnergyType
CenterOfMomentumEnergy <: AbstractUnivariateCoordinate

Represents the center-of-momentum (CoM) energy coordinate in the definion of a phase space layout.

source
QEDcore.EnergyType
Energy{IDX} <: AbstractSingleParticleCoordinate{IDX}

Represents the energy coordinate for a single particle identified by IDX. This is mainly used for multiple dispatch and the definiton of phase space layouts.

source
QEDcore.SpatialMagnitudeType
SpatialMagnitude{IDX} <: AbstractSingleParticleCoordinate{IDX}

Represents the spatial spatial magnitude for a single particle identified by IDX. This is mainly used for multiple dispatch and the definiton of phase space layouts.

source
QEDcore.RapidityType
Rapidity{IDX} <: AbstractSingleParticleCoordinate{IDX}

Represents the rapidity coordinate for a single particle identified by IDX. This is mainly used for multiple dispatch and the definiton of phase space layouts.

source
QEDcore.CosThetaType
CosTheta{IDX} <: AbstractSingleParticleCoordinate{IDX}

Represents the cosine-theta coordinate for a single particle identified by IDX. This is mainly used for multiple dispatch and the definiton of phase space layouts.

source

Multivariate Coordinates

QEDcore.CoordinateSetType
CoordinateSet{N, D<:Tuple}

A concrete type that represents a set of N coordinates, stored as a tuple coords::D. This type is a subtype of AbstractCoordinateSet{N} and is designed to handle sets of coordinates for use in various calculations, such as in phase space layouts.

Fields

  • coords::D: A tuple containing the individual coordinates. Each element of the tuple corresponds to a coordinate in the set.

Constructors

  • CoordinateSet{N}(coords::D): Creates a CoordinateSet where the number of coordinates N must match the length of the tuple coords. If they do not match, an ArgumentError is thrown.
  • CoordinateSet(coords::D): Automatically infers N as the length of the provided tuple coords.

Throws

  • ArgumentError if the length of the provided tuple does not match the specified number N.
source
+Coordinates · QEDcore.jl

Coordinates

Coordinate Interface

QEDcore.AbstractCoordinateSetType
AbstractCoordinateSet{N}

An abstract type representing a set of coordinates with N elements.

Subtypes of AbstractCoordinateSet used to define specific coordinate systems or layouts used to describe physical processes, such as phase-space parametrizations for scattering events. The parameter N specifies the number of coordinates in the set, where N can be one for univariate coordinates (e.g., energy, rapidity) or higher for more complex systems.

Type Parameters

  • N: The number of coordinates in the set.

Intended Usage

Subtypes of AbstractCoordinateSet{N} implement the structure and behavior for specific coordinate systems. Functions like coordinate_names and coordinate_name are used to retrieve human-readable names for the coordinates in the set.

source
QEDcore.coordinate_namesFunction
coordinate_names(coord_set::AbstractCoordinateSet)

Retrieve the names of all coordinates in a given coordinate set.

Arguments

  • coord_set::AbstractCoordinateSet: A coordinate set, which is a container for multiple

coordinates.

Returns

  • A tuple of strings, where each string is the name of a coordinate in the set, including its particle index if available.

This function is typically implemented for subtypes of AbstractCoordinateSet and is used to return human-readable names for each coordinate in the set.

source
QEDcore.coordinate_nameFunction
coordinate_name(coord::AbstractUnivariateCoordinate)

Retrieve the name of a single univariate coordinate.

Arguments

  • coord::AbstractUnivariateCoordinate: A single univariate coordinate, which is a subtype of AbstractCoordinateSet{1} representing a coordinate system with one degree of freedom.

Returns

  • A string representing the name of the coordinate.

This function provides a human-readable label for a single coordinate and is generally used for naming individual coordinates in a scattering process or phase space.

source
QEDcore.AbstractSingleParticleCoordinateType
AbstractSingleParticleCoordinate{IDX} <: AbstractUnivariateCoordinate

An abstract type representing a coordinate associated with a single particle. The type parameter IDX indicates the index of the particle in an AbstractProcessDefintion, either for the in- or out-channel, depending on the phase phase layout. Specific types that inherit from this abstract type define various coordinates (e.g., energy, rapidity, etc.) for the particle.

source
QEDcore.particle_indexFunction
particle_index(coord::AbstractSingleParticleCoordinate{IDX})

Return the index of the particle the coord is related to, i.e. IDX.

source

Univariate Coordinates

QEDcore.CenterOfMomentumEnergyType
CenterOfMomentumEnergy <: AbstractUnivariateCoordinate

Represents the center-of-momentum (CoM) energy coordinate in the definion of a phase space layout.

source
QEDcore.EnergyType
Energy{IDX} <: AbstractSingleParticleCoordinate{IDX}

Represents the energy coordinate for a single particle identified by IDX. This is mainly used for multiple dispatch and the definiton of phase space layouts.

source
QEDcore.SpatialMagnitudeType
SpatialMagnitude{IDX} <: AbstractSingleParticleCoordinate{IDX}

Represents the spatial spatial magnitude for a single particle identified by IDX. This is mainly used for multiple dispatch and the definiton of phase space layouts.

source
QEDcore.RapidityType
Rapidity{IDX} <: AbstractSingleParticleCoordinate{IDX}

Represents the rapidity coordinate for a single particle identified by IDX. This is mainly used for multiple dispatch and the definiton of phase space layouts.

source
QEDcore.CosThetaType
CosTheta{IDX} <: AbstractSingleParticleCoordinate{IDX}

Represents the cosine-theta coordinate for a single particle identified by IDX. This is mainly used for multiple dispatch and the definiton of phase space layouts.

source

Multivariate Coordinates

QEDcore.CoordinateSetType
CoordinateSet{N, D<:Tuple}

A concrete type that represents a set of N coordinates, stored as a tuple coords::D. This type is a subtype of AbstractCoordinateSet{N} and is designed to handle sets of coordinates for use in various calculations, such as in phase space layouts.

Fields

  • coords::D: A tuple containing the individual coordinates. Each element of the tuple corresponds to a coordinate in the set.

Constructors

  • CoordinateSet{N}(coords::D): Creates a CoordinateSet where the number of coordinates N must match the length of the tuple coords. If they do not match, an ArgumentError is thrown.
  • CoordinateSet(coords::D): Automatically infers N as the length of the provided tuple coords.

Throws

  • ArgumentError if the length of the provided tuple does not match the specified number N.
source
diff --git a/dev/library/index.html b/dev/library/index.html index 8dc7e5f..6ef3058 100644 --- a/dev/library/index.html +++ b/dev/library/index.html @@ -1,2 +1,2 @@ -Index · QEDcore.jl

QEDcore

API index for QEDcore.

+Index · QEDcore.jl

QEDcore

API index for QEDcore.

diff --git a/dev/library/lorentzboosts/index.html b/dev/library/lorentzboosts/index.html index 828daea..e4fe4d7 100644 --- a/dev/library/lorentzboosts/index.html +++ b/dev/library/lorentzboosts/index.html @@ -19,7 +19,7 @@ 2.0 1.0 -julia> @assert isapprox(p*p, p_prime*p_prime) # The invariant mass is preserved

Notes

The Boost type provides a unified and flexible interface for applying Lorentz boosts, with the boost parameter V determining the specific form of the transformation. Lorentz boosts preserve the spacetime interval, meaning that applying the boost to a four-vector will not change the invariant quantity.

See Also

source
QEDcore.BetaVectorType
BetaVector(x::Real,y::Real,z::Real)

Represents the spatial vector of velocity parameters (denoted as the "beta" vector) associated with motion in the three Cartesian directions, i.e., $\vec\beta = (\beta_x, \beta_y, \beta_z)$. These components correspond to the velocity of an object (in units of the speed of light) in each of the $x$, $y$, and $z$ directions.

The Lorentz boost along the direction of the beta vector $\vec\beta$ transforms the four-momentum as follows:

\[\begin{pmatrix} +julia> @assert isapprox(p*p, p_prime*p_prime) # The invariant mass is preserved

Notes

The Boost type provides a unified and flexible interface for applying Lorentz boosts, with the boost parameter V determining the specific form of the transformation. Lorentz boosts preserve the spacetime interval, meaning that applying the boost to a four-vector will not change the invariant quantity.

See Also

  • QEDbase.AbstractBoostParameter: Base type for specific kinds of boost parameters.
  • BetaX: Boost parameter for the x-axis.
  • BetaY: Boost parameter for the y-axis.
  • BetaZ: Boost parameter for the z-axis.
  • BetaVector: Vector of boost parameters for boosts in multiple spatial directions.
source
QEDcore.BetaVectorType
BetaVector(x::Real,y::Real,z::Real)

Represents the spatial vector of velocity parameters (denoted as the "beta" vector) associated with motion in the three Cartesian directions, i.e., $\vec\beta = (\beta_x, \beta_y, \beta_z)$. These components correspond to the velocity of an object (in units of the speed of light) in each of the $x$, $y$, and $z$ directions.

The Lorentz boost along the direction of the beta vector $\vec\beta$ transforms the four-momentum as follows:

\[\begin{pmatrix} p_0\\ p_1\\ p_2\\ @@ -55,7 +55,7 @@ 0.9242054036545237 0.6414018012181746 -julia> @assert isapprox(p*p,p_prime*p_prime) # Invariant mass is preserved

External link

source
QEDcore.BetaXType
BetaX(beta::T) where {T<:Real}

Represents the beta parameter associated with a Lorentz boost along the x-axis, commonly denoted as $\beta_x$.

The transformation for a boost along the x-axis is:

\[\begin{pmatrix} +julia> @assert isapprox(p*p,p_prime*p_prime) # Invariant mass is preserved

External link

source
QEDcore.BetaXType
BetaX(beta::T) where {T<:Real}

Represents the beta parameter associated with a Lorentz boost along the x-axis, commonly denoted as $\beta_x$.

The transformation for a boost along the x-axis is:

\[\begin{pmatrix} p_0\\ p_1\\ p_2\\ @@ -88,7 +88,7 @@ 2.0 1.0 -julia> @assert isapprox(p*p,p_prime*p_prime) # Invariant mass is preserved

External link

source
QEDcore.BetaYType
BetaY(beta::T) where {T<:Real}

Represents the beta parameter associated with a Lorentz boost along the y-axis, commonly denoted as $\beta_y$.

The transformation for a boost along the y-axis is:

\[\begin{pmatrix} +julia> @assert isapprox(p*p,p_prime*p_prime) # Invariant mass is preserved

External link

source
QEDcore.BetaYType
BetaY(beta::T) where {T<:Real}

Represents the beta parameter associated with a Lorentz boost along the y-axis, commonly denoted as $\beta_y$.

The transformation for a boost along the y-axis is:

\[\begin{pmatrix} p_0\\ p_1\\ p_2\\ @@ -126,7 +126,7 @@ 0.0 1.0 -julia> @assert isapprox(p*p,p_prime*p_prime) # Invariant mass is preserved

External link

source
QEDcore.BetaZType
BetaZ(beta::T) where {T<:Real}

Represents the beta parameter associated with a Lorentz boost along the z-axis, commonly denoted as $\beta_z$.

The transformation for a boost along the z-axis is:

\[\begin{pmatrix} +julia> @assert isapprox(p*p,p_prime*p_prime) # Invariant mass is preserved

External link

source
QEDcore.BetaZType
BetaZ(beta::T) where {T<:Real}

Represents the beta parameter associated with a Lorentz boost along the z-axis, commonly denoted as $\beta_z$.

The transformation for a boost along the z-axis is:

\[\begin{pmatrix} p_0\\ p_1\\ p_2\\ @@ -165,4 +165,4 @@ -1.1547005383792517 julia> @assert isapprox(p*p,p_prime*p_prime) # Invariant mass is preserved -

External link

source
+

External link

source diff --git a/dev/library/outline/index.html b/dev/library/outline/index.html index 3484790..f3f8612 100644 --- a/dev/library/outline/index.html +++ b/dev/library/outline/index.html @@ -1,2 +1,2 @@ -Contents · QEDcore.jl
+Contents · QEDcore.jl
diff --git a/dev/library/particles/index.html b/dev/library/particles/index.html index 0cae983..c110c11 100644 --- a/dev/library/particles/index.html +++ b/dev/library/particles/index.html @@ -1,26 +1,26 @@ -Particles · QEDcore.jl

Particles

Particle Types

The following are subtypes of QEDbase.AbstractParticleType(@extref).

For all these types the corresponding interface is implemented, including QEDbase.base_state(@extref) and QEDbase.propagator(@extref).

QEDcore.FermionLikeType

Abstract base types for particle species that act like fermions in the sense of particle statistics.

particle interface

Every concrete subtype of FermionLike has is_fermion(::FermionLike) = true.

source
QEDcore.BosonLikeType

Abstract base types for particle species that act like bosons in the sense of particle statistics.

particle interface

Every concrete subtype of BosonLike has is_boson(::BosonLike) = true.

source
QEDcore.MajoranaFermionType

Abstract base type for majorana-fermions, i.e. fermions which are their own anti-particles.

particle interface

All subtypes of MajoranaFermion have

is_fermion(::MajoranaFermion) = true
+Particles · QEDcore.jl

Particles

Particle Types

The following are subtypes of QEDbase.AbstractParticleType(@extref).

For all these types the corresponding interface is implemented, including QEDbase.base_state(@extref) and QEDbase.propagator(@extref).

QEDcore.FermionLikeType

Abstract base types for particle species that act like fermions in the sense of particle statistics.

particle interface

Every concrete subtype of FermionLike has is_fermion(::FermionLike) = true.

source
QEDcore.BosonLikeType

Abstract base types for particle species that act like bosons in the sense of particle statistics.

particle interface

Every concrete subtype of BosonLike has is_boson(::BosonLike) = true.

source
QEDcore.MajoranaFermionType

Abstract base type for majorana-fermions, i.e. fermions which are their own anti-particles.

particle interface

All subtypes of MajoranaFermion have

is_fermion(::MajoranaFermion) = true
 is_particle(::MajoranaFermion) = true
-is_anti_particle(::MajoranaFermion) = true
source
QEDcore.MajoranaBosonType

Abstract base type for majorana-bosons, i.e. bosons which are their own anti-particles.

particle interface

All subtypes of MajoranaBoson have

is_boson(::MajoranaBoson) = true
+is_anti_particle(::MajoranaFermion) = true
source
QEDcore.MajoranaBosonType

Abstract base type for majorana-bosons, i.e. bosons which are their own anti-particles.

particle interface

All subtypes of MajoranaBoson have

is_boson(::MajoranaBoson) = true
 is_particle(::MajoranaBoson) = true
-is_anti_particle(::MajoranaBoson) = true
source
QEDcore.FermionType

Abstract base type for fermions as distinct from AntiFermions.

particle interface

All subtypes of Fermion have

is_fermion(::Fermion) = true
+is_anti_particle(::MajoranaBoson) = true
source
QEDcore.FermionType

Abstract base type for fermions as distinct from AntiFermions.

particle interface

All subtypes of Fermion have

is_fermion(::Fermion) = true
 is_particle(::Fermion) = true
-is_anti_particle(::Fermion) = false
source
QEDcore.BosonType

Abstract base type for bosons as distinct from its anti-particle counterpart AntiBoson.

particle interface

All subtypes of Boson have

is_boson(::Boson) = true
+is_anti_particle(::Fermion) = false
source
QEDcore.BosonType

Abstract base type for bosons as distinct from its anti-particle counterpart AntiBoson.

particle interface

All subtypes of Boson have

is_boson(::Boson) = true
 is_particle(::Boson) = true
-is_anti_particle(::Boson) = false
source
QEDcore.AntiFermionType

Abstract base type for anti-fermions as distinct from its particle counterpart Fermion.

particle interface

All subtypes of AntiFermion have

is_fermion(::AntiFermion) = true
+is_anti_particle(::Boson) = false
source
QEDcore.AntiFermionType

Abstract base type for anti-fermions as distinct from its particle counterpart Fermion.

particle interface

All subtypes of AntiFermion have

is_fermion(::AntiFermion) = true
 is_particle(::AntiFermion) = false
-is_anti_particle(::AntiFermion) = true
source
QEDcore.AntiBosonType

Abstract base type for anti-bosons as distinct from its particle counterpart Boson.

particle interface

All subtypes of AntiBoson have

is_boson(::AntiBoson) = true
+is_anti_particle(::AntiFermion) = true
source
QEDcore.AntiBosonType

Abstract base type for anti-bosons as distinct from its particle counterpart Boson.

particle interface

All subtypes of AntiBoson have

is_boson(::AntiBoson) = true
 is_particle(::AntiBoson) = false
-is_anti_particle(::AntiBoson) = true
source
QEDcore.ElectronType

Concrete type for electrons as a particle species. Mostly used for dispatch.

julia> using QEDcore
+is_anti_particle(::AntiBoson) = true
source
QEDcore.ElectronType

Concrete type for electrons as a particle species. Mostly used for dispatch.

julia> using QEDcore
 
 julia> Electron()
 electron
particle interface

Besides being a subtype of Fermion, objects of type Electron have

mass(::Electron) = 1.0
-charge(::Electron) = -1.0
source
QEDcore.PositronType

Concrete type for positrons as a particle species. Mostly used for dispatch.

julia> using QEDcore
+charge(::Electron) = -1.0
source
QEDcore.PositronType

Concrete type for positrons as a particle species. Mostly used for dispatch.

julia> using QEDcore
 
 julia> Positron()
 positron
particle interface

Besides being a subtype of AntiFermion, objects of type Positron have

mass(::Positron) = 1.0
-charge(::Positron) = 1.0
source
QEDcore.PhotonType

Concrete type for the photons as a particle species. Mostly used for dispatch.

julia> using QEDcore
+charge(::Positron) = 1.0
source
QEDcore.PhotonType

Concrete type for the photons as a particle species. Mostly used for dispatch.

julia> using QEDcore
 
 julia> Photon()
 photon
particle interface

Besides being a subtype of MajoranaBoson, Photon has

mass(::Photon) = 0.0
-charge(::Photon) = 0.0
source
+charge(::Photon) = 0.0
source diff --git a/dev/library/phase_space_layout/index.html b/dev/library/phase_space_layout/index.html index edd19ba..7d0893d 100644 --- a/dev/library/phase_space_layout/index.html +++ b/dev/library/phase_space_layout/index.html @@ -1,6 +1,6 @@ -Phase Space Layout · QEDcore.jl

Phase Space Layout

Phase Space Layout Interface

QEDcore.AbstractPhaseSpaceLayoutType
AbstractPhaseSpaceLayout

The AbstractPhaseSpaceLayout is an abstract type that represents the general concept of a phase space layout in a scattering process.

Interface Functions to Implement:

  • phase_space_dimension(proc, model, layout::AbstractPhaseSpaceLayout): Defines the number of independent phase space coordinates needed to build the momenta.
source
QEDcore.AbstractInPhaseSpaceLayoutType
AbstractInPhaseSpaceLayout <: AbstractPhaseSpaceLayout

The AbstractInPhaseSpaceLayout represents the phase space layout for the incoming particles in a scattering process. It defines the way in which the momenta of incoming particles are constructed from phase space coordinates.

Interface Functions to Implement:

  • phase_space_dimension(proc, model, layout::AbstractInPhaseSpaceLayout): Defines the number of independent phase space coordinates for the incoming particles.
  • build_momenta(proc, model, in_psl::AbstractInPhaseSpaceLayout, in_coords::Tuple): Constructs the momenta for the incoming particles using the phase space coordinates.
source
QEDcore.AbstractOutPhaseSpaceLayoutType
AbstractOutPhaseSpaceLayout{InPSL<:AbstractInPhaseSpaceLayout} <: AbstractPhaseSpaceLayout

The AbstractOutPhaseSpaceLayout represents the phase space layout for the outgoing particles in a scattering process. It typically depends on the phase space layout of the incoming particles, and it specifies how the momenta of the outgoing particles are constructed from the respective coordinates.

The generic parameter InPSL links the outgoing phase space layout to the incoming layout, allowing consistency between the two configurations in the process.

Interface Functions to Implement:

  • phase_space_dimension(proc, model, layout::AbstractOutPhaseSpaceLayout): Defines the number of independent phase space coordinates for the outgoing particles.
  • in_phase_space_layout(out_psl::AbstractOutPhaseSpaceLayout): Provides the associated incoming phase space layout to ensure consistency between incoming and outgoing configurations.
  • build_momenta(proc, model, Ptot::AbstractFourMomentum, out_psl::AbstractOutPhaseSpaceLayout, out_coords::Tuple): Constructs the momenta for the outgoing particles, ensuring they comply with energy and momentum conservation based on the total incoming four-momentum.
source
QEDcore._build_momentaFunction
_build_momenta(proc, model, in_psl::AbstractInPhaseSpaceLayout, in_coords::Tuple)
-_build_momenta(proc, model, Ptot::AbstractFourMomentum, out_psl::AbstractOutPhaseSpaceLayout, out_coords::Tuple)

These functions need to be implemented as part of the phase space layout interface for both incoming and outgoing particle momenta construction. They serve as internal, low-level interfaces for constructing the four-momenta of particles during a scattering process, and are typically wrapped by the user-facing build_momenta function.

Incoming Phase Space Layout

The first function, _build_momenta(proc, model, in_psl, in_coords), constructs the four-momenta for the incoming particles based on the specified phase space coordinates (in_coords).

  • Arguments:

    • proc: The scattering process definition, subtype of AbstractProcessDefinition.
    • model: The physics model, subtype of AbstractModelDefinition.
    • in_psl: The incoming phase space layout, subtype of AbstractInPhaseSpaceLayout, that defines how to map the coordinates to momenta.
    • in_coords: A tuple of phase space coordinates that parametrize the momenta of the incoming particles.
  • Returns:

    • A collection of four-momenta representing the incoming particles. For performance reasons, it is recommended to return a Tuple of four-momenta.

Outgoing Phase Space Layout

The second function, _build_momenta(proc, model, Ptot, out_psl, out_coords), constructs the four-momenta for the outgoing particles. It uses the incoming four-momenta (in_moms) from the incoming state and applies the phase space coordinates (out_coords) to compute the outgoing momenta, ensuring they adhere to energy and momentum conservation laws.

  • Arguments:

    • proc: The scattering process definition, subtype of AbstractProcessDefinition.
    • model: The physics model, subtype of AbstractModelDefinition.
    • in_moms: The incoming four-momenta, which is used to compute the momenta of the outgoing particles.
    • out_psl: The outgoing phase space layout, subtype of AbstractOutPhaseSpaceLayout, that maps the coordinates to momenta.
    • out_coords: A tuple of phase space coordinates that parametrize the outgoing particle momenta.
  • Returns:

    • A collection of four-momenta representing the outgoing particles. For performance reasons, it is recommended to return a Tuple of four-momenta.

Notes

Both versions of _build_momenta handle the construction of particle momenta during different phases of the scattering process:

  • The incoming version constructs momenta based on phase space coordinates alone.
  • The outgoing version constructs momenta based on both phase space coordinates and the total four-momentum, ensuring conservation laws are respected.
source
QEDcore.phase_space_dimensionFunction
phase_space_dimension(proc, model, layout::AbstractPhaseSpaceLayout) -> Int

This function needs to be implemented for the phase-space layout interface. Return the dimensionality of the phase space, i.e. the numebr of coordinates, for a given process and model within the specified layout.

The phase space dimension is a crucial quantity that determines how many independent coordinates are required to describe the system of particles in the scattering process. It depends on the number of particles involved and the specific interaction model in use.

Arguments

  • proc: The scattering process definition, a subtype of AbstractProcessDefinition.
  • model: The physics model, a subtype of AbstractModelDefinition.
  • layout: A specific phase space layout, either AbstractInPhaseSpaceLayout or AbstractOutPhaseSpaceLayout.

Returns

  • The integer representing the number of independent phase space coordinates.
source
QEDcore.in_phase_space_layoutFunction
in_phase_space_layout(out_psl::AbstractOutPhaseSpaceLayout) -> AbstractInPhaseSpaceLayout

This function needs to be implemented for the out-phase-space layout interface. Given an outgoing phase space layout (out_psl), this function returns the associated incoming phase space layout.

This is useful for ensuring consistency between the incoming and outgoing particle momenta when calculating or sampling phase space points in scattering processes.

Arguments

  • out_psl: The outgoing phase space layout, a subtype of AbstractOutPhaseSpaceLayout.

Returns

  • The associated incoming phase space layout, a subtype of AbstractInPhaseSpaceLayout.
source

Building Momenta

QEDcore.build_momentaFunction
build_momenta(proc, model, in_psl::AbstractInPhaseSpaceLayout, in_coords::Tuple)

Construct the momenta of the incoming particles using the provided phase space coordinates.

This is the user-facing function that calls _build_momenta internally and validates the number of coordinates against the phase space dimensionality.

Arguments

  • proc: The scattering process definition, subtype of AbstractProcessDefinition.
  • model: The physics model, subtype of AbstractModelDefinition.
  • in_psl: The incoming phase space layout, subtype of AbstractInPhaseSpaceLayout.
  • in_coords: A tuple of phase space coordinates that parametrize the incoming particle momenta.

Returns

  • A collection of four-momenta representing the incoming particles. Because of performance reasons, it is recommened to return a Tuple of four-momenta.
source
build_momenta(proc::AbstractProcessDefinition, model::AbstractModelDefinition, in_psl::AbstractInPhaseSpaceLayout, in_coords::Real)

A scalar version of build_momenta for incoming phase space layouts (in_psl), where the phase space coordinates are provided as a single scalar instead of a tuple.

Arguments:

  • proc: The scattering process definition, subtype of AbstractProcessDefinition.
  • model: The physics model, subtype of AbstractModelDefinition.
  • in_psl: The incoming phase space layout, subtype of AbstractInPhaseSpaceLayout.
  • in_coords::Real: A single scalar representing the phase space coordinate for the incoming particles.

Returns:

  • A collection of four-momenta representing the incoming particles. Because of performance reasons, it is recommened to return a Tuple of four-momenta.

Notes:

This function is a convenience wrapper around build_momenta, automatically converting the scalar in_coords into a 1-tuple. It is useful when the incoming phase space only requires a single coordinate to define the particle momenta.

source
build_momenta(proc, model, Ptot::AbstractFourMomentum, out_psl::AbstractOutPhaseSpaceLayout, out_coords::Tuple)

Construct the momenta of the outgoing particles using the provided phase space coordinates (out_coords) and total incoming momentum (Ptot).

This function ensures that the outgoing momenta satisfy energy and momentum conservation, consistent with the physics model in use.

Arguments

  • proc: The scattering process definition, subtype of AbstractProcessDefinition.
  • model: The physics model, subtype of AbstractModelDefinition.
  • in_moms: The incoming four-momenta, used to compute the outgoing momenta.
  • out_psl: The outgoing phase space layout, subtype of `AbstractOutPhaseSpaceLayout.
  • out_coords: A tuple of phase space coordinates that parametrize the outgoing particle momenta.

Returns

  • A collection of four-momenta representing the incoming particles. Because of performance reasons, it is recommened to return a Tuple of four-momenta.
source

Coordinate Maps

QEDcore.CoordinateMapType
CoordinateMap{P,M,PSL}(proc::P, model::M, psl::PSL)

A CoordinateMap represents a transformation that maps phase space coordinates to particle momenta for a specific scattering process. This type encapsulates the scattering process definition (proc), the physics model (model), and the phase space layout (psl). The CoordinateMap is callable and supports the conversion of both incoming and outgoing phase space coordinates into four-momenta.

Fields

  • proc: The scattering process definition, subtype of AbstractProcessDefinition.
  • model: The physics model, subtype of AbstractModelDefinition.
  • psl: The phase space layout, either incoming or outgoing, that maps coordinates to momenta.

Usage

Incoming Coordinates

The CoordinateMap can be called with a tuple of incoming phase space coordinates (in_coords), which are used to compute the corresponding incoming particle four-momenta. This is done by calling the phase space construction function build_momenta using the proc, model, and psl provided in the CoordinateMap.

# Create a coordinate map for in phase space
+Phase Space Layout · QEDcore.jl

Phase Space Layout

Phase Space Layout Interface

QEDcore.AbstractPhaseSpaceLayoutType
AbstractPhaseSpaceLayout

The AbstractPhaseSpaceLayout is an abstract type that represents the general concept of a phase space layout in a scattering process.

Interface Functions to Implement:

  • phase_space_dimension(proc, model, layout::AbstractPhaseSpaceLayout): Defines the number of independent phase space coordinates needed to build the momenta.
source
QEDcore.AbstractInPhaseSpaceLayoutType
AbstractInPhaseSpaceLayout <: AbstractPhaseSpaceLayout

The AbstractInPhaseSpaceLayout represents the phase space layout for the incoming particles in a scattering process. It defines the way in which the momenta of incoming particles are constructed from phase space coordinates.

Interface Functions to Implement:

  • phase_space_dimension(proc, model, layout::AbstractInPhaseSpaceLayout): Defines the number of independent phase space coordinates for the incoming particles.
  • build_momenta(proc, model, in_psl::AbstractInPhaseSpaceLayout, in_coords::Tuple): Constructs the momenta for the incoming particles using the phase space coordinates.
source
QEDcore.AbstractOutPhaseSpaceLayoutType
AbstractOutPhaseSpaceLayout{InPSL<:AbstractInPhaseSpaceLayout} <: AbstractPhaseSpaceLayout

The AbstractOutPhaseSpaceLayout represents the phase space layout for the outgoing particles in a scattering process. It typically depends on the phase space layout of the incoming particles, and it specifies how the momenta of the outgoing particles are constructed from the respective coordinates.

The generic parameter InPSL links the outgoing phase space layout to the incoming layout, allowing consistency between the two configurations in the process.

Interface Functions to Implement:

  • phase_space_dimension(proc, model, layout::AbstractOutPhaseSpaceLayout): Defines the number of independent phase space coordinates for the outgoing particles.
  • in_phase_space_layout(out_psl::AbstractOutPhaseSpaceLayout): Provides the associated incoming phase space layout to ensure consistency between incoming and outgoing configurations.
  • build_momenta(proc, model, Ptot::AbstractFourMomentum, out_psl::AbstractOutPhaseSpaceLayout, out_coords::Tuple): Constructs the momenta for the outgoing particles, ensuring they comply with energy and momentum conservation based on the total incoming four-momentum.
source
QEDcore._build_momentaFunction
_build_momenta(proc, model, in_psl::AbstractInPhaseSpaceLayout, in_coords::Tuple)
+_build_momenta(proc, model, Ptot::AbstractFourMomentum, out_psl::AbstractOutPhaseSpaceLayout, out_coords::Tuple)

These functions need to be implemented as part of the phase space layout interface for both incoming and outgoing particle momenta construction. They serve as internal, low-level interfaces for constructing the four-momenta of particles during a scattering process, and are typically wrapped by the user-facing build_momenta function.

Incoming Phase Space Layout

The first function, _build_momenta(proc, model, in_psl, in_coords), constructs the four-momenta for the incoming particles based on the specified phase space coordinates (in_coords).

  • Arguments:

    • proc: The scattering process definition, subtype of AbstractProcessDefinition.
    • model: The physics model, subtype of AbstractModelDefinition.
    • in_psl: The incoming phase space layout, subtype of AbstractInPhaseSpaceLayout, that defines how to map the coordinates to momenta.
    • in_coords: A tuple of phase space coordinates that parametrize the momenta of the incoming particles.
  • Returns:

    • A collection of four-momenta representing the incoming particles. For performance reasons, it is recommended to return a Tuple of four-momenta.

Outgoing Phase Space Layout

The second function, _build_momenta(proc, model, Ptot, out_psl, out_coords), constructs the four-momenta for the outgoing particles. It uses the incoming four-momenta (in_moms) from the incoming state and applies the phase space coordinates (out_coords) to compute the outgoing momenta, ensuring they adhere to energy and momentum conservation laws.

  • Arguments:

    • proc: The scattering process definition, subtype of AbstractProcessDefinition.
    • model: The physics model, subtype of AbstractModelDefinition.
    • in_moms: The incoming four-momenta, which is used to compute the momenta of the outgoing particles.
    • out_psl: The outgoing phase space layout, subtype of AbstractOutPhaseSpaceLayout, that maps the coordinates to momenta.
    • out_coords: A tuple of phase space coordinates that parametrize the outgoing particle momenta.
  • Returns:

    • A collection of four-momenta representing the outgoing particles. For performance reasons, it is recommended to return a Tuple of four-momenta.

Notes

Both versions of _build_momenta handle the construction of particle momenta during different phases of the scattering process:

  • The incoming version constructs momenta based on phase space coordinates alone.
  • The outgoing version constructs momenta based on both phase space coordinates and the total four-momentum, ensuring conservation laws are respected.
source
QEDcore.phase_space_dimensionFunction
phase_space_dimension(proc, model, layout::AbstractPhaseSpaceLayout) -> Int

This function needs to be implemented for the phase-space layout interface. Return the dimensionality of the phase space, i.e. the numebr of coordinates, for a given process and model within the specified layout.

The phase space dimension is a crucial quantity that determines how many independent coordinates are required to describe the system of particles in the scattering process. It depends on the number of particles involved and the specific interaction model in use.

Arguments

  • proc: The scattering process definition, a subtype of AbstractProcessDefinition.
  • model: The physics model, a subtype of AbstractModelDefinition.
  • layout: A specific phase space layout, either AbstractInPhaseSpaceLayout or AbstractOutPhaseSpaceLayout.

Returns

  • The integer representing the number of independent phase space coordinates.
source
QEDcore.in_phase_space_layoutFunction
in_phase_space_layout(out_psl::AbstractOutPhaseSpaceLayout) -> AbstractInPhaseSpaceLayout

This function needs to be implemented for the out-phase-space layout interface. Given an outgoing phase space layout (out_psl), this function returns the associated incoming phase space layout.

This is useful for ensuring consistency between the incoming and outgoing particle momenta when calculating or sampling phase space points in scattering processes.

Arguments

  • out_psl: The outgoing phase space layout, a subtype of AbstractOutPhaseSpaceLayout.

Returns

  • The associated incoming phase space layout, a subtype of AbstractInPhaseSpaceLayout.
source

Building Momenta

QEDcore.build_momentaFunction
build_momenta(proc, model, in_psl::AbstractInPhaseSpaceLayout, in_coords::Tuple)

Construct the momenta of the incoming particles using the provided phase space coordinates.

This is the user-facing function that calls _build_momenta internally and validates the number of coordinates against the phase space dimensionality.

Arguments

  • proc: The scattering process definition, subtype of AbstractProcessDefinition.
  • model: The physics model, subtype of AbstractModelDefinition.
  • in_psl: The incoming phase space layout, subtype of AbstractInPhaseSpaceLayout.
  • in_coords: A tuple of phase space coordinates that parametrize the incoming particle momenta.

Returns

  • A collection of four-momenta representing the incoming particles. Because of performance reasons, it is recommened to return a Tuple of four-momenta.
source
build_momenta(proc::AbstractProcessDefinition, model::AbstractModelDefinition, in_psl::AbstractInPhaseSpaceLayout, in_coords::Real)

A scalar version of build_momenta for incoming phase space layouts (in_psl), where the phase space coordinates are provided as a single scalar instead of a tuple.

Arguments:

  • proc: The scattering process definition, subtype of AbstractProcessDefinition.
  • model: The physics model, subtype of AbstractModelDefinition.
  • in_psl: The incoming phase space layout, subtype of AbstractInPhaseSpaceLayout.
  • in_coords::Real: A single scalar representing the phase space coordinate for the incoming particles.

Returns:

  • A collection of four-momenta representing the incoming particles. Because of performance reasons, it is recommened to return a Tuple of four-momenta.

Notes:

This function is a convenience wrapper around build_momenta, automatically converting the scalar in_coords into a 1-tuple. It is useful when the incoming phase space only requires a single coordinate to define the particle momenta.

source
build_momenta(proc, model, Ptot::AbstractFourMomentum, out_psl::AbstractOutPhaseSpaceLayout, out_coords::Tuple)

Construct the momenta of the outgoing particles using the provided phase space coordinates (out_coords) and total incoming momentum (Ptot).

This function ensures that the outgoing momenta satisfy energy and momentum conservation, consistent with the physics model in use.

Arguments

  • proc: The scattering process definition, subtype of AbstractProcessDefinition.
  • model: The physics model, subtype of AbstractModelDefinition.
  • in_moms: The incoming four-momenta, used to compute the outgoing momenta.
  • out_psl: The outgoing phase space layout, subtype of `AbstractOutPhaseSpaceLayout.
  • out_coords: A tuple of phase space coordinates that parametrize the outgoing particle momenta.

Returns

  • A collection of four-momenta representing the incoming particles. Because of performance reasons, it is recommened to return a Tuple of four-momenta.
source

Coordinate Maps

QEDcore.CoordinateMapType
CoordinateMap{P,M,PSL}(proc::P, model::M, psl::PSL)

A CoordinateMap represents a transformation that maps phase space coordinates to particle momenta for a specific scattering process. This type encapsulates the scattering process definition (proc), the physics model (model), and the phase space layout (psl). The CoordinateMap is callable and supports the conversion of both incoming and outgoing phase space coordinates into four-momenta.

Fields

  • proc: The scattering process definition, subtype of AbstractProcessDefinition.
  • model: The physics model, subtype of AbstractModelDefinition.
  • psl: The phase space layout, either incoming or outgoing, that maps coordinates to momenta.

Usage

Incoming Coordinates

The CoordinateMap can be called with a tuple of incoming phase space coordinates (in_coords), which are used to compute the corresponding incoming particle four-momenta. This is done by calling the phase space construction function build_momenta using the proc, model, and psl provided in the CoordinateMap.

# Create a coordinate map for in phase space
 in_coord_map = CoordinateMap(proc, model, in_psl)
 
 # call on in-coordinates to build the momenta
@@ -8,7 +8,7 @@
 coord_map = CoordinateMap(proc, model, out_psl)
 
 # call on in- and out-coordinates to build the momenta
-coord_map(in_coords, out_coords)
  • Arguments:

    • in_coords: A tuple of phase space coordinates for the incoming particles.
    • out_coords: A tuple of phase space coordinates for the outgoing particles.
  • Returns:

    • A tuple where the first element is the incoming particle momenta and the second element is the outgoing particle momenta, both represented as tuples of four-momenta.

Notes

  • The CoordinateMap provides a flexible mechanism for transforming phase space coordinates into physically meaningful four-momenta, ensuring consistency with the scattering process, physics model, and phase space layout.
  • The type is designed to handle both incoming and outgoing momenta, ensuring proper energy and momentum conservation for the process.
source
QEDcore.CoordinateMapCachedType
CoordinateMapCached{P,M,PSL,TM}(proc::P, model::M, psl::PSL, in_moms::TM)

A CoordinateMapCached represents a precomputed transformation for phase space coordinates, where the momenta of the incoming particles are cached. This can improve performance in cases where the incoming momenta remain constant and only the outgoing momenta need to be computed based on new coordinates.

The cached map encapsulates the scattering process (proc), the physics model (model), the phase space layout (psl), and the precomputed incoming momenta (in_moms).

Fields

  • proc: The scattering process definition, which defines the incoming and outgoing particles.
  • model: The physics model, which governs the interaction type and momentum distributions.
  • psl: The phase space layout, either incoming or outgoing, that maps coordinates to momenta.
  • in_moms: A collection of precomputed four-momenta for the incoming particles, usually a Tuple.

Usage

Cached Incoming Coordinates

When a CoordinateMapCached build with psl::AbstractInPhaseSpaceLayout is called without any arguments, it returns the precomputed incoming momenta (in_moms) directly. This provides an efficient way to access the incoming particle momenta that have already been calculated and stored in the map.

# Create a coordinate map for in phase space
+coord_map(in_coords, out_coords)
  • Arguments:

    • in_coords: A tuple of phase space coordinates for the incoming particles.
    • out_coords: A tuple of phase space coordinates for the outgoing particles.
  • Returns:

    • A tuple where the first element is the incoming particle momenta and the second element is the outgoing particle momenta, both represented as tuples of four-momenta.

Notes

  • The CoordinateMap provides a flexible mechanism for transforming phase space coordinates into physically meaningful four-momenta, ensuring consistency with the scattering process, physics model, and phase space layout.
  • The type is designed to handle both incoming and outgoing momenta, ensuring proper energy and momentum conservation for the process.
source
QEDcore.CoordinateMapCachedType
CoordinateMapCached{P,M,PSL,TM}(proc::P, model::M, psl::PSL, in_moms::TM)

A CoordinateMapCached represents a precomputed transformation for phase space coordinates, where the momenta of the incoming particles are cached. This can improve performance in cases where the incoming momenta remain constant and only the outgoing momenta need to be computed based on new coordinates.

The cached map encapsulates the scattering process (proc), the physics model (model), the phase space layout (psl), and the precomputed incoming momenta (in_moms).

Fields

  • proc: The scattering process definition, which defines the incoming and outgoing particles.
  • model: The physics model, which governs the interaction type and momentum distributions.
  • psl: The phase space layout, either incoming or outgoing, that maps coordinates to momenta.
  • in_moms: A collection of precomputed four-momenta for the incoming particles, usually a Tuple.

Usage

Cached Incoming Coordinates

When a CoordinateMapCached build with psl::AbstractInPhaseSpaceLayout is called without any arguments, it returns the precomputed incoming momenta (in_moms) directly. This provides an efficient way to access the incoming particle momenta that have already been calculated and stored in the map.

# Create a coordinate map for in phase space
 in_coord_map = CoordinateMapCached(proc, model, in_psl, in_moms)
 
 # call to return the in-momenta
@@ -16,7 +16,7 @@
 out_coord_map = CoordinateMapCached(proc, model, out_psl, in_moms)
 
 # call on out coordinates to return the out-momenta
-out_coord_map(out_coords)
  • Arguments:

    • out_coords: A tuple of phase space coordinates for the outgoing particles.
  • Returns:

    • A tuple of four-momenta for the outgoing particles, consistent with the total momentum derived from the cached incoming momenta.

Notes

  • Caching: The CoordinateMapCached is useful when the incoming momenta are fixed or do not change frequently, as it avoids recomputation by storing the incoming momenta in the cache.
  • Efficiency: This caching mechanism can significantly enhance performance when repeatedly evaluating the scattering process with fixed incoming particles but varying outgoing configurations.
  • The type is designed to handle both incoming and outgoing momenta, ensuring proper energy and momentum conservation for the process.
source

Implementations

Two-body Phase Space Layout

QEDcore.AbstractTwoBodyInPhaseSpaceLayoutType
AbstractTwoBodyInPhaseSpaceLayout <: AbstractInPhaseSpaceLayout

An abstract type representing an incoming phase space layout specifically designed for two-body systems in high-energy physics. This type is a specialized subtype of AbstractInPhaseSpaceLayout, focusing on scenarios where two particles are incoming and participate in a scattering or decay process.

Concrete subtypes of AbstractTwoBodyInPhaseSpaceLayout define the parameterization of the momenta of the two incoming particles, such as by Energy, Rapidity, or other kinematic coordinates. These layouts allow for consistent calculation of the system's phase-space properties under conservation laws, facilitating method dispatch in functions like _build_momenta.

This type serves as a foundation for implementing concrete layouts, ensuring that two-body processes can be modeled flexibly and accurately within phase space calculations.

See Also

source
QEDcore.AbstractTwoBodyRestSystemType
AbstractTwoBodyRestSystem <: AbstractTwoBodyInPhaseSpaceLayout

An abstract type representing the phase space layout of a two-body system in which one particle is at rest in the system's frame.

Concrete subtypes of AbstractTwoBodyRestSystem typically specify the coordinate system used to parameterize the momentum of the non-resting particle, such as Energy, SpatialMagnitude, CenterOfMomentumEnergy, or Rapidity. The choice of coordinate system impacts how the momenta of the incoming particles are constructed.

This type serves as a base for defining custom layouts that rely on rest-frame assumptions for two-body scattering or decay processes, and it facilitates method dispatch in momentum construction functions like _build_momenta.

See Also

  • TwoBodyRestSystem: A concrete implementation of AbstractTwoBodyRestSystem that supports various univariate coordinates for describing the non-resting particle.
source
QEDcore.TwoBodyRestSystemType
TwoBodyRestSystem{RESTIDX, COORD<:AbstractUnivariateCoordinate}

Represents a two-body scattering system in the rest frame of one of the particles, where one particle (identified by RESTIDX) is at rest and the other particle's momentum is described by a coordinate system COORD. The system uses various univariate coordinates, such as energy, rapidity, or center-of-momentum energy, to parameterize the momentum of the moving particle.

This type allows for easy construction of the incoming particle momenta using the phase space layout for two-body systems, commonly used in high-energy physics processes. The system supports different coordinate systems for defining the moving particle's momenta, including energy-based and rapidity-based layouts.

Fields

  • coord::COORD: The coordinate type (COORD) used to describe the non-resting particle's momenta.

Supported Coordinates

  • Energy: Defines the energy of the moving particle.
  • SpatialMagnitude: Defines the spatial momentum magnitude of the moving particle.
  • CMSEnergy: Defines the total center-of-mass energy of the system.
  • Rapidity: Defines the rapidity of the moving particle.

Example Usages

The following examples show how to use different coordinate systems with TwoBodyRestSystem in conjunction with the _build_momenta interface.

Example 1: Using Energy Coordinate

psl = TwoBodyRestSystem(Energy(2))  # Particle 1 at rest, particle 2 described by its energy
+out_coord_map(out_coords)
  • Arguments:

    • out_coords: A tuple of phase space coordinates for the outgoing particles.
  • Returns:

    • A tuple of four-momenta for the outgoing particles, consistent with the total momentum derived from the cached incoming momenta.

Notes

  • Caching: The CoordinateMapCached is useful when the incoming momenta are fixed or do not change frequently, as it avoids recomputation by storing the incoming momenta in the cache.
  • Efficiency: This caching mechanism can significantly enhance performance when repeatedly evaluating the scattering process with fixed incoming particles but varying outgoing configurations.
  • The type is designed to handle both incoming and outgoing momenta, ensuring proper energy and momentum conservation for the process.
source

Implementations

Two-body Phase Space Layout

QEDcore.AbstractTwoBodyInPhaseSpaceLayoutType
AbstractTwoBodyInPhaseSpaceLayout <: AbstractInPhaseSpaceLayout

An abstract type representing an incoming phase space layout specifically designed for two-body systems in high-energy physics. This type is a specialized subtype of AbstractInPhaseSpaceLayout, focusing on scenarios where two particles are incoming and participate in a scattering or decay process.

Concrete subtypes of AbstractTwoBodyInPhaseSpaceLayout define the parameterization of the momenta of the two incoming particles, such as by Energy, Rapidity, or other kinematic coordinates. These layouts allow for consistent calculation of the system's phase-space properties under conservation laws, facilitating method dispatch in functions like _build_momenta.

This type serves as a foundation for implementing concrete layouts, ensuring that two-body processes can be modeled flexibly and accurately within phase space calculations.

See Also

source
QEDcore.AbstractTwoBodyRestSystemType
AbstractTwoBodyRestSystem <: AbstractTwoBodyInPhaseSpaceLayout

An abstract type representing the phase space layout of a two-body system in which one particle is at rest in the system's frame.

Concrete subtypes of AbstractTwoBodyRestSystem typically specify the coordinate system used to parameterize the momentum of the non-resting particle, such as Energy, SpatialMagnitude, CenterOfMomentumEnergy, or Rapidity. The choice of coordinate system impacts how the momenta of the incoming particles are constructed.

This type serves as a base for defining custom layouts that rely on rest-frame assumptions for two-body scattering or decay processes, and it facilitates method dispatch in momentum construction functions like _build_momenta.

See Also

  • TwoBodyRestSystem: A concrete implementation of AbstractTwoBodyRestSystem that supports various univariate coordinates for describing the non-resting particle.
source
QEDcore.TwoBodyRestSystemType
TwoBodyRestSystem{RESTIDX, COORD<:AbstractUnivariateCoordinate}

Represents a two-body scattering system in the rest frame of one of the particles, where one particle (identified by RESTIDX) is at rest and the other particle's momentum is described by a coordinate system COORD. The system uses various univariate coordinates, such as energy, rapidity, or center-of-momentum energy, to parameterize the momentum of the moving particle.

This type allows for easy construction of the incoming particle momenta using the phase space layout for two-body systems, commonly used in high-energy physics processes. The system supports different coordinate systems for defining the moving particle's momenta, including energy-based and rapidity-based layouts.

Fields

  • coord::COORD: The coordinate type (COORD) used to describe the non-resting particle's momenta.

Supported Coordinates

  • Energy: Defines the energy of the moving particle.
  • SpatialMagnitude: Defines the spatial momentum magnitude of the moving particle.
  • CMSEnergy: Defines the total center-of-mass energy of the system.
  • Rapidity: Defines the rapidity of the moving particle.

Example Usages

The following examples show how to use different coordinate systems with TwoBodyRestSystem in conjunction with the _build_momenta interface.

Example 1: Using Energy Coordinate

psl = TwoBodyRestSystem(Energy(2))  # Particle 1 at rest, particle 2 described by its energy
 in_coords = (100.0,)  # Energy of particle 2
 momenta = build_momenta(proc, model, psl, in_coords)

This constructs the momenta assuming particle 1 is at rest, and particle 2 has an energy of 100 GeV.

Example 2: Using SpatialMagnitude Coordinate

psl = TwoBodyRestSystem(SpatialMagnitude(2))  # Particle 1 at rest, particle 2 described by its spatial magnitude
 in_coords = (50.0,)  # Spatial momentum magnitude of particle 2
@@ -25,4 +25,4 @@
 momenta = build_momenta(proc, model, psl, in_coords)

Here, the center-of-mass energy of the system is provided, and the momenta of both particles are calculated while conserving energy and momentum.

Example 4: Using Rapidity Coordinate

psl = TwoBodyRestSystem(Rapidity(2))  # Particle 1 at rest, particle 2 described by its rapidity
 in_coords = (1.0,)  # Rapidity of particle 2
 momenta = _build_momenta(proc, model, psl, in_coords)
-@assert isapprox(getMass(sum(momenta)),50.0)

In this case, the rapidity of particle 2 is given, and its energy and momentum are computed based on this parameter.

Notes

  • RESTIDX is the index of the particle that is at rest in the system.
  • COORD specifies the coordinate type of the non-resting particle and must be a subtype of AbstractUnivariateCoordinate.
  • The coordinate system should be compatible with the given particles and their masses, otherwise, an error may occur during momentum construction.

Throws

  • ArgumentError if invalid coordinates are used (e.g., unsupported coordinate types or incompatible indices).
source
+@assert isapprox(getMass(sum(momenta)),50.0)

In this case, the rapidity of particle 2 is given, and its energy and momentum are computed based on this parameter.

Notes

  • RESTIDX is the index of the particle that is at rest in the system.
  • COORD specifies the coordinate type of the non-resting particle and must be a subtype of AbstractUnivariateCoordinate.
  • The coordinate system should be compatible with the given particles and their masses, otherwise, an error may occur during momentum construction.

Throws

  • ArgumentError if invalid coordinates are used (e.g., unsupported coordinate types or incompatible indices).
source
diff --git a/dev/library/phasespacedef/index.html b/dev/library/phasespacedef/index.html index 28ace64..6cfc064 100644 --- a/dev/library/phasespacedef/index.html +++ b/dev/library/phasespacedef/index.html @@ -1,2 +1,2 @@ -Phase Space Definition · QEDcore.jl

Phase Space Definitions

Phase Space Definition Type

QEDcore.PhasespaceDefinitionType
PhasespaceDefinition(coord_sys::AbstractCoordinateSystem, frame::AbstractFrameOfReference)

Convenient type to dispatch on coordiante systems and frames of reference. Combines a AbstractCoordinateSystem with a AbstractFrameOfReference.

source

Frames of Reference

Coordinate Systems

+Phase Space Definition · QEDcore.jl

Phase Space Definitions

Phase Space Definition Type

QEDcore.PhasespaceDefinitionType
PhasespaceDefinition(coord_sys::AbstractCoordinateSystem, frame::AbstractFrameOfReference)

Convenient type to dispatch on coordiante systems and frames of reference. Combines a AbstractCoordinateSystem with a AbstractFrameOfReference.

source

Frames of Reference

Coordinate Systems

diff --git a/dev/library/phasespacepoint/index.html b/dev/library/phasespacepoint/index.html index 569f1c0..74a72b8 100644 --- a/dev/library/phasespacepoint/index.html +++ b/dev/library/phasespacepoint/index.html @@ -7,7 +7,7 @@ julia> ParticleStateful(Outgoing(), Photon(), SFourMomentum(1, 0, 0, 0)) ParticleStateful: outgoing photon - momentum: [1.0, 0.0, 0.0, 0.0]source
QEDcore.PhaseSpacePointType
PhaseSpacePoint

Representation of a point in the phase space of a process. Contains the process (AbstractProcessDefinition), the model (AbstractModelDefinition), the phase space definition (AbstractPhasespaceDefinition), and stateful incoming and outgoing particles (ParticleStateful).

The legality of the combination of the given process and the incoming and outgoing particles is checked on construction. If the numbers of particles mismatch, the types of particles mismatch (note that order is important), or incoming particles have an Outgoing direction, an error is thrown.

julia> using QEDcore; using QEDprocesses
+    momentum: [1.0, 0.0, 0.0, 0.0]
source
QEDcore.PhaseSpacePointType
PhaseSpacePoint

Representation of a point in the phase space of a process. Contains the process (AbstractProcessDefinition), the model (AbstractModelDefinition), the phase space definition (AbstractPhasespaceDefinition), and stateful incoming and outgoing particles (ParticleStateful).

The legality of the combination of the given process and the incoming and outgoing particles is checked on construction. If the numbers of particles mismatch, the types of particles mismatch (note that order is important), or incoming particles have an Outgoing direction, an error is thrown.

julia> using QEDcore; using QEDprocesses
 
 julia> PhaseSpacePoint(
             Compton(),
@@ -31,7 +31,7 @@
      -> incoming photon: [1.0, 0.0, 0.0, 0.0]
     outgoing particles:
      -> outgoing electron: [1.0, 0.0, 0.0, 0.0]
-     -> outgoing photon: [1.0, 0.0, 0.0, 0.0]
Note

PhaseSpacePoints can be constructed with only one of their in- or out-channel set. For this, see the special constructors InPhaseSpacePoint and OutPhaseSpacePoint. The InPhaseSpacePoint and OutPhaseSpacePoint type definitions can be used to dispatch on such PhaseSpacePoints. Note that a full PhaseSpacePoint containing both its in- and out-channel matches both, .i.e. psp isa InPhaseSpacePoint and psp isa OutPhaseSpacePoint both evaluate to true if psp contains both channels. A completely empty PhaseSpacePoint is not allowed.

source
QEDcore.InPhaseSpacePointType
InPhaseSpacePoint

A partial type specialization on PhaseSpacePoint which can be used for dispatch in functions requiring only the in channel of the phase space to exist, for example implementations of _incident_flux. No restrictions are imposed on the out-channel, which may or may not exist.

See also: OutPhaseSpacePoint

source
QEDcore.OutPhaseSpacePointType
OutPhaseSpacePoint

A partial type specialization on PhaseSpacePoint which can be used for dispatch in functions requiring only the out channel of the phase space to exist. No restrictions are imposed on the in-channel, which may or may not exist.

See also: InPhaseSpacePoint

source

Accessors

Base.getindexFunction
Base.getindex(psp::PhaseSpacePoint, dir::Incoming, n::Int)

Overload for the array indexing operator []. Returns the nth incoming particle in this phase space point.

source
Base.getindex(psp::PhaseSpacePoint, dir::Outgoing, n::Int)

Overload for the array indexing operator []. Returns the nth outgoing particle in this phase space point.

source
QEDcore._momentum_typeFunction
_momentum_type(psp::PhaseSpacePoint)
+     -> outgoing photon: [1.0, 0.0, 0.0, 0.0]
Note

PhaseSpacePoints can be constructed with only one of their in- or out-channel set. For this, see the special constructors InPhaseSpacePoint and OutPhaseSpacePoint. The InPhaseSpacePoint and OutPhaseSpacePoint type definitions can be used to dispatch on such PhaseSpacePoints. Note that a full PhaseSpacePoint containing both its in- and out-channel matches both, .i.e. psp isa InPhaseSpacePoint and psp isa OutPhaseSpacePoint both evaluate to true if psp contains both channels. A completely empty PhaseSpacePoint is not allowed.

source
QEDcore.InPhaseSpacePointType
InPhaseSpacePoint

A partial type specialization on PhaseSpacePoint which can be used for dispatch in functions requiring only the in channel of the phase space to exist, for example implementations of _incident_flux. No restrictions are imposed on the out-channel, which may or may not exist.

See also: OutPhaseSpacePoint

source
QEDcore.OutPhaseSpacePointType
OutPhaseSpacePoint

A partial type specialization on PhaseSpacePoint which can be used for dispatch in functions requiring only the out channel of the phase space to exist. No restrictions are imposed on the in-channel, which may or may not exist.

See also: InPhaseSpacePoint

source

Accessors

Base.getindexFunction
Base.getindex(psp::PhaseSpacePoint, dir::Incoming, n::Int)

Overload for the array indexing operator []. Returns the nth incoming particle in this phase space point.

source
Base.getindex(psp::PhaseSpacePoint, dir::Outgoing, n::Int)

Overload for the array indexing operator []. Returns the nth outgoing particle in this phase space point.

source
QEDcore._momentum_typeFunction
_momentum_type(psp::PhaseSpacePoint)
 _momentum_type(type::Type{PhaseSpacePoint})

Returns the element type of the PhaseSpacePoint object or type, e.g. SFourMomentum.

julia> using QEDcore; using QEDprocesses
 
 julia> psp = PhaseSpacePoint(Compton(), PerturbativeQED(), PhasespaceDefinition(SphericalCoordinateSystem(), ElectronRestFrame()), Tuple(rand(SFourMomentum) for _ in 1:2), Tuple(rand(SFourMomentum) for _ in 1:2));
@@ -40,4 +40,4 @@
 SFourMomentum
 
 julia> QEDcore._momentum_type(typeof(psp))
-SFourMomentum
source
+SFourMomentumsource diff --git a/dev/library/vectors/index.html b/dev/library/vectors/index.html index 8b5e5e5..020067d 100644 --- a/dev/library/vectors/index.html +++ b/dev/library/vectors/index.html @@ -1,15 +1,15 @@ -Vector Types · QEDcore.jl

Vector and Matrix Types

4-Momenta

QEDcore.SFourMomentumType
struct SFourMomentum <: AbstractFourMomentum

Builds a static LorentzVectorLike with real components used to statically model the four-momentum of a particle or field.

Fields

  • E::Float64: energy component

  • px::Float64: x component

  • py::Float64: y component

  • pz::Float64: z component

source
QEDcore.MFourMomentumType
mutable struct MFourMomentum <: AbstractFourMomentum

Builds a mutable LorentzVector with real components used to statically model the four-momentum of a particle or field.

Fields

  • E::Float64: energy component

  • px::Float64: x component

  • py::Float64: y component

  • pz::Float64: z component

source

Spinors

QEDcore.BiSpinorType
struct BiSpinor <: AbstractDiracVector{ComplexF64}

Concrete type to model a Dirac four-spinor with complex-valued components. These are the elements of an actual spinor space.

source
QEDcore.AdjointBiSpinorType
struct AdjointBiSpinor <: AbstractDiracVector{ComplexF64}

Concrete type to model an adjoint Dirac four-spinor with complex-valued components. These are the elements of the dual spinor space.

source

Lorentz Vectors

QEDcore.SLorentzVectorType
struct SLorentzVector{T} <: AbstractLorentzVector{T}

Concrete implementation of a generic static Lorentz vector. Each manipulation of an concrete implementation which is not self-contained (i.e. produces the same Lorentz vector type) will result in this type.

Fields

  • t::Any: t component

  • x::Any: x component

  • y::Any: y component

  • z::Any: z component

source
QEDcore.MLorentzVectorType
mutable struct MLorentzVector{T} <: AbstractLorentzVector{T}

Concrete implementation of a generic mutable Lorentz vector. Each manipulation of an concrete implementation which is not self-contained (i.e. produces the same Lorentz vector type) will result in this type.

Fields

  • t::Any: t component

  • x::Any: x component

  • y::Any: y component

  • z::Any: z component

source

Dirac Matrix

QEDcore.DiracMatrixType
struct DiracMatrix <: AbstractDiracMatrix{ComplexF64}

Concrete type to model Dirac matrices, i.e. matrix representations of linear mappings between two spinor spaces.

source

Multiplications

QEDcore._mulFunction
_mul(aBS::AdjointBiSpinor, BS::BiSpinor) -> ComplexF64
-

Tensor product of an adjoint with a standard bi-spinor resulting in a scalar.

Multiplication operator

This also overloads the * operator for this types.

source
_mul(BS::BiSpinor, aBS::AdjointBiSpinor) -> DiracMatrix
-

Tensor product of a standard with an adjoint bi-spinor resulting in a Dirac matrix.

Multiplication operator

This also overloads the * operator for this types.

source
_mul(DM::DiracMatrix, BS::BiSpinor) -> BiSpinor
-

Tensor product of an Dirac matrix with a standard bi-spinor resulting in another standard bi-spinor.

Multiplication operator

This also overloads the * operator for this types.

source
_mul(
+Vector Types · QEDcore.jl

Vector and Matrix Types

4-Momenta

QEDcore.SFourMomentumType
struct SFourMomentum <: AbstractFourMomentum

Builds a static LorentzVectorLike with real components used to statically model the four-momentum of a particle or field.

Fields

  • E::Float64: energy component

  • px::Float64: x component

  • py::Float64: y component

  • pz::Float64: z component

source
QEDcore.MFourMomentumType
mutable struct MFourMomentum <: AbstractFourMomentum

Builds a mutable LorentzVector with real components used to statically model the four-momentum of a particle or field.

Fields

  • E::Float64: energy component

  • px::Float64: x component

  • py::Float64: y component

  • pz::Float64: z component

source

Spinors

QEDcore.BiSpinorType
struct BiSpinor <: AbstractDiracVector{ComplexF64}

Concrete type to model a Dirac four-spinor with complex-valued components. These are the elements of an actual spinor space.

source
QEDcore.AdjointBiSpinorType
struct AdjointBiSpinor <: AbstractDiracVector{ComplexF64}

Concrete type to model an adjoint Dirac four-spinor with complex-valued components. These are the elements of the dual spinor space.

source

Lorentz Vectors

QEDcore.SLorentzVectorType
struct SLorentzVector{T} <: AbstractLorentzVector{T}

Concrete implementation of a generic static Lorentz vector. Each manipulation of an concrete implementation which is not self-contained (i.e. produces the same Lorentz vector type) will result in this type.

Fields

  • t::Any: t component

  • x::Any: x component

  • y::Any: y component

  • z::Any: z component

source
QEDcore.MLorentzVectorType
mutable struct MLorentzVector{T} <: AbstractLorentzVector{T}

Concrete implementation of a generic mutable Lorentz vector. Each manipulation of an concrete implementation which is not self-contained (i.e. produces the same Lorentz vector type) will result in this type.

Fields

  • t::Any: t component

  • x::Any: x component

  • y::Any: y component

  • z::Any: z component

source

Dirac Matrix

QEDcore.DiracMatrixType
struct DiracMatrix <: AbstractDiracMatrix{ComplexF64}

Concrete type to model Dirac matrices, i.e. matrix representations of linear mappings between two spinor spaces.

source

Multiplications

QEDcore._mulFunction
_mul(aBS::AdjointBiSpinor, BS::BiSpinor) -> ComplexF64
+

Tensor product of an adjoint with a standard bi-spinor resulting in a scalar.

Multiplication operator

This also overloads the * operator for this types.

source
_mul(BS::BiSpinor, aBS::AdjointBiSpinor) -> DiracMatrix
+

Tensor product of a standard with an adjoint bi-spinor resulting in a Dirac matrix.

Multiplication operator

This also overloads the * operator for this types.

source
_mul(DM::DiracMatrix, BS::BiSpinor) -> BiSpinor
+

Tensor product of an Dirac matrix with a standard bi-spinor resulting in another standard bi-spinor.

Multiplication operator

This also overloads the * operator for this types.

source
_mul(
     aBS::AdjointBiSpinor,
     DM::DiracMatrix
 ) -> AdjointBiSpinor
-

Tensor product of an adjoint bi-spinor with a Dirac matrix resulting in another adjoint bi-spinor.

Multiplication operator

This also overloads the * operator for this types.

source
_mul(DM1::DiracMatrix, DM2::DiracMatrix) -> DiracMatrix
-

Tensor product two Dirac matrices resulting in another Dirac matrix.

Multiplication operator

This also overloads the * operator for this types.

source
_mul(
+

Tensor product of an adjoint bi-spinor with a Dirac matrix resulting in another adjoint bi-spinor.

Multiplication operator

This also overloads the * operator for this types.

source
_mul(DM1::DiracMatrix, DM2::DiracMatrix) -> DiracMatrix
+

Tensor product two Dirac matrices resulting in another Dirac matrix.

Multiplication operator

This also overloads the * operator for this types.

source
_mul(
     aBS::AdjointBiSpinor,
     DM::DiracMatrix,
     BS::BiSpinor
 ) -> ComplexF64
-

Tensor product of Dirac matrix sandwiched between an adjoint and a standard bi-spinor resulting in a scalar.

source
+

Tensor product of Dirac matrix sandwiched between an adjoint and a standard bi-spinor resulting in a scalar.

source