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

562 detailed trajectory information writer #563

Closed
wants to merge 7 commits into from

Conversation

rahmans1
Copy link
Contributor

Briefly, what does this PR introduce?

Initial implementation of trajectory writer provided by Shyam

What kind of change does this PR introduce?

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

No

Does this PR change default behavior?

@rahmans1 rahmans1 linked an issue Mar 22, 2023 that may be closed by this pull request
@rahmans1 rahmans1 requested a review from DraTeots March 22, 2023 06:05
@rahmans1
Copy link
Contributor Author

There seems to be a few things that are not clear in the initial implementation

  1. What's listed as the output tag in the tracking.cc file is being used as the input tag in the factory

Proposed solution: Replace "outputTrajectories" in tracking.cc with "CentralCKFTrajectories" or follow the example in other similar factories.

  1. Tries to fetch edm4eic::Trajectory object which doesn't have a vector structure and so the later portions of the code will not work. See error below.
/lustre06/project/6061913/rahmans/EIC/tests/EICrecon/src/global/tracking/Trajectory_factory.cc: In member function ‘virtual void eicrecon::Trajectory_factory::Process(const std::shared_ptr<const JEvent>&)’:
/lustre06/project/6061913/rahmans/EIC/tests/EICrecon/src/global/tracking/Trajectory_factory.cc:36:53: error: invalid use of ‘edm4eic::Trajectory::Trajectory’
   36 |             for (size_t i = 0; i < trajectory_info->Trajectory()->size(); i++) {
      |                                                     ^~~~~~~~~~
/lustre06/project/6061913/rahmans/EIC/tests/EICrecon/src/global/tracking/Trajectory_factory.cc:37:61: error: invalid use of ‘edm4eic::Trajectory::Trajectory’
   37 |                 auto trajectory_params = (*trajectory_info->Trajectory())[i];
      |                                                             ^~~~~~~~~~
/lustre06/project/6061913/rahmans/EIC/tests/EICrecon/src/global/tracking/Trajectory_factory.cc: In member function ‘virtual void eicrecon::Trajectory_factory::Process(const std::shared_ptr<const JEvent>&)’:
/lustre06/project/6061913/rahmans/EIC/tests/EICrecon/src/global/tracking/Trajectory_factory.cc:36:53: error: invalid use of ‘edm4eic::Trajectory::Trajectory’
   36 |             for (size_t i = 0; i < trajectory_info->Trajectory()->size(); i++) {
      |                                                     ^~~~~~~~~~
/lustre06/project/6061913/rahmans/EIC/tests/EICrecon/src/global/tracking/Trajectory_factory.cc:37:61: error: invalid use of ‘edm4eic::Trajectory::Trajectory’
   37 |                 auto trajectory_params = (*trajectory_info->Trajectory())[i];
      |                                                             ^~~~~~~~~~

Proposed solution: I am guessing what was intended was to get the eicrecon::TrackingResultTrajectory

    std::string input_tag = GetInputTags()[0];
    auto trajectories = event->Get<eicrecon::TrackingResultTrajectory>(input_tag);

and then pass it to an algorithm which can write out the track parameters.

  1. @ShujieL Can you comment what the broader goal of implementing this functionality was?

@DraTeots Any comments/suggestions? Is the functionality intended with this factory already available within existing factories?

DraTeots
DraTeots previously approved these changes Mar 22, 2023
@DraTeots DraTeots enabled auto-merge (squash) March 22, 2023 13:00
@DraTeots DraTeots disabled auto-merge March 22, 2023 13:04
@DraTeots DraTeots marked this pull request as draft March 22, 2023 13:04
@wdconinc
Copy link
Contributor

@rahmans1 Can we close this? We are now writing trajectories as part of CKFTracking.

@rahmans1 rahmans1 changed the title Draft: 562 detailed trajectory information writer 562 detailed trajectory information writer Oct 31, 2024
@rahmans1 rahmans1 closed this Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detailed trajectory information writer
4 participants