GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — cparamlib/cparamlib/sigma.c at master · niklask/cparamlib

Expand file tree

/

sigma.c

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
676 lines (584 loc) · 20.6 KB
/

sigma.c

Copy path

File metadata and controls

676 lines (584 loc) · 20.6 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
/*
* $Source: /home/nkarlsson/usr/cvsroot/cparamlib/cparamlib/sigma.c,v $
* $Author: niklas $ $Date: 2008/01/16 18:35:27 $ $Revision: 1.12 $
*
* Change log:
*
* 2006-10-11:
* On request we have added functions for calculating sigma_pp for the for
* components as given in the paper. We also changed sigma to sigma_incl.
*
* 2007-05-01:
* Functionality to calculate pT distributions added.
*
* 2007-05-22:
* Changed all functions to take a pointer to a struct containing parameters
* rather than taking pointers to double arrays.
*
* 2007-12-14:
* Modified for documentation generation with doxygen.
*
* 2007-12-20:
* Modified to reflect change of PARAMSET_PT definition.
*
*/
/**
* @file sigma.c
*
* @brief Main part of cparamlib; functions to calculate of differential
* cross sections.
*
* File provides functions for the calculation of inclusive cross sections for
* stable secondary particles (gamma rays, electrons, positrons, electron
* neutrinos, electron antineutrinos, muon neutrinos and muon antineturinos)
* and transverse momentum distributions for gamma rays, as described in
* <a href="http://www.arxiv.org/abs/astro-ph/0605581">Kamae et al. (2006)</a>
* and
* <a href="http://www.arxiv.org/abs/0709.0233">Karlsson and Kamae (2008)</a>.
* It also provides functions for the calculation of the inelastic
* proton-proton cross section given in
* <a href="http://www.arxiv.org/abs/astro-ph/0605581">Kamae et al. (2006)</a>.
*
*/
#include <stdio.h>
#include <math.h>
#include "cparamlib.h"
/*
* Coefficients for the kinematic cutoff functions as given in Table 2 of
* Kamae et al. (2006)
*
*/
double L_MAX[7] = {0.96, 0.96, 0.94, 0.98, 0.98, 0.94, 0.98};
double W_NDL[7] = {15.0, 20.0, 15.0, 15.0, 15.0, 20.0, 15.0};
double W_NDH[7] = {44.0, 45.0, 47.0, 42.0, 40.0, 45.0, 40.0};
/**
* Calculates the inclusive cross section for the non-diffractive interaction
* (equation 6 of Kamae et al. 2006). The inclusive cross section is defined as
* dsigma/dlog(E) and returned in the units of mb.
*
* @param particle Secondary particle id number (see cparamlib.h).
* @param E Secondary particle energy in GeV.
* @param Tp Proton kinetic energy in GeV.
* @param params Pointer to a ::PARAMSET struct. The struct should be
* initialized before being passed to this function.
* @return Inclusive cross section dsigma/dlogE in mb.
*
*/
double sigma_incl_nd(int particle, double E, double Tp, PARAMSET* params)
{
double Wl, Wh, Lmin, Lmax;
double x, y;
double xa3, xa8;
double pow1, pow2;
double sigma;
double cutoff, r_factor;
/* check whether params is a null pointer or not */
if (params == NULL)
return 0;
/* calculate log(E) and log(Tp) */
x = log10(E);
y = log10(Tp*0.001);
/* init some variables, given in table 2 */
Lmin = -2.6;
Lmax = L_MAX[particle]*(y + 3.0);
Wl = W_NDL[particle];
Wh = W_NDH[particle];
/* calculate the flux due to non-diffractive process for given gamma-ray energy */
/* 06/12/06: replaced code involving pow() */
xa3 = x - params->a[3];
pow1 = xa3*(1 + params->a[2]*xa3);
xa8 = x - params->a[8];
pow2 = xa8*(1 + xa8*(params->a[6] + params->a[7]*xa8));
sigma = params->a[0]*exp(-params->a[1]*pow1*pow1) + params->a[4]*exp(-params->a[5]*pow2*pow2);
/* cutoff is the kinematic limit function as in the paper */
cutoff = (1/(1 + exp(Wl*(Lmin - x))))*(1/(1 + exp(Wh*(x - Lmax))));
sigma = sigma*cutoff;
if (sigma < 0)
sigma = 0;
/* renormalization
this is different for each particle, thus we must use if statements
*/
r_factor = 1;
switch (particle) {
/* gamma */
case ID_GAMMA:
if (Tp <= 1.95) {
pow1 = (y + 3.25)/(1 + 8.08*(y + 3.25));
r_factor = 3.05*exp(-107.0*pow1*pow1);
} else
r_factor = 1.01;
break;
/* electron */
case ID_ELECTRON:
if (Tp <= 15.6) {
pow1 = (y + 3.26)/(1 + 9.21*(y + 3.26));
r_factor = 3.63*exp(-106*pow1*pow1) + y*(-0.182 - 0.175*y);
} else
r_factor = 1.01;
break;
/* positron */
case ID_POSITRON:
if (Tp <= 5.52) {
pow1 = (y + 3.25)/(1 + 10.4*(y + 3.25));
r_factor = 2.22*exp(-98.9*pow1*pow1);
}
break;
/* electron neutrino */
case ID_NUE:
if (Tp <= 7.81) {
pow1 = (y + 3.26)/(1 + 6.56*(y + 3.26));
r_factor = 0.329*exp(-247*pow1*pow1) + y*(-0.959 - 0.229*y);
}
break;
/* muon neutrino */
case ID_NUMU:
if (Tp <= 15.6) {
pow1 = (y + 3.25)/(1 + 8.38*(y + 3.25));
r_factor = 2.23*exp(-93.4*pow1*pow1) + y*(-0.376 - 0.121*y);
}
break;
/* electron antineutrino */
case ID_ANTINUE:
if (Tp <= 15.6) {
pow1 = (y + 3.27)/(1 + 6.59*(y + 3.27));
r_factor = 2.67*exp(-45.7*pow1*pow1) + y*(-0.301 - 0.208*y);
}
break;
/* muon antineutrino */
case ID_ANTINUMU:
if (Tp <= 15.6) {
pow1 = (y + 3.25)/(1 + 8.34*(y + 3.25));
r_factor = 2.56*exp(-107*pow1*pow1) + y*(-0.385 - 0.125*y);
}
break;
}
sigma = sigma*r_factor;
return sigma;
}
/**
* Calculates the inclusive cross section for the diffraction dissociation
* process (equation 9 of Kamae et al. 2006). The inclusive cross section is
* defined as dsigma/dlog(E) and is returned in units of mb.
*
* @param particle Secondary particle id number (see cparamlib.h).
* @param E Secondary particle energy in GeV.
* @param Tp Proton kinetic energy in GeV.
* @param params Pointer to a ::PARAMSET struct. The struct should be
* initialized before being passed to this function.
* @return Inclusive cross section dsigma/dlogE in mb.
*
*/
double sigma_incl_diff(int particle, double E, double Tp, PARAMSET* params)
{
double Wdiff, Lmax;
double x, y;
double pow1, pow2;
double sigma;
double cutoff;
/* check whether params is a null pointer or not */
if (params == NULL)
return 0;
/* calculate log(E) and log(Tp) */
x = log10(E);
y = log10(Tp*0.001);
/* init some variables */
Lmax = y + 3.0;
Wdiff = 75.0;
/* calculate the sigma due to diffractive process for given gamma-ray energy */
/* 06/12/06: replaced code involving pow() */
pow1 = (x - params->b[2])/(1 + params->b[3]*(x - params->b[2]));
pow2 = (x - params->b[6])/(1 + params->b[7]*(x - params->b[6]));
sigma = params->b[0]*exp(-params->b[1]*pow1*pow1) + params->b[4]*exp(-params->b[5]*pow2*pow2);
/* cutoff is the kinematic limit function as in the paper */
cutoff = 1/(1 + exp(Wdiff*(x - Lmax)));
sigma = sigma*cutoff;
if (sigma < 0)
sigma = 0;
return sigma;
}
/**
* Calculates the inclusive cross section for the Delta(1232) resonance
* (equation 12 of Kamae et al. 2006). The inclusive cross section is defined as
* dsigma/dlog(E) and is returned in units of mb.
*
* @param particle Secondary particle id number (see cparamlib.h)
* @param E Secondary particle energy in GeV
* @param Tp Proton kinetic energy in GeV
* @param params Pointer to a ::PARAMSET struct. The struct should be
* initialized before being passed to this function.
* @return Inclusive cross section dsigma/dlogE in mb
*
*/
double sigma_incl_delta(int particle, double E, double Tp, PARAMSET* params)
{
double Wdiff, Lmax;
double x, y;
double xc2;
double pow;
double sigma;
double cutoff;
/* check whether params is a null pointer or not */
if (params == NULL)
return 0;
/* calculate log(E) and log(Tp) */
x = log10(E);
y = log10(Tp*0.001);
/* init some variables */
Lmax = y + 3.0;
Wdiff = 75.0;
/* calculate the sigma due to resonance process for given gamma-ray energy */
/* 06/12/06: replaced code involving pow() */
xc2 = x - params->c[2];
pow = xc2/(1 + xc2*(params->c[3] + params->c[4]*xc2));
sigma = params->c[0]*exp(-params->c[1]*pow*pow);
/* cutoff is the kinematic limit function as in the paper */
cutoff = 1/(1 + exp(Wdiff*(x - Lmax)));
sigma = sigma*cutoff;
if (sigma < 0)
sigma = 0;
return sigma;
}
/**
* Calculates the inclusive cross section for the res(1600) resonance
* (equation 12 of Kamae et al. 2006). The inclusive cross section is defined as
* dsigma/dlog(E) and is returned in units of mb.
*
* @param particle Secondary particle id number (see cparamlib.h).
* @param E Secondary particle energy in GeV.
* @param Tp Proton kinetic energy in GeV.
* @param params Pointer to a ::PARAMSET struct. The struct should be
* initialized before being passed to this function.
* @return Inclusive cross section dsigma/dlogE in mb.
*
*/
double sigma_incl_res(int particle, double E, double Tp, PARAMSET* params)
{
double Wdiff, Lmax;
double x, y;
double xd2;
double pow;
double sigma;
double cutoff;
/* check whether params is a null pointer or not */
if (params == NULL)
return 0;
/* calculate log(E) and log(Tp) */
x = log10(E);
y = log10(Tp*0.001);
/* init some variables */
Lmax = y + 3.0;
Wdiff = 75.0;
/* calculate the sigma due to resonance process for given gamma-ray energy */
/* 06/12/06: replaced code involving pow() */
xd2 = x - params->d[2];
pow = xd2/(1 + xd2*(params->d[3] + params->d[4]*xd2));
sigma = params->d[0]*exp(-params->d[1]*pow*pow);
/* cutoff is the kinematic limit function as in the paper */
cutoff = 1/(1 + exp(Wdiff*(x - Lmax)));
sigma = sigma*cutoff;
if (sigma < 0)
sigma = 0;
return sigma;
}
/**
* Calculates the total inclusive cross section, i.e. the sum of all components
* (non-diffractive interaction, diffraction dissociation, Delta(1232) and
* res(1600) resonances). The inclusive cross section is defined as
* dsigma/dlog(E) and is returned in units of mb.
*
* @param particle Secondary particle id number (see cparamlib.h).
* @param E Secondary particle energy in GeV.
* @param Tp Proton kinetic energy in GeV.
* @param params Pointer to a ::PARAMSET struct. The struct should be
* initialized before being passed to this function.
* @return Inclusive cross section dsigma/dlogE in mb.
*
*/
double sigma_incl_tot(int particle, double E, double Tp, PARAMSET* params)
{
double s_tot;
double s_nd, s_diff, s_delta, s_res;
/* check whether params is a null pointer or not */
if (params == NULL)
return 0;
s_tot = s_nd = s_diff = s_delta = s_res = 0;
/* calculate sigmas */
s_nd = sigma_incl_nd(particle, E, Tp, params);
s_diff = sigma_incl_diff(particle, E, Tp, params);
s_delta = sigma_incl_delta(particle, E, Tp, params);
s_res = sigma_incl_res(particle, E, Tp, params);
s_tot = s_nd + s_diff + s_delta + s_res;
return s_tot;
}
/**
* Calculates the pT distribution for non-resonance (non-diffractive plus
* diffraction dissociation). The pT distribution is defined as the differential
* cross section d^2sigma/dlog(E)dpT and is returned in units of mb/(GeV/c).
*
* @param particle Secondary particle id number (see cparamlib.h).
* @param pT Secondary particle transverse momentum in GeV/c.
* @param E Secondary particle energy in GeV.
* @param Tp Proton kinetic energy in GeV.
* @param pt_params Pointer to a ::PARAMSET_PT struct. The struct should be
* initialized before being passed to this function.
* @return Inclusive cross section d^2sigma/dlog(E)dpT in mb/(GeV/c).
*
*/
double sigma_pt_nr(int particle, double pT, double E, double Tp, PARAMSET_PT* pt_params)
{
double x;
double x1, Lp, W;
double sigma;
double cutoff;
/* check whether params is a null pointer or not */
if (pt_params == NULL)
return 0;
sigma = 0;
W = 75.0;
Lp = 0;
x = log10(E);
if (particle == ID_GAMMA) {
sigma = pt_params->a[0]*pT*exp(-pT/pt_params->a[1]);
/* cutoff is the kinematic limit function as in the paper */
if (x > 0.5) {
Lp = 2.5;
} else if (x > -1.0) {
x1 = x + 1.0;
Lp = -0.793 + exp(0.271*x1 + 0.363*x1*x1);
} else {
Lp = 0.09755 + 0.670*exp(1.81*x);
}
cutoff = 1/(1 + exp(W*(pT - Lp)));
sigma = sigma*cutoff;
if (sigma < 0)
sigma = 0;
}
return sigma;
}
/**
* Calculates the pT distribution for the Delta(1232) resonance. The pT
* distribution is defined as the differential cross section d^2sigma/dlog(E)dpT
* and is returned in units of mb/(GeV/c).
*
* @param particle Secondary particle id number (see cparamlib.h).
* @param pT Secondary particle transverse momentum in GeV/c.
* @param E Secondary particle energy in GeV.
* @param Tp Proton kinetic energy in GeV.
* @param pt_params Pointer to a ::PARAMSET_PT struct. The struct should be
* initialized before being passed to this function.
* @return Inclusive cross section d^2sigma/dlog(E)dpT in mb/(GeV/c).
*
*/
double sigma_pt_delta(int particle, double pT, double E, double Tp, PARAMSET_PT* pt_params)
{
double x;
double pow;
double x1, Lp, W;
double sigma;
double cutoff;
/* check whether params is a null pointer or not */
if (pt_params == NULL)
return 0;
sigma = 0;
W = 75.0;
Lp = 0;
x = log10(E);
if (particle == ID_GAMMA) {
pow = pT - pt_params->b[0][1];
sigma = pt_params->b[0][0]*pT*exp(-pow*pow/pt_params->b[0][2]);
/* cutoff is the kinematic limit function as in the paper */
if (x > 0.5) {
Lp = 2.5;
} else if (x > -1.0) {
x1 = x + 1.0;
Lp = -0.793 + exp(0.271*x1 + 0.363*x1*x1);
} else {
Lp = 0.09755 + 0.670*exp(1.81*x);
}
cutoff = 1/(1 + exp(W*(pT - Lp)));
sigma = sigma*cutoff;
if (sigma < 0)
sigma = 0;
}
return sigma;
}
/**
* Calculates the pT distribution for the res(1600) resonance. The pT
* distribution is defined as the differential cross section d^2sigma/dlog(E)dpT
* and is returned in units of mb/(GeV/c).
*
* @param particle Secondary particle id number (see cparamlib.h).
* @param pT Secondary particle transverse momentum in GeV/c.
* @param E Secondary particle energy in GeV.
* @param Tp Proton kinetic energy in GeV.
* @param pt_params Pointer to a ::PARAMSET_PT struct. The struct should be
* initialized before being passed to this function.
* @return Inclusive cross section d^2sigma/dlog(E)dpT in mb/(GeV/c).
*
*/
double sigma_pt_res(int particle, double pT, double E, double Tp, PARAMSET_PT* pt_params)
{
double x;
double pow;
double x1, Lp, W;
double sigma;
double cutoff;
/* check whether params is a null pointer or not */
if (pt_params == NULL)
return 0;
sigma = 0;
W = 75.0;
Lp = 0;
x = log10(E);
if (particle == ID_GAMMA) {
pow = pT - pt_params->c[0][1];
sigma = pt_params->c[0][0]*pT*exp(-pow*pow/pt_params->c[0][2]);
/* cutoff is the kinematic limit function as in the paper */
if (x > 0.5) {
Lp = 2.5;
} else if (x > -1.0) {
x1 = x + 1.0;
Lp = -0.793 + exp(0.271*x1 + 0.363*x1*x1);
} else {
Lp = 0.09755 + 0.670*exp(1.81*x);
}
cutoff = 1/(1 + exp(W*(pT - Lp)));
sigma = sigma*cutoff;
if (sigma < 0)
sigma = 0;
}
return sigma;
}
/**
* Calculates the total pT distribution, i.e. sum of all components,
* non-resonance, Delta(1232) and res(1600) resonances. The pT distribution is
* defined as the differential cross section d^2sigma/dlog(E)dpT and is
* returned in units of mb/(GeV/c).
*
* @param particle Secondary particle id number (see cparamlib.h).
* @param pT Secondary particle transverse momentum in GeV/c.
* @param E Secondary particle energy in GeV.
* @param Tp Proton kinetic energy in GeV.
* @param pt_params Pointer to a ::PARAMSET_PT struct. The struct should be
* initialized before being passed to this function.
* @return Inclusive cross section d^2sigma/dlog(E)dpT in mb/(GeV/c).
*
*/
double sigma_pt_tot(int particle, double pT, double E, double Tp, PARAMSET_PT* pt_params)
{
double s_tot;
double s_nr, s_delta, s_res;
/* check whether params is a null pointer or not */
if (pt_params == NULL)
return 0;
s_tot = s_nr = s_delta = s_res = 0;
/* calculate sigmas */
s_nr = sigma_pt_nr(particle, pT, E, Tp, pt_params);
s_delta = sigma_pt_delta(particle, pT, E, Tp, pt_params);
s_res = sigma_pt_res(particle, pT, E, Tp, pt_params);
s_tot = s_nr + s_delta + s_res;
return s_tot;
}
/**
* Calculates the inelastic proton-proton cross section for the non-diffractive
* interaction component, as given by equation 3 in Kamae et al. (2006). The
* cross section sigma(pp) is returned in units of mb.
*
* @param Pp Proton momentum in GeV/c.
* @return Inelastic cross section sigma(pp) in mb.
*
*/
double sigma_pp_nd(double Pp)
{
double a[9] = {0.57, 0.1176, 0.3829, 23.10, 6.454, -5.764, -23.63, 94.75, 0.02667};
double b[2] = {11.34, 23.72};
double c[3] = {28.5, -6.133, 1.464};
double x, sigma;
x = log10(Pp);
sigma = 0;
if ((Pp >= 1) && (Pp < 1.3)) {
sigma = a[0]*pow(x/a[1], 1.2)*(a[3] + x*x*(a[4] + a[5]*x) + a[6]*exp(-a[7]*(x + a[8])*(x + a[8])));
} else if ((Pp >= 1.3) && (Pp < 2.4)) {
sigma = (b[0]*abs(a[2] - x) + b[1]*abs(a[1] - x))/(a[2] - a[1]);
} else if ((Pp >= 2.4) && (Pp <= 10.0)) {
sigma = a[3] + x*x*(a[4] + a[5]*x) + a[6]*exp(-a[7]*(x + a[8])*(x + a[8]));
} else if (Pp > 10.0) {
sigma = c[0] + c[1]*x + c[2]*x*x;
}
return sigma;
}
/**
* Calculates the inelastic proton-proton cross section for the diffraction
* dissociation component, as given by equation 3 in Kamae et al. (2006). The
* cross section sigma(pp) is returned in units of mb.
*
* @param Pp Proton momentum in GeV/c.
* @return Inelastic cross section sigma(pp) in mb.
*
*/
double sigma_pp_diff(double Pp)
{
double d[7] = {0.3522, 0.1530, 1.498, 2.0, 30.0, 3.155, 1.042};
double e[2] = {5.922, 1.632};
double x, sigma;
x = log10(Pp);
sigma = 0;
if ((Pp >= 2.25) && (Pp < 3.2)) {
sigma = sqrt((x-d[0])/d[1])*(d[2] + d[3]*log10(d[4]*(x - 0.25)) + x*x*(d[5] - d[6]*x));
} else if ((Pp >= 3.2) && (Pp <= 100.0)) {
sigma = d[2] + d[3]*log10(d[4]*(x - 0.25)) + x*x*(d[5] - d[6]*x);
} else if (Pp > 100.0) {
sigma = e[0] + e[1]*x;
}
return sigma;
}
/**
* Calculates the inelastic proton-proton cross section for the Delta(1232)
* component, as given by equation 3 in Kamae et al. (2006). The cross section
* sigma(pp) is returned in units of mb.
*
* @param Pp Proton momentum in GeV/c.
* @return Inelastic cross section sigma(pp) in mb.
*
*/
double sigma_pp_delta(double Pp)
{
double f[5] = {0.0834, 9.5, -5.5, 1.68, 3134.0};
double Ep, sigma;
/* proton mass 0.938 GeV/c^2 gives mass squared 0.879844 (GeV/c^2)^2 */
Ep = sqrt(Pp*Pp + 0.879844);
sigma = 0;
if ((Ep >= 1.4) && (Ep < 1.6)) {
sigma = f[0]*pow(Ep, 10);
} else if ((Ep >= 1.6) && (Ep < 1.8)) {
sigma = f[1]*exp(-f[2]*(Ep - f[3])*(Ep - f[3]));
} else if ((Ep >= 1.8) && (Ep <= 10.0)) {
sigma = f[4]*pow(Ep, -10);
}
return sigma;
}
/**
* Calculates the inelastic proton-proton cross section for the res(1600)
* component, as given by equation 4 in Kamae et al. (2006). The cross section
* sigma(pp) is returned in units of mb.
*
* @param Pp Proton momentum in GeV/c.
* @return Inelastic cross section sigma(pp) in mb.
*
*/
double sigma_pp_res(double Pp)
{
double g[5] = {0.0004257, 4.5, -7.0, 2.1, 503.5};
double Ep, sigma;
/* proton mass 0.938 GeV/c^2 gives mass squared 0.879844 (GeV/c^2)^2 */
Ep = sqrt(Pp*Pp + 0.879844);
sigma = 0;
if ((Ep >= 1.6) && (Ep < 1.9)) {
sigma = g[0]*pow(Ep, 14);
} else if ((Ep >= 1.9) && (Ep < 2.3)) {
sigma = g[1]*exp(-g[2]*(Ep - g[3])*(Ep - g[3]));
} else if ((Ep >= 2.3) && (Ep <= 20.0)) {
sigma = g[4]*pow(Ep, -6);
}
return sigma;
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.