ara-software / AraProc

ARA data analysis framework
GNU General Public License v3.0
3 stars 1 forks source link

Here is a draft of daq error and read out window error cut #19

Closed pgiri4 closed 1 week ago

marcomuzio commented 2 weeks ago

Hi @pgiri4, thanks for getting this together, it's looking really good and was clearly a lot of work! I think it just needs some restructuring and it will be there. Here are a few broad comments that should help get it most of the way:

  1. Assume the input for functions is useful_event from useful_event = data.get_useful_event(). These functions only need to do these quality checks for a single event at a time (the event loaded into useful_event).
  2. Since we're only checking things for a single event, you can use the pyroot way of accessing variables. For example, to get the event timeStamp you would do useful_event.timeStamp.
  3. Use AraRoot functions where they exist. For example to check if the event is a calpulser you can use useful_event.isCalpulserEvent(). Corresponding functions can be found here.
  4. For information that can't be gotten from useful_event and needs to be supplied in some way by the user, we can add to AraProc/araproc/framework/config_files/analysis_configs.yaml and ask everyone to add the necessary info. Then you can code it assuming you pull the relevant info from that file. An example of how to do that can be found here.
  5. The function that gets called by the user should be something like check_daq_quality(useful_event) which is a wrapper for all the other functions you've written and returns True or False to indicate if all the quality checks have passed.

Let us know if you have questions or run into errors implementing any of these, so we can get this turned around quickly.

marcomuzio commented 1 week ago

@pgiri4 this is a huge improvement! Thanks for addressing those big restructuring comments. I left a few small comments, but I think this is just about done.

marcomuzio commented 1 week ago

@pgiri4 thank you so much for your work here, really nice job! Merge away! :)