-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding ability to compare two different files
- Loading branch information
Horoho
committed
Nov 8, 2023
1 parent
b407ba3
commit 73497ed
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
from . import hcal | ||
from . import photonuclear | ||
from . import dark_brem | ||
from . import simparticles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from ._differ import Differ | ||
from ._plotter import plotter | ||
import logging | ||
|
||
log = logging.getLogger('8GeV') | ||
|
||
@plotter(hist=True, event=False) | ||
def beamenergy_comp(d: Differ, out_dir=None): | ||
|
||
pdgid_labels = ['', 'e+', 'e-', 'μ+', 'μ-', 'γ', 'p', 'n', 'π+', 'π-', 'π0', 'K+', 'K-', 'K-L', 'K-S', 'nucleus', 'exotic', ''] # finish later | ||
|
||
d.plot1d("SampleValidation/SampleValidation_pdgid_primaries", "PDG ID, primaries", | ||
tick_labels=pdgid_labels, | ||
out_dir=out_dir, | ||
density=True) | ||
|
||
d.plot1d("SampleValidation/SampleValidation_energy_primaries", "Energy of primaries (MeV)", | ||
out_dir=out_dir, | ||
density=True) | ||
|
||
d.plot1d("SampleValidation/SampleValidation_pdgid_primarydaughters", "PDG ID, primary daughters", | ||
tick_labels=pdgid_labels, | ||
out_dir=out_dir, | ||
density=True) | ||
|
||
d.plot1d("SampleValidation/SampleValidation_startZ_hardbrem", "Start z position of hard primary daughter", | ||
out_dir=out_dir, | ||
density=True) | ||
|
||
d.plot1d("SampleValidation/SampleValidation_endZ_hardbrem", "End z position of hard primary daughter", | ||
out_dir=out_dir, | ||
density=True) | ||
|
||
d.plot1d("SampleValidation/SampleValidation_energy_hardbrem", "Energy spectrum of hard primary daughter", | ||
out_dir=out_dir, | ||
density=True) | ||
|
||
d.plot1d("SampleValidation/SampleValidation_pdgid_hardbremdaughters", "PDG ID, hard brem daughters", | ||
tick_labels=pdgid_labels, | ||
out_dir=out_dir, | ||
density=True) | ||
|
||
d.plot1d("SampleValidation/SampleValidation_startZ_hardbremdaughters", "Start z position of hard brem daughters", | ||
out_dir=out_dir, | ||
density=True) |