BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
betagamma.cxx File Reference

Go to the source code of this file.

Functions

void bg (int i, double p)
 
void rebg (int i, double bg)
 

Function Documentation

◆ bg()

void bg ( int  i,
double  p 
)

Definition at line 1 of file betagamma.cxx.

1 {
2 double mass = 0;
3 switch(i){
4 case 0:
5 mass = 0.511e-3;
6 cout << "mass " << mass << " betagamma " << p/mass << endl;
7 break;
8 case 1:
9 mass = 105.658e-3;
10 cout << "mass " << mass << " betagamma " << p/mass << endl;
11 break;
12 case 2:
13 mass = 139.570e-3;
14 cout << "mass " << mass << " betagamma " << p/mass << endl;
15 break;
16 case 3:
17 mass = 493.677e-3;
18 cout << "mass " << mass << " betagamma " << p/mass << endl;
19 break;
20 case 4:
21 mass = 938.272e-3;
22 cout << "mass " << mass << " betagamma " << p/mass << endl;
23 break;
24 default:
25 cout << "bg(index, momentum) index:0/1/2/3/4; e/mu/pi/k/p" << endl;
26 }
27}
double mass

Referenced by combineDigits(), combineMdcDigits(), MixerAlg::mixDigi(), rebg(), CalibData::TofSimConstBase::setBarPMTGain(), and TofConst::setBarPMTGain().

◆ rebg()

void rebg ( int  i,
double  bg 
)

Definition at line 30 of file betagamma.cxx.

30 {
31 double mass = 0;
32 switch(i){
33 case 0:
34 mass = 0.511e-3;
35 cout << "mass " << mass << " momentum " << bg*mass << endl;
36 break;
37 case 1:
38 mass = 105.658e-3;
39 cout << "mass " << mass << " momentum " << bg*mass << endl;
40 break;
41 case 2:
42 mass = 139.570e-3;
43 cout << "mass " << mass << " momentum " << bg*mass << endl;
44 break;
45 case 3:
46 mass = 493.677e-3;
47 cout << "mass " << mass << " momentum " << bg*mass << endl;
48 break;
49 case 4:
50 mass = 938.272e-3;
51 cout << "mass " << mass << " momentum " << bg*mass << endl;
52 break;
53 default:
54 cout << "bg(index, betagamma) index:0/1/2/3/4; e/mu/pi/k/p" << endl;
55 }
56}
void bg(int i, double p)
Definition: betagamma.cxx:1