Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add Reconstructed TOF. #299

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions edm4hep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,19 @@ datatypes:
OneToOneRelations:
- edm4hep::Track track // the corresponding track

#------------- RecTof
edm4hep::RecTof:
Description: "Reconstructed TOF (time of flight) info."
Author: "EDM4hep authors"
Members:
- float time [ns] // time measurement
- std::array<float, 5> timeExp [ns] // expected time for e(0),mu(1),pi(2),K(3),p(4)
andresailer marked this conversation as resolved.
Show resolved Hide resolved
- float sigma // time resolution
- std::array<float, 5> pathLength [mm] // length of flight for e(0),mu(1),pi(2),K(3),p(4)
Copy link
Collaborator

@andresailer andresailer May 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add one "unknown/background/other" entry?

- edm4hep::Vector3d position [mm] // extrapolated hit position
Comment on lines +789 to +793
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would potentially re-order these to keep the particle species bits and the "measured" bits together, e.g.

  • time
  • sigma
  • position

sigma still needs a unit, which, I would assume is ps?

Is the extrapolated hit position necessary here? I assume you need it for the calculation of the track length, but do you still need it afterwards?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also propose sigma -> timeError, which is similar to other places where we have value and valueError

Copy link
Contributor

@m-fila m-fila May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about renaming sigma to something like resolution
Sorry didn't see Andre's comment, timeError seems nice

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle we also have the edm4hep::Quantity that bundles both:

EDM4hep/edm4hep.yaml

Lines 221 to 225 in a296139

edm4hep::Quantity:
Members:
- int16_t type // flag identifying how to interpret the quantity
- float value // value of the quantity
- float error // error on the value of the quantity

However, that also brings along another 16 free bits. Not sure if we want to go there.

OneToOneRelations:
- edm4hep::Track track // the corresponding track

interfaces:
edm4hep::TrackerHit:
Description: "Tracker hit interface class"
Expand Down
3 changes: 3 additions & 0 deletions tools/include/edm4hep2json.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "edm4hep/RecDqdxCollection.h"
#include "edm4hep/RecIonizationClusterCollection.h"
#include "edm4hep/ReconstructedParticleCollection.h"
#include "edm4hep/RecTofCollection.h"
#include "edm4hep/SimCalorimeterHitCollection.h"
#include "edm4hep/SimPrimaryIonizationClusterCollection.h"
#include "edm4hep/SimTrackerHitCollection.h"
Expand Down Expand Up @@ -114,6 +115,8 @@ nlohmann::json processEvent(const podio::Frame& frame, std::vector<std::string>&
insertIntoJson<edm4hep::TimeSeriesCollection>(jsonDict, coll, collList[i]);
} else if (coll->getTypeName() == "edm4hep::RecDqdxCollection") {
insertIntoJson<edm4hep::RecDqdxCollection>(jsonDict, coll, collList[i]);
} else if (coll->getTypeName() == "edm4hep::RecTofCollection") {
insertIntoJson<edm4hep::RecTofCollection>(jsonDict, coll, collList[i]);
}
// Associations
else if (coll->getTypeName() == "edm4hep::MCRecoParticleAssociationCollection") {
Expand Down
Loading