本文整理汇总了C++中Process::GetMin方法的典型用法代码示例。如果您正苦于以下问题:C++ Process::GetMin方法的具体用法?C++ Process::GetMin怎么用?C++ Process::GetMin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Process
的用法示例。
在下文中一共展示了Process::GetMin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ExtractPhotonEnergyMC
double Propagation::ExtractPhotonEnergyMC(double z, Process &proc) const {
double esoft = 0;
//double snew = 0;
double emin = proc.GetMin();
Particle pi = proc.GetIncidentParticle();
Particle pb = proc.GetTargetParticle();
double Epi = pi.GetEnergy();
double m = pi.GetMass();
esoft = ShootPhotonEnergyMC(emin / (4.0 * Epi), z);
//snew = 4 * Epi * esoft + m * m;
pb.SetEnergy(esoft);
proc.SetTargetParticle(pb);
proc.SetCMEnergy();
return esoft;
}
示例2: if
std::vector<double> Propagation::GetEtarget(Process &proc,
const Particle &particle) const {
std::vector<double> Etarget;
double Etarget_tmp = 0;
double smintmp = 0;
double z_curr = particle.Getz();
double Energy = particle.GetEnergy();
int pType = particle.GetType();
double Eexp = smintmp/(4.0 * Energy);
if (pType == 22) {
proc.SetName(Process::PP);
proc.SetLimits();
smintmp = proc.GetMin();
Eexp = std::max(proc.feps_inf,ElectronMass*ElectronMass/Energy);
if (Eexp > proc.feps_sup) {
// std::cout << proc.GetName() << " " << Eexp << " too big wrt " << proc.feps_sup << " , " << proc.feps_inf << " .. it should not interact!" << std::endl;
Eexp = 0;
Etarget.push_back(0);}
else
Etarget_tmp = ShootPhotonEnergyMC(Eexp, z_curr);
Etarget.push_back(Etarget_tmp);
proc.SetName(Process::DPP);
proc.SetLimits();
smintmp = proc.GetMin();
Eexp = std::max(proc.feps_inf,2*ElectronMass*ElectronMass/Energy);
if (Eexp > proc.feps_sup) {
// std::cout << proc.GetName() << " " << Eexp << " too big wrt " << proc.feps_sup << " , " << proc.feps_inf << " .. it should not interact!" << std::endl;
Eexp = 0;
Etarget.push_back(0);}
else
Etarget_tmp = ShootPhotonEnergyMC(Eexp, z_curr);
Etarget.push_back(Etarget_tmp);
}
else if (abs(pType) == 11) {
proc.SetName(Process::ICS);
proc.SetLimits();
smintmp = proc.GetMin();
Eexp = proc.feps_inf;
Etarget_tmp = ShootPhotonEnergyMC(Eexp, z_curr);
Etarget.push_back(Etarget_tmp);
proc.SetName(Process::TPP);
proc.SetLimits();
smintmp = proc.GetMin();
Eexp = std::max(proc.feps_inf,2*ElectronMass*ElectronMass/Energy);
if (Eexp > proc.feps_sup) {
// std::cout << proc.GetName() << " " << Eexp << " too big wrt " << proc.feps_sup << " , " << proc.feps_inf << " .. it should not interact!" << std::endl;
Eexp = 0;
Etarget.push_back(0);}
else
Etarget_tmp = ShootPhotonEnergyMC(Eexp, z_curr);
Etarget.push_back(Etarget_tmp);
} //end e/e
else
std::cerr << "something wrong in particle type ( " << pType
<< ". Propagation of photons and e+/e- is the only allowed.)"
<< std::endl;
if (Etarget.size() != 2) {
std::cout << "something wrong with the Etarget!! " << std::endl;
exit(0);
}
return Etarget;
}