VERB_code_2.3
en2pc.m
1 function pc = en2pc(energy)
2  %%
3  % EN2PC calculates p*c (MeV) from energy (MeV)
4  %
5  % pc = pfunc(energy)
6  %
7  % Input:
8  % energy in MeV
9  %
10  % Output:
11  % pc = p*c in MeV
12  %
13  % see also: Various_functions
14 
15  % Author: Yuri Shprits
16  % Last change: 20014-01-01 by Dmitriy Subbotin
17  % Email: subbotin@ucla.edu
18  % The work was supported by:
19  % LANL grant 12-LR-235337, PI Yuri Shprits
20  % NASA grant NNX09AF51G, PI Yuri Shprits
21 
22  mc2 = 0.511;
23  pc = sqrt( (energy ./ mc2 + 1).^2 - 1) .* mc2;
24 
25 end
functions for write log and support files. Functions are defined in Output.h and descripted in Output...
Definition: Output.cpp:15
double pfunc(double K)
Computation of moumentum from Kinetic energy .