Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
JPHYSICS::JDIS::JDIS_t Class Reference

Auxiliary helper class for kinematics of deep-inelastic muon-nucleon scattering at fixed muon energy. More...

#include <JDIS.hh>

Public Member Functions

 JDIS_t (const double E)
 Constructor. More...
 
double getP (const double v) const
 Get probability of given energy fraction. More...
 
double getE () const
 Get shower energy. More...
 

Public Attributes

const double E
 actual energy [GeV] More...
 
const double E2
 maximal energy [GeV] More...
 

Static Public Attributes

static constexpr double E0 = 0.144
 minimal energy [GeV] More...
 
static constexpr double E1 = 0.35
 breakpoint [GeV] More...
 
static constexpr double p0 = 2.0
 spectral index upto breakpoint More...
 
static constexpr double p1 = -1.11
 spectral index from breakpoint More...
 

Private Member Functions

double getA (const double v, const bool option=true) const
 Integral upto breakpoint. More...
 
double getB (const double v, const bool option=true) const
 Integral from breakpoint. More...
 
double getb (const double v) const
 Integral from breakpoint without suppression factor. More...
 

Private Attributes

double k1
 normalisation constant upto breakpoint More...
 
double k2
 normalisation constant from breakpoint More...
 

Detailed Description

Auxiliary helper class for kinematics of deep-inelastic muon-nucleon scattering at fixed muon energy.

Definition at line 119 of file JDIS.hh.

Constructor & Destructor Documentation

JPHYSICS::JDIS::JDIS_t::JDIS_t ( const double  E)
inline

Constructor.

Parameters
Emuon energy [GeV]

Definition at line 126 of file JDIS.hh.

126  :
127  E (E),
128  E2(E - MASS_MUON)
129  {
130  k2 = pow(E1, p0 - p1) / pow(1.0 - E1/E, 2);
131 
132  const double A = getA(E1/E, false) - getA(E0/E, false);
133  const double B = getB(E2/E, false) - getB(E1/E, false);
134 
135  k1 = 1.0 / (A + k2 * B);
136  }
double k2
normalisation constant from breakpoint
Definition: JDIS.hh:251
static const double MASS_MUON
muon mass [GeV]
static constexpr double p0
spectral index upto breakpoint
Definition: JDIS.hh:207
static constexpr double p1
spectral index from breakpoint
Definition: JDIS.hh:208
static constexpr double E0
minimal energy [GeV]
Definition: JDIS.hh:204
T pow(const T &x, const double y)
Power .
Definition: JMath.hh:97
double getA(const double v, const bool option=true) const
Integral upto breakpoint.
Definition: JDIS.hh:218
static constexpr double E1
breakpoint [GeV]
Definition: JDIS.hh:205
double k1
normalisation constant upto breakpoint
Definition: JDIS.hh:250
const double E
actual energy [GeV]
Definition: JDIS.hh:201
const double E2
maximal energy [GeV]
Definition: JDIS.hh:202
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
double getB(const double v, const bool option=true) const
Integral from breakpoint.
Definition: JDIS.hh:231

Member Function Documentation

double JPHYSICS::JDIS::JDIS_t::getP ( const double  v) const
inline

Get probability of given energy fraction.

Parameters
venergy fraction
Returns
probability

Definition at line 145 of file JDIS.hh.

146  {
147  const double x = E*v;
148  const double u = 1.0 - v;
149 
150  if (x > E2)
151  return 0.0;
152  else if (x > E1)
153  return k1 * k2 * pow(x, p1) * u*u;
154  else if (x > E0)
155  return k1 * pow(x, p0);
156  else
157  return 0.0;
158  }
double k2
normalisation constant from breakpoint
Definition: JDIS.hh:251
static constexpr double p0
spectral index upto breakpoint
Definition: JDIS.hh:207
static constexpr double p1
spectral index from breakpoint
Definition: JDIS.hh:208
static constexpr double E0
minimal energy [GeV]
Definition: JDIS.hh:204
T pow(const T &x, const double y)
Power .
Definition: JMath.hh:97
static constexpr double E1
breakpoint [GeV]
Definition: JDIS.hh:205
double k1
normalisation constant upto breakpoint
Definition: JDIS.hh:250
const double E
actual energy [GeV]
Definition: JDIS.hh:201
const double E2
maximal energy [GeV]
Definition: JDIS.hh:202
data_type v[N+1][M+1]
Definition: JPolint.hh:866
double u[N+1]
Definition: JPolint.hh:865
double JPHYSICS::JDIS::JDIS_t::getE ( ) const
inline

Get shower energy.

Returns
shower energy [GeV]

Definition at line 166 of file JDIS.hh.

167  {
168  const double A = getA(E1/E) - getA(E0/E);
169  const double B = getB(E2/E) - getB(E1/E);
170 
171  for ( ; ; ) {
172 
173  double y = gRandom->Rndm() * (A + B);
174 
175  if (y <= A) {
176 
177  y += getA(E0/E);
178  y /= k1 * pow(E,p0) / (p0 + 1);
179 
180  const double v = pow(y, 1.0 / (p0 + 1));
181 
182  return E * v;
183 
184  } else {
185 
186  y -= A;
187  y *= (getb(E2/E) - getb(E1/E)) / B;
188  y += getb(E1/E);
189  y /= k1 * k2 * pow(E,p1) / (p1 + 1);
190 
191  const double v = pow(y, 1.0 / (p1 + 1));
192  const double u = 1.0 - v;
193 
194  if (gRandom->Rndm() < u*u) {
195  return E * v;
196  }
197  }
198  }
199  }
double k2
normalisation constant from breakpoint
Definition: JDIS.hh:251
static constexpr double p0
spectral index upto breakpoint
Definition: JDIS.hh:207
static constexpr double p1
spectral index from breakpoint
Definition: JDIS.hh:208
static constexpr double E0
minimal energy [GeV]
Definition: JDIS.hh:204
T pow(const T &x, const double y)
Power .
Definition: JMath.hh:97
double getA(const double v, const bool option=true) const
Integral upto breakpoint.
Definition: JDIS.hh:218
static constexpr double E1
breakpoint [GeV]
Definition: JDIS.hh:205
double k1
normalisation constant upto breakpoint
Definition: JDIS.hh:250
const double E
actual energy [GeV]
Definition: JDIS.hh:201
double getb(const double v) const
Integral from breakpoint without suppression factor.
Definition: JDIS.hh:245
const double E2
maximal energy [GeV]
Definition: JDIS.hh:202
data_type v[N+1][M+1]
Definition: JPolint.hh:866
double u[N+1]
Definition: JPolint.hh:865
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
double getB(const double v, const bool option=true) const
Integral from breakpoint.
Definition: JDIS.hh:231
double JPHYSICS::JDIS::JDIS_t::getA ( const double  v,
const bool  option = true 
) const
inlineprivate

Integral upto breakpoint.

Parameters
venergy fraction
optionoption (if false, suppress normalisation constant)
Returns
integral

Definition at line 218 of file JDIS.hh.

219  {
220  return (option ? k1 : 1.0) * pow(E, p0) * pow(v, p0 + 1) * (1.0 / (p0 + 1));
221  }
static constexpr double p0
spectral index upto breakpoint
Definition: JDIS.hh:207
T pow(const T &x, const double y)
Power .
Definition: JMath.hh:97
double k1
normalisation constant upto breakpoint
Definition: JDIS.hh:250
const double E
actual energy [GeV]
Definition: JDIS.hh:201
data_type v[N+1][M+1]
Definition: JPolint.hh:866
double JPHYSICS::JDIS::JDIS_t::getB ( const double  v,
const bool  option = true 
) const
inlineprivate

Integral from breakpoint.

Parameters
venergy fraction
optionoption (if false, suppress normalisation constant)
Returns
integral

Definition at line 231 of file JDIS.hh.

232  {
233  return (option ? k1 * k2 : 1.0) * pow(E, p1) * pow(v, p1 + 1) * (1.0 / (p1 + 1) -
234  2*v / (p1 + 2) +
235  v*v / (p1 + 3));
236  }
double k2
normalisation constant from breakpoint
Definition: JDIS.hh:251
static constexpr double p1
spectral index from breakpoint
Definition: JDIS.hh:208
T pow(const T &x, const double y)
Power .
Definition: JMath.hh:97
double k1
normalisation constant upto breakpoint
Definition: JDIS.hh:250
const double E
actual energy [GeV]
Definition: JDIS.hh:201
data_type v[N+1][M+1]
Definition: JPolint.hh:866
double JPHYSICS::JDIS::JDIS_t::getb ( const double  v) const
inlineprivate

Integral from breakpoint without suppression factor.

Parameters
venergy fraction
Returns
integral

Definition at line 245 of file JDIS.hh.

246  {
247  return k1 * k2 * pow(E, p1) * pow(v, p1 + 1) / (p1 + 1);
248  }
double k2
normalisation constant from breakpoint
Definition: JDIS.hh:251
static constexpr double p1
spectral index from breakpoint
Definition: JDIS.hh:208
T pow(const T &x, const double y)
Power .
Definition: JMath.hh:97
double k1
normalisation constant upto breakpoint
Definition: JDIS.hh:250
const double E
actual energy [GeV]
Definition: JDIS.hh:201
data_type v[N+1][M+1]
Definition: JPolint.hh:866

Member Data Documentation

const double JPHYSICS::JDIS::JDIS_t::E

actual energy [GeV]

Definition at line 201 of file JDIS.hh.

const double JPHYSICS::JDIS::JDIS_t::E2

maximal energy [GeV]

Definition at line 202 of file JDIS.hh.

constexpr double JPHYSICS::JDIS::JDIS_t::E0 = 0.144
static

minimal energy [GeV]

Definition at line 204 of file JDIS.hh.

constexpr double JPHYSICS::JDIS::JDIS_t::E1 = 0.35
static

breakpoint [GeV]

Definition at line 205 of file JDIS.hh.

constexpr double JPHYSICS::JDIS::JDIS_t::p0 = 2.0
static

spectral index upto breakpoint

Definition at line 207 of file JDIS.hh.

constexpr double JPHYSICS::JDIS::JDIS_t::p1 = -1.11
static

spectral index from breakpoint

Definition at line 208 of file JDIS.hh.

double JPHYSICS::JDIS::JDIS_t::k1
private

normalisation constant upto breakpoint

Definition at line 250 of file JDIS.hh.

double JPHYSICS::JDIS::JDIS_t::k2
private

normalisation constant from breakpoint

Definition at line 251 of file JDIS.hh.


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