⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mt01trackerhit.cc

📁 利用linux环境下蒙特卡罗计算工具geant4实现伽玛射线与探测器乘积能量的模拟过程
💻 CC
字号:
//// ********************************************************************// * DISCLAIMER                                                       *// *                                                                  *// * The following disclaimer summarizes all the specific disclaimers *// * of contributors to this software. The specific disclaimers,which *// * govern, are listed with their locations in:                      *// *   http://cern.ch/geant4/license                                  *// *                                                                  *// * Neither the authors of this software system, nor their employing *// * institutes,nor the agencies providing financial support for this *// * work  make  any representation or  warranty, express or implied, *// * regarding  this  software system or assume any liability for its *// * use.                                                             *// *                                                                  *// * This  code  implementation is the  intellectual property  of the *// * GEANT4 collaboration.                                            *// * By copying,  distributing  or modifying the Program (or any work *// * based  on  the Program)  you indicate  your  acceptance of  this *// * statement, and all its terms.                                    *// ********************************************************************////// $Id: mt01TrackerHit.cc,v 1.8 2003/05/28 09:54:09 gcosmo Exp $// GEANT4 tag $Name: geant4-07-00-patch-01 $////....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......#include "mt01TrackerHit.hh"#include "G4UnitsTable.hh"#include "G4VVisManager.hh"#include "G4Circle.hh"#include "G4Colour.hh"#include "G4VisAttributes.hh"G4Allocator<mt01TrackerHit> mt01TrackerHitAllocator;//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......mt01TrackerHit::mt01TrackerHit() {}//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......mt01TrackerHit::~mt01TrackerHit() {}//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......mt01TrackerHit::mt01TrackerHit(const mt01TrackerHit& right)  : G4VHit(){  trackID   = right.trackID;  chamberNb = right.chamberNb;  edep      = right.edep;  pos       = right.pos;}//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......const mt01TrackerHit& mt01TrackerHit::operator=(const mt01TrackerHit& right){  trackID   = right.trackID;  chamberNb = right.chamberNb;  edep      = right.edep;  pos       = right.pos;  return *this;}//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......G4int mt01TrackerHit::operator==(const mt01TrackerHit& right) const{  return (this==&right) ? 1 : 0;}//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......void mt01TrackerHit::Draw(){  G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();  if(pVVisManager)  {    G4Circle circle(pos);    circle.SetScreenSize(0.04);    circle.SetFillStyle(G4Circle::filled);    G4Colour colour(1.,0.,0.);    G4VisAttributes attribs(colour);    circle.SetVisAttributes(attribs);    pVVisManager->Draw(circle);  }}//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......void mt01TrackerHit::Print(){  G4cout << "  trackID: " << trackID << "  chamberNb: " << chamberNb         << "  energy deposit: " << G4BestUnit(edep,"Energy")	 << "  position: " << G4BestUnit(pos,"Length") << G4endl;}//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -