From abe5d278c2115c2a97a21bab94a2966273251fee Mon Sep 17 00:00:00 2001 From: "armin.ilg" Date: Tue, 24 Sep 2024 14:25:33 +0200 Subject: [PATCH] Adding all beam pipe materials to both material scan scripts. --- utils/material_plots.py | 7 ++----- utils/material_plots_2D.py | 5 +++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/utils/material_plots.py b/utils/material_plots.py index 561ca60f7..d51413584 100644 --- a/utils/material_plots.py +++ b/utils/material_plots.py @@ -34,11 +34,8 @@ def main(): material = material.replace("66D","") material = material.replace("Vtx","") - if material == "Air": continue - if material == "Tungsten": continue - if material == "Copper": continue - if material == "beam": continue - if material in ["LiquidNDecane", "AlBeMet162", "Gold"]: + # Ignore materials used in beam pipe as vertex material budget does not work without beam pipe. You can add more materials to ignore here + if material in ["Air","Tungsten","Copper","beam","LiquidNDecane", "AlBeMet162", "Gold"]: continue if material not in histDict.keys(): histDict[material] = { diff --git a/utils/material_plots_2D.py b/utils/material_plots_2D.py index 65babb228..186971937 100644 --- a/utils/material_plots_2D.py +++ b/utils/material_plots_2D.py @@ -36,8 +36,9 @@ def main(): entry_x0, entry_lambda, entry_depth = 0.0, 0.0, 0.0 for i in range(nMat): - if entry.material.at(i) == "Air": continue - + # Ignore materials used in beam pipe as vertex material budget does not work without beam pipe. You can add more materials to ignore here + if entry.material.at(i) in ["Air","Tungsten","Copper","beam","LiquidNDecane", "AlBeMet162", "Gold"]: + continue entry_x0 += entry.nX0.at(i)*100.0 entry_lambda += entry.nLambda.at(i) entry_depth += entry.matDepth.at(i)