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

feat: Introduce vertex performance writer #776

Merged

Conversation

baschlag
Copy link
Contributor

@baschlag baschlag commented Apr 15, 2021

This PR introduces a vertex performance writer to the examples which enables a full reconstruction chain (with truth tracking) from event generation to vertex reconstruction including vertexing performance writing at the very end.

The changes include:

  • RootTrajectoryParametersReader has been added.
  • RootTrajectoryParametersWriter writes tracks now per event to root file.
  • RootVertexPerformanceWriter added which saves quantities such a number of reco vertices, number of truth vertices and number of max. vertices in acceptance per event. Also x/y/z vertex resolutions.
  • New TrackReaderVertexingPerformanceWriterExample has been added.
  • Adds a setter method for Barcodes to the Particle class.

//edit: A more sophisticated reco/true vertex match scheme has been added for the position resolution plots. True and reco vertices are now matched if at least 50% (default) of their tracks coincide.

A full reco chain could e.g. look like this:

# ttbar event generation
./ActsExamplePythia8  --events=200  --output-dir=data/gen/ttbar_mu200 --output-csv  --gen-cms-energy-gev=14000 --gen-hard-process=Top:qqbar2ttbar=on --gen-npileup=200

# simulation
./ActsExampleFatrasGeneric --input-dir=data/gen/ttbar_mu200   --output-dir=data/sim_generic/ttbar_mu200  --output-csv  --select-eta=-2.5:2.5 --select-pt-gev=0.4: --fatras-pmin-gev 0.4 --remove-neutral  --bf-constant-tesla=0:0:2

# truth tracking
./ActsExampleTruthTracksGeneric --input-dir=data/sim_generic/ttbar_mu200 --output-dir=data/reco_generic/ttbar_mu200 --bf-constant-tesla=0:0:2 --digi-config-file ../../Examples/Algorithms/Digitization/share/default-smearing-config-generic.json

# vertexing + performance writing
./bin/ActsExampleVertexFinderTrackReaderPerformanceWriter  --bf-constant-tesla=0:0:2 --input-dir=data/reco_generic/ttbar_mu200 --output-dir=data/vertexing/ttbar_mu200

@baschlag baschlag added 🚧 WIP Work-in-progress Component - Examples Affects the Examples module Feature Development to integrate a new feature labels Apr 15, 2021
@baschlag baschlag added this to the next milestone Apr 15, 2021
@baschlag baschlag changed the title Feat: Introduce vertex performance writer feat: Introduce vertex performance writer Apr 15, 2021
@HadrienG2
Copy link
Contributor

HadrienG2 commented Apr 15, 2021

A full reco chain could e.g. look like this:

# ttbar event generation
./ActsExamplePythia8  --events=200  --output-dir=data/gen/ttbar_mu200 --output-csv  --gen-cms-energy-gev=14000 --gen-hard-process=Top:qqbar2ttbar=on --gen-npileup=200

# simulation
./ActsExampleFatrasGeneric --input-dir=data/gen/ttbar_mu200   --output-dir=data/sim_generic/ttbar_mu200  --output-csv  --select-eta=-2.5:2.5 --select-pt-gev=0.4: --fatras-pmin-gev 0.4 --remove-neutral  --bf-constant-tesla=0:0:2

# truth tracking
./ActsExampleTruthTracksGeneric --input-dir=data/sim_generic/ttbar_mu200 --output-dir=data/reco_generic/ttbar_mu200 --bf-constant-tesla=0:0:2 --digi-config-file ../../Examples/Algorithms/Digitization/share/default-smearing-config-generic.json

# vertexing + performance writing
./bin/ActsExampleVertexFinderTrackReaderPerformanceWriter  --bf-constant-tesla=0:0:2 --input-dir=data/reco_generic/ttbar_mu200 --output-dir=data/vertexing/ttbar_mu200

Since you took the time to collect these commands, may I ask you to integrate them into the CI/run_examples.sh script, so that continuous integration runs these examples, which will give us a stronger guarantee that they keep working across future ACTS evolutions?

(I think we already have a Pythia8 job, which could be adapted to your needs, but the other examples are not covered yet)

@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #776 (d7ee0d5) into main (df7b197) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #776   +/-   ##
=======================================
  Coverage   48.64%   48.64%           
=======================================
  Files         328      328           
  Lines       16898    16898           
  Branches     7934     7934           
=======================================
  Hits         8220     8220           
  Misses       3080     3080           
  Partials     5598     5598           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df7b197...d7ee0d5. Read the comment docs.

@baschlag
Copy link
Contributor Author

A full reco chain could e.g. look like this:

# ttbar event generation
./ActsExamplePythia8  --events=200  --output-dir=data/gen/ttbar_mu200 --output-csv  --gen-cms-energy-gev=14000 --gen-hard-process=Top:qqbar2ttbar=on --gen-npileup=200

# simulation
./ActsExampleFatrasGeneric --input-dir=data/gen/ttbar_mu200   --output-dir=data/sim_generic/ttbar_mu200  --output-csv  --select-eta=-2.5:2.5 --select-pt-gev=0.4: --fatras-pmin-gev 0.4 --remove-neutral  --bf-constant-tesla=0:0:2

# truth tracking
./ActsExampleTruthTracksGeneric --input-dir=data/sim_generic/ttbar_mu200 --output-dir=data/reco_generic/ttbar_mu200 --bf-constant-tesla=0:0:2 --digi-config-file ../../Examples/Algorithms/Digitization/share/default-smearing-config-generic.json

# vertexing + performance writing
./bin/ActsExampleVertexFinderTrackReaderPerformanceWriter  --bf-constant-tesla=0:0:2 --input-dir=data/reco_generic/ttbar_mu200 --output-dir=data/vertexing/ttbar_mu200

Since you took the time to collect these commands, may I ask you to integrate them into the CI/run_examples.sh script, so that continuous integration runs these examples, which will give us a stronger guarantee that they keep working across future ACTS evolutions?

(I think we already have a Pythia8 job, which could be adapted to your needs, but the other examples are not covered yet)

Hi,

so currently there's still some problems with running some of these example (see e.g. #774 ) and especially the truth tracking part would sometimes just segfault. I guess this should be fixed before adding it to the CI script, right? But I agree that it would be nice to have it in there

@baschlag baschlag force-pushed the introduce_vertexperformance_writer branch from 4f27924 to 027c5b9 Compare April 16, 2021 14:22
@baschlag baschlag force-pushed the introduce_vertexperformance_writer branch from 027c5b9 to a6941f1 Compare April 16, 2021 14:34
@baschlag baschlag removed the 🚧 WIP Work-in-progress label Apr 26, 2021
Copy link
Contributor

@XiaocongAi XiaocongAi left a comment

Choose a reason for hiding this comment

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

Hi @baschlag , the PR looks nice to me. I have some naming suggestions. Also, for the Root based writer and reader, I find it's always helpful to add some description of what is exactly read in or written out, in particular what one entry in the tree represents.

@baschlag
Copy link
Contributor Author

baschlag commented May 3, 2021

Hi @XiaocongAi, thanks for your comments! I've addressed all of them and I hope the PR is now good to go in. Cheers, Bastian

@baschlag baschlag requested a review from XiaocongAi May 3, 2021 16:02
Copy link
Contributor

@XiaocongAi XiaocongAi left a comment

Choose a reason for hiding this comment

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

Hi @baschlag , thank you for the update. I have a few minor follow-up comments which should be easy to address.

Copy link
Contributor Author

@baschlag baschlag left a comment

Choose a reason for hiding this comment

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

Hi @XiaocongAi, thanks again for your comments. All of them have been addressed. Please have a look again, thanks!

@XiaocongAi XiaocongAi self-requested a review May 10, 2021 07:50
Copy link
Contributor

@XiaocongAi XiaocongAi left a comment

Choose a reason for hiding this comment

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

Thank you! I will approve.

@asalzburger asalzburger merged commit 3a8bfa1 into acts-project:main May 12, 2021
@paulgessinger paulgessinger modified the milestones: next, v8.3.0 May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Examples Affects the Examples module Feature Development to integrate a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants