SND@LHC Software
Loading...
Searching...
No Matches
reweighting_function Namespace Reference

Classes

class  FluxReweighter
 

Functions

 tqdm (x, **kwargs)
 
 load_analysis_config (path)
 
 resolve_normalization (norm, number_files, target_luminosity=68.6, luminosity_per_file=100.0)
 
 build_fastsim_curves (fastsim_configs, reference, degree)
 
 dpm_file_list (data_dir, n_files, pattern, indexed=True)
 
 build_chain (files, tree_name="cbmsim")
 
 _incoming_neutrino_energy (tree, pids)
 
 get_energies_pyroot (files, flavour="mu", tree_name="cbmsim", n_events=None)
 
 _find_mctrack_branches (tree)
 
 get_energies_uproot (files, flavour="mu", tree_name="cbmsim", n_events=None)
 
 read_dpm_energies (ri, reader="auto")
 
 make_comparison_plot (dpm, curves, normalized_factor, outfile, bins=100, hist_range=(0, 2000), title=None)
 
 fastsim_entries_from_args (paths)
 
 main ()
 

Variables

 ROOT = None
 
 uproot = None
 
 ak = None
 
dict NU_PID = {"e": 12, "mu": 14, "tau": 16}
 
list DEFAULT_COLORS = ["tab:blue", "tab:red", "tab:green", "tab:orange", "tab:purple"]
 
list DEFAULT_STYLES = ["--", "-.", ":"]
 

Detailed Description

Neutrino-flux reweighting and energy-distribution comparison for SND@LHC.

Overview
--------
Hadron-production models disagree about the neutrino flux reaching SND@LHC.
This module derives an energy-dependent weight w(E) that maps one model onto
another, and applies it to a simulated sample.

    w(E) = flux_fastsim(E) / flux_DPMJET(E)

where each flux is the sum of a light-hadron (pi/K) and a heavy-flavour
(charm) contribution:

    flux_DPMJET  = light_DPMJET  + charm_DPMJET      (the reference / denominator)
    flux_fastsim = light_EPOS    + charm_POWHEG      (the target  / numerator)

Multiplying every DPMJET event by w(E) therefore reproduces the fast-sim
prediction, without re-running the simulation:

    DPMJET x w(E)  ==  fast-sim (light + charm)

Two capabilities
----------------
1. ``FluxReweighter`` -- builds the ratio from the flux text files, fits a
   polynomial w(E), and writes a diagnostic plot per polynomial degree.
2. ``main()`` in "compare" mode -- reads neutrino energies straight from
   SND@LHC ROOT files (``cbmsim`` tree), applies w(E), and overlays the
   DPMJET reference with each reweighted fast-sim prediction.

Inputs
------
Flux text files: whitespace-separated, one neutrino per row, no header, with
the columns listed in ``FluxReweighter.COLS``. POWHEG files carry one extra
trailing column (``iEvent``).

ROOT files: standard SND@LHC digitised output holding the ``cbmsim`` tree with
the ``MCTrack`` branch, from which the incoming (primary) neutrino energy is
taken.

Configuration
-------------
Every input is read from YAML; nothing analysis-specific is hard-coded.

    Analysis.yaml      run settings: ROOT input, which fast-sim variants to
                       overlay, normalisation, plot styling
    Config_epos.yaml   one per fast-sim variant: flux file paths, flavour,
                       binning, fit range, cuts, weights, output label

Usage
-----
    # diagnostic ratio-fit plots for one or more reweighter configs
    python3 reweighting_function.py -m reweight -rc Config_epos.yaml

    # full comparison: fit w(E), read ROOT energies, overlay and save
    python3 reweighting_function.py -c Analysis.yaml -rc Config_epos.yaml

    # everything taken from the run YAML, no extra arguments
    python3 reweighting_function.py -c Analysis.yaml

As a library:

    from reweighting_function import FluxReweighter
    poly, chi2red = FluxReweighter("Config_epos.yaml").fit(degree=2)
    weights = poly(energies)      # w(E) evaluated per event

Function Documentation

◆ _find_mctrack_branches()

reweighting_function._find_mctrack_branches (   tree)
protected
Locate the MCTrack member branches whatever the exact prefix is.

Different productions store them as ``MCTrack.fPdgCode``,
``MCTrack/fPdgCode`` and so on, so the names are matched by suffix.
Returns a dict mapping the member name to the branch key found.

Definition at line 732 of file reweighting_function.py.

732def _find_mctrack_branches(tree):
733 """Locate the MCTrack member branches whatever the exact prefix is.
734
735 Different productions store them as ``MCTrack.fPdgCode``,
736 ``MCTrack/fPdgCode`` and so on, so the names are matched by suffix.
737 Returns a dict mapping the member name to the branch key found.
738 """
739 want = ["fPdgCode", "fMotherId", "fPx", "fPy", "fPz"]
740 keys = tree.keys()
741 found = {}
742 for w in want:
743 cands = ([k for k in keys if "MCTrack" in k and k.endswith("." + w)]
744 or [k for k in keys if "MCTrack" in k and k.endswith(w)]
745 or [k for k in keys if k.endswith(w)])
746 if cands:
747 found[w] = cands[0]
748 return found
749

◆ _incoming_neutrino_energy()

reweighting_function._incoming_neutrino_energy (   tree,
  pids 
)
protected
Energy of the primary neutrino in the current entry, or None.

The incoming neutrino is the MCTrack whose |pdg| matches the requested
flavour and which has no mother (MotherId == -1).

Definition at line 699 of file reweighting_function.py.

699def _incoming_neutrino_energy(tree, pids):
700 """Energy of the primary neutrino in the current entry, or None.
701
702 The incoming neutrino is the MCTrack whose |pdg| matches the requested
703 flavour and which has no mother (MotherId == -1).
704 """
705 for trk in tree.MCTrack:
706 if abs(trk.GetPdgCode()) in pids and trk.GetMotherId() == -1:
707 return trk.GetEnergy()
708 return None
709
710

◆ build_chain()

reweighting_function.build_chain (   files,
  tree_name = "cbmsim" 
)
Chain the given ROOT files into one TChain (pyROOT only).

Definition at line 689 of file reweighting_function.py.

689def build_chain(files, tree_name="cbmsim"):
690 """Chain the given ROOT files into one TChain (pyROOT only)."""
691 if ROOT is None:
692 raise RuntimeError("ROOT is not available in this environment.")
693 chain = ROOT.TChain(tree_name)
694 added = sum(bool(chain.Add(f)) for f in files)
695 print(f"Chained {added}/{len(files)} files (tree '{tree_name}')")
696 return chain
697
698

◆ build_fastsim_curves()

reweighting_function.build_fastsim_curves (   fastsim_configs,
  reference,
  degree 
)
Fit w(E) for each fast-sim variant and assemble the curves to draw.

One ``FluxReweighter`` is run per config, so the weights come from the fit
and are never hard-coded. The fitted coefficients and chi2/ndf are printed
for the record, and each curve is labelled from its own config.

Returns a list of ``(label, weight_poly | None, color, linestyle)`` with the
unweighted DPMJET reference (``weight_poly`` None) first.

Definition at line 647 of file reweighting_function.py.

647def build_fastsim_curves(fastsim_configs, reference, degree):
648 """Fit w(E) for each fast-sim variant and assemble the curves to draw.
649
650 One ``FluxReweighter`` is run per config, so the weights come from the fit
651 and are never hard-coded. The fitted coefficients and chi2/ndf are printed
652 for the record, and each curve is labelled from its own config.
653
654 Returns a list of ``(label, weight_poly | None, color, linestyle)`` with the
655 unweighted DPMJET reference (``weight_poly`` None) first.
656 """
657 curves = [(reference.get("label", "DPMJET (reference)"),
658 None,
659 reference.get("color", "black"),
660 reference.get("linestyle", "-"))]
661 for entry in fastsim_configs:
662 rw = FluxReweighter(entry["config"])
663 poly, chi2red = rw.fit(degree=degree)
664 label = rw.cfg["label"]
665 coeffs = np.array2string(poly.coefficients, precision=4, separator=", ")
666 print(f"{label}: fast-sim(light+charm)/DPMJET deg={degree} "
667 f"coeffs(high->low)={coeffs} chi2/ndf={chi2red:.2f}")
668 curves.append((label, poly,
669 entry.get("color", "tab:blue"),
670 entry.get("linestyle", "--")))
671 return curves
672
673
674# ==========================================================================
675# Reading energies from ROOT (SND@LHC cbmsim tree)
676# ==========================================================================

◆ dpm_file_list()

reweighting_function.dpm_file_list (   data_dir,
  n_files,
  pattern,
  indexed = True 
)
Build the list of ROOT files to read.

``indexed=True`` expects the per-job layout ``<data_dir>/<i>/<pattern>``
for i in range(n_files); ``indexed=False`` a single merged file at
``<data_dir>/<pattern>``.

Definition at line 677 of file reweighting_function.py.

677def dpm_file_list(data_dir, n_files, pattern, indexed=True):
678 """Build the list of ROOT files to read.
679
680 ``indexed=True`` expects the per-job layout ``<data_dir>/<i>/<pattern>``
681 for i in range(n_files); ``indexed=False`` a single merged file at
682 ``<data_dir>/<pattern>``.
683 """
684 if indexed:
685 return [os.path.join(data_dir, str(i), pattern) for i in range(n_files)]
686 return [os.path.join(data_dir, pattern)]
687
688

◆ fastsim_entries_from_args()

reweighting_function.fastsim_entries_from_args (   paths)
Turn bare config paths from ``-rc`` into styled fast-sim entries.

Definition at line 885 of file reweighting_function.py.

885def fastsim_entries_from_args(paths):
886 """Turn bare config paths from ``-rc`` into styled fast-sim entries."""
887 return [{"config": path,
888 "color": DEFAULT_COLORS[i % len(DEFAULT_COLORS)],
889 "linestyle": DEFAULT_STYLES[i % len(DEFAULT_STYLES)]}
890 for i, path in enumerate(paths)]
891
892

◆ get_energies_pyroot()

reweighting_function.get_energies_pyroot (   files,
  flavour = "mu",
  tree_name = "cbmsim",
  n_events = None 
)
Read per-event neutrino energies [GeV] with pyROOT.

Loops the chained ``cbmsim`` tree entry by entry. Returns a 1-D array with
one energy per event that contains a matching primary neutrino.

Definition at line 711 of file reweighting_function.py.

711def get_energies_pyroot(files, flavour="mu", tree_name="cbmsim", n_events=None):
712 """Read per-event neutrino energies [GeV] with pyROOT.
713
714 Loops the chained ``cbmsim`` tree entry by entry. Returns a 1-D array with
715 one energy per event that contains a matching primary neutrino.
716 """
717 pids = set(NU_PID.values()) if flavour == "all" else {NU_PID[flavour]}
718 chain = build_chain(files, tree_name)
719 n_total = chain.GetEntries()
720 n = n_total if n_events is None else min(n_events, n_total)
721
722 energies = []
723 for i in tqdm(range(n), desc="reading neutrino energy (pyROOT)"):
724 chain.GetEntry(i)
725 E = _incoming_neutrino_energy(chain, pids)
726 if E is not None:
727 energies.append(E)
728 arr = np.asarray(energies, dtype=float)
729 print(f"Extracted {arr.size} neutrino energies (flavour={flavour})")
730 return arr
731
set(INCLUDE_DIRECTORIES ${SYSTEM_INCLUDE_DIRECTORIES} ${VMC_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/shipdata ${CMAKE_SOURCE_DIR}/shipLHC ${CMAKE_SOURCE_DIR}/analysis/cuts ${CMAKE_SOURCE_DIR}/analysis/tools ${FMT_INCLUDE_DIR}) include_directories($
Definition CMakeLists.txt:1

◆ get_energies_uproot()

reweighting_function.get_energies_uproot (   files,
  flavour = "mu",
  tree_name = "cbmsim",
  n_events = None 
)
Read per-event neutrino energies [GeV] with uproot, without ROOT.

Selects the incoming neutrino (|pdg| matching the flavour, fMotherId == -1)
and, neutrinos being effectively massless, takes E = |p|. Unreadable files
are skipped with a message.

Definition at line 750 of file reweighting_function.py.

750def get_energies_uproot(files, flavour="mu", tree_name="cbmsim", n_events=None):
751 """Read per-event neutrino energies [GeV] with uproot, without ROOT.
752
753 Selects the incoming neutrino (|pdg| matching the flavour, fMotherId == -1)
754 and, neutrinos being effectively massless, takes E = |p|. Unreadable files
755 are skipped with a message.
756 """
757 if uproot is None or ak is None:
758 raise RuntimeError("uproot/awkward not available -- pip install uproot awkward")
759 pids = set(NU_PID.values()) if flavour == "all" else {NU_PID[flavour]}
760
761 out = []
762 for path in tqdm(files, desc="reading neutrino energy (uproot)"):
763 try:
764 tree = uproot.open(f"{path}:{tree_name}")
765 except Exception as exc: # noqa: BLE001
766 print(f" [skip] {path}: {exc}")
767 continue
768 br = _find_mctrack_branches(tree)
769 if len(br) < 5:
770 raise RuntimeError(
771 "Could not find MCTrack momentum/pdg branches. Branches seen: "
772 f"{tree.keys()[:40]} ... adjust _find_mctrack_branches().")
773 a = tree.arrays(list(br.values()), entry_stop=n_events, library="ak")
774 pdg, mom = a[br["fPdgCode"]], a[br["fMotherId"]]
775 px, py, pz = a[br["fPx"]], a[br["fPy"]], a[br["fPz"]]
776
777 is_nu = ak.zeros_like(mom, dtype=bool)
778 for pid in pids:
779 is_nu = is_nu | (abs(pdg) == pid)
780 sel = is_nu & (mom == -1)
781
782 E = np.sqrt(px ** 2 + py ** 2 + pz ** 2)
783 first = ak.firsts(E[sel]) # first primary nu per event
784 first = first[~ak.is_none(first)]
785 out.append(ak.to_numpy(first))
786
787 arr = np.concatenate(out) if out else np.array([], dtype=float)
788 print(f"Extracted {arr.size} neutrino energies (flavour={flavour})")
789 return arr
790
791

◆ load_analysis_config()

reweighting_function.load_analysis_config (   path)
Load the top-level run YAML (Analysis.yaml) into a dict.

Definition at line 622 of file reweighting_function.py.

622def load_analysis_config(path):
623 """Load the top-level run YAML (Analysis.yaml) into a dict."""
624 with open(path) as f:
625 return yaml.safe_load(f) or {}
626
627

◆ main()

reweighting_function.main ( )
Parse the command line and run the requested mode.

Modes
-----
reweight : fit each reweighter config and save its diagnostic plots. Needs
           no run YAML when both ``-m reweight`` and ``-rc`` are given.
compare  : fit w(E), read the DPMJET energies from ROOT, and save the
           overlay. Needs the run YAML for the ROOT input and plot settings.

Command-line options override the corresponding run-YAML fields; anything
not given falls back to the YAML.

Definition at line 893 of file reweighting_function.py.

893def main():
894 """Parse the command line and run the requested mode.
895
896 Modes
897 -----
898 reweight : fit each reweighter config and save its diagnostic plots. Needs
899 no run YAML when both ``-m reweight`` and ``-rc`` are given.
900 compare : fit w(E), read the DPMJET energies from ROOT, and save the
901 overlay. Needs the run YAML for the ROOT input and plot settings.
902
903 Command-line options override the corresponding run-YAML fields; anything
904 not given falls back to the YAML.
905 """
906 p = argparse.ArgumentParser(
907 description="Flux reweighting + energy-distribution comparison (YAML driven)")
908 p.add_argument("-c", "--config", default="analysis.yaml",
909 help="Top-level analysis YAML with the run settings")
910 p.add_argument("-rc", "--reweight-config", nargs="+", default=None,
911 metavar="YAML",
912 help="FluxReweighter config file(s). In compare mode these are "
913 "the fast-sim variants (overrides fastsim_configs in the "
914 "run YAML); in reweight mode each is fit and plotted.")
915 p.add_argument("-m", "--mode", choices=["compare", "reweight"], default=None,
916 help="Override the 'mode' set in the run YAML")
917 p.add_argument("--reader", choices=["auto", "pyroot", "uproot"], default=None,
918 help="ROOT backend: auto (default), pyroot, or uproot "
919 "(pip install uproot awkward; no ROOT framework needed)")
920 args = p.parse_args()
921
922 # The run YAML is loaded lazily, so 'reweight' mode with -rc works in a
923 # directory that has no Analysis.yaml at all.
924 _cfg = {}
925
926 def get_cfg():
927 nonlocal _cfg
928 if not _cfg:
929 try:
930 _cfg = load_analysis_config(args.config)
931 except FileNotFoundError:
932 raise SystemExit(
933 f"Run config '{args.config}' not found. It's needed for "
934 "compare mode (and to read 'mode'/'reweight_only' when not "
935 "given on the CLI). Pass -c <file>, or in reweight mode give "
936 "-m reweight with -rc <config(s)> so no run YAML is required.")
937 return _cfg
938
939 mode = args.mode or get_cfg().get("mode", "compare")
940
941 if mode == "reweight":
942 paths = args.reweight_config or [get_cfg()["reweight_only"]["config"]]
943 for path in paths:
944 FluxReweighter(path).run()
945 return
946
947 # --- compare mode ---
948 cfg = get_cfg()
949 ri = cfg["root_input"]
950 rw = cfg.get("reweight", {})
951 plot = cfg.get("plot", {})
952 degree = int(rw.get("degree", 2))
953
954 fastsim = (fastsim_entries_from_args(args.reweight_config)
955 if args.reweight_config else cfg["fastsim_configs"])
956
957 # 1) reweighting polynomials, fitted by FluxReweighter
958 curves = build_fastsim_curves(fastsim, cfg.get("reference", {}), degree=degree)
959
960 # 2) DPMJET neutrino energies from ROOT (pyROOT or uproot)
961 reader = args.reader or ri.get("reader", "auto")
962 dpm = read_dpm_energies(ri, reader=reader)
963 if dpm.size == 0:
964 raise SystemExit("No energies extracted -- check files / branch names.")
965
966 # 3) overlay DPMJET with each reweighted fast-sim curve
967 norm = resolve_normalization(
968 plot.get("normalization", "auto"),
969 int(ri["number_files"]),
970 target_luminosity=float(plot.get("target_luminosity", 68.6)),
971 luminosity_per_file=float(plot.get("luminosity_per_file", 100.0)),
972 )
973 make_comparison_plot(
974 dpm, curves, normalized_factor=norm,
975 outfile=plot.get("outfile", "energy_comparison.pdf"),
976 bins=int(plot.get("bins", 100)),
977 hist_range=(0, float(plot.get("energy_max", 2000.0))),
978 title=plot.get("title"),
979 )
980
981
int main()
Definition main.cc:133

◆ make_comparison_plot()

reweighting_function.make_comparison_plot (   dpm,
  curves,
  normalized_factor,
  outfile,
  bins = 100,
  hist_range = (0, 2000),
  title = None 
)
Overlay the DPMJET energy spectrum with each reweighted fast-sim curve.

The same array of DPMJET energies is histogrammed once per curve. The
reference is unweighted; every other curve applies its w(E) per event, so
``DPMJET x w(E)`` is the fast-sim prediction. The binning here is
independent of the binning used to derive w(E): the weight is evaluated
from the polynomial at each event's energy, not looked up by bin.

The integral quoted in each legend entry is the normalised area under the
histogram, i.e. the expected yield at the target luminosity.

Returns a dict of ``{label: integral}``.

Definition at line 820 of file reweighting_function.py.

821 bins=100, hist_range=(0, 2000), title=None):
822 """Overlay the DPMJET energy spectrum with each reweighted fast-sim curve.
823
824 The same array of DPMJET energies is histogrammed once per curve. The
825 reference is unweighted; every other curve applies its w(E) per event, so
826 ``DPMJET x w(E)`` is the fast-sim prediction. The binning here is
827 independent of the binning used to derive w(E): the weight is evaluated
828 from the polynomial at each event's energy, not looked up by bin.
829
830 The integral quoted in each legend entry is the normalised area under the
831 histogram, i.e. the expected yield at the target luminosity.
832
833 Returns a dict of ``{label: integral}``.
834 """
835 if title is None:
836 title = "Energy Distribution: DPMJET vs fast-sim (light + charm) reweighted"
837
838 plt.figure(figsize=(12, 7))
839 integrals = {}
840
841 for label, weight_poly, color, linestyle in curves:
842 weights = None if weight_poly is None else weight_poly(dpm)
843
844 # Histogram used for the integral only (not drawn).
845 counts, edges = np.histogram(
846 dpm, bins=bins, range=hist_range, weights=weights
847 )
848 bin_width = edges[1] - edges[0]
849 integral = (normalized_factor * np.sum(counts) * bin_width
850 * (bins / (hist_range[1] - hist_range[0])))
851 integrals[label] = integral
852
853 plt.hist(dpm, bins=bins, range=hist_range, histtype="step",
854 weights=weights, color=color, linestyle=linestyle,
855 label=f"{label} (\u222bfde \u2248 {integral:.1f})")
856
857 plt.xlabel("Energy GeV")
858 plt.ylabel(f"Events / {(hist_range[1] - hist_range[0]) / bins} GeV")
859 plt.title(title)
860 plt.legend()
861 plt.grid(alpha=0.3)
862 plt.tight_layout()
863
864 os.makedirs(os.path.dirname(os.path.abspath(outfile)), exist_ok=True)
865 plt.savefig(outfile, dpi=150)
866 plt.close()
867 print("Saved:", outfile)
868
869 print("\nIntegrals (sum(counts)*bin_width, normalized):")
870 for label, val in integrals.items():
871 print(f"{label:45s}: {val:.3f}")
872 return integrals
873
874
875# ==========================================================================
876# Command line entry point
877# ==========================================================================
878
879#: Fallback styling when fast-sim configs are given on the command line and so
880#: carry no colour/linestyle of their own.

◆ read_dpm_energies()

reweighting_function.read_dpm_energies (   ri,
  reader = "auto" 
)
Read the DPMJET neutrino energies using the requested ROOT backend.

``ri`` is the ``root_input`` block of the run YAML. ``reader`` is "auto"
(pyROOT when importable, else uproot), "pyroot" or "uproot".

Definition at line 792 of file reweighting_function.py.

792def read_dpm_energies(ri, reader="auto"):
793 """Read the DPMJET neutrino energies using the requested ROOT backend.
794
795 ``ri`` is the ``root_input`` block of the run YAML. ``reader`` is "auto"
796 (pyROOT when importable, else uproot), "pyroot" or "uproot".
797 """
798 files = dpm_file_list(ri["data_dir"], int(ri["number_files"]),
799 ri["pattern"], indexed=ri.get("indexed", True))
800 tree_name = ri.get("tree_name", "cbmsim")
801 flavour = ri.get("flavour", "mu")
802
803 if reader == "auto":
804 reader = "pyroot" if ROOT is not None else "uproot"
805
806 if reader == "pyroot":
807 if ROOT is None:
808 raise RuntimeError("reader=pyroot but ROOT is unavailable. Source the "
809 "SND@LHC setup, or use reader: uproot "
810 "(pip install uproot awkward).")
811 return get_energies_pyroot(files, flavour, tree_name)
812 if reader == "uproot":
813 return get_energies_uproot(files, flavour, tree_name)
814 raise ValueError(f"unknown reader: {reader!r} (use auto/pyroot/uproot)")
815
816
817# ==========================================================================
818# Comparison plot
819# ==========================================================================

◆ resolve_normalization()

reweighting_function.resolve_normalization (   norm,
  number_files,
  target_luminosity = 68.6,
  luminosity_per_file = 100.0 
)
Return the factor scaling the simulated sample to the target luminosity.

The automatic value is the luminosity ratio L_data / L_MC,

    target_luminosity / (number_files * luminosity_per_file)

with each input file representing ``luminosity_per_file`` [fb^-1] and
``number_files`` of them merged. Passing a number instead of ``"auto"``
uses it verbatim; ``"auto"`` or a non-positive value uses the formula.

Definition at line 628 of file reweighting_function.py.

629 luminosity_per_file=100.0):
630 """Return the factor scaling the simulated sample to the target luminosity.
631
632 The automatic value is the luminosity ratio L_data / L_MC,
633
634 target_luminosity / (number_files * luminosity_per_file)
635
636 with each input file representing ``luminosity_per_file`` [fb^-1] and
637 ``number_files`` of them merged. Passing a number instead of ``"auto"``
638 uses it verbatim; ``"auto"`` or a non-positive value uses the formula.
639 """
640 auto = target_luminosity / (number_files * luminosity_per_file)
641 if isinstance(norm, str) and norm.strip().lower() == "auto":
642 return auto
643 norm = float(norm)
644 return norm if norm > 0 else auto
645
646

◆ tqdm()

reweighting_function.tqdm (   x,
**  kwargs 
)

Definition at line 100 of file reweighting_function.py.

100 def tqdm(x, **kwargs):
101 return x
102
103

Variable Documentation

◆ ak

reweighting_function.ak = None

Definition at line 95 of file reweighting_function.py.

◆ DEFAULT_COLORS

list reweighting_function.DEFAULT_COLORS = ["tab:blue", "tab:red", "tab:green", "tab:orange", "tab:purple"]

Definition at line 881 of file reweighting_function.py.

◆ DEFAULT_STYLES

list reweighting_function.DEFAULT_STYLES = ["--", "-.", ":"]

Definition at line 882 of file reweighting_function.py.

◆ NU_PID

dict reweighting_function.NU_PID = {"e": 12, "mu": 14, "tau": 16}

Definition at line 619 of file reweighting_function.py.

◆ ROOT

reweighting_function.ROOT = None

Definition at line 84 of file reweighting_function.py.

◆ uproot

reweighting_function.uproot = None

Definition at line 91 of file reweighting_function.py.