-
Notifications
You must be signed in to change notification settings - Fork 14
Allow different matching scale for the photon #1751
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
df6371f
Allow Q_IN != 100
niclaurenti 04ac7a8
Add theories 524, 525, 526
niclaurenti b425a69
Fix tests
niclaurenti cb59f2e
Upgrade to eko13
niclaurenti 6a33baa
Use ev_op_iterations=30 for exact evolution
niclaurenti 4c19a78
Add control on alphaem running in eko_utils
niclaurenti 2b27cbc
Merge branch 'master' into different-qin
niclaurenti 57f80a6
Merge branch 'master' into different-qin
niclaurenti 6e98bf8
Use _ for unused varibles
niclaurenti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Binary file not shown.
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -17,7 +17,6 @@ | |
|
|
||
| log = logging.getLogger(__name__) | ||
|
|
||
| Q_IN = 100 | ||
| FIATLUX_DEFAULT = { | ||
| "apfel": False, | ||
| "eps_base": 1e-5, # precision on final integration of double integral. | ||
|
|
@@ -71,6 +70,9 @@ def __init__(self, theoryid, lux_params, replicas): | |
| path_to_F2 = theoryid.path / "fastkernel/fiatlux_dis_F2.pineappl.lz4" | ||
| path_to_FL = theoryid.path / "fastkernel/fiatlux_dis_FL.pineappl.lz4" | ||
| self.path_to_eko_photon = theoryid.path / "eko_photon.tar" | ||
| with EKO.read(self.path_to_eko_photon) as eko: | ||
| self.q_in = np.sqrt(eko.mu20) | ||
|
scarlehoff marked this conversation as resolved.
|
||
|
|
||
|
|
||
| # set fiatlux | ||
| self.lux = {} | ||
|
|
@@ -129,7 +131,7 @@ def compute_photon_array(self, replica): | |
| """ | ||
| # Compute photon PDF | ||
| log.info(f"Computing photon") | ||
| photon_qin = np.array([self.lux[replica].EvaluatePhoton(x, Q_IN**2).total for x in XGRID]) | ||
| photon_qin = np.array([self.lux[replica].EvaluatePhoton(x, self.q_in**2).total for x in XGRID]) | ||
| photon_qin += self.generate_errors(replica) | ||
| # fiatlux computes x * gamma(x) | ||
| photon_qin /= XGRID | ||
|
|
@@ -141,21 +143,20 @@ def compute_photon_array(self, replica): | |
| # it has to be done inside vp-setupfit | ||
|
|
||
| # construct PDFs | ||
| pdfs_init = np.zeros((len(eko.rotations.inputpids), len(XGRID))) | ||
| for j, pid in enumerate(eko.rotations.inputpids): | ||
| pdfs_init = np.zeros((len(eko.bases.inputpids), len(XGRID))) | ||
| for j, pid in enumerate(eko.bases.inputpids): | ||
| if pid == 22: | ||
| pdfs_init[j] = photon_qin | ||
| ph_id = j | ||
| else: | ||
| if pid not in self.luxpdfset.flavors: | ||
| continue | ||
| pdfs_init[j] = np.array( | ||
| [self.luxpdfset.xfxQ(x, Q_IN, replica, pid) / x for x in XGRID] | ||
| [self.luxpdfset.xfxQ(x, self.q_in, replica, pid) / x for x in XGRID] | ||
| ) | ||
|
|
||
| # Apply EKO to PDFs | ||
| q2 = eko.mu2grid[0] | ||
| with eko.operator(q2) as elem: | ||
| for _, elem in eko.items(): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using a for loop assuming that there is a single element is not the best style ever... |
||
| pdfs_final = np.einsum("ajbk,bk", elem.operator, pdfs_init) | ||
|
|
||
| photon_Q0 = pdfs_final[ph_id] | ||
|
|
@@ -188,7 +189,7 @@ def error_matrix(self): | |
| if not self.additional_errors: | ||
| return None | ||
| extra_set = self.additional_errors.load() | ||
| qs = [Q_IN] * len(XGRID) | ||
| qs = [self.q_in] * len(XGRID) | ||
| res_central = np.array(extra_set.central_member.xfxQ(22, XGRID, qs)) | ||
| res = [] | ||
| for idx_member in range(101, 107 + 1): | ||
|
|
||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.