#include <cmath>
#include "RecoTracker/RoadSearchHelixMaker/interface/Dcxprobab.hh"
Go to the source code of this file.
float Dcxprobab |
( |
int & |
ndof, |
|
|
float & |
chisq |
|
) |
| |
Definition at line 6 of file Dcxprobab.cc.
References create_public_lumi_plots::exp, i, m, M_PI, mathSSE::sqrt(), and groupFilesInBlocks::temp.
9 static float srtopi=2.0/
sqrt(2.0*
M_PI);
10 static float upl=100.0;
13 if(ndof<=0) {
return prob;}
14 if(chisq<0.0) {
return prob;}
17 if(chisq>upl) {
return prob;}
18 float sum=
exp(-0.5*chisq);
24 for(
int i=2;
i<=
m;
i++){
25 term=0.5*term*chisq/(
i-1);
33 float srty=
sqrt(chisq);
34 float temp=srty/M_SQRT2;
36 if(ndof==1) {
return prob;}
37 if(ndof==3) {
return (srtopi*srty*sum+prob);}
39 for(
int i=1;
i<=
m;
i++){
40 term=term*chisq/(2*
i+1);
43 return (srtopi*srty*sum+prob);
49 float srty=
sqrt(chisq)-
sqrt(ndof-0.5);
50 if(srty<12.0) {prob=0.5*erfc(srty);};