Project

General

Profile

Feature #1801

Allow selection of recon events for inclusion in maus_output file, based on user defined criteria

Added by Dobbs, Adam almost 6 years ago. Updated almost 4 years ago.

Status:
Open
Priority:
Normal
Category:
Code Infrastructure
Target version:
Start date:
18 December 2015
Due date:
% Done:

0%

Estimated time:
Workflow:
New Issue

Description

We have had a request to allow maus_output files to be created with only a particular subset of the reconstruction events included, based on some cutting criteria. This could then used for subsequent analysis or code debugging. The final output file should be a standard maus output file compatible with being read back into maus via an input module.

#1

Updated by Dobbs, Adam almost 6 years ago

My initial thoughts on a solution are to create a map module, MapCppDataSelection or something, which sits in a chain:

InputCppRoot -> MapCppDataSelection -> OutputCppRoot

i.e. it would take in a maus_output ROOT file containing the full dataset, and output a new maus_output file containing only the desired reconstruction events.

The mapper itself could be implemented in a number of ways - initially I may try the most direct route of editing each Spill in place, removing those events which fail the cuts from the recon events vector, and then passing the resultant Spill and Data object up to the output module to create the final ROOT file.

An alternative would be to add a kill / keep flag to the recon event class, setting this in the mapper, then modifying the output modules to only write those events with the flag set to keep (think this boils down to the same thing, just with the output module doing the actual pruning of the events).

#2

Updated by Rogers, Chris almost 6 years ago

Just curious, where did the request come from?

#3

Updated by Dobbs, Adam almost 6 years ago

Request originates with Ken. We would like to be able to study tracker performance for those events which have, for example, one and only one spacepoint in TOF1 and TOF2. A purely offline script is not sufficient as we need to extract pattern recognition data which are not (nor should be) written into the standard MAUS output file (specifically all the road cut residuals, whether that trial track is accepted or not).

#4

Updated by Dobbs, Adam almost 6 years ago

First iteration of this now working in lp:~ajdobbs/maus/data-selection.

I noticed when I was writing the code that InputCppRoot still uses JSON conversion, which we need to fix. Will create a separate issue.

#5

Updated by Dobbs, Adam about 5 years ago

I have done some more work on this. I have added a boolean field to the Data class called _should_write, with the corresponding get and set methods. I have also implemented an EventSelection mapper which will set this. Lastly I have updated OutputCppRoot to check _should_write before writing data to the output ROOT file.

The current road block is that the _should_write field gets reset to true in between the EventSelection mapper and OutputCppRoot. The only intervening module is ReducePyDoNothing. I have tried switching to a cpp reducer instead but that in turn is blocked by issue #1868. The reason for the reset is currently unknown.

Latest work on Launchpad at lp:~ajdobbs/maus/event-selection

#6

Updated by Dobbs, Adam almost 4 years ago

  • Assignee changed from Dobbs, Adam to Fedorov, Misha

This is now being dealt with by Misha, reassigning.

Also available in: Atom PDF