Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
double getP (const double v) const
 Get probability of given energy fraction.
 
double getE () const
 Get shower energy.
 

Public Attributes

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

Static Public Attributes

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

Private Member Functions

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

Private Attributes

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

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

◆ JDIS_t()

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 }
const double E2
maximal energy [GeV]
Definition JDIS.hh:202
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
static constexpr double p1
spectral index from breakpoint
Definition JDIS.hh:208
double getB(const double v, const bool option=true) const
Integral from breakpoint.
Definition JDIS.hh:231
static constexpr double p0
spectral index upto breakpoint
Definition JDIS.hh:207
static constexpr double E0
minimal energy [GeV]
Definition JDIS.hh:204
const double E
actual energy [GeV]
Definition JDIS.hh:201
double k1
normalisation constant upto breakpoint
Definition JDIS.hh:250
double k2
normalisation constant from breakpoint
Definition JDIS.hh:251
T pow(const T &x, const double y)
Power .
Definition JMath.hh:97

Member Function Documentation

◆ getP()

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 }

◆ getE()

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 getb(const double v) const
Integral from breakpoint without suppression factor.
Definition JDIS.hh:245

◆ getA()

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 }

◆ getB()

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 }

◆ getb()

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 }

Member Data Documentation

◆ E

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

actual energy [GeV]

Definition at line 201 of file JDIS.hh.

◆ E2

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

maximal energy [GeV]

Definition at line 202 of file JDIS.hh.

◆ E0

double JPHYSICS::JDIS::JDIS_t::E0 = 0.144
staticconstexpr

minimal energy [GeV]

Definition at line 204 of file JDIS.hh.

◆ E1

double JPHYSICS::JDIS::JDIS_t::E1 = 0.35
staticconstexpr

breakpoint [GeV]

Definition at line 205 of file JDIS.hh.

◆ p0

double JPHYSICS::JDIS::JDIS_t::p0 = 2.0
staticconstexpr

spectral index upto breakpoint

Definition at line 207 of file JDIS.hh.

◆ p1

double JPHYSICS::JDIS::JDIS_t::p1 = -1.11
staticconstexpr

spectral index from breakpoint

Definition at line 208 of file JDIS.hh.

◆ k1

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

normalisation constant upto breakpoint

Definition at line 250 of file JDIS.hh.

◆ k2

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: