work

23
WORK WORK Bo-Wen Shiou Bo-Wen Shiou

Upload: zev

Post on 05-Jan-2016

23 views

Category:

Documents


0 download

DESCRIPTION

WORK. Bo-Wen Shiou. GNUmakefile XXX.cc (ex:try03.cc) include folder (xxx.hh) src folder (xxx.cc). GNUmakefile. name := try03 G4TARGET := $(name) G4EXLIB := true ifndef G4INSTALL G4INSTALL = ../../.. endif .PHONY: all all: lib bin - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: WORK

WORKWORK

Bo-Wen ShiouBo-Wen Shiou

Page 2: WORK

GNUmakefileGNUmakefile XXX.cc (ex:try03.cc)XXX.cc (ex:try03.cc) include folder (xxx.hh)include folder (xxx.hh) src folder (xxx.cc)src folder (xxx.cc)

Page 3: WORK

GNUmakefileGNUmakefile name := try03name := try03 G4TARGET := $(name)G4TARGET := $(name) G4EXLIB := trueG4EXLIB := true

ifndef G4INSTALLifndef G4INSTALL G4INSTALL = ../../..G4INSTALL = ../../.. endifendif

.PHONY: all.PHONY: all all: lib binall: lib bin

include $(G4INSTALL)/config/binmake.gmkinclude $(G4INSTALL)/config/binmake.gmk

Page 4: WORK

try03.cctry03.cc #include "G4RunManager.hh"#include "G4RunManager.hh" #include "G4UImanager.hh"#include "G4UImanager.hh"

#include "try03DetectorConstruction.hh"#include "try03DetectorConstruction.hh" #include "try03PhysicsList.hh"#include "try03PhysicsList.hh" #include "try03PrimaryGeneratorAction.hh"#include "try03PrimaryGeneratorAction.hh"

int main()int main() {{ // Construct the default run manager// Construct the default run manager //// G4RunManager* runManager = new G4RunManager;G4RunManager* runManager = new G4RunManager;

// set mandatory initialization classes// set mandatory initialization classes //// G4VUserDetectorConstruction* detector = new try03DetectorConstruction;G4VUserDetectorConstruction* detector = new try03DetectorConstruction; runManager->SetUserInitialization(detector);runManager->SetUserInitialization(detector); //// G4VUserPhysicsList* physics = new try03PhysicsList;G4VUserPhysicsList* physics = new try03PhysicsList; runManager->SetUserInitialization(physics);runManager->SetUserInitialization(physics);

// set mandatory user action class// set mandatory user action class //// G4VUserPrimaryGeneratorAction* gen_action = new try03PrimaryGeneratorAction;G4VUserPrimaryGeneratorAction* gen_action = new try03PrimaryGeneratorAction; runManager->SetUserAction(gen_action);runManager->SetUserAction(gen_action);

Page 5: WORK

// Initialize G4 kernel// Initialize G4 kernel //// runManager->Initialize();runManager->Initialize();

// Get the pointer to the UI manager and set verbosities// Get the pointer to the UI manager and set verbosities //// G4UImanager* UI = G4UImanager::GetUIpointer();G4UImanager* UI = G4UImanager::GetUIpointer(); UI->ApplyCommand("/run/verbose 1");UI->ApplyCommand("/run/verbose 1"); UI->ApplyCommand("/event/verbose 1");UI->ApplyCommand("/event/verbose 1"); UI->ApplyCommand("/tracking/verbose 1");UI->ApplyCommand("/tracking/verbose 1");

// Start a run// Start a run //// G4int numberOfEvent = G4int numberOfEvent = 11;; runManager->BeamOn(numberOfEvent);runManager->BeamOn(numberOfEvent);

// Job termination// Job termination //// // Free the store: user actions, physics_list and detector_description are// Free the store: user actions, physics_list and detector_description are // owned and deleted by the run manager, so they should not// owned and deleted by the run manager, so they should not // be deleted in the main() program !// be deleted in the main() program ! //// delete runManager;delete runManager;

return 0;return 0; }}

Page 6: WORK

try03DetectorConstruction.ctry03DetectorConstruction.ccc

#include "try03DetectorConstruction.hh"#include "try03DetectorConstruction.hh"

#include "G4Material.hh"#include "G4Material.hh"#include "G4Box.hh"#include "G4Box.hh"#include "G4Tubs.hh"#include "G4Tubs.hh"#include "G4LogicalVolume.hh"#include "G4LogicalVolume.hh"#include "G4ThreeVector.hh"#include "G4ThreeVector.hh"#include "G4PVPlacement.hh"#include "G4PVPlacement.hh"#include "globals.hh"#include "globals.hh"

try03DetectorConstruction::try03DetectorConstruction()try03DetectorConstruction::try03DetectorConstruction() : experimentalHall_log(0), tracker_log(0),: experimentalHall_log(0), tracker_log(0), calorimeterBlock_log(0), calorimeterLayer_log(0),calorimeterBlock_log(0), calorimeterLayer_log(0), experimentalHall_phys(0), calorimeterLayer_phys(0),experimentalHall_phys(0), calorimeterLayer_phys(0), calorimeterBlock_phys(0), tracker_phys(0)calorimeterBlock_phys(0), tracker_phys(0){;}{;}try03DetectorConstruction::~try03DetectorConstruction()try03DetectorConstruction::~try03DetectorConstruction(){{}}

Page 7: WORK

G4VPhysicalVolume* try03DetectorConstruction::Construct()G4VPhysicalVolume* try03DetectorConstruction::Construct() {{

//------------------------------------------------------ materials//------------------------------------------------------ materials

G4double a; G4double a; //// atomic massatomic mass G4double z; G4double z; //// atomic numberatomic number G4double density;G4double density;

G4Material* Ar = G4Material* Ar = new G4Material("ArgonGas", z= 18., a= 39.95*g/mole, density= 1.782*mg/cm3);new G4Material("ArgonGas", z= 18., a= 39.95*g/mole, density= 1.782*mg/cm3);

G4Material* Al = G4Material* Al = new G4Material("Aluminum", z= 13., a= 26.98*g/mole, density= 2.7*g/cm3);new G4Material("Aluminum", z= 13., a= 26.98*g/mole, density= 2.7*g/cm3);

G4Material* Pb = G4Material* Pb = new G4Material("Lead", z= 82., a= 207.19*g/mole, density= 11.35*g/cm3);new G4Material("Lead", z= 82., a= 207.19*g/mole, density= 11.35*g/cm3); //------------------------------------------------------ volumes//------------------------------------------------------ volumes //------------------------------ experimental hall (world volume)//------------------------------ experimental hall (world volume) G4double expHall_x = G4double expHall_x = 1.0*m1.0*m;; G4double expHall_y = G4double expHall_y = 3.0*m3.0*m;; G4double expHall_z = G4double expHall_z = 1.0*m1.0*m;; G4Box* experimentalHall_boxG4Box* experimentalHall_box = new G4Box("expHall_box",expHall_x,expHall_y,expHall_z);= new G4Box("expHall_box",expHall_x,expHall_y,expHall_z); experimentalHall_log = new G4LogicalVolume(experimentalHall_box,experimentalHall_log = new G4LogicalVolume(experimentalHall_box, Ar,"expHall_log",0,0,0);Ar,"expHall_log",0,0,0); experimentalHall_phys = new G4PVPlacement(0,G4ThreeVector(),experimentalHall_phys = new G4PVPlacement(0,G4ThreeVector(), experimentalHall_log,"expHall",0,false,0);experimentalHall_log,"expHall",0,false,0);

Page 8: WORK

//------------------------------ a tracker tube//------------------------------ a tracker tube

G4double innerRadiusOfTheTube = G4double innerRadiusOfTheTube = 0.0*m0.0*m;; G4double outerRadiusOfTheTube = G4double outerRadiusOfTheTube = 0.5*m0.5*m;; G4double hightOfTheTube = G4double hightOfTheTube = 1.0*m1.0*m;; G4double startAngleOfTheTube = 0.*deg;G4double startAngleOfTheTube = 0.*deg; G4double spanningAngleOfTheTube = 360.*deg;G4double spanningAngleOfTheTube = 360.*deg; G4Tubs* tracker_tube = new G4Tubs("tracker_tube",innerRadiusOfTheG4Tubs* tracker_tube = new G4Tubs("tracker_tube",innerRadiusOfThe

Tube,Tube, outerRadiusOfTheTube,hightOfTheTube,outerRadiusOfTheTube,hightOfTheTube, startAngleOfTheTube,spanningAngleOfTheTube);startAngleOfTheTube,spanningAngleOfTheTube); tracker_log = new G4LogicalVolume(tracker_tube,Al,"tracker_log",0,0,tracker_log = new G4LogicalVolume(tracker_tube,Al,"tracker_log",0,0,

0);0); G4double trackerPos_x = G4double trackerPos_x = 0.0*m0.0*m;; G4double trackerPos_y = G4double trackerPos_y = 1.0*m1.0*m;; G4double trackerPos_z = G4double trackerPos_z = 0.0*m0.0*m;; tracker_phys = new G4PVPlacement(0,tracker_phys = new G4PVPlacement(0, G4ThreeVector(trackerPos_x,trackerPos_y,trackerPos_z),G4ThreeVector(trackerPos_x,trackerPos_y,trackerPos_z), tracker_log,"tracker",experimentalHall_log,false,0);tracker_log,"tracker",experimentalHall_log,false,0);

Page 9: WORK

//------------------------------ a calorimeter block//------------------------------ a calorimeter block

G4double block_x = G4double block_x = 0.5*m0.5*m;; G4double block_y = G4double block_y = 1.0*m1.0*m;; G4double block_z = G4double block_z = 0.5*m0.5*m;; G4Box* calorimeterBlock_box = new G4Box("calBlock_box",block_x,G4Box* calorimeterBlock_box = new G4Box("calBlock_box",block_x, block_y,block_z);block_y,block_z); calorimeterBlock_log = new G4LogicalVolume(calorimeterBlock_box,calorimeterBlock_log = new G4LogicalVolume(calorimeterBlock_box, Pb,"caloBlock_log",0,0,0);Pb,"caloBlock_log",0,0,0); G4double blockPos_x = G4double blockPos_x = 0.0*m0.0*m;; G4double blockPos_y = G4double blockPos_y = -0.1*m-0.1*m;; G4double blockPos_z = G4double blockPos_z = 0.0*m0.0*m;; calorimeterBlock_phys = new G4PVPlacement(0,calorimeterBlock_phys = new G4PVPlacement(0, G4ThreeVector(blockPos_x,blockPos_y,blockPos_z),G4ThreeVector(blockPos_x,blockPos_y,blockPos_z), calorimeterBlock_log,"caloBlock",experimentalHall_log,false,0);calorimeterBlock_log,"caloBlock",experimentalHall_log,false,0); //------------------------------ calorimeter layers//------------------------------ calorimeter layers G4double calo_x = G4double calo_x = 40.*cm40.*cm;; G4double calo_y = G4double calo_y = 1.*cm1.*cm;; G4double calo_z = G4double calo_z = 40.*cm40.*cm;; G4Box* calorimeterLayer_box = new G4Box("caloLayer_box",G4Box* calorimeterLayer_box = new G4Box("caloLayer_box", calo_x,calo_y,calo_z);calo_x,calo_y,calo_z); calorimeterLayer_log = new G4LogicalVolume(calorimeterLayer_box,calorimeterLayer_log = new G4LogicalVolume(calorimeterLayer_box, Al,"caloLayer_log",0,0,0);Al,"caloLayer_log",0,0,0); for(G4int i=0;i<19;i++) for(G4int i=0;i<19;i++) // loop for 19 layers// loop for 19 layers {{ G4double caloPos_x = G4double caloPos_x = 0.00*cm0.00*cm;; G4double caloPos_y = G4double caloPos_y = (i-9)*10.*cm(i-9)*10.*cm;; G4double caloPos_z = G4double caloPos_z = 0.0*cm0.0*cm;; calorimeterLayer_phys = new G4PVPlacement(0,calorimeterLayer_phys = new G4PVPlacement(0, G4ThreeVector(caloPos_x,caloPos_y,caloPos_z),G4ThreeVector(caloPos_x,caloPos_y,caloPos_z), calorimeterLayer_log,"caloLayer",calorimeterBlock_log,false,i);calorimeterLayer_log,"caloLayer",calorimeterBlock_log,false,i); }} return experimentalHall_phys;return experimentalHall_phys; }}

Page 10: WORK

try03PhysicsList.cctry03PhysicsList.cc #include "try03PhysicsList.hh"#include "try03PhysicsList.hh" #include "G4ParticleTypes.hh"#include "G4ParticleTypes.hh" #include "G4ParticleTable.hh"#include "G4ParticleTable.hh" #include "G4ParticleDefinition.hh"#include "G4ParticleDefinition.hh" try03PhysicsList::try03PhysicsList()try03PhysicsList::try03PhysicsList() {;}{;}

try03PhysicsList::~try03PhysicsList()try03PhysicsList::~try03PhysicsList() {;}{;}

void try03PhysicsList::ConstructParticle()void try03PhysicsList::ConstructParticle() {{ // In this method, static member functions should be called// In this method, static member functions should be called // for all particles which you want to use. // for all particles which you want to use. ConstructBosons();ConstructBosons(); ConstructLeptons();ConstructLeptons(); ConstructMesons();ConstructMesons(); ConstructBaryons();ConstructBaryons(); ConstructIons();ConstructIons(); }}

Page 11: WORK

void try03PhysicsList::ConstructBosons()void try03PhysicsList::ConstructBosons() {{ //gamma//gamma G4Gamma::GammaDefinition();G4Gamma::GammaDefinition(); }}

#include "G4LeptonConstructor.hh"#include "G4LeptonConstructor.hh" void try03PhysicsList::ConstructLeptons()void try03PhysicsList::ConstructLeptons() {{ // Construct all leptons// Construct all leptons G4LeptonConstructor pConstructor;G4LeptonConstructor pConstructor; pConstructor.ConstructParticle();pConstructor.ConstructParticle(); }}

#include "G4MesonConstructor.hh"#include "G4MesonConstructor.hh" void try03PhysicsList::ConstructMesons()void try03PhysicsList::ConstructMesons() {{ // Construct all mesons// Construct all mesons G4MesonConstructor pConstructor;G4MesonConstructor pConstructor; pConstructor.ConstructParticle();pConstructor.ConstructParticle(); }}

#include "G4BaryonConstructor.hh"#include "G4BaryonConstructor.hh" void try03PhysicsList::ConstructBaryons()void try03PhysicsList::ConstructBaryons() {{ // Construct all barions// Construct all barions G4BaryonConstructor pConstructor;G4BaryonConstructor pConstructor; pConstructor.ConstructParticle(); pConstructor.ConstructParticle(); }}

#include "G4IonConstructor.hh"#include "G4IonConstructor.hh" void try03PhysicsList::ConstructIons()void try03PhysicsList::ConstructIons() {{ // Construct light ions// Construct light ions G4IonConstructor pConstructor;G4IonConstructor pConstructor; pConstructor.ConstructParticle(); pConstructor.ConstructParticle(); }}

Page 12: WORK

void try03PhysicsList::ConstructProcess()void try03PhysicsList::ConstructProcess() {{ // Define transportation process// Define transportation process AddTransportation();AddTransportation(); }}

void try03PhysicsList::SetCuts()void try03PhysicsList::SetCuts() {{ // uppress error messages even in case e/gamma/proton do not exist // uppress error messages even in case e/gamma/proton do not exist

G4int temp = GetVerboseLevel(); SetVerboseLevG4int temp = GetVerboseLevel(); SetVerboseLev

el(0); el(0); // " G4VUserPhysicsList::SetCutsWithDefault" method sets // " G4VUserPhysicsList::SetCutsWithDefault" method sets // the default cut value for all particle types // the default cut value for all particle types SetCutsWithDefault(); SetCutsWithDefault();

// Retrieve verbose level// Retrieve verbose level SetVerboseLevel(temp); SetVerboseLevel(temp); }}

Page 13: WORK

try03PrimaryGeneratorActiotry03PrimaryGeneratorAction.ccn.cc

#include "try03PrimaryGeneratorAction.hh"#include "try03PrimaryGeneratorAction.hh" #include "try03DetectorConstruction.hh"#include "try03DetectorConstruction.hh"

#include "G4Event.hh"#include "G4Event.hh" #include "G4ParticleGun.hh"#include "G4ParticleGun.hh" #include "G4ParticleTable.hh"#include "G4ParticleTable.hh" #include "G4ParticleDefinition.hh"#include "G4ParticleDefinition.hh" #include "globals.hh"#include "globals.hh"

try03PrimaryGeneratorAction::try03PrimaryGeneratorAction()try03PrimaryGeneratorAction::try03PrimaryGeneratorAction() {{ G4int n_particle = 1;G4int n_particle = 1; particleGun = new G4ParticleGun(n_particle);particleGun = new G4ParticleGun(n_particle);

G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable(); G4String particleName;G4String particleName; particleGun->SetParticleDefinition(particleTable->FindParticle(particleName="particleGun->SetParticleDefinition(particleTable->FindParticle(particleName=" protonproton"));")); particleGun->SetParticleEnergy(particleGun->SetParticleEnergy(10.0*GeV10.0*GeV);); particleGun->SetParticlePosition(G4ThreeVector(particleGun->SetParticlePosition(G4ThreeVector( 0.0*m, 2.0*m, 0.00.0*m, 2.0*m, 0.0));)); }}

Page 14: WORK

try03PrimaryGeneratorAction::~try03PrimaryGeneratorAction()try03PrimaryGeneratorAction::~try03PrimaryGeneratorAction() {{ delete particleGun;delete particleGun; }}

void try03PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)void try03PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent) {{ G4int i = anEvent->GetEventID() % 3;G4int i = anEvent->GetEventID() % 3; G4ThreeVector G4ThreeVector v(0.0,-1.0,0.0);v(0.0,-1.0,0.0); switch(i)switch(i) {{ case 0:case 0: break;break; case 1:case 1: v.setY(0.1);v.setY(0.1); break;break; case 2:case 2: v.setZ(0.1);v.setZ(0.1); break;break; }} particleGun->SetParticleMomentumDirection(v);particleGun->SetParticleMomentumDirection(v); particleGun->GeneratePrimaryVertex(anEvent);particleGun->GeneratePrimaryVertex(anEvent); }}

Page 15: WORK

try03datatry03data ========= Table of registered couples ======================================= Table of registered couples ============================== Index : 0 used in the geometry : Yes recalculation needed : No Index : 0 used in the geometry : Yes recalculation needed : No Material : ArgonGasMaterial : ArgonGas Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm Energy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 keVEnergy thresholds : gamma 990 eV e- 990 eV e+ 990 eV proton 100 keV Region(s) which use this couple : Region(s) which use this couple : DefaultRegionForTheWorldDefaultRegionForTheWorld Index : 1 used in the geometry : Yes recalculation needed : No Index : 1 used in the geometry : Yes recalculation needed : No Material : AluminumMaterial : Aluminum Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm Energy thresholds : gamma 6.90363 keV e- 598.345 keV e+ 570.85 keV proton 100 keVEnergy thresholds : gamma 6.90363 keV e- 598.345 keV e+ 570.85 keV proton 100 keV Region(s) which use this couple : Region(s) which use this couple : DefaultRegionForTheWorldDefaultRegionForTheWorld Index : 2 used in the geometry : Yes recalculation needed : No Index : 2 used in the geometry : Yes recalculation needed : No Material : LeadMaterial : Lead Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm Range cuts : gamma 1 mm e- 1 mm e+ 1 mm proton 1 mm Energy thresholds : gamma 101.843 keV e- 1.36749 MeV e+ 1.27862 MeV proton 100 keVEnergy thresholds : gamma 101.843 keV e- 1.36749 MeV e+ 1.27862 MeV proton 100 keV Region(s) which use this couple : Region(s) which use this couple : DefaultRegionForTheWorldDefaultRegionForTheWorld ======================================================================================================================================== Start Run processing.Start Run processing. ========================================================================== G4EventManager::ProcessOneEvent() G4EventManager::ProcessOneEvent() ========================================================================== 1 primaries are passed from G4EventTransformer.1 primaries are passed from G4EventTransformer. !!!!!!! Now start processing an event !!!!!!! !!!!!!! Now start processing an event !!!!!!! ********************************************************************************************************************************************************************************************************** * G4Track Information: Particle = proton, Track ID = 1, Parent ID = 0* G4Track Information: Particle = proton, Track ID = 1, Parent ID = 0 **********************************************************************************************************************************************************************************************************

Page 16: WORK

Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcNameStep# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName 0 0 2e+03 0 1e+04 0 0 0 expHall initStep0 0 2e+03 0 1e+04 0 0 0 expHall initStep 1 0 1.5e+03 0 1e+04 0 500 500 tracker Transportation1 0 1.5e+03 0 1e+04 0 500 500 tracker Transportation 2 0 500 0 1e+04 0 1e+03 1.5e+03 caloLayer Transportation2 0 500 0 1e+04 0 1e+03 1.5e+03 caloLayer Transportation 3 0 490 0 1e+04 0 10 1.51e+03 caloBlock Transportation3 0 490 0 1e+04 0 10 1.51e+03 caloBlock Transportation 4 0 410 0 1e+04 0 80 1.59e+03 caloLayer Transportation4 0 410 0 1e+04 0 80 1.59e+03 caloLayer Transportation 5 0 390 0 1e+04 0 20 1.61e+03 caloBlock Transportation5 0 390 0 1e+04 0 20 1.61e+03 caloBlock Transportation 6 0 310 0 1e+04 0 80 1.69e+03 caloLayer Transportation6 0 310 0 1e+04 0 80 1.69e+03 caloLayer Transportation 7 0 290 0 1e+04 0 20 1.71e+03 caloBlock Transportation7 0 290 0 1e+04 0 20 1.71e+03 caloBlock Transportation 8 0 210 0 1e+04 0 80 1.79e+03 caloLayer Transportation8 0 210 0 1e+04 0 80 1.79e+03 caloLayer Transportation 9 0 190 0 1e+04 0 20 1.81e+03 caloBlock Transportation9 0 190 0 1e+04 0 20 1.81e+03 caloBlock Transportation 10 0 110 0 1e+04 0 80 1.89e+03 caloLayer Transportation10 0 110 0 1e+04 0 80 1.89e+03 caloLayer Transportation 11 0 90 0 1e+04 0 20 1.91e+03 caloBlock Transportation11 0 90 0 1e+04 0 20 1.91e+03 caloBlock Transportation 12 0 10 0 1e+04 0 80 1.99e+03 caloLayer Transportation12 0 10 0 1e+04 0 80 1.99e+03 caloLayer Transportation 13 0 -10 0 1e+04 0 20 2.01e+03 caloBlock Transportation13 0 -10 0 1e+04 0 20 2.01e+03 caloBlock Transportation 14 0 -90 0 1e+04 0 80 2.09e+03 caloLayer Transportation14 0 -90 0 1e+04 0 80 2.09e+03 caloLayer Transportation 15 0 -110 0 1e+04 0 20 2.11e+03 caloBlock Transportation15 0 -110 0 1e+04 0 20 2.11e+03 caloBlock Transportation 16 0 -190 0 1e+04 0 80 2.19e+03 caloLayer Transportation16 0 -190 0 1e+04 0 80 2.19e+03 caloLayer Transportation 17 0 -210 0 1e+04 0 20 2.21e+03 caloBlock Transportation17 0 -210 0 1e+04 0 20 2.21e+03 caloBlock Transportation 18 0 -290 0 1e+04 0 80 2.29e+03 caloLayer Transportation18 0 -290 0 1e+04 0 80 2.29e+03 caloLayer Transportation 19 0 -310 0 1e+04 0 20 2.31e+03 caloBlock Transportation19 0 -310 0 1e+04 0 20 2.31e+03 caloBlock Transportation 20 0 -390 0 1e+04 0 80 2.39e+03 caloLayer Transportation20 0 -390 0 1e+04 0 80 2.39e+03 caloLayer Transportation 21 0 -410 0 1e+04 0 20 2.41e+03 caloBlock Transportation21 0 -410 0 1e+04 0 20 2.41e+03 caloBlock Transportation 22 0 -490 0 1e+04 0 80 2.49e+03 caloLayer Transportation22 0 -490 0 1e+04 0 80 2.49e+03 caloLayer Transportation 23 0 -510 0 1e+04 0 20 2.51e+03 caloBlock Transportation23 0 -510 0 1e+04 0 20 2.51e+03 caloBlock Transportation 24 0 -590 0 1e+04 0 80 2.59e+03 caloLayer Transportation24 0 -590 0 1e+04 0 80 2.59e+03 caloLayer Transportation 25 0 -610 0 1e+04 0 20 2.61e+03 caloBlock Transportation25 0 -610 0 1e+04 0 20 2.61e+03 caloBlock Transportation 26 0 -690 0 1e+04 0 80 2.69e+03 caloLayer Transportation26 0 -690 0 1e+04 0 80 2.69e+03 caloLayer Transportation 27 0 -710 0 1e+04 0 20 2.71e+03 caloBlock Transportation27 0 -710 0 1e+04 0 20 2.71e+03 caloBlock Transportation 28 0 -790 0 1e+04 0 80 2.79e+03 caloLayer Transportation28 0 -790 0 1e+04 0 80 2.79e+03 caloLayer Transportation 29 0 -810 0 1e+04 0 20 2.81e+03 caloBlock Transportation29 0 -810 0 1e+04 0 20 2.81e+03 caloBlock Transportation 30 0 -890 0 1e+04 0 80 2.89e+03 caloLayer Transportation30 0 -890 0 1e+04 0 80 2.89e+03 caloLayer Transportation 31 0 -910 0 1e+04 0 20 2.91e+03 caloBlock Transportation31 0 -910 0 1e+04 0 20 2.91e+03 caloBlock Transportation 32 0 -990 0 1e+04 0 80 2.99e+03 caloLayer Transportation32 0 -990 0 1e+04 0 80 2.99e+03 caloLayer Transportation 33 0 -1.01e+03 0 1e+04 0 20 3.01e+03 caloBlock Transportation33 0 -1.01e+03 0 1e+04 0 20 3.01e+03 caloBlock Transportation 34 0 -1.1e+03 0 1e+04 0 90 3.1e+03 expHall Transportation34 0 -1.1e+03 0 1e+04 0 90 3.1e+03 expHall Transportation 35 0 -3e+03 0 1e+04 0 1.9e+03 5e+03 OutOfWorld Transportation35 0 -3e+03 0 1e+04 0 1.9e+03 5e+03 OutOfWorld Transportation

Page 17: WORK

Track (trackID 1, parentID 0) is processed with stopping code 2Track (trackID 1, parentID 0) is processed with stopping code 2 NULL returned from G4StackManager.NULL returned from G4StackManager. Terminate current event processing.Terminate current event processing. Run terminated.Run terminated. Run SummaryRun Summary Number of events processed : 1Number of events processed : 1 User=0.01s Real=0.01s Sys=0sUser=0.01s Real=0.01s Sys=0s G4 kernel has come to Quit state.G4 kernel has come to Quit state. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Maximum number of tracks in the urgent stack : 1Maximum number of tracks in the urgent stack : 1 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Page 18: WORK

join the fieldjoin the field

Change:Change: DetectorConstructionDetectorConstruction PhysicsListPhysicsList MagneticFieldMagneticField

Page 19: WORK

try01DetectorConstruction.cctry01DetectorConstruction.cc 1. #include "try01MagneticField.hh"1. #include "try01MagneticField.hh" 2. try01DetectorConstruction::try01DetectorConstruction()2. try01DetectorConstruction::try01DetectorConstruction() : experimentalHall_log(0), tracker_log(0),: experimentalHall_log(0), tracker_log(0), calorimeterBlock_log(0), calorimeterLayer_log(0),calorimeterBlock_log(0), calorimeterLayer_log(0), experimentalHall_phys(0), calorimeterLayer_phys(0),experimentalHall_phys(0), calorimeterLayer_phys(0), calorimeterBlock_phys(0), tracker_phys(0),calorimeterBlock_phys(0), tracker_phys(0),fpMagField(0)fpMagField(0) {{ fpMagField = new try01MagneticField();fpMagField = new try01MagneticField(); }} try01DetectorConstruction::~try01DetectorConstruction()try01DetectorConstruction::~try01DetectorConstruction() {{ delete fpMagField;delete fpMagField; }}3. void try01DetectorConstruction::SetMagField(G4double fieldValue)3. void try01DetectorConstruction::SetMagField(G4double fieldValue) {{ fpMagField->SetMagFieldValue(fieldValue);fpMagField->SetMagFieldValue(fieldValue); }}

Page 20: WORK

try01PhysicsList.cctry01PhysicsList.cc

1. #include "G4ProcessManager.hh“1. #include "G4ProcessManager.hh“ 2. void try01PhysicsList::ConstructProcess()2. void try01PhysicsList::ConstructProcess() {{ // Define transportation process// Define transportation process AddTransportation();AddTransportation(); ConstructEM();ConstructEM(); }}

Page 21: WORK

3. #include "G4ComptonScattering.hh"3. #include "G4ComptonScattering.hh" #include "G4GammaConversion.hh"#include "G4GammaConversion.hh" #include "G4PhotoElectricEffect.hh”#include "G4PhotoElectricEffect.hh” .. .. .. void try01PhysicsList::ConstructEM()void try01PhysicsList::ConstructEM() {{ theParticleIterator->reset();theParticleIterator->reset(); while( (*theParticleIterator)() ){while( (*theParticleIterator)() ){ G4ParticleDefinition* particle = theParticleIterator->value();G4ParticleDefinition* particle = theParticleIterator->value(); G4ProcessManager* pmanager = particle->GetProcessManager();G4ProcessManager* pmanager = particle->GetProcessManager(); G4String particleName = particle->GetParticleName();G4String particleName = particle->GetParticleName(); if (particleName == "gamma") if (particleName == "gamma") { // gamma { // gamma pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);pmanager->AddDiscreteProcess(new G4PhotoElectricEffect); pmanager->AddDiscreteProcess(new G4ComptonScattering);pmanager->AddDiscreteProcess(new G4ComptonScattering); pmanager->AddDiscreteProcess(new G4GammaConversion);pmanager->AddDiscreteProcess(new G4GammaConversion); } } .. .. ..

Page 22: WORK
Page 23: WORK

ENDEND