Skip to content

Draft: CSVDumpers: Implement algorithms for dumping velo, UT, and SciFi hits to CSV files

Anthony Correia requested to merge anthonyc-persistence_csv into master

This MR implements algorithms that allow to dump velo, UT and SciFi hits into CSV files from (X)DIGI files. This is the equivalent of PrTrackerDumper for CSV files. The algorithms are located in Dumpers/CSVDumpers and are meant to be executed using Moore using the configurables in RecoConf/persistence_csv.py. A general Moore option file is accessible in RecoConf/options/persistence_csv.py.

The 6 algorithms, as detailed in the table below.

Algorithm .cpp file Description Parameters Typical output
PrCSVDumperVPHits PrCSVDumperVPHits.cpp Dump velo hits - Extended hits_velo.csv
PrCSVDumperUTHits PrCSVDumperUTHits.cpp Dump UT hits - Extended hits_ut.csv
PrCSVDumperFTHits PrCSVDumperFTHits.cpp Dump SciFi hits - Extended hits_scifi.csv
PrCSVDumperMCParticles PrCSVDumperMCParticles.cpp Dump MC particles - Extended
- AllMCParticles: whether to dump all MC particles
hits_mcparticles.csv
PrCSVDumperMCHits PrCSVDumperMCHits.cpp Dump MC hits mchits_{detector}.csv
PrCSVDumperEventInfo PrCSVDumperEventInfo.cpp Dump information about event event_info.csv

The PrCSVDumperMCParticles algorithm only dumps the MC particles that have hits in order to save space and time, if the parameter AllMCParticles is set to false. In addition, each algorithm has a parameter OutputPath that indicates where the CSV file is dumped.

For reference, I have put some updated slides to this MR about the algorithms that are implemented: xdigi2csv_updated.pdf

In order not to repeat PrTrackerDumper, some functions where added to a Dumpers/RootDumpers/include/RootDumper/MCTools.h header file so that I can use them in my algorithm.

NB: Note that, unlike PrTrackerDumper, the PrCSVDumperVPHits algorithm uses full clusters instead of light clusters to dump the velo clusters. This decision was made because the MC particle-velo cluster linking uses full clusters as well, making the use of light clusters redundant. Please let me know if there are any issues with this decision.

PS: This is my first contribution and merge request, so please let me know if there are any issues or if I can improve anything. Thank you for taking the time to review this merge request!

Edited by Anthony Correia

Merge request reports