Skip to content
Snippets Groups Projects
Unverified Commit 388dff9f authored by Sebouh Paul's avatar Sebouh Paul Committed by GitHub
Browse files

Fix bug in neutron_plots.py (#26)

* Update neutron_plots.py

import uproot as ur

* fixed another bug in the neutron_plots.py

* Update config.yml

Make sure the neutron::analyze stage actually runs.
parent 3e6a6efb
No related branches found
No related tags found
No related merge requests found
Pipeline #101213 passed
import numpy as np, pandas as pd, matplotlib.pyplot as plt, matplotlib as mpl, awkward as ak, sys import numpy as np, pandas as pd, matplotlib.pyplot as plt, matplotlib as mpl, awkward as ak, sys, uproot as ur
import mplhep as hep import mplhep as hep
hep.style.use("CMS") hep.style.use("CMS")
...@@ -57,7 +57,7 @@ for array in arrays_sim.values(): ...@@ -57,7 +57,7 @@ for array in arrays_sim.values():
w=E w=E
array['theta_recon']=np.sum(np.arccos(zp/r)*w, axis=-1)/np.sum(w, axis=-1) array['theta_recon']=np.sum(np.arccos(zp/r)*w, axis=-1)/np.sum(w, axis=-1)
array['eta_recon']=-np.log(np.tan(['theta_recon']/2)) array['eta_recon']=-np.log(np.tan(array['theta_recon']/2))
array['E_Hcal']=np.sum(array['HcalEndcapPInsertClusters.energy'], axis=-1)#*20/12.5 array['E_Hcal']=np.sum(array['HcalEndcapPInsertClusters.energy'], axis=-1)#*20/12.5
......
...@@ -24,7 +24,8 @@ neutron:analyze: ...@@ -24,7 +24,8 @@ neutron:analyze:
extends: .phy_benchmark extends: .phy_benchmark
needs: ["neutron:simulate"] needs: ["neutron:simulate"]
script: script:
- snakemake --cores 1 --touch results/epic_craterlake/neutron - mkdir -p results/epic_craterlake
- python benchmarks/neutron/analysis/neutron_plots.py results/epic_craterlake/neutron
neutron:results: neutron:results:
stage: collect stage: collect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment