CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
calg.cxx
Go to the documentation of this file.
1// This is "translation" of "subroutine calg" from sub.f file to C++
2//
3// The function gausin(x) from CERNLIB replaced with
4// M_SQRT2*TMath::ErfInverse(2*x-1) from ROOT
5// (see http://en.wikipedia.org/wiki/Probit_function)
6
7/*
8 subroutine calg(Px,e2)
9c real*8 Px,chi
10c Px=0.5
11c external sub
12 real*8 e2
13 external sub
14c chi = 0.0
15 REAL Px
16c print*, "the value of Px is ",Px
17 e2=gausin(Px)
18c print*, "the value of chi is ",e2
19c calg=chi
20c Px=0.1
21c print*, "the value of chi is ",e2
22c RETURN
23 end
24*/
25
26#include <iostream>
27#include <TMath.h>
28
29using namespace std;
30
31void CALG(double Px, double& e2)
32{
33 // cout << "the value of Px is " << Px << endl;
34 e2 = M_SQRT2*TMath::ErfInverse(2*Px-1);
35 // cout << "the value of chi is " << e2 << endl;
36}
double Px(RecMdcKalTrack *trk)
Double_t e2
void CALG(double Px, double &e2)
Definition: calg.cxx:31