#include <CosmicsGenerator.h>
Definition at line 21 of file CosmicsGenerator.h.
◆ Co3Rng()
Definition at line 23 of file CosmicsGenerator.h.
23 {
24 rng =
new TRandom3(gRandom->GetSeed());
25 fTheta =
new TF1(
"f2",
"cos(x)*cos(x)",0,TMath::Pi()/2);
27 fSpectrumH =
new TF1(
"f4",
"1400*TMath::Power(x,-2.7)*(1/(1+x/115)+0.054/(1+x/850))",100,1000);
28 };
◆ ~Co3Rng()
virtual Co3Rng::~Co3Rng |
( |
| ) |
|
|
inlinevirtual |
◆ fSpectrumL()
double Co3Rng::fSpectrumL |
( |
double |
theta, |
|
|
double |
minE, |
|
|
Bool_t |
generateP = 1 |
|
) |
| |
Definition at line 16 of file CosmicsGenerator.cxx.
16 {
17
18
19
20
21
22
23
24
25
27 double a = -0.8816/10000 /(1/
theta -0.1117/1000 *
theta) - 0.1096 - 0.01966*TMath::Exp(-0.02040*theta);
28 double b = 0.4169/100 /(1/
theta -0.9891/10000 *
theta) + 4.0395 - 4.3118*TMath::Exp(0.9235/1000*theta);
29 double btilde =
b + 1.0/TMath::Ln10();
30 double gamma = sqrt(-TMath::Ln10()*a);
32 double norm = TMath::Erf(gamma*(TMath::Log(100)+offset)) - TMath::Erf(gamma*(offset + TMath::Log(minE)));
33
34 if (generateP){
35 double r3 =
rng->Uniform();
36 return exp(TMath::ErfInverse(r3*norm+TMath::Erf(gamma*(offset + TMath::Log(minE))))/gamma-offset);
37 }
38 else{
39 double c = -0.3516/1000 *
theta*
theta + 0.8861/100 *
theta - 2.5985 -0.8745/100000*TMath::Exp(0.1457*theta);
40 double scale = 0.5*TMath::Sqrt(TMath::Pi())/
gamma * TMath::Power(10,(-0.25/a*btilde*btilde + c));
42 }
43}
◆ Uniform()
double Co3Rng::Uniform |
( |
Float_t |
min, |
|
|
Float_t |
max |
|
) |
| |
|
inline |
◆ fSpectrumH
◆ fTheta
◆ rng
The documentation for this class was generated from the following files: