G4RandGauss::shoot(double mean, double stdDev);
//产生高斯分布随机数,等同于CLHEP::RandGaussQ::shoot(double mean, double stdDev);
8.从G4Step中读取有用的信息cnscott的博客
void MySteppingAction::UserSteppingAction(const G4Step* stp)
{
G4Track* theTrack = stp->GetTrack(); //获取G4Track指针
theTrack->GetVolume()->GetName(); //获取当前几何体(PhysicalVolume)名称
G4StepPoint* preStepPoint = stp->GetPreStepPoint();
G4StepPoint* postStepPoint = stp->GetPostStepPoint(); //获取两个StepPoint的指针
if (preStepPoint->GetStepStatus() == fGeomBoundary) //判断是否位于几何体边界std::cout << "Step starts on geometry boundary" << std::endl;
if (postStepPoint->GetStepStatus() == fGeomBoundary) //判断是否位于几何体边界std::cout << "Step ends on geometry boundary" << std::endl
if (theTrack->GetTrackID() == 1) //判断是否是初级粒子(初级粒子Trac