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

Added Fiducial Cut Algorithm #221

Closed
wants to merge 11 commits into from
Closed

Conversation

Gregtom3
Copy link
Contributor

Added a Fiducial Cut algorithm that handles pid==11,211,-211,2212 drift chamber cuts using REC::Traj bank data

Currently only using pass1 parameterization

meson test validator-clas12-FiducialFilter --verbose --test-args '\-f /cache/clas12/rg-a/production/recon/fall2018/torus-1/pass1/v1/dst/train/nSidis/nSidis_005036.hipo \-n 0 \-o ../validator_output' outputs before and after REC::Traj [x,y] 2d histograms for each drift chamber number. Below is the result for DC1

Before Fiducial Cuts

DC1_before

After Fiducial Cuts

DC1_after

@Gregtom3 Gregtom3 requested a review from c-dilks as a code owner May 22, 2024 15:45
@c-dilks c-dilks linked an issue May 23, 2024 that may be closed by this pull request
CODEOWNERS Outdated Show resolved Hide resolved
@@ -7,6 +7,7 @@
#include <variant>
#include <vector>

#include <fmt/ranges.h>
Copy link
Member

Choose a reason for hiding this comment

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

we can probably remove this, since it's in Logger.h now

Suggested change
#include <fmt/ranges.h>
#include <fmt/ranges.h>

Comment on lines +47 to +52
/// @action_function{scalar filter} checks if the particle passes fiducial cuts
/// @param traj_row data struct of the particle in REC::Traj
/// @param torus toroidal magnetic field sign
/// @param pid pid of the particle
/// @returns `true` if passes fiducial cuts
bool Filter(FiducialFilter::traj_row_data const traj_row, int const torus, int const pid) const;
Copy link
Member

Choose a reason for hiding this comment

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

This isn't an action function, since traj_row is not a simple scalar. Perhaps you need a vector action function here; I believe it would be the first (see #169). For this PR, I recommend:

  • change the docstring so that it's not registering as an action function (remove @action_function{scalar filter})
  • open an issue saying FiducialCuts lacks an action function

Copy link
Member

Choose a reason for hiding this comment

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

We need better documentation on what an action function is, exactly; added to #141

hipo::banklist::size_type b_config;

/// Pi
const double PI = 3.14159265;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const double PI = 3.14159265;
const double PI = M_PI;

or replace PI with M_PI everywhere


/// @brief_algo Filter the `REC::Particle` bank by applying DC (drift chamber) fiducial cuts
///
/// @begin_doc_algo{Filter}
Copy link
Member

Choose a reason for hiding this comment

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

new docstring syntax (#223)

Suggested change
/// @begin_doc_algo{Filter}
/// @begin_doc_algo{clas12::FiducialFilter | Filter}

@Gregtom3 Gregtom3 closed this May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Fiducial cuts for Pass 1
2 participants