当前位置: 首页>>代码示例>>C++>>正文


C++ Analysis::FillSNSneutronFlux方法代码示例

本文整理汇总了C++中Analysis::FillSNSneutronFlux方法的典型用法代码示例。如果您正苦于以下问题:C++ Analysis::FillSNSneutronFlux方法的具体用法?C++ Analysis::FillSNSneutronFlux怎么用?C++ Analysis::FillSNSneutronFlux使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Analysis的用法示例。


在下文中一共展示了Analysis::FillSNSneutronFlux方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: UserSteppingAction


//.........这里部分代码省略.........
			G4double postZ = step->GetPostStepPoint()->GetPosition().z();
			G4double weight = track->GetWeight() ;//step->GetPreStepPoint()->GetWeight();
			G4double eDep =0;
			
            if(partName == "neutron")// && step->GetPostStepPoint()->GetStepStatus()==fGeomBoundary ) 
            {//fGeomBoundary =1, from G4StepStatus.hh.  use poststep, not pre

                if(postVol=="SNSDetectorCsI" && preVol != "SNSDetectorCsI" ) volumeID = 1;
                else if( postVol == "DetLeadShield" &&  !(preVol == "SNSDetectorCsI" 
                        || preVol == "DetLeadShield"))  volumeID = 2;
                else if( postVol == "DetPolyShield"&&  !(preVol == "SNSDetectorCsI" 
                        || preVol == "DetPolyShield" || preVol == "DetLeadShield"))volumeID = 3;
                //else if( postVol == "DetWaterShield"&&  !(preVol == "SNSDetectorCsI" 
                //   || preVol == "DetLeadShield" ||preVol == "DetPolyShield" ))volumeID = 4;    
                //else if( preVol == "MonolithSteelCyl")volumeID = 5;//NOTE
                //xx = (aTrack->GetVertexPosition()).x();
                //yy = (aTrack->GetVertexPosition()).y();
                //zz = (aTrack->GetVertexPosition()).z();
				
				G4double preX = step->GetPreStepPoint()->GetPosition().x();
				G4double preY = step->GetPreStepPoint()->GetPosition().y();				
				G4double preZ = step->GetPreStepPoint()->GetPosition().z();
				//pass without interaction
                if(step->GetPostStepPoint()->GetStepStatus()==fGeomBoundary &&  
                    preVol == "DetLeadShield" && postVol == "DetLeadShield")
                {   
                    volumeID = 1;
                    G4cout  << " Passed vol1 ...... " << G4endl;
                }

                if(track->GetNextVolume() == 0) volumeID = 0;

                if(volumeID > -1)
					man->FillSNSneutronFlux(volumeID, preKE/MeV , trackKE/MeV, pdgCode, weight, xx/m,  
                    yy/m, zz/m, evtid, trackid, parentID, stepNum, time/microsecond); 
                

				if(verbDetCsIInfo && volumeID > -1)
				{
                    G4cout  << " NFLUX "
					<< std::setprecision(3) << preKE/MeV 
					<< " preKE(mev):postKE " << std::setprecision(3) << trackKE/MeV    
                    << " " << partName << " eDep "
                    << std::setprecision(3) << eDep/MeV <<  " mev|pre:post " <<  preVol 
                    <<  " " << postVol << " volID "<< volumeID << " " << weight 
                    << " wt|evt:track:step " << evtid << " "<< trackid << " " << stepNum
                    << "  " << preProc << " preproc|postproc " << postProc << " "
                    << track->GetCreatorProcess()->GetProcessName()
                    <<  " create_proc|in " << track->GetLogicalVolumeAtVertex()->GetName()
					<< "  withKE "<< track->GetVertexKineticEnergy()/MeV
                    //<< " track_xyz_m " << std::setprecision(3) << xx/m << " " << std::setprecision(3) 
                    //<< yy/m << " " << std::setprecision(3) <<  zz/m
                    << " post_xyz_m " << std::setprecision(3) << postX/m << " " << std::setprecision(3) 
					<< postY/m << " " << std::setprecision(3) << postZ/m
					<< " pre_xyz_m " << std::setprecision(3) << preX/m << " " << std::setprecision(3) 
					<< preY/m << " " << std::setprecision(3) << preZ/m
                    << " postStatus " << step->GetPostStepPoint()->GetStepStatus()
                    << G4endl;
				}
			
				G4bool shieldSteps = false;
                if( shieldSteps && (postVol== "DetPolyShield"|| postVol=="DetLeadShield" ||
					postVol=="SNSDetectorCsI" ) &&  postVol != preVol ) 
                {
                    G4cout  << " ShieldN "
                    << std::setprecision(3) << preKE/MeV 
开发者ID:kumargp,项目名称:cpp,代码行数:67,代码来源:SteppingAction_Jul23.cpp


注:本文中的Analysis::FillSNSneutronFlux方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。