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

TrajectoryPoints? #31

Open
cbernet opened this issue Dec 1, 2016 · 7 comments
Open

TrajectoryPoints? #31

cbernet opened this issue Dec 1, 2016 · 7 comments

Comments

@cbernet
Copy link
Contributor

cbernet commented Dec 1, 2016

Hi everybody,

In papas we have a data structure called path that contains trajectory parameters and points (reference points on the trajectory). We're talking about a purely geometrical object, this is not a track.

The number of points is arbitrary but limited to ~10, and the points are indexed by a name (e.g. vertex, ecal_entrance, ..). We would like to store such objects in the FCC EDM.

We thought about the following.
What do you think? wouldn't a fixed size array of points be more adequate in fcc::TrajectoryPoints?
Do we have such a thing?
Indeed, we think it is better to have concrete storage of the points within fcc::TrajectoryPoints rather than in a separate collection.

fcc::Helix:
   # here helix parameters
  OneToOneRelations:
  - fcc::TrajectoryPoints points

fcc::StraightLine:
   # here straightline parameters
  OneToOneRelations:
  - fcc::TrajectoryPoints points

fcc::TrajectoryPoints: 
  OneToManyRelations:
  - fcc::Point points 

Cheers,

Colin, @alicerobson

@cbernet cbernet added this to the papas_integration milestone Dec 1, 2016
@alicerobson
Copy link
Collaborator

alicerobson commented Dec 5, 2016 via email

@jlingema
Copy link
Contributor

jlingema commented Apr 7, 2017

Hi Colin and Alice,

Sorry for only answering now, I missed this somehow.

We now (since podio v0.6) have the possibility to store arrays, but it was only tested for builtin types. There is a small bug fix necessary to make it also work for PODs (components), PR soon. So something like this should be feasible:

components:
fcc::TrajectoryPoints: 
  points: std::array<fcc::Point, 10>

datatypes: 
fcc::Helix:
   # here helix parameters
  Members:
  - fcc::TrajectoryPoints points

fcc::StraightLine:
   # here straightline parameters
  Members:
  - fcc::TrajectoryPoints points

However, is it really fixed size? Regarding Alice's question, I guess that could be solved by an enum?

Cheers,
Joschka

@cbernet
Copy link
Contributor Author

cbernet commented Apr 7, 2017

Hi Joschka, an enum could be good but is there a way to declare that with podio?

@jlingema
Copy link
Contributor

jlingema commented Apr 7, 2017

No. After writing I also began wondering about how to make this work without risking to go out of synch.

@jlingema
Copy link
Contributor

jlingema commented Apr 7, 2017

Although, I guess one could use the ExtraCode but I guess that was not it's intended usage, @hegner?

@jlingema
Copy link
Contributor

jlingema commented Apr 7, 2017

To elaborate on that, something like this does work:

fcc::TrajectoryPoints: 
  points: std::array<fcc::Point, 10>
  ExtraCode :
      declaration: "
      enum class PointType : int { kVertex, kEcalEntrance, ...};"

@cbernet
Copy link
Contributor Author

cbernet commented Apr 7, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants