GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
genie::utils::gsl::d2XSecRESFast_dWQ2_E Class Reference

#include <ReinSehgalRESXSecWithCacheFast.h>

Inheritance diagram for genie::utils::gsl::d2XSecRESFast_dWQ2_E:
Inheritance graph
[legend]
Collaboration diagram for genie::utils::gsl::d2XSecRESFast_dWQ2_E:
Collaboration graph
[legend]

Public Member Functions

 d2XSecRESFast_dWQ2_E (const XSecAlgorithmI *m, const Interaction *i)
 
 ~d2XSecRESFast_dWQ2_E ()
 
unsigned int NDim (void) const
 
double DoEval (const double *xin) const
 
ROOT::Math::IBaseFunctionMultiDim * Clone (void) const
 

Private Attributes

const XSecAlgorithmIfModel
 
const InteractionfInteraction
 
double fWmin
 
double fWmax
 
bool isfWcutLessfWmin
 
KPhaseSpacekps
 

Detailed Description

Definition at line 78 of file ReinSehgalRESXSecWithCacheFast.h.

Constructor & Destructor Documentation

genie::utils::gsl::d2XSecRESFast_dWQ2_E::d2XSecRESFast_dWQ2_E ( const XSecAlgorithmI m,
const Interaction i 
)

Definition at line 227 of file ReinSehgalRESXSecWithCacheFast.cxx.

References genie::Interaction::ExclTag(), fInteraction, fModel, fWmax, fWmin, genie::Registry::GetBool(), genie::Registry::GetBoolDef(), genie::Registry::GetDouble(), genie::Registry::GetDoubleDef(), isfWcutLessfWmin, kps, genie::utils::res::Mass(), genie::Range1D_t::max, genie::Range1D_t::min, genie::Interaction::PhaseSpacePtr(), genie::XclsTag::Resonance(), genie::utils::res::ResonanceIndex(), genie::utils::res::Width(), and genie::KPhaseSpace::WLim().

228  :
229 ROOT::Math::IBaseFunctionMultiDim(),
230 fModel(m),
231 fInteraction(i)
232 {
234  Range1D_t Wl = kps->WLim();
235  fWmin = Wl.min;
236  fWmax = Wl.max;
237  Registry fConfig = (const_cast<XSecAlgorithmI *>(fModel))->GetConfig();
238  bool fUsingDisResJoin = fConfig.GetBool("UseDRJoinScheme");
239  double fWcut = 999999;
240  if(fUsingDisResJoin)
241  {
242  fWcut = fConfig.GetDouble("Wcut");
243  }
244  fWmax=TMath::Min(fWcut, fWmax);
245  if (fWcut<fWmin)
246  isfWcutLessfWmin=true;
247  else
248  isfWcutLessfWmin=false;
249  bool fNormBW = fConfig.GetBoolDef("BreitWignerNorm", true);
250  if (fNormBW)
251  {
252  double fN2ResMaxNWidths = fConfig.GetDoubleDef("MaxNWidthForN2Res", 2.0);
253  double fN0ResMaxNWidths = fConfig.GetDoubleDef("MaxNWidthForN0Res", 6.0);
254  double fGNResMaxNWidths = fConfig.GetDoubleDef("MaxNWidthForGNRes", 4.0);
255  Resonance_t resonance = fInteraction->ExclTag().Resonance();
256  int IR = utils::res::ResonanceIndex (resonance);
257  double MR = utils::res::Mass (resonance);
258  double WR = utils::res::Width (resonance);
259  if (IR==0)
260  fWcut = MR + fN0ResMaxNWidths * WR;
261  else if (IR==2)
262  fWcut = MR + fN2ResMaxNWidths * WR;
263  else
264  fWcut = MR + fGNResMaxNWidths * WR;
265  fWmax=TMath::Min(fWcut, fWmax);
266  if (fWcut<fWmin)
267  isfWcutLessfWmin=true;
268  }
269 
270 }
Cross Section Calculation Interface.
RgDbl GetDoubleDef(RgKey key, RgDbl def_opt, bool set_def=true)
Definition: Registry.cxx:535
A simple [min,max] interval for doubles.
Definition: Range1.h:42
double Mass(Resonance_t res)
resonance mass (GeV)
double Width(Resonance_t res)
resonance width (GeV)
RgDbl GetDouble(RgKey key) const
Definition: Registry.cxx:474
enum genie::EResonance Resonance_t
KPhaseSpace * PhaseSpacePtr(void) const
Definition: Interaction.h:78
Resonance_t Resonance(void) const
Definition: XclsTag.h:69
double max
Definition: Range1.h:53
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
const XclsTag & ExclTag(void) const
Definition: Interaction.h:72
RgBool GetBool(RgKey key) const
Definition: Registry.cxx:460
double min
Definition: Range1.h:52
RgBool GetBoolDef(RgKey key, RgBool def_opt, bool set_def=true)
Definition: Registry.cxx:525
Range1D_t WLim(void) const
W limits.
int ResonanceIndex(Resonance_t res)
resonance idx, quark model / SU(6)
genie::utils::gsl::d2XSecRESFast_dWQ2_E::~d2XSecRESFast_dWQ2_E ( )

Definition at line 271 of file ReinSehgalRESXSecWithCacheFast.cxx.

272 {
273 
274 }

Member Function Documentation

ROOT::Math::IBaseFunctionMultiDim * genie::utils::gsl::d2XSecRESFast_dWQ2_E::Clone ( void  ) const
double genie::utils::gsl::d2XSecRESFast_dWQ2_E::DoEval ( const double *  xin) const

Definition at line 279 of file ReinSehgalRESXSecWithCacheFast.cxx.

References genie::units::cm2, genie::kPSWQ2fE, genie::Range1D_t::max, genie::Range1D_t::min, genie::utils::kinematics::Q2(), and genie::utils::kinematics::W().

280 {
281 // inputs:
282 // W
283 // Q2
284 // outputs:
285 // differential cross section [10^-38 cm^2/GeV^3] for Resonance production
286 //
287 
288  if (isfWcutLessfWmin)
289  return 0;
290  double W = fWmin+(fWmax-fWmin)*xin[0];
291  fInteraction->KinePtr()->SetW(W);
292  Range1D_t Q2l = kps->Q2Lim_W();
293  if (Q2l.min<0 || Q2l.max<0)
294  return 0.0;
295  double Q2 = Q2l.min+(Q2l.max-Q2l.min)*xin[1];
296  fInteraction->KinePtr()->SetQ2(Q2);
297  double xsec = fModel->XSec(fInteraction, kPSWQ2fE)*(fWmax-fWmin)*(Q2l.max-Q2l.min);
298  return xsec/(1E-38 * units::cm2);
299 }
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1077
void SetQ2(double Q2, bool selected=false)
Definition: Kinematics.cxx:255
Kinematics * KinePtr(void) const
Definition: Interaction.h:76
A simple [min,max] interval for doubles.
Definition: Range1.h:42
Range1D_t Q2Lim_W(void) const
Q2 limits @ fixed W.
double W(const Interaction *const i)
Definition: KineUtils.cxx:1101
static constexpr double cm2
Definition: Units.h:69
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
double max
Definition: Range1.h:53
void SetW(double W, bool selected=false)
Definition: Kinematics.cxx:279
double min
Definition: Range1.h:52
unsigned int genie::utils::gsl::d2XSecRESFast_dWQ2_E::NDim ( void  ) const

Definition at line 275 of file ReinSehgalRESXSecWithCacheFast.cxx.

276 {
277  return 2;
278 }

Member Data Documentation

const Interaction* genie::utils::gsl::d2XSecRESFast_dWQ2_E::fInteraction
private

Definition at line 91 of file ReinSehgalRESXSecWithCacheFast.h.

Referenced by d2XSecRESFast_dWQ2_E().

const XSecAlgorithmI* genie::utils::gsl::d2XSecRESFast_dWQ2_E::fModel
private

Definition at line 90 of file ReinSehgalRESXSecWithCacheFast.h.

Referenced by d2XSecRESFast_dWQ2_E().

double genie::utils::gsl::d2XSecRESFast_dWQ2_E::fWmax
private

Definition at line 93 of file ReinSehgalRESXSecWithCacheFast.h.

Referenced by d2XSecRESFast_dWQ2_E().

double genie::utils::gsl::d2XSecRESFast_dWQ2_E::fWmin
private

Definition at line 92 of file ReinSehgalRESXSecWithCacheFast.h.

Referenced by d2XSecRESFast_dWQ2_E().

bool genie::utils::gsl::d2XSecRESFast_dWQ2_E::isfWcutLessfWmin
private

Definition at line 94 of file ReinSehgalRESXSecWithCacheFast.h.

Referenced by d2XSecRESFast_dWQ2_E().

KPhaseSpace* genie::utils::gsl::d2XSecRESFast_dWQ2_E::kps
private

Definition at line 95 of file ReinSehgalRESXSecWithCacheFast.h.

Referenced by d2XSecRESFast_dWQ2_E().


The documentation for this class was generated from the following files: