Conversation
Splines for BDM models
Added description of fork
remove 'AllNeutrino'
nusense
left a comment
There was a problem hiding this comment.
This wasn't a review of the physics but of the general code, especially changes to existing code.
| http://www.genie-mc.org for more information. This fork adds the capability to simulate boosted dark matter | ||
| scattering via resonant baryon production. It is intended for future merger into an official GENIE release. | ||
|
|
||
| The GENIE Generator product is an advanced physics simulation used by nearly all modern neutrino experiments and |
There was a problem hiding this comment.
Before any merge the previous paragraph about being a fork should be removed.
There was a problem hiding this comment.
Actually a big block of stuff here is a reversion of some more recent changes and care must be taken in what's merged in.
| <param type="alg" name="Module-9"> genie::UnstableParticleDecayer/AfterHadronTransport </param> | ||
| <param type="alg" name="ILstGen"> genie::DMRESInteractionListGenerator/DM-Default </param> | ||
| </param_set> | ||
|
|
There was a problem hiding this comment.
Is there a reason that "RES-DM" is not clustered with "RES-DMv1" and "RES-DMv2" up near line 117. Or perhaps those should be down here. Or they're vestigial and need to be removed?
| <priority msgstream="DMELKinematics"> WARN </priority> | ||
| <priority msgstream="DMELXSec"> NOTICE </priority> | ||
| <priority msgstream="DMRes"> INFO </priority> | ||
| <priority msgstream="EventGenerator"> WARN </priority> |
There was a problem hiding this comment.
Should an entry for msgstream "DMRes" be added (at different levels) to all the other `Messenger_XYZZY.xml" files?
| mcj_driver->UseFluxDriver(flux_driver); | ||
| mcj_driver->UseGeomAnalyzer(geom_driver); | ||
| mcj_driver->ForceInteraction(); | ||
| mcj_driver->Configure(); |
There was a problem hiding this comment.
This addition of mcj_driver->ForceInteraction() doesn't seem DM related and would change the behavior of this application. Is it something that really should be done, or is it leftover from some testing?
|
|
||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
You might want to clear up a bunch of empty lines here and right below the next block of code.
|
Robert Hatcher,
Thank you for reviewing our pull request of the boosted dark matter resonant scattering process. We have updated the pull request after reviewing your comments. The only unresolved issue might be to block out a range of enum values for dark matter in the src/Framework/Interactions/ScatteringType.h file. As for the occurrence of "special values" in several of the src/Physics/BoostedDarkMatter/EventGen/DMRESKinematicsGenerator.cxx file, these are copied from the src/Physics/Resonance/EventGen/RESKinematicsGenerator.cxx version of the file. Thank you for your help identifying all the other discrepancies. Hopefully our updates have fixed everything. Let me know if there is anything else I missed or other concerns you want me to address. We appreciate your help.
Best,
Zachary Orr
________________________________
From: Robert Hatcher ***@***.***>
Sent: Wednesday, January 14, 2026 3:02 PM
To: GENIE-MC/Generator ***@***.***>
Cc: Orr,Zach ***@***.***>; Author ***@***.***>
Subject: Re: [GENIE-MC/Generator] BDM Resonant Scattering (PR #471)
** Caution: EXTERNAL Sender **
@nusense commented on this pull request.
This wasn't a review of the physics but of the general code, especially changes to existing code.
________________________________
In README.md<#471 (comment)>:
@@ -1,5 +1,9 @@
# The GENIE Event Generator
+This code is a fork of the GENIE Generator product. For the official release of the GENIE code, please visit
+http://www.genie-mc.org for more information. This fork adds the capability to simulate boosted dark matter
+scattering via resonant baryon production. It is intended for future merger into an official GENIE release.
+
The GENIE Generator product is an advanced physics simulation used by nearly all modern neutrino experiments and
Before any merge the previous paragraph about being a fork should be removed.
________________________________
In config/EventGenerator.xml<#471 (comment)>:
+ <param_set name="RES-DM">
+ <param type="string" name="VldContext"> </param>
+ <param type="int" name="NModules"> 10 </param>
+ <param type="alg" name="Module-0"> genie::InitialStateAppender/Default </param>
+ <param type="alg" name="Module-1"> genie::VertexGenerator/Default </param>
+ <param type="alg" name="Module-2"> genie::FermiMover/Default </param>
+ <param type="alg" name="Module-3"> genie::DMRESKinematicsGenerator/RES </param>
+ <param type="alg" name="Module-4"> genie::DMRESOutgoingDarkGenerator/Default </param>
+ <param type="alg" name="Module-5"> genie::DMRESHadronicSystemGenerator/Default </param>
+ <param type="alg" name="Module-6"> genie::NucDeExcitationSim/Default </param>
+ <param type="alg" name="Module-7"> genie::HadronTransporter/Default </param>
+ <param type="alg" name="Module-8"> genie::NucBindEnergyAggregator/Default </param>
+ <param type="alg" name="Module-9"> genie::UnstableParticleDecayer/AfterHadronTransport </param>
+ <param type="alg" name="ILstGen"> genie::DMRESInteractionListGenerator/DM-Default </param>
+ </param_set>
+
Is there a reason that "RES-DM" is not clustered with "RES-DMv1" and "RES-DMv2" up near line 117. Or perhaps those should be down here. Or they're vestigial and need to be removed?
________________________________
In config/EventGeneratorListAssembler.xml<#471 (comment)>:
</param_set>
<param_set name="DARKNEUTRINO">
<param type="int" name="NGenerators"> 1 </param>
<param type="alg" name="Generator-0"> genie::EventGenerator/COHDNu </param>
</param_set>
+ <param_set name="NonRes">
+ <param type="int" name="NGenerators"> 3 </param>
+ <param type="alg" name="Generator-0"> genie::EventGenerator/DMEL </param>
+ <param type="alg" name="Generator-1"> genie::EventGenerator/DMDIS </param>
+ <param type="alg" name="Generator-2"> genie::EventGenerator/DME </param>
+ </param_set>
Should the name of this param set include "DM" rather than just be "NonRes"
________________________________
In config/Messenger.xml<#471 (comment)>:
@@ -86,6 +86,7 @@
<priority msgstream="DMELEvent"> NOTICE </priority>
<priority msgstream="DMELKinematics"> WARN </priority>
<priority msgstream="DMELXSec"> NOTICE </priority>
+ <priority msgstream="DMRes"> INFO </priority>
<priority msgstream="EventGenerator"> WARN </priority>
Should an entry for msgstream "DMRes" be added (at different levels) to all the other `Messenger_XYZZY.xml" files?
________________________________
In src/Apps/gAtmoEvGen.cxx<#471 (comment)>:
@@ -368,6 +368,7 @@ int main(int argc, char** argv)
mcj_driver->SetEventGeneratorList(RunOpt::Instance()->EventGeneratorList());
mcj_driver->UseFluxDriver(flux_driver);
mcj_driver->UseGeomAnalyzer(geom_driver);
+ mcj_driver->ForceInteraction();
mcj_driver->Configure();
This addition of mcj_driver->ForceInteraction() doesn't seem DM related and would change the behavior of this application. Is it something that really should be done, or is it leftover from some testing?
________________________________
In src/Framework/EventGen/GMCJDriver.cxx<#471 (comment)>:
@@ -654,11 +654,12 @@ void GMCJDriver::BootstrapXSecSplineSummation(void)
// knots with zero y values (although the GENIE Spline object handles it)
double min = rE.min;
double max = TMath::Min(rE.max, fEmax);
-
+ max = 1.1 * max;
+
giving max a 1.1 fudge factor in a universally used class seems to be something that should get wider discussion than this pull request.
________________________________
In src/Framework/Interaction/KPhaseSpace.cxx<#471 (comment)>:
@@ -453,7 +456,7 @@ Range1D_t KPhaseSpace::WLim(void) const
bool is_em = pi.IsEM();
bool is_qel = pi.IsQuasiElastic() || pi.IsInverseBetaDecay() || pi.IsDarkMatterElastic();
bool is_inel = pi.IsDeepInelastic() || pi.IsResonant() || pi.IsDiffractive();
- bool is_dmdis = pi.IsDarkMatterDeepInelastic();
+ bool is_dmdis = pi.IsDarkMatterDeepInelastic() || pi.IsDarkMatterResonant();
Here and several places below the is_dmdis seems misleading if it's really DMDIST and DMRES.
________________________________
In src/Framework/Interaction/ScatteringType.h<#471 (comment)>:
@@ -56,6 +56,7 @@ typedef enum EScatteringType {
kScDarkMatterElastic = 101,
kScDarkMatterDeepInelastic,
kScDarkMatterElectron,
+ kScDarkMatterResonant,
kScNorm
I'm always very hesitant about adding enum entries in the middle. This invalidates anything that has stored kScNorm to now look like it is kScDarkMatterResonant. There probably currently isn't anything, but perhaps we should block out a range for dark matter and restart counting with kScNorm=110 or something.
________________________________
In src/Physics/BoostedDarkMatter/EventGen/DMRESKinematicsGenerator.cxx<#471 (comment)>:
+ double max_xsec = 0.;
+
+ const InitialState & init_state = interaction -> InitState();
+ double E = init_state.ProbeE(kRfHitNucRest);
+
+//___________For DM cross check with EM________________________________________
+// Q2Thres will be set to 1E-4
+//______________________________________________________________________________
+//Original:
+bool is_em = interaction->ProcInfo().IsEM();
+double Q2Thres = is_em ? utils::kinematics::electromagnetic::kMinQ2Limit : controls::kMinQ2Limit;
+//______________________________________________________________________________
+
+ double md;
+ if(!interaction->ExclTag().KnownResonance()) md=1.23;
+ else {
What is md and why is there a special value of 1.23 in some cases? Maybe at least a comment here.
________________________________
In src/Physics/BoostedDarkMatter/EventGen/DMRESKinematicsGenerator.cxx<#471 (comment)>:
+
+ Wmin = TMath::Max(Wmin, md-.3);
+ Wmax = TMath::Min(Wmax, md+.3);
+
+ if(Wmax-Wmin<0.05) { NW=1; Wmin=Wmax; }
+
+ double dW = (NW>1) ? (Wmax-Wmin)/(NW-1) : 0.;
+
+ for(int iw=0; iw<NW; iw++)
+ {
+ double W = Wmin + iw*dW;
+ interaction->KinePtr()->SetW(W);
+
+ int NQ2 = 25;
+ int NQ2b = 4;
+
I never like seeing "special values" (here 25, 4 and 5, 3 below) without some comment explaining them.
________________________________
In src/Physics/BoostedDarkMatter/XSection/DMRESPXSec.cxx<#471 (comment)>:
+ if (mZprime2 != 0.0){
+ AZ = -mchiTerm*mZ_q2*fQchiLmR2;
+ }
+
+ //For Scalar DM: spin average = 1
+ if(fVelMode == 2){
+ AL = fQchiS2 * (2*UV + 2*mchiTerm);
+ AR = fQchiS2 * (2*UV + 2*mchiTerm);
+ AS = fQchiS2 * (TMath::Power((U+V), 2));
+ AZ = 0.0;
+}
+
+
+
+
+
You might want to clear up a bunch of empty lines here and right below the next block of code.
________________________________
In src/Physics/BoostedDarkMatter/XSection/DMRESPXSec.cxx<#471 (comment)>:
+ const XclsTag & xcls = interaction->ExclTag();
+
+ if(!proc_info.IsDarkMatterResonant()) return false;
+ if(!xcls.KnownResonance()) return false;
+
+ int hitnuc = init_state.Tgt().HitNucPdg();
+ bool is_pn = (pdg::IsProton(hitnuc) || pdg::IsNeutron(hitnuc));
+
+ if (!is_pn) return false;
+
+ int probe = init_state.ProbePdg();
+ bool is_DM = proc_info.IsDarkMatterResonant();
+ bool is_dm = proc_info.IsDarkMatter();
+
+ if (!is_dm && !is_DM) return false;
+
I'm not a fan of two variables only differentiated by case. Perhaps using is_dmres might be warranted.
________________________________
In src/Physics/BoostedDarkMatter/XSection/DMRESXSecFast.cxx<#471 (comment)>:
@@ -0,0 +1,223 @@
+//____________________________________________________________________________
+/*
+ Copyright (c) 2003-2023, The GENIE Collaboration
+ For the full text of the license visit http://copyright.genie-mc.org
+
+ Igor Kakorin ***@***.***>
+ Joint Institute for Nuclear Research
+
Is this Igor Kakorin's code or Zachary Orr's? Also check the copyright ranges ... should probably be up to 2026.
________________________________
In src/Physics/BoostedDarkMatter/XSection/RSHelicityAmplModelDMn.cxx<#471 (comment)>:
+ fAmpl.fMinus1 = k1_Sqrt6 * fkrdm.Lamda * (fkrdm.Ra * (fQuA + 5 * fQdA) - fkrdm.Rv * (fQuV + 5 * fQdV)) + kSqrt3 * fkrdm.Ta * (fQdA - fQuA) + kSqrt3 * fkrdm.Tv * (fQuV - fQdV);
+ fAmpl.fPlus1 = -k1_Sqrt6 * fkrdm.Lamda * (fkrdm.Ra * (fQuA + 5 * fQdA) + fkrdm.Rv * (fQuV + 5 * fQdV)) + kSqrt3 * fkrdm.Ta * (fQuA - fQdA) + kSqrt3 * fkrdm.Tv * (fQuV - fQdV);
+ fAmpl.fPlus3 = 0;
+ fAmpl.f0Plus = k1_Sqrt6 * (3 * fkrdm.Lamda * fkrdm.S * (fQdV - fQuV) - 3 * fkrdm.Bs * (fQuA + 5 * fQdA) + fkrdm.Lamda * fkrdm.Cs * (fQuA + 5 * fQdA));
+ fAmpl.f0Minus = k1_Sqrt6 * (3 * fkrdm.Lamda * fkrdm.S * (fQuV - fQdV) - 3 * fkrdm.Bs * (fQuA + 5 * fQdA) + fkrdm.Lamda * fkrdm.Cs * (fQuA + 5 * fQdA));
+ fAmpl.fz0Plus = -k1_Sqrt6 * ((fQuA + 5 * fQdA) * (3 * fkrdm.Bz - fkrdm.Lamda * fkrdm.Cz));
+ fAmpl.fz0Minus = -k1_Sqrt6 * ((fQuA + 5 * fQdA) * (3 * fkrdm.Bz - fkrdm.Lamda * fkrdm.Cz));
+
+ break;
+ }
+ case (kD13_1520) :
+ {
+ fAmpl.fMinus3 = k3_Sqrt2 * (fkrdm.Tv * (fQuV - fQdV) + fkrdm.Ta * (fQdA - fQuA));
+ fAmpl.fMinus1 = (1/2) * k1_Sqrt3 * (2 * fkrdm.Lamda * (fkrdm.Rv * (5 * fQdV + fQuV) - fkrdm.Ra * (5 * fQdA + fQuA)) + 3 * kSqrt2 * (fkrdm.Tv * (fQuV - fQdV) + fkrdm.Ta * (fQdA - fQuA)));
+ fAmpl.fPlus1 = (1/2) * k1_Sqrt3 * (-2 * fkrdm.Lamda * (fkrdm.Ra * fQuA + fkrdm.Rv * (5 * fQdV + fQuV)) + fQdA * (3 * kSqrt2 * fkrdm.Ta - 10 * fkrdm.Lamda * fkrdm.Ra) + 3 * kSqrt2 * fkrdm.Tv * (fQdV - fQuV) - 3 * kSqrt2 * fQuA * fkrdm.Ta);
+ fAmpl.fPlus3 = k3_Sqrt2 * (fkrdm.Tv * (fQdV - fQuV) + fkrdm.Ta * (fQdA - fQuA));
In C++ (1/2) is done as integer math and will always yield zero. You need to make at least one of the two a floating point type.
________________________________
In src/Physics/BoostedDarkMatter/XSection/RSHelicityAmplModelDMn.cxx<#471 (comment)>:
+ fAmpl.fPlus3 = -k3_Sqrt2 * (fkrdm.Tv * (fQdV - fQuV) + fkrdm.Ta * (fQdA - fQuA));
+ fAmpl.f0Plus = fkrdm.Lamda * k1_Sqrt3 * (3 * fkrdm.S * (fQdV - fQuV) + fkrdm.Cs * (fQuA - fQdA));
+ fAmpl.f0Minus = fkrdm.Lamda * k1_Sqrt3 * (3 * fkrdm.S * (fQdV - fQuV) + fkrdm.Cs * (fQdA - fQuA));
+ fAmpl.fz0Plus = fkrdm.Lamda * fkrdm.Cz * k1_Sqrt3 * (fQuA - fQdA);
+ fAmpl.fz0Minus = fkrdm.Lamda * fkrdm.Cz * k1_Sqrt3 * (fQdA - fQuA);
+
+ break;
+ }
+ case (kP11_1440) :
+ {
+ double L2 = TMath::Power(fkrdm.Lamda, 2);
+
+ fAmpl.fMinus3 = 0;
+ fAmpl.fMinus1 = (1/2) * k1_Sqrt3 * L2 * (fkrdm.Ra * (fQuA - 4 * fQdA) - fkrdm.Rv * (fQuV - 4 * fQdV));
+ fAmpl.fPlus1 = (1/2) * k1_Sqrt3 * L2 * (fkrdm.Ra * (fQuA - 4 * fQdA) + fkrdm.Rv * (fQuV - 4 * fQdV));
+ fAmpl.fPlus3 = 0;
Again (1/2) is 0. Last mention... You'll need to check everywhere (not just this file and these two instances) for this.
—
Reply to this email directly, view it on GitHub<#471 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BER2E3MCHR7IWMMKCGHDHOT4G24GFAVCNFSM6AAAAACRW4M2SWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTMNRSG4YTENRZGU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Added Resonant scattering to the Boosted Dark Matter physics module. Modified the framework to include Boosted Dark Matter Resonant Scattering.