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

file reader for TPC Tracks and Clusters (+ MC info) #5256

Merged
merged 1 commit into from Jan 23, 2021

Conversation

tklemenz
Copy link
Contributor

@tklemenz tklemenz commented Jan 21, 2021

This adds a file reader workflow to read either tracks (with or without MC info) or clusters (with or without MC info) from file and provides them in the DPL.

  • Read tracks: o2-tpc-file-reader --infile tpctracks.root --input-type tracks
  • Read clusters: o2-tpc-file-reader --infile tpc-native-clusters.root --input-type clusters

@davidrohr
Copy link
Collaborator

@tklemenz : I think it might be helpful to add the option to distribute both clusters and tracks.
Have you tested it with the new TPC QC task, which has been merged into QC in the meantime?

@tklemenz
Copy link
Contributor Author

Hi @davidrohr, I agree, this might be useful. I will look into it.

Until now I only tested the file reader with the "old" QC workflows but I will check with your new one and let you know.

@davidrohr
Copy link
Collaborator

Thx, I think this is important in particular for the MC labels, since I believe they are not used in the other tasks. The instructions are in this JIRA ticket: https://alice.its.cern.ch/jira/browse/QC-519?filter=-2

@tklemenz
Copy link
Contributor Author

tklemenz commented Jan 22, 2021

@davidrohr, I checked with your TrackingQA and it ran without issues. When I do --disable-mc it does not run and complains about a missing output for CLNATIVEMCLBL. So as far as I can judge it works. You can have a look at the output on the qcg test page if you want. It is the histograms from ~15:50 on 22 Jan. (simulated 1000 pp 14TeV events with the pythia8 generator).
All mean, rms, and eff plots are empty. Is this related to the file reader not working, the simulated data or the QA task itself?

When the reading of clusters and tracks at the same time works, I will update the PR. I ran the test above calling the file reader twice.

@shahor02, I will remove the mentioned customization and the dispatching-mode and add the tracks to the description.

davidrohr
davidrohr previously approved these changes Jan 22, 2021
Copy link
Collaborator

@davidrohr davidrohr left a comment

Choose a reason for hiding this comment

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

@tklemenz : Thx, the output on the qcg page looks OK. Those efficiency histograms are empty in the mergeable output. They would only be filled when the postprocessing runs. I guess I should remove them completely when the output is set to mergeable.

@tklemenz
Copy link
Contributor Author

tklemenz commented Jan 22, 2021

I am thinking how to make the reader read two files at a time.

My problem is, that the DataProcessorSpec which reads the clusters is created by the PublisherSpec, which has the option infile. The part reading the tracks is the standalone TrackreaderSpec, which has the option tpc-track-file (in the PR this is also called infile but I meanwhile changed it back, because I think otherwise it won't work to read two files). Now if I put both options in the command line when calling the o2-tpc-file-reader exe both parts don't know one of the options.

A dirty workaround is to add the option tpc-track-file to the PublisherSpec and the option infile to the TrackreaderSpec. Then it works as intended but obviously no one wants that "solution". So what I would like to do is to add an option infile-clusters and infile-tracks (or maybe a comma separated list infiles) to the FileReaderWorkflow via the customize function and somehow pass the file path info to the getPublisherSpec and the getTPCTrackReaderSpec functions. For the latter this should be easy to implement but for the former I don't see if/how this would work.

Do you have an idea maybe?
The MatchTPCITSWorkflow I assume is also reading multiple files. Can you guide me a bit how it is done there?

@shahor02
Copy link
Collaborator

@tklemenz it should work with --infile for both readers, provided you put each of them in quotes, i.e.

o2-tpc-file-reader --tpc-track-reader '--infile tpctracks.root' --tpc-native-cluster-reader '--infile tpc-native-clusters.root'

@tklemenz
Copy link
Contributor Author

Yes! Thanks a lot, this works. I will push the changes asap.

Comment on lines +39 to +45
enum struct Input { Clusters,
Tracks
};

const std::unordered_map<std::string, Input> InputMap{
{"clusters", Input::Clusters},
{"tracks", Input::Tracks}};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This does not necessarily need to be there. I could also include the RecoWorkflow header and use the OutputType enum from there instead and adjust the InputMap but I think this is the nicer solution.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is ok, it is not so much code... :)
When you are ready, can you remove the WIP such that the CI runs, or is there still something to update?

shahor02
shahor02 previously approved these changes Jan 23, 2021
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.

@tklemenz could you remove [WIP] to trigger the CI tests?

@tklemenz tklemenz changed the title [WIP] file reader for TPC Tracks and Clusters (+ MC info) file reader for TPC Tracks and Clusters (+ MC info) Jan 23, 2021
@tklemenz
Copy link
Contributor Author

I rebased on the latest dev branch and removed WIP.

@davidrohr davidrohr merged commit c55375d into AliceO2Group:dev Jan 23, 2021
@tklemenz tklemenz deleted the FileReader branch January 24, 2021 09:49
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

3 participants