Skip to content

Commit

Permalink
Add weights vector to EventHeader and constant for storing them (key4…
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener authored Feb 22, 2024
1 parent cb738b0 commit 83b6c4a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 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#L145) | [MCParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L155) | [SimTrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L224) |
| [CaloHitContribution](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L266) | [SimCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L278) | [RawCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L290) |
| [CalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L299) | [ParticleID](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L311) | [Cluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L324) |
| [TrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L345) | [TrackerHitPlane](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L362) | [RawTimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L383) |
| [Track](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L396) | [Vertex](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L415) | [ReconstructedParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L432) |
| [SimPrimaryIonizationCluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L536) | [TrackerPulse](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L570) | [RecIonizationCluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L583) |
| [TimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L594) | [RecDqdx](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L606) | |
| [EventHeader](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L145) | [MCParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L157) | [SimTrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L226) |
| [CaloHitContribution](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L268) | [SimCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L280) | [RawCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L292) |
| [CalorimeterHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L301) | [ParticleID](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L313) | [Cluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L326) |
| [TrackerHit](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L347) | [TrackerHitPlane](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L364) | [RawTimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L385) |
| [Track](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L398) | [Vertex](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L417) | [ReconstructedParticle](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L434) |
| [SimPrimaryIonizationCluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L538) | [TrackerPulse](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L572) | [RecIonizationCluster](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L585) |
| [TimeSeries](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L596) | [RecDqdx](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L608) | |

**Associations**

| | | |
|-|-|-|
| [MCRecoParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L462) | [MCRecoCaloAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L471) | [MCRecoTrackerAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L480) |
| [MCRecoTrackerHitPlaneAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L489) | [MCRecoCaloParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L498) | [MCRecoClusterParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L507) |
| [MCRecoTrackParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L516) | [RecoParticleVertexAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L525) | |
| [MCRecoParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L464) | [MCRecoCaloAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L473) | [MCRecoTrackerAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L482) |
| [MCRecoTrackerHitPlaneAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L491) | [MCRecoCaloParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L500) | [MCRecoClusterParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L509) |
| [MCRecoTrackParticleAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L518) | [RecoParticleVertexAssociation](https://github.com/key4hep/EDM4hep/blob/main/edm4hep.yaml#L527) | |

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

Expand Down
4 changes: 3 additions & 1 deletion edm4hep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ datatypes:
- int32_t eventNumber //event number
- int32_t runNumber //run number
- uint64_t timeStamp //time stamp
- float weight // event weight
- double 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 83b6c4a

Please sign in to comment.