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

new analysis_toolkit.py #572

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

anupama-reghunath
Copy link
Contributor

@anupama-reghunath anupama-reghunath commented Nov 28, 2024

First version of a new toolkit script for analysis.
preselection_cut(show_table=True) returns a flag and produces a table for the candidate in the event.
Sample Output :

+----------------------------------+---------------------------+---------------------+-----------------------+
| Parameter                        | Value                     | Pre-selection cut   | Pre-selection Check   |
+==================================+===========================+=====================+=======================+
| Number of candidates in event    | 1                         | ==1                 | True                  |
+----------------------------------+---------------------------+---------------------+-----------------------+
| Time @ decay vertex (ns)         | 827.838314901504          |                     |                       |
+----------------------------------+---------------------------+---------------------+-----------------------+
| Impact Parameter (cm)            | 1.870657075982154         | IP < 250.0 cm       | True                  |
+----------------------------------+---------------------------+---------------------+-----------------------+
| DOCA (cm)                        | 0.1314989058928542        | DOCA < 1 cm         | True                  |
+----------------------------------+---------------------------+---------------------+-----------------------+
| Is within Fiducial Volume?       | True                      | True                | True                  |
+----------------------------------+---------------------------+---------------------+-----------------------+
| Dist2InnerWall (cm)              | 107.77691678708439        | > 5 cm              | True                  |
+----------------------------------+---------------------------+---------------------+-----------------------+
| Dist2VesselEntrance (cm)         | 4427.433487678709         | > 100 cm            | True                  |
+----------------------------------+---------------------------+---------------------+-----------------------+
| Invariant Mass (GeV)             | 0.9924035137310876        |                     |                       |
+----------------------------------+---------------------------+---------------------+-----------------------+
| Daughter Momentum [d1, d2] (GeV) | [10.6655147  17.80364632] | > 1 GeV             | True                  |
+----------------------------------+---------------------------+---------------------+-----------------------+
| Degrees of Freedom [d1, d2]      | [27 27]                   | > 25                | True                  |
+----------------------------------+---------------------------+---------------------+-----------------------+
| Reduced Chi^2 [d1, d2]           | [0.91172176 0.80305711]   | < 5                 | True                  |
+----------------------------------+---------------------------+---------------------+-----------------------+
| Pre-selection passed:            |                           |                     | True                  |
+----------------------------------+---------------------------+---------------------+-----------------------+

I've added an analysis_example.py in macro/, which was used for this output.

@olantwin
Copy link
Contributor

Thanks a lot for this! While I'm sure the details will evolve based on my (and hopefully others') feedback, I really appreciate the initiative!

Would you have time to briefly introduce the current implementation at the meeting Monday?

@anupama-reghunath
Copy link
Contributor Author

Yes, I do hope we can add on more as we go. I can briefly show the implementation on Monday's meeting :)

@olantwin
Copy link
Contributor

olantwin commented Dec 3, 2024

Maybe we could move the example to a new directly called examples.

@egamberini could we run the example in the CI?

macro/analysis_example.py Outdated Show resolved Hide resolved
macro/analysis_example.py Outdated Show resolved Hide resolved
@olantwin
Copy link
Contributor

olantwin commented Dec 9, 2024

One more general comment:
For new python code, we should probably make a ship module, potentially with e.g. an analysis_tools submodule. For things that don't yet have a stable interface, we might initially want to hide them in an experimental namespace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants