Skip to content

EDM4EIC diagram

Main Data Model

Primary physics objects (particles, tracks, clusters, vertices, associations)


Components/Utilities

Supporting structures like:

  • Covariance matrices (Cov2f, Cov3f, etc.)
  • Utility classes (Surface, Tensor, etc.)
  • Component types (TrackPoint, Hypothesis classes, etc.)
  • External types from other packages (Vector3f, etc, etc.)

The prompt used to convert:

Here is edm4eic yaml. Please convert it to mermaid diagrams. 
The main diagram should focus on the core physics data flow, while utility structures go in a separate diagram.

# Quick Instructions: YAML to Mermaid Class Diagram
When converting YAML schemas (PODIO/EDM4hep/EDM4EIC) to Mermaid diagrams:

## Don't fail

1. Arrow Syntax
** NEVER USE:** `-.->` (causes parse error)  
** USE INSTEAD:** `..>` for dashed arrows
Valid arrows only:
- `-->` (solid arrow for OneToOne)
- `--o` (aggregation for OneToMany)
- `..>` (dependency for Links)
- `--*`, `--|>`, `..|>`, `--`, `..`

2. Complex Types
Simplify these:
- `std::array<float, 21>` → `float[]`
- `vector<int>` → `int[]`
- Remove namespace prefixes: `edm4eic::Track` → `Track`

3. If Arrays Cause Errors
If `float data[10]` causes syntax errors, remove brackets: `float data`

## Diagram Organization
### Separate into Multiple Diagrams:
1. **Main Data Model** - Primary physics objects (particles, tracks, clusters, vertices, associations)
2. **Components/Utilities** - Supporting structures like:
   - Covariance matrices (Cov2f, Cov3f, etc.)
   - Utility classes (Surface, Tensor, etc.)
   - Component types (TrackPoint, Hypothesis classes, etc.)
   - External types from other packages (Vector3f, etc, etc.)

## Standard Mappings
Follow the standard YAML structure mapping:
- `OneToOneRelations` → `-->`
- `OneToManyRelations` → `--o`
- `VectorMembers` with type references → `--o`
- `links` section → `..>`

Create clean, readable diagrams by separating concerns.

Released under the MIT License.