Skip to content

Commit

Permalink
Add weights vector to EventHeader and constant for storing them
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Jan 30, 2024
1 parent ad5a607 commit dd0cb22
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ A generic event data model for future HEP collider experiments.

| | | |
|-|-|-|
| [EventHeader](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L148) | [MCParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L158) | [SimTrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L227) |
| [CaloHitContribution](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L261) | [SimCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L273) | [RawCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L285) |
| [CalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L294) | [ParticleID](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L306) | [Cluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L319) |
| [TrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L340) | [TrackerHitPlane](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L357) | [RawTimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L378) |
| [Track](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L391) | [Vertex](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L410) | [ReconstructedParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L427) |
| [SimPrimaryIonizationCluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L531) | [TrackerPulse](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L549) | [RecIonizationCluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L562) |
| [TimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L573) | [RecDqdx](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L585) | |
| [EventHeader](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L148) | [MCParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L160) | [SimTrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L229) |
| [CaloHitContribution](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L263) | [SimCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L275) | [RawCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L287) |
| [CalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L296) | [ParticleID](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L308) | [Cluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L321) |
| [TrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L342) | [TrackerHitPlane](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L359) | [RawTimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L380) |
| [Track](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L393) | [Vertex](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L412) | [ReconstructedParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L429) |
| [SimPrimaryIonizationCluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L533) | [TrackerPulse](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L551) | [RecIonizationCluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L564) |
| [TimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L575) | [RecDqdx](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L587) | |

**Associations**

| | | |
|-|-|-|
| [MCRecoParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L457) | [MCRecoCaloAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L466) | [MCRecoTrackerAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L475) |
| [MCRecoTrackerHitPlaneAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L484) | [MCRecoCaloParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L493) | [MCRecoClusterParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L502) |
| [MCRecoTrackParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L511) | [RecoParticleVertexAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L520) | |
| [MCRecoParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L459) | [MCRecoCaloAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L468) | [MCRecoTrackerAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L477) |
| [MCRecoTrackerHitPlaneAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L486) | [MCRecoCaloParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L495) | [MCRecoClusterParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L504) |
| [MCRecoTrackParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L513) | [RecoParticleVertexAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L522) | |

The tests and examples in the `tests` directory show how to read, write, and use these types in your code.

Expand Down
2 changes: 2 additions & 0 deletions edm4hep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ datatypes:
- int32_t runNumber //run number
- uint64_t timeStamp //time stamp
- float weight // event weight
VectorMembers:
- double weights // event weights in case there are multiple. **NOTE that weights[0] might not be the same as weight!** Event weight names should be stored using the edm4hep::EventWeights name in the file level metadata.


edm4hep::MCParticle:
Expand Down
1 change: 1 addition & 0 deletions include/edm4hep/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
namespace edm4hep {
static constexpr const char* CellIDEncoding = "CellIDEncoding";
static constexpr const char* EventHeaderName = "EventHeader";
static constexpr const char* EventWeights = "EventWeightNames";
} // namespace edm4hep

#endif // EDM4HEP_CONSTANTS_H

0 comments on commit dd0cb22

Please sign in to comment.