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

Protection in all_invariant_masses computation #342

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

atishelmanch
Copy link
Contributor

@atishelmanch atishelmanch commented Jan 31, 2024

Hello FCCAnalyses experts - when I implemented all_invariant_masses a while ago, I forgot to include a protection on the numbers of jets. This is problematic when running on events that do not have at least 2 jets - which can happen for example with the WW background even if you require exclusive clustering with njets = 4. See attached the error, stage 1 config file, and command run to produce the error:

error.log
cmd.log
ZH_Hadronic_stage1.py.txt

The error is fixed for me when adding the simple protection.


Files edited:

  • analyzers/dataframe/src/JetConstituentsUtils.cc:
    • Added the protection.

By the way, I've encountered the same problem when importing this weaver example as by default it computes invariant mass assuming you have two jets. Given that this is just an example, not sure if the protection is necessary here.

@kjvbrt
Copy link
Contributor

kjvbrt commented Feb 1, 2024

Hi @atishelmanch, the fix looks OK to me :)

Can you add also a little documentation about the analyzer in the form similar to this example?

/**
 * @brief Use brief, otherwise the index won't have a brief explanation.
 *
 * Detailed explanation.
 */
typedef struct BoxStruct_struct {
  int a;    /**< Some documentation for the member BoxStruct#a. */
  int b;    /**< Some documentation for the member BoxStruct#b. */
  double c; /**< Etc. */
} BoxStruct;

@atishelmanch
Copy link
Contributor Author

Hi @atishelmanch, the fix looks OK to me :)

Can you add also a little documentation about the analyzer in the form similar to this example?

/**
 * @brief Use brief, otherwise the index won't have a brief explanation.
 *
 * Detailed explanation.
 */
typedef struct BoxStruct_struct {
  int a;    /**< Some documentation for the member BoxStruct#a. */
  int b;    /**< Some documentation for the member BoxStruct#b. */
  double c; /**< Etc. */
} BoxStruct;

@kjvbrt - like this?

@atishelmanch
Copy link
Contributor Author

Friendly ping @kjvbrt - 🙂 is this ready to merge?

@kjvbrt
Copy link
Contributor

kjvbrt commented Feb 15, 2024

Hi @atishelmanch, Yes :)

@kjvbrt kjvbrt merged commit b408bdc into HEP-FCC:master Feb 15, 2024
7 checks passed
@atishelmanch atishelmanch deleted the InvMassProtection branch February 15, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants