style: change include G4class; feat: add Sciintillator definition

This commit is contained in:
liuyihui 2023-04-09 22:12:47 +08:00
parent 052d806a04
commit d8a811e9f4
21 changed files with 171 additions and 119 deletions

4
.gitignore vendored
View File

@ -7,6 +7,10 @@ lib/
# Settings # Settings
.vscode/*.json .vscode/*.json
!.vscode/c_cpp_properties.json !.vscode/c_cpp_properties.json
.python-version
# Debugs
test/
# Data # Data
*.root *.root

View File

@ -5,7 +5,7 @@
#include "TROOT.h" #include "TROOT.h"
#include "TTree.h" #include "TTree.h"
#include "globals.hh" #include <globals.hh>
struct detEvent { struct detEvent {
G4double Thetacm; G4double Thetacm;

View File

@ -5,8 +5,8 @@ class G4LogicalVolume;
class G4VPhysicalVolume; class G4VPhysicalVolume;
class GeneDetectorConstructionMessenger; class GeneDetectorConstructionMessenger;
#include "G4VUserDetectorConstruction.hh" #include <G4VUserDetectorConstruction.hh>
#include "globals.hh" #include <globals.hh>
class GeneDetectorConstruction : public G4VUserDetectorConstruction { class GeneDetectorConstruction : public G4VUserDetectorConstruction {
public: public:

View File

@ -1,8 +1,8 @@
#ifndef GeneDetectorConstructionMessenger_h #ifndef GeneDetectorConstructionMessenger_h
#define GeneDetectorConstructionMessenger_h 1 #define GeneDetectorConstructionMessenger_h 1
#include "G4UImessenger.hh" #include <G4UImessenger.hh>
#include "globals.hh" #include <globals.hh>
class GeneDetectorConstruction; class GeneDetectorConstruction;
class G4UIdirectory; class G4UIdirectory;

View File

@ -1,8 +1,8 @@
#ifndef GeneEventAction_HH #ifndef GeneEventAction_HH
#define GeneEventAction_HH 1 #define GeneEventAction_HH 1
#include "G4UserEventAction.hh" #include <G4UserEventAction.hh>
#include "globals.hh" #include <globals.hh>
class GeneEventAction : public G4UserEventAction { class GeneEventAction : public G4UserEventAction {
public: public:

View File

@ -1,10 +1,10 @@
#ifndef GeneHe3detHit_h #ifndef GeneHe3detHit_h
#define GeneHe3detHit_h 1 #define GeneHe3detHit_h 1
#include "G4Allocator.hh" #include <G4Allocator.hh>
#include "G4THitsCollection.hh" #include <G4THitsCollection.hh>
#include "G4ThreeVector.hh" #include <G4ThreeVector.hh>
#include "G4VHit.hh" #include <G4VHit.hh>
class GeneHe3detHit : public G4VHit { class GeneHe3detHit : public G4VHit {
public: public:

View File

@ -1,9 +1,9 @@
#ifndef GeneHe3detSD_HH #ifndef GeneHe3detSD_HH
#define GeneHe3detSD_HH 1 #define GeneHe3detSD_HH 1
#include "G4VSensitiveDetector.hh"
#include "GeneHe3detHit.hh" #include "GeneHe3detHit.hh"
#include "globals.hh" #include <G4VSensitiveDetector.hh>
#include <globals.hh>
class G4Step; class G4Step;
class G4HCofThisEvent; class G4HCofThisEvent;

View File

@ -1,8 +1,8 @@
#ifndef GenePrimaryGeneratorAction_H #ifndef GenePrimaryGeneratorAction_H
#define GenePrimaryGeneratorAction_H 1 #define GenePrimaryGeneratorAction_H 1
#include "G4VUserPrimaryGeneratorAction.hh" #include <G4VUserPrimaryGeneratorAction.hh>
#include "globals.hh" #include <globals.hh>
class G4ParticleGun; class G4ParticleGun;
class G4Event; class G4Event;

View File

@ -1,8 +1,8 @@
#ifndef GenePrimaryGeneratorActionMessenger_h #ifndef GenePrimaryGeneratorActionMessenger_h
#define GenePrimaryGeneratorActionMessenger_h 1 #define GenePrimaryGeneratorActionMessenger_h 1
#include "G4UImessenger.hh" #include <G4UImessenger.hh>
#include "globals.hh" #include <globals.hh>
class GenePrimaryGeneratorAction; class GenePrimaryGeneratorAction;
class G4UIdirectory; class G4UIdirectory;

View File

@ -1,8 +1,8 @@
#ifndef GeneRunAction_HH #ifndef GeneRunAction_HH
#define GeneRunAction_HH 1 #define GeneRunAction_HH 1
#include "G4UserRunAction.hh" #include <G4UserRunAction.hh>
#include "globals.hh" #include <globals.hh>
class G4String; class G4String;
class GeneRunActionMessenger; class GeneRunActionMessenger;

View File

@ -1,8 +1,8 @@
#ifndef GeneRunActionMessenger_h #ifndef GeneRunActionMessenger_h
#define GeneRunActionMessenger_h 1 #define GeneRunActionMessenger_h 1
#include "G4UImessenger.hh" #include <G4UImessenger.hh>
#include "globals.hh" #include <globals.hh>
class GeneRunAction; class GeneRunAction;
class G4UIdirectory; class G4UIdirectory;

View File

@ -1,20 +1,20 @@
#include "TROOT.h" #include <TROOT.h>
#include "time.h" #include <time.h>
#include "G4RunManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4UIExecutive.hh"
#include "G4UImanager.hh"
#include "G4UItcsh.hh"
#include "G4UIterminal.hh"
#include "G4UnitsTable.hh"
#include "G4VisExecutive.hh"
#include "GeneDetectorConstruction.hh" #include "GeneDetectorConstruction.hh"
#include "GeneEventAction.hh" #include "GeneEventAction.hh"
#include "GenePrimaryGeneratorAction.hh" #include "GenePrimaryGeneratorAction.hh"
#include "GeneRunAction.hh" #include "GeneRunAction.hh"
#include "QGSP_BERT_HP.hh" #include <G4RunManager.hh>
#include "Randomize.hh" #include <G4SystemOfUnits.hh>
#include <G4UIExecutive.hh>
#include <G4UImanager.hh>
#include <G4UItcsh.hh>
#include <G4UIterminal.hh>
#include <G4UnitsTable.hh>
#include <G4VisExecutive.hh>
#include <QGSP_BERT_HP.hh>
#include <Randomize.hh>
int main(int argc, char **argv) { int main(int argc, char **argv) {
G4UIExecutive *ui = nullptr; G4UIExecutive *ui = nullptr;

View File

@ -1,22 +1,24 @@
#include "GeneDetectorConstruction.hh" #include "GeneDetectorConstruction.hh"
#include "G4Box.hh"
#include "G4Colour.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4NistManager.hh"
#include "G4PVPlacement.hh"
#include "G4PhysicalConstants.hh"
#include "G4RotationMatrix.hh"
#include "G4SDManager.hh"
#include "G4SubtractionSolid.hh"
#include "G4SystemOfUnits.hh"
#include "G4ThreeVector.hh"
#include "G4Tubs.hh"
#include "G4VisAttributes.hh"
#include "GeneDetectorConstructionMessenger.hh" #include "GeneDetectorConstructionMessenger.hh"
#include "GeneHe3detSD.hh" #include "GeneHe3detSD.hh"
#include "globals.hh" #include <G4Box.hh>
#include <G4Colour.hh>
#include <G4LogicalBorderSurface.hh>
#include <G4LogicalVolume.hh>
#include <G4Material.hh>
#include <G4NistManager.hh>
#include <G4OpticalSurface.hh>
#include <G4PVPlacement.hh>
#include <G4PhysicalConstants.hh>
#include <G4RotationMatrix.hh>
#include <G4SDManager.hh>
#include <G4SubtractionSolid.hh>
#include <G4SystemOfUnits.hh>
#include <G4ThreeVector.hh>
#include <G4Tubs.hh>
#include <G4VisAttributes.hh>
#include <globals.hh>
GeneDetectorConstruction::GeneDetectorConstruction() { GeneDetectorConstruction::GeneDetectorConstruction() {
Zoffset = 0; Zoffset = 0;
@ -35,16 +37,20 @@ G4VPhysicalVolume* GeneDetectorConstruction::Construct() {
G4String name, symbol; G4String name, symbol;
G4int ncomponents; G4int ncomponents;
// Hydrogen 氢
G4Element* ele_H = manager->FindOrBuildElement("H");
// Carbon 碳
G4Element* ele_C = manager->FindOrBuildElement("C");
// Boron 硼 // Boron 硼
G4Material* ele_B = manager->FindOrBuildMaterial("G4_B"); G4Material* mat_B = manager->FindOrBuildMaterial("G4_B");
// Copper 铜 // Copper 铜
G4Material* ele_Cu = manager->FindOrBuildMaterial("G4_Cu"); G4Material* mat_Cu = manager->FindOrBuildMaterial("G4_Cu");
// Gold 金 // Gold 金
G4Material* ele_Au = manager->FindOrBuildMaterial("G4_Au"); G4Material* mat_Au = manager->FindOrBuildMaterial("G4_Au");
// Aluminum 铝 // Aluminum 铝
G4Material* ele_Al = manager->FindOrBuildMaterial("G4_Al"); G4Material* mat_Al = manager->FindOrBuildMaterial("G4_Al");
// Tantalum 钽 // Tantalum 钽
G4Material* ele_Ta = manager->FindOrBuildMaterial("G4_Ta"); G4Material* mat_Ta = manager->FindOrBuildMaterial("G4_Ta");
// Stainless stell 不锈钢 // Stainless stell 不锈钢
G4Material* mat_stell = manager->FindOrBuildMaterial("G4_STAINLESS-STEEL"); G4Material* mat_stell = manager->FindOrBuildMaterial("G4_STAINLESS-STEEL");
// Water 水 // Water 水
@ -58,12 +64,12 @@ G4VPhysicalVolume* GeneDetectorConstruction::Construct() {
density = 0.938 * g / cm3; density = 0.938 * g / cm3;
G4Material* shield_PE = new G4Material("PE_B", density, ncomponents = 2); G4Material* shield_PE = new G4Material("PE_B", density, ncomponents = 2);
shield_PE->AddMaterial(mat_PE, fractionmass = 93 * perCent); shield_PE->AddMaterial(mat_PE, fractionmass = 93 * perCent);
shield_PE->AddMaterial(ele_B, fractionmass = 7 * perCent); shield_PE->AddMaterial(mat_B, fractionmass = 7 * perCent);
// moderator 慢化剂 PE(B) 含硼聚乙烯 // moderator 慢化剂 PE(B) 含硼聚乙烯
G4Material* moderator_PE = new G4Material("PE_B_impurity", density, ncomponents = 2); G4Material* moderator_PE = new G4Material("PE_B_impurity", density, ncomponents = 2);
moderator_PE->AddMaterial(mat_PE, fractionmass = (100.0 - PE_Bfraction) * perCent); moderator_PE->AddMaterial(mat_PE, fractionmass = (100.0 - PE_Bfraction) * perCent);
moderator_PE->AddMaterial(ele_B, fractionmass = PE_Bfraction * perCent); moderator_PE->AddMaterial(mat_B, fractionmass = PE_Bfraction * perCent);
// Vacuum 真空 // Vacuum 真空
temperature = 77 * kelvin; temperature = 77 * kelvin;
@ -87,11 +93,53 @@ G4VPhysicalVolume* GeneDetectorConstruction::Construct() {
// C13 Target C13靶 // C13 Target C13靶
G4Isotope* iso_C12 = new G4Isotope(name = "C12", z = 6.0, n = 12.0, a = 12.0 * g / mole); G4Isotope* iso_C12 = new G4Isotope(name = "C12", z = 6.0, n = 12.0, a = 12.0 * g / mole);
G4Isotope* iso_C13 = new G4Isotope(name = "C13", z = 6.0, n = 13.0, a = 13.003 * g / mole); G4Isotope* iso_C13 = new G4Isotope(name = "C13", z = 6.0, n = 13.0, a = 13.003 * g / mole);
G4Element* ele_C = new G4Element(name = "Carbon", symbol = "C13", ncomponents = 2); G4Element* ele_C13 = new G4Element(name = "Carbon", symbol = "C13", ncomponents = 2);
ele_C->AddIsotope(iso_C12, 1.0 * perCent); ele_C13->AddIsotope(iso_C12, 1.0 * perCent);
ele_C->AddIsotope(iso_C13, 99.0 * perCent); ele_C13->AddIsotope(iso_C13, 99.0 * perCent);
G4Material* target_C = new G4Material("targetC", density = 2.3 * g / cm3, ncomponents = 1); G4Material* target_C = new G4Material("targetC", density = 2.3 * g / cm3, ncomponents = 1);
target_C->AddElement(ele_C, 100 * perCent); target_C->AddElement(ele_C13, 100 * perCent);
// ********** Sciintillator **********
// Plastic scintillator 塑料闪烁体 EJ-200
density = 1.023 * g / cm3;
G4Material* ej_200 = new G4Material("ej_200", density, ncomponents = 2);
ej_200->AddElement(ele_H, 8.5 * perCent);
ej_200->AddElement(ele_C, 91.5 * perCent);
// Material properties table 物质光学属性表
G4MaterialPropertiesTable* ej_200_MPT = new G4MaterialPropertiesTable();
// Optical properties 光学属性
const G4int nEntries = 21;
G4double PhotonEnergy[nEntries] = {2.411 * eV, 2.483 * eV, 2.533 * eV, 2.586 * eV, 2.628 * eV, 2.666 * eV,
2.699 * eV, 2.779 * eV, 2.821 * eV, 2.865 * eV, 2.903 * eV, 2.921 * eV,
2.936 * eV, 2.946 * eV, 2.964 * eV, 3.008 * eV, 3.022 * eV, 3.039 * eV,
3.079 * eV, 3.104 * eV, 3.143 * eV}; // 光子能量 395 nm -> 515 nm
G4double AbsorptionLength[nEntries] = {380. * cm, 380. * cm, 380. * cm, 380. * cm, 380. * cm, 380. * cm,
380. * cm, 380. * cm, 380. * cm, 380. * cm, 380. * cm, 380. * cm,
380. * cm, 380. * cm, 380. * cm, 380. * cm, 380. * cm, 380. * cm,
380. * cm, 380. * cm, 380. * cm}; // 吸收长度
G4double RefractiveIndex[nEntries] = {1.58, 1.58, 1.58, 1.58, 1.58, 1.58, 1.58, 1.58, 1.58, 1.58, 1.58,
1.58, 1.58, 1.58, 1.58, 1.58, 1.58, 1.58, 1.58, 1.58, 1.58}; // 折射率
G4double FastComponent[nEntries] = {0.00000, 0.05885, 0.10053, 0.17197, 0.26426, 0.37440, 0.43394,
0.60064, 0.74651, 0.89833, 0.98168, 1.00000, 0.97870, 0.93703,
0.79712, 0.40119, 0.30444, 0.19876, 0.03801, 0.00926, 0.00000}; // 快成分能谱
ej_200_MPT->AddProperty("ABSLENGTH", PhotonEnergy, AbsorptionLength, nEntries);
ej_200_MPT->AddProperty("RINDEX", PhotonEnergy, RefractiveIndex, nEntries);
ej_200_MPT->AddProperty("FASTCOMPONENT", PhotonEnergy, FastComponent, nEntries);
// Intrinsic properties 本征属性
ej_200_MPT->AddConstProperty("RESOLUTIONSCALE", 10.0); // 本征分辨率
ej_200_MPT->AddConstProperty("SCINTILLATIONYIELD", 10000. / MeV); // 本征光产额
ej_200_MPT->AddConstProperty("YIELDRATIO", 1.0); // 快慢响应之比
ej_200_MPT->AddConstProperty("FASTSCINTILLATIONRISETIME", 0.9 * ns); // 快成分上升时间
ej_200_MPT->AddConstProperty("FASTTIMECONSTANT", 2.1 * ns); // 快成分衰减时间
ej_200->SetMaterialPropertiesTable(ej_200_MPT);
// ********** Boundary Optical Properties **********
G4OpticalSurface* ej_200_OpticalSurface = new G4OpticalSurface("ej_200_OpticalSurface");
ej_200_OpticalSurface->SetType(dielectric_metal);
ej_200_OpticalSurface->SetFinish(polished);
ej_200_OpticalSurface->SetModel(glisur);
// ********** Geometry ********** // ********** Geometry **********
// world // world
@ -249,7 +297,7 @@ G4VPhysicalVolume* GeneDetectorConstruction::Construct() {
G4double Cu0z = 0.5 * (C13thickness + Cu0thickness); G4double Cu0z = 0.5 * (C13thickness + Cu0thickness);
G4Tubs* CuSubstrate_tub0 = G4Tubs* CuSubstrate_tub0 =
new G4Tubs("CuSubstrate_tub0", 18. * mm, 25. * mm, 0.5 * Cu0thickness, 0, 360. * deg); new G4Tubs("CuSubstrate_tub0", 18. * mm, 25. * mm, 0.5 * Cu0thickness, 0, 360. * deg);
G4LogicalVolume* CuSubstrate_log0 = new G4LogicalVolume(CuSubstrate_tub0, ele_Cu, "CuSubstrate_log0"); G4LogicalVolume* CuSubstrate_log0 = new G4LogicalVolume(CuSubstrate_tub0, mat_Cu, "CuSubstrate_log0");
new G4PVPlacement(0, G4ThreeVector(0, 0, Cu0z), "CuSubstrate_phys0", CuSubstrate_log0, physicalWorld, false, 4, new G4PVPlacement(0, G4ThreeVector(0, 0, Cu0z), "CuSubstrate_phys0", CuSubstrate_log0, physicalWorld, false, 4,
true); true);
@ -257,21 +305,21 @@ G4VPhysicalVolume* GeneDetectorConstruction::Construct() {
G4double Cu1z = 0.0 * mm; G4double Cu1z = 0.0 * mm;
G4Tubs* CuSubstrate_tub1 = G4Tubs* CuSubstrate_tub1 =
new G4Tubs("CuSubstrate_tub1", 20. * mm, 24.25 * mm, 0.5 * Cu1thickness, 0, 360. * deg); new G4Tubs("CuSubstrate_tub1", 20. * mm, 24.25 * mm, 0.5 * Cu1thickness, 0, 360. * deg);
G4LogicalVolume* CuSubstrate_log1 = new G4LogicalVolume(CuSubstrate_tub1, ele_Cu, "CuSubstrate_log1"); G4LogicalVolume* CuSubstrate_log1 = new G4LogicalVolume(CuSubstrate_tub1, mat_Cu, "CuSubstrate_log1");
new G4PVPlacement(0, G4ThreeVector(0, 0, Cu1z), "CuSubstrate_phys1", CuSubstrate_log1, physicalWorld, false, 5, new G4PVPlacement(0, G4ThreeVector(0, 0, Cu1z), "CuSubstrate_phys1", CuSubstrate_log1, physicalWorld, false, 5,
true); true);
G4double Cu2thickness = 3.5 * mm; G4double Cu2thickness = 3.5 * mm;
G4double Cu2z = -0.5 * (C13thickness + Cu2thickness); G4double Cu2z = -0.5 * (C13thickness + Cu2thickness);
G4Tubs* CuSubstrate_tub2 = new G4Tubs("CuSubstrate_tub2", 0, 24.25 * mm, 0.5 * Cu2thickness, 0, 360. * deg); G4Tubs* CuSubstrate_tub2 = new G4Tubs("CuSubstrate_tub2", 0, 24.25 * mm, 0.5 * Cu2thickness, 0, 360. * deg);
G4LogicalVolume* CuSubstrate_log2 = new G4LogicalVolume(CuSubstrate_tub2, ele_Cu, "CuSubstrate_log2"); G4LogicalVolume* CuSubstrate_log2 = new G4LogicalVolume(CuSubstrate_tub2, mat_Cu, "CuSubstrate_log2");
new G4PVPlacement(0, G4ThreeVector(0, 0, Cu2z), "CuSubstrate_phys2", CuSubstrate_log2, physicalWorld, false, 6, new G4PVPlacement(0, G4ThreeVector(0, 0, Cu2z), "CuSubstrate_phys2", CuSubstrate_log2, physicalWorld, false, 6,
true); true);
G4double Cu3thickness = 2.0 * mm; G4double Cu3thickness = 2.0 * mm;
G4double Cu3z = Cu2z - 0.5 * Cu2thickness - 0.5 * Cu3thickness; G4double Cu3z = Cu2z - 0.5 * Cu2thickness - 0.5 * Cu3thickness;
G4Tubs* CuSubstrate_tub3 = new G4Tubs("CuSubstrate_tub3", 0, 29. * mm, 0.5 * Cu3thickness, 0, 360. * deg); G4Tubs* CuSubstrate_tub3 = new G4Tubs("CuSubstrate_tub3", 0, 29. * mm, 0.5 * Cu3thickness, 0, 360. * deg);
G4LogicalVolume* CuSubstrate_log3 = new G4LogicalVolume(CuSubstrate_tub3, ele_Cu, "CuSubstrate_log3"); G4LogicalVolume* CuSubstrate_log3 = new G4LogicalVolume(CuSubstrate_tub3, mat_Cu, "CuSubstrate_log3");
new G4PVPlacement(0, G4ThreeVector(0, 0, Cu3z), "CuSubstrate_phys3", CuSubstrate_log3, physicalWorld, false, 7, new G4PVPlacement(0, G4ThreeVector(0, 0, Cu3z), "CuSubstrate_phys3", CuSubstrate_log3, physicalWorld, false, 7,
true); true);
@ -310,7 +358,7 @@ G4VPhysicalVolume* GeneDetectorConstruction::Construct() {
G4double CuTrapLength = 50.0 * cm; G4double CuTrapLength = 50.0 * cm;
G4double CuTrapz = 0.5 * CuTrapLength + 12.0 * mm + 60.0 * mm; G4double CuTrapz = 0.5 * CuTrapLength + 12.0 * mm + 60.0 * mm;
G4Tubs* CuTrap_tub = new G4Tubs("CuTrap_tub", 28.0 * mm, 30.0 * mm, 0.5 * CuTrapLength, 0, 360. * deg); G4Tubs* CuTrap_tub = new G4Tubs("CuTrap_tub", 28.0 * mm, 30.0 * mm, 0.5 * CuTrapLength, 0, 360. * deg);
G4LogicalVolume* CuTrap_log = new G4LogicalVolume(CuTrap_tub, ele_Cu, "CuTrap_log"); G4LogicalVolume* CuTrap_log = new G4LogicalVolume(CuTrap_tub, mat_Cu, "CuTrap_log");
new G4PVPlacement(0, G4ThreeVector(0, 0, CuTrapz), "CuTrap_phys", CuTrap_log, physicalWorld, false, 11, true); new G4PVPlacement(0, G4ThreeVector(0, 0, CuTrapz), "CuTrap_phys", CuTrap_log, physicalWorld, false, 11, true);
CuTrap_log->SetVisAttributes(CuSub_vis); CuTrap_log->SetVisAttributes(CuSub_vis);
@ -319,27 +367,27 @@ G4VPhysicalVolume* GeneDetectorConstruction::Construct() {
G4double CuSupLength = 1.0 * mm; G4double CuSupLength = 1.0 * mm;
G4double CuSupz = 0.5 * CuSupLength + 8.0 * mm + 60.0 * mm; G4double CuSupz = 0.5 * CuSupLength + 8.0 * mm + 60.0 * mm;
G4Tubs* CuSup_tub = new G4Tubs("CuSup_tub", 15.0 * mm, 30.0 * mm, 0.5 * CuSupLength, 0, 360. * deg); G4Tubs* CuSup_tub = new G4Tubs("CuSup_tub", 15.0 * mm, 30.0 * mm, 0.5 * CuSupLength, 0, 360. * deg);
G4LogicalVolume* CuSup_log = new G4LogicalVolume(CuSup_tub, ele_Cu, "CuSup_log"); G4LogicalVolume* CuSup_log = new G4LogicalVolume(CuSup_tub, mat_Cu, "CuSup_log");
new G4PVPlacement(0, G4ThreeVector(0, 0, CuSupz), "CuSup_phys", CuSup_log, physicalWorld, false, 12, true); new G4PVPlacement(0, G4ThreeVector(0, 0, CuSupz), "CuSup_phys", CuSup_log, physicalWorld, false, 12, true);
// Collimator // Collimator
G4double AuCollLength = 3.0 * um; G4double AuCollLength = 3.0 * um;
G4double AuCollz = -0.5 * AuCollLength + 12.0 * mm + 60.0 * mm; G4double AuCollz = -0.5 * AuCollLength + 12.0 * mm + 60.0 * mm;
G4Tubs* AuColl_tub = new G4Tubs("AuColl_tub", 5.0 * mm, 28.0 * mm, 0.5 * AuCollLength, 0, 360. * deg); G4Tubs* AuColl_tub = new G4Tubs("AuColl_tub", 5.0 * mm, 28.0 * mm, 0.5 * AuCollLength, 0, 360. * deg);
G4LogicalVolume* AuColl_log = new G4LogicalVolume(AuColl_tub, ele_Au, "AuColl_log"); G4LogicalVolume* AuColl_log = new G4LogicalVolume(AuColl_tub, mat_Au, "AuColl_log");
new G4PVPlacement(0, G4ThreeVector(0, 0, AuCollz), "AuColl_phys", AuColl_log, physicalWorld, false, 13, true); new G4PVPlacement(0, G4ThreeVector(0, 0, AuCollz), "AuColl_phys", AuColl_log, physicalWorld, false, 13, true);
G4double CuColl0Length = 2.0 * mm; G4double CuColl0Length = 2.0 * mm;
G4double CuColl0z = 0.5 * CuColl0Length + 12.0 * mm + 60.0 * mm; G4double CuColl0z = 0.5 * CuColl0Length + 12.0 * mm + 60.0 * mm;
G4Tubs* CuColl_tub0 = new G4Tubs("CuColl_tub0", 5.0 * mm, 28.0 * mm, 0.5 * CuColl0Length, 0, 360. * deg); G4Tubs* CuColl_tub0 = new G4Tubs("CuColl_tub0", 5.0 * mm, 28.0 * mm, 0.5 * CuColl0Length, 0, 360. * deg);
G4LogicalVolume* CuColl_log0 = new G4LogicalVolume(CuColl_tub0, ele_Cu, "CuColl_log0"); G4LogicalVolume* CuColl_log0 = new G4LogicalVolume(CuColl_tub0, mat_Cu, "CuColl_log0");
new G4PVPlacement(0, G4ThreeVector(0, 0, CuColl0z), "CuColl_phys0", CuColl_log0, physicalWorld, false, 14, new G4PVPlacement(0, G4ThreeVector(0, 0, CuColl0z), "CuColl_phys0", CuColl_log0, physicalWorld, false, 14,
true); true);
G4double CuColl1Length = 3.0 * mm; G4double CuColl1Length = 3.0 * mm;
G4double CuColl1z = CuColl0z + 0.5 * CuColl0Length + 0.5 * CuColl1Length; G4double CuColl1z = CuColl0z + 0.5 * CuColl0Length + 0.5 * CuColl1Length;
G4Tubs* CuColl_tub1 = new G4Tubs("CuColl_tub1", 25.0 * mm, 28.0 * mm, 0.5 * CuColl1Length, 0, 360. * deg); G4Tubs* CuColl_tub1 = new G4Tubs("CuColl_tub1", 25.0 * mm, 28.0 * mm, 0.5 * CuColl1Length, 0, 360. * deg);
G4LogicalVolume* CuColl_log1 = new G4LogicalVolume(CuColl_tub1, ele_Cu, "CuColl_log1"); G4LogicalVolume* CuColl_log1 = new G4LogicalVolume(CuColl_tub1, mat_Cu, "CuColl_log1");
new G4PVPlacement(0, G4ThreeVector(0, 0, CuColl1z), "CuColl_phys1", CuColl_log1, physicalWorld, false, 15, new G4PVPlacement(0, G4ThreeVector(0, 0, CuColl1z), "CuColl_phys1", CuColl_log1, physicalWorld, false, 15,
true); true);
@ -397,7 +445,7 @@ G4VPhysicalVolume* GeneDetectorConstruction::Construct() {
G4double Al0z = WaterBackz - 0.5 * WaterBack_thickness - 0.5 * Al0thickness; G4double Al0z = WaterBackz - 0.5 * WaterBack_thickness - 0.5 * Al0thickness;
G4Tubs* AlSubstrate_tub0 = G4Tubs* AlSubstrate_tub0 =
new G4Tubs("AlSubstrate_tub0", 0, 29.0 * mm, 0.5 * Al0thickness, 0. * deg, 360. * deg); new G4Tubs("AlSubstrate_tub0", 0, 29.0 * mm, 0.5 * Al0thickness, 0. * deg, 360. * deg);
G4LogicalVolume* AlSubstrate_log0 = new G4LogicalVolume(AlSubstrate_tub0, ele_Al, "AlSubstrate_log0"); G4LogicalVolume* AlSubstrate_log0 = new G4LogicalVolume(AlSubstrate_tub0, mat_Al, "AlSubstrate_log0");
G4PVPlacement* Al0phys = new G4PVPlacement(0, G4ThreeVector(0, 0, Al0z), "AlSubstrate_phys0", AlSubstrate_log0, G4PVPlacement* Al0phys = new G4PVPlacement(0, G4ThreeVector(0, 0, Al0z), "AlSubstrate_phys0", AlSubstrate_log0,
physicalWorld, false, 18, true); physicalWorld, false, 18, true);
AlSubstrate_log0->SetVisAttributes(tube_vis); AlSubstrate_log0->SetVisAttributes(tube_vis);
@ -406,7 +454,7 @@ G4VPhysicalVolume* GeneDetectorConstruction::Construct() {
G4double Al1z = Al0z - 0.5 * Al0thickness - 0.5 * Al1thickness; G4double Al1z = Al0z - 0.5 * Al0thickness - 0.5 * Al1thickness;
G4Tubs* AlSubstrate_tub1 = G4Tubs* AlSubstrate_tub1 =
new G4Tubs("AlSubstrate_tub1", 0, 44.45 * mm, 0.5 * Al1thickness, 0. * deg, 360. * deg); new G4Tubs("AlSubstrate_tub1", 0, 44.45 * mm, 0.5 * Al1thickness, 0. * deg, 360. * deg);
G4LogicalVolume* AlSubstrate_log1 = new G4LogicalVolume(AlSubstrate_tub1, ele_Al, "AlSubstrate_log1"); G4LogicalVolume* AlSubstrate_log1 = new G4LogicalVolume(AlSubstrate_tub1, mat_Al, "AlSubstrate_log1");
G4PVPlacement* Al1phys = new G4PVPlacement(0, G4ThreeVector(0, 0, Al1z), "AlSubstrate_phys1", AlSubstrate_log1, G4PVPlacement* Al1phys = new G4PVPlacement(0, G4ThreeVector(0, 0, Al1z), "AlSubstrate_phys1", AlSubstrate_log1,
physicalWorld, false, 19, true); physicalWorld, false, 19, true);
AlSubstrate_log1->SetVisAttributes(tube_vis); AlSubstrate_log1->SetVisAttributes(tube_vis);
@ -442,7 +490,7 @@ G4VPhysicalVolume* GeneDetectorConstruction::Construct() {
G4double Tathickness = 1.0 * mm; G4double Tathickness = 1.0 * mm;
G4Tubs* Tatub = new G4Tubs("Tatub", 0, 15. * mm, 0.5 * Tathickness, 0, 360. * deg); G4Tubs* Tatub = new G4Tubs("Tatub", 0, 15. * mm, 0.5 * Tathickness, 0, 360. * deg);
G4LogicalVolume* Talog = new G4LogicalVolume(Tatub, ele_Ta, "Talog"); G4LogicalVolume* Talog = new G4LogicalVolume(Tatub, mat_Ta, "Talog");
new G4PVPlacement(0, G4ThreeVector(), "Taphys", Talog, physicalWorld, false, 3, true); new G4PVPlacement(0, G4ThreeVector(), "Taphys", Talog, physicalWorld, false, 3, true);
Talog->SetVisAttributes(C13_vis); Talog->SetVisAttributes(C13_vis);
@ -451,7 +499,7 @@ G4VPhysicalVolume* GeneDetectorConstruction::Construct() {
G4double Cu0z = 0.5 * (Tathickness + Cu0thickness); G4double Cu0z = 0.5 * (Tathickness + Cu0thickness);
G4Tubs* CuSubstrate_tub0 = G4Tubs* CuSubstrate_tub0 =
new G4Tubs("CuSubstrate_tub0", 11. * mm, 29. * mm, 0.5 * Cu0thickness, 0, 360. * deg); new G4Tubs("CuSubstrate_tub0", 11. * mm, 29. * mm, 0.5 * Cu0thickness, 0, 360. * deg);
G4LogicalVolume* CuSubstrate_log0 = new G4LogicalVolume(CuSubstrate_tub0, ele_Cu, "CuSubstrate_log0"); G4LogicalVolume* CuSubstrate_log0 = new G4LogicalVolume(CuSubstrate_tub0, mat_Cu, "CuSubstrate_log0");
new G4PVPlacement(0, G4ThreeVector(0, 0, Cu0z), "CuSubstrate_phys1", CuSubstrate_log0, physicalWorld, false, 4, new G4PVPlacement(0, G4ThreeVector(0, 0, Cu0z), "CuSubstrate_phys1", CuSubstrate_log0, physicalWorld, false, 4,
true); true);

View File

@ -1,10 +1,10 @@
#include "GeneDetectorConstructionMessenger.hh" #include "GeneDetectorConstructionMessenger.hh"
#include "G4UIcmdWithADouble.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIdirectory.hh"
#include "GeneDetectorConstruction.hh" #include "GeneDetectorConstruction.hh"
#include <G4UIcmdWithADouble.hh>
#include <G4UIcmdWithADoubleAndUnit.hh>
#include <G4UIcmdWithAString.hh>
#include <G4UIdirectory.hh>
GeneDetectorConstructionMessenger::GeneDetectorConstructionMessenger(GeneDetectorConstruction* pDets) GeneDetectorConstructionMessenger::GeneDetectorConstructionMessenger(GeneDetectorConstruction* pDets)
: pDetectorConstruction(pDets) { : pDetectorConstruction(pDets) {

View File

@ -1,20 +1,20 @@
#include "GeneEventAction.hh" #include "GeneEventAction.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4HCofThisEvent.hh"
#include "G4SDManager.hh"
#include "G4SystemOfUnits.hh"
#include "G4Trajectory.hh"
#include "G4TrajectoryContainer.hh"
#include "G4UImanager.hh"
#include "G4UnitsTable.hh"
#include "G4VHitsCollection.hh"
#include "G4VVisManager.hh"
#include "G4ios.hh"
#include "GeneAnalysisManager.hh" #include "GeneAnalysisManager.hh"
#include "GeneHe3detHit.hh" #include "GeneHe3detHit.hh"
#include "Randomize.hh" #include "Randomize.hh"
#include <G4Event.hh>
#include <G4EventManager.hh>
#include <G4HCofThisEvent.hh>
#include <G4SDManager.hh>
#include <G4SystemOfUnits.hh>
#include <G4Trajectory.hh>
#include <G4TrajectoryContainer.hh>
#include <G4UImanager.hh>
#include <G4UnitsTable.hh>
#include <G4VHitsCollection.hh>
#include <G4VVisManager.hh>
#include <G4ios.hh>
GeneEventAction::GeneEventAction() : GeneHe3detSDCollID(-1), drawFlag("non") {} GeneEventAction::GeneEventAction() : GeneHe3detSDCollID(-1), drawFlag("non") {}

View File

@ -1,10 +1,10 @@
#include "GeneHe3detHit.hh" #include "GeneHe3detHit.hh"
#include "G4Circle.hh" #include <G4Circle.hh>
#include "G4Colour.hh" #include <G4Colour.hh>
#include "G4UnitsTable.hh" #include <G4UnitsTable.hh>
#include "G4VVisManager.hh" #include <G4VVisManager.hh>
#include "G4VisAttributes.hh" #include <G4VisAttributes.hh>
#include <iomanip> #include <iomanip>

View File

@ -1,14 +1,14 @@
#include "GeneHe3detSD.hh" #include "GeneHe3detSD.hh"
#include "G4HCofThisEvent.hh"
#include "G4Ions.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTypes.hh"
#include "G4SDManager.hh"
#include "G4Step.hh"
#include "G4VPhysicalVolume.hh"
#include "G4ios.hh"
#include "GeneHe3detHit.hh" #include "GeneHe3detHit.hh"
#include <G4HCofThisEvent.hh>
#include <G4Ions.hh>
#include <G4ParticleDefinition.hh>
#include <G4ParticleTypes.hh>
#include <G4SDManager.hh>
#include <G4Step.hh>
#include <G4VPhysicalVolume.hh>
#include <G4ios.hh>
GeneHe3detSD::GeneHe3detSD(G4String name) : G4VSensitiveDetector(name) { GeneHe3detSD::GeneHe3detSD(G4String name) : G4VSensitiveDetector(name) {
G4String HCname = "GeneHe3detHitCollection"; G4String HCname = "GeneHe3detHitCollection";

View File

@ -2,16 +2,16 @@
#include "TGraph.h" #include "TGraph.h"
#include "TH1F.h" #include "TH1F.h"
#include "G4Event.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleGun.hh"
#include "G4ParticleTable.hh"
#include "G4PhysicalConstants.hh"
#include "G4SystemOfUnits.hh"
#include "GeneAnalysisManager.hh" #include "GeneAnalysisManager.hh"
#include "GenePrimaryGeneratorActionMessenger.hh" #include "GenePrimaryGeneratorActionMessenger.hh"
#include "Randomize.hh" #include "Randomize.hh"
#include "globals.hh" #include <G4Event.hh>
#include <G4ParticleDefinition.hh>
#include <G4ParticleGun.hh>
#include <G4ParticleTable.hh>
#include <G4PhysicalConstants.hh>
#include <G4SystemOfUnits.hh>
#include <globals.hh>
#include "fstream" #include "fstream"

View File

@ -1,10 +1,10 @@
#include "GenePrimaryGeneratorActionMessenger.hh" #include "GenePrimaryGeneratorActionMessenger.hh"
#include "G4SystemOfUnits.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIdirectory.hh"
#include "GenePrimaryGeneratorAction.hh" #include "GenePrimaryGeneratorAction.hh"
#include <G4SystemOfUnits.hh>
#include <G4UIcmdWithADoubleAndUnit.hh>
#include <G4UIcmdWithAString.hh>
#include <G4UIdirectory.hh>
GenePrimaryGeneratorActionMessenger::GenePrimaryGeneratorActionMessenger(GenePrimaryGeneratorAction* pPrimary) GenePrimaryGeneratorActionMessenger::GenePrimaryGeneratorActionMessenger(GenePrimaryGeneratorAction* pPrimary)
: pPrimaryGeneratorAction(pPrimary) { : pPrimaryGeneratorAction(pPrimary) {

View File

@ -1,12 +1,12 @@
#include "GeneRunAction.hh" #include "GeneRunAction.hh"
#include "G4Run.hh"
#include "G4SystemOfUnits.hh"
#include "G4UImanager.hh"
#include "G4VVisManager.hh"
#include "G4ios.hh"
#include "GeneAnalysisManager.hh" #include "GeneAnalysisManager.hh"
#include "GeneRunActionMessenger.hh" #include "GeneRunActionMessenger.hh"
#include <G4Run.hh>
#include <G4SystemOfUnits.hh>
#include <G4UImanager.hh>
#include <G4VVisManager.hh>
#include <G4ios.hh>
GeneRunAction::GeneRunAction() : G4UserRunAction() { GeneRunAction::GeneRunAction() : G4UserRunAction() {
RunNo = "00"; RunNo = "00";

View File

@ -1,8 +1,8 @@
#include "GeneRunActionMessenger.hh" #include "GeneRunActionMessenger.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIdirectory.hh"
#include "GeneRunAction.hh" #include "GeneRunAction.hh"
#include <G4UIcmdWithAString.hh>
#include <G4UIdirectory.hh>
GeneRunActionMessenger::GeneRunActionMessenger(GeneRunAction* pRun) : pRunAction(pRun) { GeneRunActionMessenger::GeneRunActionMessenger(GeneRunAction* pRun) : pRunAction(pRun) {
RunDir = new G4UIdirectory("/Gene/Run/"); RunDir = new G4UIdirectory("/Gene/Run/");