diff --git a/README.md b/README.md index 1c5fe5a71..a0f69f31a 100644 --- a/README.md +++ b/README.md @@ -14,25 +14,28 @@ A generic event data model for future HEP collider experiments. |-|-|-| | [Vector3f ](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L9) | [Vector3d ](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L24) | [Vector2i](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L40) | | [Vector2f](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L54) | [TrackState ](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L68) | [ObjectID](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L91) | +| [Quantity](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L103) | [Hypothesis ](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L111) | [HitLevelData](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L118) | **Datatypes** | | | | |-|-|-| -| [EventHeader](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L113) | [MCParticle](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L123) | [SimTrackerHit](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L191) | -| [CaloHitContribution](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L225) | [SimCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L237) | [RawCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L249) | -| [CalorimeterHit](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L258) | [ParticleID](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L270) | [Cluster](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L283) | -| [TrackerHit](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L304) | [TrackerHitPlane](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L321) | [TPCHit](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L342) | -| [Track](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L354) | [Vertex](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L373) | [ReconstructedParticle](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L390) | +| [EventHeader](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L129) | [MCParticle](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L139) | [SimTrackerHit](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L207) | +| [CaloHitContribution](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L241) | [SimCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L254) | [RawCalorimeterHit](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L266) | +| [CalorimeterHit](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L274) | [ParticleID](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L286) | [Cluster](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L299) | +| [TrackerHit](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L320) | [TrackerHitPlane](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L337) | [RawTimeSeries](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L358) | +| [Track](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L371) | [Vertex](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L390) | [ReconstructedParticle](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L407) | +| [SimPrimaryIonizationCluster](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L511) | [TrackerPulse](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L529) | [RecIonizationCluster](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L542) | +| [TimeSeries](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L553) | [RecDqdx](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L565) | | **Associations** | | | | |-|-|-| -| [MCRecoParticleAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L421) | [MCRecoCaloAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L430) | [MCRecoTrackerAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L439) | -| [MCRecoTrackerHitPlaneAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L448) | [MCRecoCaloParticleAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L457) | [MCRecoClusterParticleAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L466) | -| [MCRecoTrackParticleAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L475) | [RecoParticleVertexAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L484) | | +| [MCRecoParticleAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L438) | [MCRecoCaloAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L447) | [MCRecoTrackerAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L456) | +| [MCRecoTrackerHitPlaneAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L465) | [MCRecoCaloParticleAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L474) | [MCRecoClusterParticleAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L483) | +| [MCRecoTrackParticleAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L492) | [RecoParticleVertexAssociation](https://github.com/key4hep/EDM4hep/blob/master/edm4hep.yaml#L501) | | The tests and examples in the `tests` directory show how to read, write, and use these types in your code. diff --git a/edm4hep.yaml b/edm4hep.yaml index 9e2e82f42..6a1a1e620 100644 --- a/edm4hep.yaml +++ b/edm4hep.yaml @@ -107,6 +107,22 @@ components: - float value // value of the quantity - float error // error on the value of the quantity + + # Hypothesis for 5 particle types + edm4hep::Hypothesis: + Members: + - float chi2 // chi2 + - float expected // expected value + - float sigma // sigma value + + # Reconstructed hit information + edm4hep::HitLevelData: + Members: + - uint64_t cellID // cell id + - uint32_t N // number of reconstructed ionization cluster. + - float eDep // reconstructed energy deposit [GeV]. + - float pathLength // track path length [mm]. + datatypes : @@ -307,7 +323,7 @@ datatypes : Author : "F.Gaede, DESY" Members : - uint64_t cellID //ID of the sensor that created this hit - - int32_t type //type of raw data hit, either one of edm4hep::TPCHIT, edm4hep::SIMTRACKERHIT - see collection parameters "TrackerHitTypeNames" and "TrackerHitTypeValues". + - int32_t type //type of raw data hit, either one of edm4hep::RawTimeSeries, edm4hep::SIMTRACKERHIT - see collection parameters "TrackerHitTypeNames" and "TrackerHitTypeValues". - int32_t quality //quality bit flag of the hit. - float time //time of the hit. - float eDep //energy deposited on the hit [GeV]. @@ -324,7 +340,7 @@ datatypes : Author : "Placido Fernandez Declara, CERN" Members : - uint64_t cellID //ID of the sensor that created this hit - - int32_t type //type of raw data hit, either one of edm4hep::TPCHIT, edm4hep::SIMTRACKERHIT - see collection parameters "TrackerHitTypeNames" and "TrackerHitTypeValues". + - int32_t type //type of raw data hit, either one of edm4hep::RawTimeSeries, edm4hep::SIMTRACKERHIT - see collection parameters "TrackerHitTypeNames" and "TrackerHitTypeValues". - int32_t quality //quality bit flag of the hit. - float time //time of the hit. - float eDep //energy deposited on the hit [GeV]. @@ -339,17 +355,18 @@ datatypes : - edm4hep::ObjectID rawHits //raw data hits. Check getType to get actual data type. - #---------- TPCHit - edm4hep::TPCHit: - Description: "Time Projection Chamber Hit" + #---------- RawTimeSeries + edm4hep::RawTimeSeries: + Description: "Raw data of a detector readout" Author : "F.Gaede, DESY" Members: - uint64_t cellID //detector specific cell id. - int32_t quality //quality flag for the hit. - float time //time of the hit. - float charge //integrated charge of the hit. + - float interval //interval of each sampling [ns]. VectorMembers: - - int32_t rawDataWords //raw data (32-bit) word at i. + - int32_t adcCounts //raw data (32-bit) word at i. #-------- Track edm4hep::Track: @@ -489,3 +506,72 @@ datatypes : OneToOneRelations: - edm4hep::ReconstructedParticle rec // reference to the reconstructed particle - edm4hep::Vertex vertex // reference to the vertex + + + #----------- SimPrimaryIonizationCluster + edm4hep::SimPrimaryIonizationCluster: + Description: "Simulated Primary Ionization" + Author : "Wenxing Fang, IHEP" + Members: + - uint64_t cellID //cell id. + - float time //the primary ionization's time in the lab frame [ns]. + - edm4hep::Vector3d position //the primary ionization's position [mm]. + - int16_t type //type. + VectorMembers: + - uint64_t electronCellID //cell id. + - float electronTime //the time in the lab frame [ns]. + - edm4hep::Vector3d electronPosition //the position in the lab frame [mm]. + - float pulseTime //the pulse's time in the lab frame [ns]. + - float pulseAmplitude //the pulse's amplitude [fC]. + OneToOneRelations: + - edm4hep::MCParticle MCParticle //the particle that caused the ionizing collisions. + + #---------- TrackerPulse + edm4hep::TrackerPulse: + Description: "Reconstructed Tracker Pulse" + Author : "Wenxing Fang, IHEP" + Members: + - uint64_t cellID //cell id. + - float time //time [ns]. + - float charge //charge [fC]. + - int16_t quality //quality. + - std::array covMatrix //lower triangle covariance matrix of the charge(c) and time(t) measurements. + OneToOneRelations: + - edm4hep::TimeSeries timeSeries //Optionally, the timeSeries that has been used to create the pulse can be stored with the pulse. + + #---------- RecIonizationCluster + edm4hep::RecIonizationCluster: + Description: "Reconstructed Ionization Cluster" + Author : "Wenxing Fang, IHEP" + Members: + - uint64_t cellID //cell id. + - float significance //significance. + - int16_t type //type. + OneToManyRelations: + - edm4hep::TrackerPulse trackerPulse //the TrackerPulse used to create the ionization cluster. + + #---------- TimeSeries + edm4hep::TimeSeries: + Description: "Calibrated Detector Data" + Author : "Wenxing Fang, IHEP" + Members: + - uint64_t cellID //cell id. + - float time //begin time [ns]. + - float interval //interval of each sampling [ns]. + VectorMembers: + - float amplitude //calibrated detector data. + + + #------------- RecDqdx + edm4hep::RecDqdx: + Description : "dN/dx or dE/dx info of Track." + Author : "Wenxing Fang, IHEP" + Members : + - edm4hep::Quantity dQdx //the reconstructed dEdx or dNdx and its error + - int16_t particleType //particle type, e(0),mu(1),pi(2),K(3),p(4). + - int16_t type //type. + - std::array hypotheses //5 particle hypothesis + VectorMembers: + - edm4hep::HitLevelData hitData //hit level data + OneToOneRelations: + - edm4hep::Track track //the corresponding track. diff --git a/test/read_events.h b/test/read_events.h index e3628d442..12982abc5 100644 --- a/test/read_events.h +++ b/test/read_events.h @@ -4,9 +4,9 @@ // test data model #include "edm4hep/CaloHitContributionCollection.h" #include "edm4hep/MCParticleCollection.h" +#include "edm4hep/RawTimeSeriesCollection.h" #include "edm4hep/SimCalorimeterHitCollection.h" #include "edm4hep/SimTrackerHitCollection.h" -#include "edm4hep/TPCHitCollection.h" #include "edm4hep/TrackerHitPlaneCollection.h" // podio specific includes @@ -23,7 +23,7 @@ void processEvent(const podio::Frame& event, bool verboser, unsigned eventNum) { auto& sths = event.get("SimTrackerHits"); auto& schs = event.get("SimCalorimeterHits"); auto& sccons = event.get("SimCalorimeterHitContributions"); - auto& tpchs = event.get("TPCHits"); + auto& tpchs = event.get("TPCHits"); auto& thps = event.get("TrackerHitPlanes"); if (mcps.isValid()) { diff --git a/test/write_events.h b/test/write_events.h index 0afc45310..5c357498b 100644 --- a/test/write_events.h +++ b/test/write_events.h @@ -4,9 +4,9 @@ // Data model #include "edm4hep/CaloHitContributionCollection.h" #include "edm4hep/MCParticleCollection.h" +#include "edm4hep/RawTimeSeriesCollection.h" #include "edm4hep/SimCalorimeterHitCollection.h" #include "edm4hep/SimTrackerHitCollection.h" -#include "edm4hep/TPCHitCollection.h" #include "edm4hep/TrackerHitPlaneCollection.h" // STL @@ -186,8 +186,8 @@ void write(std::string outfilename) { event.put(std::move(sccons), "SimCalorimeterHitContributions"); //=============================================================================== - // write some TPCHits: - auto tpchs = edm4hep::TPCHitCollection(); + // write some RawTimeSeries: + auto tpchs = edm4hep::RawTimeSeriesCollection(); int ntpch = 5; for (int j = 0; j < ntpch; ++j) { auto tpch1 = tpchs.create();