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][ITS-tracking] Add track dumping in standalone debugger #5069

Merged
merged 3 commits into from Dec 28, 2020

Conversation

mconcas
Copy link
Collaborator

@mconcas mconcas commented Dec 15, 2020

Hi @shahor02,
this pr adds the possibility to dump a o2::its::TrackITSExt on file.
By enabling CA_DEBUG in Definitions.h it creates automatically the file. I tested with the macro, should work also on workflow.

I also have a previously developed FakeTrackInfo class that performs some checks on the labels given a track to decide whether it is fake and other details.
My goal is to stream also this struct on file, coupled to the actual track.

This last class still does not work for some reason, tomorrow I'll fix it. In the meanwhile if you want to have a look, the track dumping works (i randomly put it in some point in the code, for today).

Cheers

Copy link
Collaborator

@shahor02 shahor02 left a comment

Choose a reason for hiding this comment

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

Thanks @mconcas !
Please see a few comments below.

occurrences.clear();
for (size_t iCluster{0}; iCluster < 7; ++iCluster) {
int extIndex = track.getClusterIndex(iCluster);
o2::MCCompLabel mcLabel = event.getClusterLabels(iCluster, extIndex);
Copy link
Collaborator

Choose a reason for hiding this comment

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

in principle, a cluster may have multiple labels. What is the reason to copy the labels into the ROframe, rather than fetching them by cluster index from the MC container?

Copy link
Collaborator Author

@mconcas mconcas Dec 16, 2020

Choose a reason for hiding this comment

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

Well, I just got this from the approach used in the tracker to access the labels, at some point I realised it is a duplication.
Unless I am forgetting some strong reason we might consider to simplify this, will check with Max to be sure.

@mconcas mconcas changed the title [WIP] Add track dumping in standalone debugger [WIP][ITS-tracking] Add track dumping in standalone debugger Dec 16, 2020
@mconcas
Copy link
Collaborator Author

mconcas commented Dec 16, 2020

Hi @shahor02,
now we can store the custom FakeTrackInfo<NClusters> also in the tree.
Two small remarks:

  1. The FakeTrackInfo struct is currently templetized to accommodate tracks with variable number of clusters (e.g. usable in ITS3 and ALICE3). The drawback is that tracks can be shorter than 7 clusters, hence saving nonsense data for the clusters coordinates. This requires a filtering on TrackITS::getNumberOfClusters().
  2. For the moment I am storing our lightweight version of the clusters, I am right now working for substuting them with the original clusters, still have to test indices are not lost in translation (we also sort them...).

Please if you have some suggestion on how make this utility more handy it is very welcome.

Cheers,
Matteo

@shahor02
Copy link
Collaborator

@mconcas thanks! Indeed, for (2) what matters are the clusters (position, errors) as used in the Tracker::fitTrack.

@mconcas
Copy link
Collaborator Author

mconcas commented Dec 16, 2020

@mconcas thanks! Indeed, for (2) what matters are the clusters (position, errors) as used in the Tracker::fitTrack.

Well, then using our clusters is even more consistent. I'll let it as it is.

@mconcas mconcas marked this pull request as ready for review December 16, 2020 21:18
@shahor02
Copy link
Collaborator

Well, then using our clusters is even more consistent. I'll let it as it is.

Are you sure? Now you are extracting the clusters from the PrimaryVertexContext (as far as I can see, they provide lab coordinates) while for the fit you take them as ROframe::getTrackingFrameInfoOnLayer(iLayer).at(track.getClusterIndex(iLayer)).

@mconcas
Copy link
Collaborator Author

mconcas commented Dec 17, 2020

Well, then using our clusters is even more consistent. I'll let it as it is.

Are you sure? Now you are extracting the clusters from the PrimaryVertexContext (as far as I can see, they provide lab coordinates) while for the fit you take them as ROframe::getTrackingFrameInfoOnLayer(iLayer).at(track.getClusterIndex(iLayer)).

You are right, we actually use both (clusters for track seed initialisation and trackingFrameInfo for fit and propagation).
Adding also TrackingFrameInfo.

@mconcas
Copy link
Collaborator Author

mconcas commented Dec 28, 2020

Hi @shahor02 , if this can work for you I have nothing more to put here at this iteration.

Cheers

@shahor02 shahor02 merged commit 29db127 into AliceO2Group:dev Dec 28, 2020
@mconcas mconcas deleted the n-tracker-debugger branch December 28, 2020 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants