TPCCLIB
Toggle main menu visibility
Loading...
Searching...
No Matches
libtpcidi
heartcorr.c
Go to the documentation of this file.
1
6
/*****************************************************************************/
7
#include "
libtpcidi.h
"
8
/*****************************************************************************/
9
10
/*****************************************************************************/
12
15
int
heartcorr(
17
int
verbose
18
) {
19
if
(verbose>0) printf(
"heartcorr()\n"
);
20
21
return
(0);
22
}
24
/*****************************************************************************/
25
26
/*****************************************************************************/
37
int
heartRecoverySpilloverCorrectionFactors
(
39
double
R,
41
double
d,
43
double
s,
45
double
Vb,
47
double
*FMM,
49
double
*FMB,
51
double
*FBM,
53
double
*FBB
54
) {
55
double
hp;
56
57
if
(R<=0.0 || d<=0.0 || s<=0.0)
return
(1);
58
if
(FMM==NULL || FMB==NULL || FBM==NULL || FBB==NULL)
return
(2);
59
if
(Vb<0.0 || Vb>=1.0)
return
(3);
60
hp = exp(-R*R/(2.0*s*s));
61
*FMB = hp - exp(-(R+d)*(R+d)/(2.0*s*s));
62
*FMM = erf( (d/2.0) / (M_SQRT2*s) );
63
*FBB = 1.0 - hp;
64
*FBM = Vb + 0.5*(1.0 - *FMM);
//0.6 - 0.5 * *FMM;
65
return
(0);
66
}
67
/*****************************************************************************/
68
69
/*****************************************************************************/
heartRecoverySpilloverCorrectionFactors
int heartRecoverySpilloverCorrectionFactors(double R, double d, double s, double Vb, double *FMM, double *FMB, double *FBM, double *FBB)
Definition
heartcorr.c:37
libtpcidi.h
Header file for libtpcidi.
Generated on
for TPCCLIB by
1.17.0