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

Need to verify copy() doesn't change the results. #401

Open
bryates opened this issue Feb 17, 2024 · 0 comments
Open

Need to verify copy() doesn't change the results. #401

bryates opened this issue Feb 17, 2024 · 0 comments

Comments

@bryates
Copy link
Contributor

bryates commented Feb 17, 2024

Need to changing deepcopy() to copy() doesn't change the results.

Originally posted by @bryates in #391 (comment)

weights_obj_base_for_kinematic_syst = copy.copy(weights_obj_base)

weights_dict[ch_name] = copy.copy(weights_obj_base_for_kinematic_syst)

if ch_name.startswith("2l"):
weights_dict[ch_name].add("lepSF_muon", events.sf_2l_muon, copy.copy(events.sf_2l_hi_muon), copy.copy(events.sf_2l_lo_muon))
weights_dict[ch_name].add("lepSF_elec", events.sf_2l_elec, copy.copy(events.sf_2l_hi_elec), copy.copy(events.sf_2l_lo_elec))
elif ch_name.startswith("3l"):
weights_dict[ch_name].add("lepSF_muon", events.sf_3l_muon, copy.copy(events.sf_3l_hi_muon), copy.copy(events.sf_3l_lo_muon))
weights_dict[ch_name].add("lepSF_elec", events.sf_3l_elec, copy.copy(events.sf_3l_hi_elec), copy.copy(events.sf_3l_lo_elec))
elif ch_name.startswith("4l"):
weights_dict[ch_name].add("lepSF_muon", events.sf_4l_muon, copy.copy(events.sf_4l_hi_muon), copy.copy(events.sf_4l_lo_muon))
weights_dict[ch_name].add("lepSF_elec", events.sf_4l_elec, copy.copy(events.sf_4l_hi_elec), copy.copy(events.sf_4l_lo_elec))

@bryates bryates changed the title Need to verify this didn't change the results. Need to verify copy() doesn't change the results. Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

1 participant