Skip to content

Add Non-HFE–enhanced dataset #2189

Open
rashigupt wants to merge 40 commits intoAliceO2Group:masterfrom
rashigupt:rashigupta
Open

Add Non-HFE–enhanced dataset #2189
rashigupt wants to merge 40 commits intoAliceO2Group:masterfrom
rashigupt:rashigupta

Conversation

@rashigupt
Copy link

We will produce a Non-HFE–enhanced dataset by generating Monte Carlo samples with increased π⁰ and η production, to improve the statistical precision of the non-HFE efficiency measurement.

We will produce a Non-HFE–enhanced dataset by generating Monte Carlo samples with increased π⁰ and η production, to improve the statistical precision of the non-HFE efficiency measurement.
We will produce a Non-HFE–enhanced dataset by generating Monte Carlo samples with increased π⁰ and η production, to improve the statistical precision of the non-HFE efficiency measurement.
We will produce a Non-HFE–enhanced dataset by generating Monte Carlo samples with increased π⁰ and η production, to improve the statistical precision of the non-HFE efficiency measurement.
@rashigupt rashigupt requested a review from a team as a code owner November 23, 2025 11:23
@github-actions
Copy link

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0
async-2024-PbPb-apass1
async-2024-ppRef-apass1
async-2024-PbPb-apass2
async-2023-PbPb-apass5

@stefanopolitano
Copy link
Contributor

Hi @rashigupt ! Thanks for the development. I just have a doubt from my side: why using a gap-triggered configuration if you disable all HF decays? Why can't you use a standard generator?

@rashigupt
Copy link
Author

hi @stefanopolitano, Yes, I disabled all HF decays while producing the enhanced sample because I want to generate enhanced pion and eta statistics in order to obtain a sufficient number of non-heavy-flavour (background) electrons. When I used the general-purpose dataset, the statistics for Non-HFE were too low.

@jackal1-66
Copy link
Collaborator

Hello @rashigupt , I see from your PR that you have GeneratorHF_Non_Hfe_enhance.ini, but GeneratorHF_Non_Hfe.C as test. This will not work because the CI will check a .C macro named in the same way as your ini file. Could you please rename the test?

@stefanopolitano
Copy link
Contributor

Hi @rashigupt ! Sorry for the late response, but I think I am not getting your point. For my understanding, if you want pions and eta not coming from HF, what is the point of using gap trigger to include ccbar/bbbar events?

@rashigupt
Copy link
Author

Hello @rashigupt , I see from your PR that you have GeneratorHF_Non_Hfe_enhance.ini, but GeneratorHF_Non_Hfe.C as test. This will not work because the CI will check a .C macro named in the same way as your ini file. Could you please rename the test?

ok

Add  generator_pythia8_gaptriggered_nonhfe.C file for enance pion and eta
@rashigupt
Copy link
Author

Hi @rashigupt ! Sorry for the late response, but I think I am not getting your point. For my understanding, if you want pions and eta not coming from HF, what is the point of using gap trigger to include ccbar/bbbar events?

Hi, sorry for the late reply. You're right — using a gap trigger doesn't make sense for non-HFE pions and η. I've updated the code and created a separate file without the gap trigger for the non-HFE case.

@rashigupt
Copy link
Author

Dear all, please apprvoe and merge this code.

@jackal1-66
Copy link
Collaborator

Hi @rashigupt could you please fix the test?

Following INI files will be tested:
  - /O2DPG/MC/config/PWGHF/ini/GeneratorHF_Non_Hfe.ini
Checking /O2DPG/MC/config/PWGHF/ini/GeneratorHF_Non_Hfe.ini
Test 0: /O2DPG/MC/config/PWGHF/ini/GeneratorHF_Non_Hfe.ini with generator External�[0;31m -> FAILED�[0m
�[0;31mError found in log /sw/BUILD/d863a04800afcfe7c5f10c292ee38e8aeb3fff02/O2DPG-sim-tests/o2dpg-sim_tests/o2dpg_tests/generators/0_GeneratorHF_Non_Hfe.ini_External_dir/o2dpg-test-kine.log�[0m
21---------------------------------
22-# Events: 100
23-# MB events: 80
24-# events injected with 1 quark pair: 7
25-# events injected with 2 quark pair: 7
26-# events injected with 3 quark pair: 6
27-# 1 (anti)quarks: 4680
28-# 2 (anti)quarks: 5370
29-# 3 (anti)quarks: 1677
30-Number of generated events injected with 1 different than expected
31:(int) 1

This is the current error making the CI fail

@rashigupt
Copy link
Author

Hi, @jackal1-66 ,I’m still not sure how to fix this. Could you please guide me?

@jackal1-66
Copy link
Collaborator

jackal1-66 commented Jan 15, 2026

Hi, @jackal1-66 ,I’m still not sure how to fix this. Could you please guide me?

Ciao @rashigupt I had a look at your test. I think the problem is that you're assuming nEventsInjOne, and other counters should be half of the total injected events, while in reality the factor is 1/3 (considering 3 quarks species by default). This should fix the problem you're experiencing in the CI

@rashigupt
Copy link
Author

hi @jackal1-66 , Thank you for the suggestion.

@stefanopolitano
Copy link
Contributor

Hi @rashigupt, I think what you are describing in your point 1. is exactly what is done in the case of an external trigger. Personally, I would suggest to go in that direction instead of having a dedicated generator, which at this point won't be used as generator but as a trigger. Regarding your second point, to me is quite strange to suppress HF decays. My naive expectation would be that if you turn them off you are biasing the topology of your events with respect to a realistic data taking. For instance, I would expect the multiplicity of your events to be smaller than the one obtained in a MC in which the HF hadrons are allowed to decay. Similarly, also the occupancy will be different, the resolution on the primary vertex, etc. Have you checked the impact of this choice on the reconstruction efficiency of pion and eta? In addition, by looking at previous analyses (https://alice-notes.web.cern.ch/system/files/notes/analysis/1172/2023-03-23-EHCorrelation_AN_pp_pPb_2021-1.pdf), it seems to me that the HF decays were considered, even when enhancing the pi0 and eta contributions.

@rashigupt
Copy link
Author

Dear expert, could you please explain why this error occurs even though the code runs correctly on my local setup?

@jackal1-66
Copy link
Collaborator

jackal1-66 commented Feb 16, 2026

Hello @rashigupt @stefanopolitano ,
there are multiple issues here:
1 - You are setting an External function in the test but never define an external generator, so the test will never run.
2 - You set an external trigger, but use GeneratorPythia8
3 - The system is limited => you can run an external generator test with an external trigger set, however you can't run a standalone GeneratorPythia8 test with an external trigger (it would cause a few problems changing it in case someone wants to run external with trigger but Pythia8 triggerless)
The best solution here is to use the Hybrid Generator testing, so your steps to implement these are:

  • Create a folder in MC/config/PWGHF/ named hybrid --> from now on it will store the hybrid JSON configurations
  • Edit your ini file by removing everything you have inside and adding these two lines:
[GeneratorHybrid]
configFile = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/hybrid/GeneratorHF_Non_Hfe.json

but please also add a comment ad the top of the ini file to let users know what this configuration does

  • Create the GeneratorHF_Non_Hfe.json file inside the hybrid folder putting in this configuration:
{
  "generators": [
    {
      "name": "pythia8",
      "config": {
        "config": "${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/pythia8/generator/pythia8_NonHfe.cfg",
        "hooksFileName": "",
        "hooksFuncName": "",
        "includePartonEvent": true,
        "particleFilter": "",
        "verbose": 0
      },
      "triggers": {
        "mode": "or",
        "specs": [
          {
            "macro": "${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGHF/trigger/selectNonHfe.C",
            "function": "selectPionEtaWithinAcc(\"111;221\",-1.5,1.5,1)"
          }
        ]
      }
    }
  ],
  "fractions": [
    1
  ]
}
  • Replace the External() function in the test macro with Hybrid()
  • Remove ALL the headers inclusion in the test macro: they will cause the test to crash.

These steps will fix your issues. Do you have to run this as MCGen on Hyperloop as well? If so we will need to add another short line in the ini file.

@rashigupt
Copy link
Author

If so we will need to add anoth
Thank you, @jackal1-66.

Yes, I will use the produced dataset on Hyperloop.

@jackal1-66
Copy link
Collaborator

@rashigupt the dataset okay, but will you produce the events on-the-fly on hyperloop?

@rashigupt
Copy link
Author

the dataset okay, but will you produce the events on-the-fly on hyperloop?

HI @jackal1-66 , iI will first produce the dataset, and then use the produced dataset in my analysis.

@rashigupt
Copy link
Author

the dataset okay, but will you produce the events on-the-fly on hyperloop?

HI @jackal1-66 , iI will first produce the dataset, and then use the produced dataset in my analysis.

I have updated the file accordingly. Could you please check if there are any issues?

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.

3 participants