Skip to content

Prepare SCE maps and relevant FHiCLs for detector variation samples for Spring Production#797

Merged
nathanielerowe merged 15 commits intoproduction/v10_06_00from
feature/lkashur_sce_detvar_prod
Sep 5, 2025
Merged

Prepare SCE maps and relevant FHiCLs for detector variation samples for Spring Production#797
nathanielerowe merged 15 commits intoproduction/v10_06_00from
feature/lkashur_sce_detvar_prod

Conversation

@lkashur
Copy link
Copy Markdown
Collaborator

@lkashur lkashur commented Aug 25, 2025

Description

Three new space charge effect (SCE) maps are created with this PR:

  1. SCEoffsets_SBND_E500_dualmap_CV_voxelTH3.root (1.1x nominal in East TPC, 1.4x nominal in West TPC)
  2. SCEoffsets_SBND_E500_dualmap_0x_voxelTH3.root (bin contents in CV histogram are multiplied by zero)
  3. SCEoffsets_SBND_E500_dualmap_2x_voxelTH3.root (bin contents in CV histogram are multiplied by two)

Scaling of histograms is achieved with the following function:

TH3F* scale_TH3F(TH3F* source_hist, string out_name, double scaling)
{
  TH3F* out_hist = (TH3F*) source_hist->Clone();
  for(int i=1; i<=source_hist->GetNbinsX(); ++i){
    for(int j=1; j<=source_hist->GetNbinsY(); ++j){
      for(int k=1; k<=source_hist->GetNbinsZ(); ++k){
        Float_t orig = source_hist->GetBinContent(i, j, k);
        out_hist->SetBinContent(i,j,k, scaling*orig);
      }
    }
  }
  out_hist->SetName(out_name.c_str());
  return out_hist;
}

As usual, these maps are to be stored in the latest version of sbnd_data/SCEoffsets. For now, I have copied the latest version of sbnd_data to my working directory: /exp/sbnd/app/users/lkashur/sce_detvar/sbnd_data/.

Motivation for the scalings used for #1 (1.1x and 1.4x offsets) comes from differences seen in spatial offsets between TPCs using Spring 2025 crossing muon data:
sbnd_sce_dx_vs_x_nominal_sim

New FHiCL files for g4 simulation point to these maps and are located in JobConfigurations/standard/g4/sce_variations/:

  • g4_enable_nominalspacecharge_sbnd.fcl
  • g4_enable_zerospacecharge_sbnd.fcl
  • g4_enable_doublespacecharge_sbnd.fcl

For validation, a small sample of anode-cathode crossing muons was created at the gen stage, and processed with each of the SCE variation maps at the g4 stage. Resultant simulated spatial offsets in the drift coordinate are shown here.

CV

sim_edeps_sce_detvar_cv

0x

sim_edeps_sce_detvar_0x

2x

sim_edeps_sce_detvar_2x

$${\color{red}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}$$

$${\color{red}\bf{\textrm{IMPORTANT UPDATE June 22nd 2025:}}}$$ If you are making a PR which is intended as a patch for the CURRENT production (which started in Spring 2025), you must make two PRs: one for develop and one for the production/v10_06_00 branch.

$${\color{red}!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}$$

Checklist

  • Added at least 1 label from available labels.
  • Assigned at least 1 reviewer under Reviewers,
  • Assigned all contributers including yourself under Assignees
  • Linked any relevant issues under Developement
  • Does this PR affect CAF data format? If so, please assign a CAF maintainer (PetrilloAtWork or JosiePaton) as additional reviewer.
  • Does this affect the standard workflow?
  • Is this PR a patch for the ongoing production? If so, separate PR must also be made for production/v10_06_00 branch!

Relevant PR links (optional)

Does this PR require merging another PR in a different repository (such as sbnanobj/sbnobj etc.)?

Link(s) to docdb describing changes (optional)

Is there a docdb describing the issue this solves or the feature added?

@lkashur lkashur changed the title Feature/lkashur sce detvar prod Prepare SCE maps and relevant FHiCLs for detector variation samples for Spring Production Aug 25, 2025
@lkashur lkashur requested review from linyan-w and mrmooney August 25, 2025 22:45
@lkashur lkashur self-assigned this Aug 25, 2025
@lkashur lkashur added the simulation genie or geant4 (g4) label Aug 25, 2025
@lkashur lkashur marked this pull request as ready for review August 26, 2025 16:05
Copy link
Copy Markdown
Contributor

@linyan-w linyan-w left a comment

Choose a reason for hiding this comment

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

Thanks to @marcodeltutto we figured out these detvars fcls should be detsim level. Now they run as expected.
@lkashur could you have a look at this new version and confirm it looks correct?

This PR needs a tag in sbnd_data.

@nathanielerowe
Copy link
Copy Markdown
Contributor

trigger build ci_ref=v10_06_00_03 LArSoft/larcore@LARSOFT_SUITE_v10_06_00 LArSoft/larcorealg@LARSOFT_SUITE_v10_06_00 LArSoft/larcoreobj@LARSOFT_SUITE_v10_06_00 LArSoft/lardataalg@LARSOFT_SUITE_v10_06_00 LArSoft/lardataobj@LARSOFT_SUITE_v10_06_00 LArSoft/larfinder@LARSOFT_SUITE_v10_06_00 LArSoft/larsoftobj@LARSOFT_SUITE_v10_06_00 LArSoft/larvecutils@LARSOFT_SUITE_v10_06_00 LArSoft/larpandoracontent@LARSOFT_SUITE_v10_06_00 LArSoft/larpandoracontent@LARSOFT_SUITE_v10_06_00 LArSoft/lar*@LARSOFT_SUITE_v10_06_00_02 SBNSoftware/sbncode@v10_06_00_04 SBNSoftware/sbnalg@v10_06_00_03 SBNSoftware/sbnobj@v10_01_01 SBNSoftware/sbnanaobj@v10_00_05 SBNSoftware/sbndaq-artdaq-core@v1_10_06 SBNSoftware/sbndata@v01_07 SBNSoftware/sbndutil@v10_06_01 SBNSoftware/sbnd_data@v01_34_00

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for c14:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase build SBND on slf7 for c14:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

⚠️ CI build for SBND Warning at phase ci_tests SBND on slf7 for e26:prof - ignored warnings for build -- details available through the CI dashboard

🚨 For more details about the warning phase, check the ci_tests SBND phase logs

parent CI build details are available through the CI dashboard

@nathanielerowe
Copy link
Copy Markdown
Contributor

Will be merging this in today, if you need to make any other changes, please let me know and do so immediately

@nathanielerowe
Copy link
Copy Markdown
Contributor

trigger build ci_ref=v10_06_00_03 LArSoft/larcore@LARSOFT_SUITE_v10_06_00 LArSoft/larcorealg@LARSOFT_SUITE_v10_06_00 LArSoft/larcoreobj@LARSOFT_SUITE_v10_06_00 LArSoft/lardataalg@LARSOFT_SUITE_v10_06_00 LArSoft/lardataobj@LARSOFT_SUITE_v10_06_00 LArSoft/larfinder@LARSOFT_SUITE_v10_06_00 LArSoft/larsoftobj@LARSOFT_SUITE_v10_06_00 LArSoft/larvecutils@LARSOFT_SUITE_v10_06_00 LArSoft/larpandoracontent@LARSOFT_SUITE_v10_06_00 LArSoft/larpandoracontent@LARSOFT_SUITE_v10_06_00 LArSoft/lar*@LARSOFT_SUITE_v10_06_00_02 SBNSoftware/sbncode@v10_06_00_05 SBNSoftware/sbnalg@v10_06_00_04 SBNSoftware/sbnobj@v10_01_01_01 SBNSoftware/sbnanaobj@v10_00_05_01 SBNSoftware/sbndaq-artdaq-core@v1_10_06 SBNSoftware/sbndata@v01_07 SBNSoftware/sbndutil@v10_06_01 SBNSoftware/sbnd_data@v01_35_00

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for c14:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

❌ CI build for SBND Failed at phase build SBND on slf7 for c14:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown
Collaborator

⚠️ CI build for SBND Warning at phase ci_tests SBND on slf7 for e26:prof - ignored warnings for build -- details available through the CI dashboard

🚨 For more details about the warning phase, check the ci_tests SBND phase logs

parent CI build details are available through the CI dashboard

@nathanielerowe
Copy link
Copy Markdown
Contributor

Approved!

@nathanielerowe nathanielerowe merged commit 12f2c48 into production/v10_06_00 Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

simulation genie or geant4 (g4)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants