Functions | Variables
genie::utils::kinematics::electromagnetic Namespace Reference

Functions

Range1D_t InelWLim (double El, double ml, double M)
 
Range1D_t InelQ2Lim_W (double El, double ml, double M, double W)
 
Range1D_t Inelq2Lim_W (double El, double ml, double M, double W)
 
Range1D_t InelQ2Lim (double El, double ml, double M)
 
Range1D_t Inelq2Lim (double El, double ml, double M)
 
Range1D_t InelXLim (double El, double ml, double M)
 
Range1D_t InelYLim (double El, double ml, double M)
 
Range1D_t InelYLim_X (double El, double ml, double M, double x)
 

Variables

static const double kMinQ2Limit = 0.02
 

Function Documentation

Range1D_t genie::utils::kinematics::electromagnetic::InelQ2Lim ( double  El,
double  ml,
double  M 
)

Definition at line 606 of file KineUtils.cxx.

608 {
609 // Computes Q2 (>0) limits irrespective of W for inelastic em interactions
610 
611  Range1D_t Q2;
612  Q2.min = -1;
613  Q2.max = -1;
614 
616  if(W.min<0) return Q2;
617 
619  return Q2;
620 }
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1064
Range1D_t InelWLim(double Ev, double M, double ml)
Definition: KineUtils.cxx:345
A simple [min,max] interval for doubles.
Definition: Range1.h:42
Range1D_t InelQ2Lim_W(double Ev, double M, double ml, double W, double Q2min_cut=controls::kMinQ2Limit)
Definition: KineUtils.cxx:366
double max
Definition: Range1.h:53
double min
Definition: Range1.h:52
Range1D_t genie::utils::kinematics::electromagnetic::Inelq2Lim ( double  El,
double  ml,
double  M 
)

Definition at line 622 of file KineUtils.cxx.

624 {
625 // Computes Q2 (>0) limits irrespective of W for inelastic em interactions
626 
628  Range1D_t q2;
629  q2.min = - Q2.max;
630  q2.max = - Q2.min;
631  return q2;
632 }
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1064
A simple [min,max] interval for doubles.
Definition: Range1.h:42
Range1D_t InelQ2Lim(double Ev, double M, double ml, double Q2min_cut=controls::kMinQ2Limit)
Definition: KineUtils.cxx:416
double max
Definition: Range1.h:53
double min
Definition: Range1.h:52
Range1D_t genie::utils::kinematics::electromagnetic::InelQ2Lim_W ( double  El,
double  ml,
double  M,
double  W 
)

Definition at line 556 of file KineUtils.cxx.

558 {
559 // Computes Q2 limits (>0) @ the input W for inelastic em interactions
560 
561  Range1D_t Q2;
562  Q2.min = -1;
563  Q2.max = -1;
564 
565  double M2 = TMath::Power(M, 2.);
566  double ml2 = TMath::Power(ml, 2.);
567  double W2 = TMath::Power(W, 2.);
568  double s = M2 + 2*M*El + ml2; // added lepton mass squared to be used in s calculation (non-negligible mass for em interactions)
569 
570  SLOG("KineLimits", pDEBUG) << "s = " << s;
571  SLOG("KineLimits", pDEBUG) << "El = " << El;
572  assert (s>0);
573 
574  double auxC = 0.5*(s - M2 - ml2)/s; // subtract ml2 to account for the non-negligible mass of the incoming lepton
575  double aux1 = s + ml2 - W2;
576  double aux2 = aux1*aux1 - 4*s*ml2;
577 
578  (aux2 < 0) ? ( aux2 = 0 ) : ( aux2 = TMath::Sqrt(aux2) );
579 
580  Q2.max = -ml2 + auxC * (aux1 + aux2); // => 0
581  Q2.min = -ml2 + auxC * (aux1 - aux2); // => 0
582 
583  // guard against overflows
584  Q2.max = TMath::Max(0., Q2.max);
585  Q2.min = TMath::Max(0., Q2.min);
586 
587  // limit the minimum Q2
588  if(Q2.min < utils::kinematics::electromagnetic::kMinQ2Limit) {Q2.min = utils::kinematics::electromagnetic::kMinQ2Limit; } // use the relevant threshold for em scattering
589  if(Q2.max < Q2.min ) {Q2.min = -1; Q2.max = -1;}
590 
591  return Q2;
592 }
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1064
A simple [min,max] interval for doubles.
Definition: Range1.h:42
static const double kMinQ2Limit
Definition: Controls.h:41
double max
Definition: Range1.h:53
double min
Definition: Range1.h:52
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Definition: Messenger.h:84
static QCString * s
Definition: config.cpp:1042
#define pDEBUG
Definition: Messenger.h:63
Range1D_t genie::utils::kinematics::electromagnetic::Inelq2Lim_W ( double  El,
double  ml,
double  M,
double  W 
)

Definition at line 594 of file KineUtils.cxx.

596 {
597 // Computes q2 (<0) limits @ the input W for inelastic em interactions
598 
600  Range1D_t q2;
601  q2.min = - Q2.max;
602  q2.max = - Q2.min;
603  return q2;
604 }
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1064
A simple [min,max] interval for doubles.
Definition: Range1.h:42
Range1D_t InelQ2Lim_W(double Ev, double M, double ml, double W, double Q2min_cut=controls::kMinQ2Limit)
Definition: KineUtils.cxx:366
double max
Definition: Range1.h:53
double min
Definition: Range1.h:52
Range1D_t genie::utils::kinematics::electromagnetic::InelWLim ( double  El,
double  ml,
double  M 
)

Definition at line 534 of file KineUtils.cxx.

535 {
536 // Computes W limits for inelastic em interactions
537 //
538  double M2 = TMath::Power(M,2);
539  double ml2 = TMath::Power(ml,2); // added lepton mass squared to be used in s calculation
540  double s = M2 + 2*M*El + ml2; // non-negligible mass for em interactions
541  assert (s>0);
542 
543  Range1D_t W;
545  W.max = TMath::Sqrt(s) - ml;
546  if(W.max<=W.min) {
547  W.min = -1;
548  W.max = -1;
549  return W;
550  }
553  return W;
554 }
A simple [min,max] interval for doubles.
Definition: Range1.h:42
static const double kPhotontest
Definition: Constants.h:79
static const double kNeutronMass
Definition: Constants.h:76
static const double kASmallNum
Definition: Controls.h:40
double max
Definition: Range1.h:53
double min
Definition: Range1.h:52
static QCString * s
Definition: config.cpp:1042
Range1D_t genie::utils::kinematics::electromagnetic::InelXLim ( double  El,
double  ml,
double  M 
)

Definition at line 634 of file KineUtils.cxx.

636 {
637 // Computes Bjorken x limits for inelastic em interactions
638 
639  double M2 = TMath::Power(M, 2.);
640  double ml2 = TMath::Power(ml,2.);
641  double s = M2 + 2*M*El + ml2; // added lepton mass squared to be used in s calculation (non-negligible mass for em interactions)
642 
643  SLOG("KineLimits", pDEBUG) << "s = " << s;
644  SLOG("KineLimits", pDEBUG) << "El = " << El;
645  assert (s > M2 + ml2); // added lepton mass squared to be used in s calculation (non-negligible mass for em interactions)
646 
647  Range1D_t x;
648  x.min = ml2/(s - M2 - ml2) + controls::kASmallNum; // subtracted lepton mass squared to be used in s calculation (non-negligible mass for em interactions)
649  x.max = 1. - controls::kASmallNum;
650 
651  return x;
652 }
A simple [min,max] interval for doubles.
Definition: Range1.h:42
static const double kASmallNum
Definition: Controls.h:40
double max
Definition: Range1.h:53
list x
Definition: train.py:276
double min
Definition: Range1.h:52
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Definition: Messenger.h:84
static QCString * s
Definition: config.cpp:1042
#define pDEBUG
Definition: Messenger.h:63
Range1D_t genie::utils::kinematics::electromagnetic::InelYLim ( double  El,
double  ml,
double  M 
)

Definition at line 654 of file KineUtils.cxx.

655 {
656 // Computes y limits for inelastic v interactions
657 
658  Range1D_t y;
659  y.min = 999;
660  y.max = -999;
661 
663  assert(xl.min>0 && xl.max>0);
664 
665  const unsigned int N=100;
666  const double logxmin = TMath::Log10(xl.min);
667  const double logxmax = TMath::Log10(xl.max);
668  const double dlogx = (logxmax-logxmin) / (double)(N-1);
669 
670  for(unsigned int i=0; i<N; i++) {
671  double x = TMath::Power(10, logxmin + i*dlogx);
672 
674  if(y_x.min>=0 && y_x.min<=1) y.min = TMath::Min(y.min, y_x.min);
675  if(y_x.max>=0 && y_x.max<=1) y.max = TMath::Max(y.max, y_x.max);
676  }
677 
678  if(y.max >= 0 && y.max <= 1 && y.min >= 0 && y.min <= 1) {
679  y.min = TMath::Max(y.min, controls::kASmallNum);
680  y.max = TMath::Min(y.max, 1 - controls::kASmallNum);
681  } else {
682  y.min = -1;
683  y.max = -1;
684  }
685  SLOG("KineLimits", pDEBUG) << "y = [" << y.min << ", " << y.max << "]";
686  return y;
687 }
A simple [min,max] interval for doubles.
Definition: Range1.h:42
Range1D_t InelXLim(double Ev, double M, double ml)
Definition: KineUtils.cxx:444
static const double kASmallNum
Definition: Controls.h:40
double max
Definition: Range1.h:53
Range1D_t InelYLim_X(double Ev, double M, double ml, double x)
Definition: KineUtils.cxx:499
list x
Definition: train.py:276
double min
Definition: Range1.h:52
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Definition: Messenger.h:84
#define pDEBUG
Definition: Messenger.h:63
Range1D_t genie::utils::kinematics::electromagnetic::InelYLim_X ( double  El,
double  ml,
double  M,
double  x 
)

Definition at line 689 of file KineUtils.cxx.

692 {
693 // Computes y limits @ the input x for inelastic em interactions
694 
695  Range1D_t y;
696  y.min = -1;
697  y.max = -1;
698 
699  double El2 = TMath::Power(El,2);
700  double ml2 = TMath::Power(ml,2);
701 
702  SLOG("KineLimits", pDEBUG) << "x = " << x;
703  SLOG("KineLimits", pDEBUG) << "El = " << El;
704 
705  assert (El>0);
706  assert (x>0&&x<1);
707 
708  double a = 0.5 * ml2/(M*El*x);
709  double b = ml2/El2;
710  double c = 1 + 0.5*x*M/El;
711  double d = TMath::Max(0., TMath::Power(1-a,2.) - b);
712 
713  double A = 0.5 * (1-a-0.5*b)/c;
714  double B = 0.5 * TMath::Sqrt(d)/c;
715 
716  y.min = TMath::Max(0., A-B) + controls::kASmallNum;
717  y.max = TMath::Min(1., A+B) - controls::kASmallNum;
718 
719  return y;
720 }
A simple [min,max] interval for doubles.
Definition: Range1.h:42
const double a
static const double kASmallNum
Definition: Controls.h:40
double max
Definition: Range1.h:53
#define A
Definition: memgrp.cpp:38
static bool * b
Definition: config.cpp:1043
list x
Definition: train.py:276
double min
Definition: Range1.h:52
#define SLOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a short string (using the FUNCTION and...
Definition: Messenger.h:84
#define pDEBUG
Definition: Messenger.h:63

Variable Documentation

const double genie::utils::kinematics::electromagnetic::kMinQ2Limit = 0.02
static

Definition at line 114 of file KineUtils.h.