Unified QEL model with spectral function#485
Conversation
Add unified QEL cross-section framework with hadron tensor infrastructure
Introduces a hadron-tensor-based formulation for quasi-elastic cross
section calculations, replacing direct amplitude evaluation with a
contraction of leptonic and hadronic tensors.
New components:
- HadronTensorInterface(I) and Rank2LorentzTensorI: base classes for
rank-2 Lorentz tensor manipulation and contraction. New we only
implement the one body current. We will introduction two body
currents and interference in the future.
- LeptonTensor and ManualResponseTensor: leptonic and hadronic tensor
implementations
- UnifiedQELPXSec: tensor-contraction-based QEL cross-section algorithm
- KellyELFormFactorsModel: Kelly parametrization of nucleon EM form
factors, it is dipole model, new to GENIE
- LwlynSmithFFEM: electromagnetic variant of the Llewellyn-Smith
form-factor model
- onebody_currents_sf: one-body current operators for spectral
function calculations
- Spectral function tables for 12C, 16O, and 40Ar (p/n)
Updates SpectralFunc to interface with the new framework, registers
new algorithms in master_config.xml and per-algorithm XML configs,
and adjusts Makefile and LinkDef entries for the new classes.
nusense
left a comment
There was a problem hiding this comment.
I've got a number of questions, but I've looked at all the changes.
| double qtx, qty, qtz, wt; | ||
| double f1v, xif2v, fa, fp; | ||
|
|
||
| w = fw; mNi = fmNi; |
There was a problem hiding this comment.
These multiple assignments on the same line are hard to read, along with declaring variables ahead and then assigning them here. It would be less fortran-like to have:
double mNi = fmNi; double w = fw; ...
This is a stylistic suggestion and not a requirement.
| kTIdx_NumDimensions = 4 | ||
| } TensorIndex_t; | ||
|
|
||
| class Rank2LorentzTensorI { |
There was a problem hiding this comment.
I'm a bit confused by this class being Rank2LorentzTensorI as the trailing I by GENIE convention usually means "interface" not a concrete class. And in the \class documentation above you give the name without the I.
In UnifiedQELPXSec it seems to be treated as a concrete class. And while there is a destructor declared, I don't see a constructor.
|
Hi, Robert, Thank you very much for your valuable comments. This RP is a continue work from #461. At this point, I have mainly converted the one-body current from Fortran to C++ and verified that the C++ code produces the same results as the Fortran version. I would love to improve the hadron tensor interface according to your comments. For the Best, Liang |
The change only rename the class of hadron tensor, add comments
In order to avoid use external Eigen library, implement the TensorUtil to do hadron current. The implementation is done by claude, I do the validate to make sure the agreement at machine precision.
|
Hi, Robert, Here, I rename all the tensors and here is hierarchy of them I hope it helps. Best |
nusense
left a comment
There was a problem hiding this comment.
The revisions since my previous review have addressed my comments. I'll approve this for when the series of pull requests are applied for version R-3_08_00.
Add unified QEL cross-section framework with hadron tensor infrastructure
This PR convert the original Fortran code to c++ code based on the work from Noah Steinberg and Steven Gardiner et, al.
Introduces a hadron-tensor-based formulation for quasi-elastic cross section calculations, replacing direct amplitude evaluation with a contraction of leptonic and hadronic tensors.
New components:
Updates SpectralFunc to interface with the new framework, registers new algorithms in master_config.xml and per-algorithm XML configs, and adjusts Makefile and LinkDef entries for the new classes.