Work_Geant4 Bo-Wen Shiou. #include "G4RunManager.hh“ #include "G4RunManager.hh“ #include "G4UImanager.hh" #include "G4UImanager.hh" #include "ExN01DetectorConstruction.hh“

Slides:



Advertisements
Similar presentations
Geant4 v9.2p02 Geometry I Makoto Asai (SLAC) Geant4 Tutorial Course.
Advertisements

Geant4 Collaboration WS1 Extension of Geant4 particles : hyper-nuclei / anti-nuclei 12 th Geant4 Collaboration Workshop Hisaya.
Geant4 v9.4 Material Makoto Asai (SLAC) Geant4 Tutorial Course.
Geant4 v9.4 Geometry I Makoto Asai (SLAC) Geant4 Tutorial Course.
Makoto Asai (SLAC) Geant4 Tutorial Course
Geometry I Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01.
Introduction and Getting Started ESA/ESTEC Makoto Asai (SLAC)
Makoto Asai (SLAC) Geant4 Users CERN Nov. 15 th, 2002 Customizing Run Management.
Nested Parameterization
Geometry II Makoto Asai (SLAC) Geant4 Tutorial Course Geant4 v8.2p01.
MICE PID Review 12 October Upstream PID simulation: Simulation Results II Hideyuki Sakamoto (Osaka Univ.) MICE Collaboration Meeting 12 th October.
Defining Material Tatsumi Koi (SLAC/SCCS) (based on Makoto Asai's slides) Geant4 Tutorial Course Geant4 v8.2p01.
Detector Description - Materials
Detector Description: Materials
Defining Materials Geant4 tutorial Paris, 4-8 June 2007 Giovanni Santin ESA / ESTEC Rhea System SA With material from previous tutorials by Makoto Asai.
Geant4 Geometry – building your virtual experiment
Логашенко И.Б. Современные методы обработки экспериментальных данных GEANT4 – программный пакет для моделирования взаимодействия элементарных частиц с.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
A Hands-on introduction to Geant4 Andrea Dell’Acqua CERN-EP/ATC
Tabular Editors for Geant4 Geant4 Geometry Editor and Geant4 Physics Editor CHEP 2000 at Padova Hajime Yoshida Naruto University of Education.
parameterisation The aim of the exercise is again to build a lead-scintillator calorimeter, this time though the calorimeter will be a trapezoid.
Materials 1 Images: Isotopic composition Molecular composition Density Pressure State Temperature.
Tuesday, Nov 9th 9:30-12:30 –Visualization attributes –Physics processes 14:00-17:00 –Kinematics and event generation (from yesterday) Particle gun –Boolean.
Geometry Detector geometry A detector geometry in Geant4 is made of a number of volumes. The largest volume is called the World volume. It must contain.
Materials In nature, general materials (compounds, mixtures) are made by elements and elements are made by isotopes. These are the three main classes.
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Collaboration.
Physics I: Physics Lists Geant4 Tutorial at Jefferson Lab 10 July 2012 Dennis Wright (SLAC) Geant4 9.6 beta.
Special Topics in Nuclear Physics, JU, Second Semester, (Saed Dababneh). 1 Course web or
7th December 2007Geant4 Manchester Seminar1 Geant4 A simulation toolkit Geometry and tracking 4th incarnation.
W. Pokorski - CERN Simulation Project1 Python binding for Geant4 toolkit using Reflex/PyROOT tool Witek Pokorski EuroPython 2006, CERN, Geneva
Krakow Feb.06 Institute of Physics, Prague Petr Mikes / Lukas Masek.
Monte Carlo /12/07. What is Geant ? Monte Carlo simulation tool for nuclear and particle physics Set up detectors –Sensitive detector which returns.
User Application Toolkit + User application toolkit Geant4 is a toolkit –i.e. you cannot “run” it out of the box –You must write.
User Application Luciano Pandola INFN-LNGS Partially based on a presentation by Maria Grazia Pia (INFN-Ge)
Detector Description – Part I Ivana Hrivnacova, IPN Orsay Tatiana Nikitina, CERN Aknowledgement: Slides by: J.Apostolakis, G.Cosmo, A. Lechner
Monte carlo and analysis tool study Shi-hong yao.
Generating Primary Particles Each Geant4 Event starts with generation of one or multiple primary particles It is up to the user to define primary particle.
Material Definition University of Pennsylvania Geant4 Tutorial 15 May 2011 Dennis Wright Geant4 V9.4.
Run and Event G4Run and G4RunManager In Geant4, the Run is the largest unit of simulation and it consist of a series of events Within a Run, the detector.
A Thread-Parallel Geant4 with Shared Geometry Gene Cooperman and Xin Dong College of Computer and Information Science Northeastern University 360 Huntington.
May 20, 2005Wah-kai Ngai1 Basic Visualization Tutorial Using Geant4.
A Hands-on introduction to Geant4 Andrea Dell’Acqua CERN-EP/ATC
WORK Bo-Wen Shiou. GNUmakefile GNUmakefile XXX.cc (ex:try03.cc) XXX.cc (ex:try03.cc) include folder (xxx.hh) include folder (xxx.hh) src folder (xxx.cc)
Detector Description: Basics
Physics I: Physics Lists Puebla Geant4 Tutorial 15 June 2010 Dennis Wright Geant4 V9.3.p01.
DENSITY Density = MASS Volume. MASS –How heavy an object is. –Quantity of matter observed in an object. –Measured in kg, g, or mg –WE FEEL MASS (Atoms).
Use of Ions in MT Makoto Asai 2013 Geant4 Collaboration Seville.
Detector Description - Materials
1 Exercises 0 Go inside the “hadrontherapy” directory: cd hadrontherapy Copy the Hadrontherapy example to your home folder: cp –r $G4INSTALL/examples/advanced/hadrontherapy.
What are the Factors that Affect Density?
Makoto Asai.  Parallel layered mass geometry  Other minor improvement  G4Exception.
Maria Grazia Pia Retrieving information from kernel Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
Makoto Asai.  In the past, material is considered only if it appears in the mass (tracking) world. The user might define parallel world(s) for artificial.
Detector Description – Part I Ivana Hrivnacova, IPN Orsay Tatiana Nikitina, CERN Aknowledgement: Slides by: J.Apostolakis, G.Cosmo, A. Lechner
A Hands-on introduction to Geant4
Physics I: Physics Lists
User Application
Detector Description - Materials
User Application
User Application
The full set of lecture notes of this Geant4 Course is available at
Customizing Run Management
The full set of lecture notes of this Geant4 Course is available at
Kernel Author: Makoto Asai.
The full set of lecture notes of this Geant4 Course is available at
The Density Problem.
Particles and Density How does the arrangement of particles effect density ? How is density calculated ?
What amount of heat is required to increase the temperature of 75
Monte Carlo /12/25.
GEANT4: Inner Poly Shield
Presentation transcript:

Work_Geant4 Bo-Wen Shiou

#include "G4RunManager.hh“ #include "G4RunManager.hh“ #include "G4UImanager.hh" #include "G4UImanager.hh" #include "ExN01DetectorConstruction.hh“ #include "ExN01DetectorConstruction.hh“ #include "ExN01PhysicsList.hh“ #include "ExN01PhysicsList.hh“ #include "ExN01PrimaryGeneratorAction.hh" #include "ExN01PrimaryGeneratorAction.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 runManager->SetUserInitialization(new ExN01DetectorConstruction); runManager->SetUserInitialization(new ExN01DetectorConstruction); runManager->SetUserInitialization(new ExN01PhysicsList); runManager->SetUserInitialization(new ExN01PhysicsList); A Sample main() Method

// set mandatory user action class // set mandatory user action class runManager->SetUserAction(new ExN01PrimaryGeneratorAction); runManager->SetUserAction(new ExN01PrimaryGeneratorAction); // 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 int numberOfEvent = 3; // start a run int numberOfEvent = 3; runManager->BeamOn(numberOfEvent); runManager->BeamOn(numberOfEvent); // job termination delete runManager; // job termination delete runManager; return 0; return 0; }

Detector Construction 1. Create a geometry. 2. Using this geometry, and adding other attributes and adding other attributes

Create a geometry Example : Creating a box. G4double expHall_x = 3.0*m; G4double expHall_x = 3.0*m; G4double expHall_y = 1.0*m; G4double expHall_y = 1.0*m; G4double expHall_z = 1.0*m; G4double expHall_z = 1.0*m; G4Box* experimentalHall_box G4Box* experimentalHall_box = new G4Box("expHall_box",expHall_x,expHall_y,expHall_z); = new G4Box("expHall_box",expHall_x,expHall_y,expHall_z);

Example : Create a Physical Volume G4VPhysicalVolume* experimentalHall_phys = new G4PVPlacement(0, // no rotation G4ThreeVector(0.,0.,0.), // translation position G4ThreeVector(0.,0.,0.), // translation position experimentalHall_log, // its logical volume experimentalHall_log, // its logical volume "expHall", // its name "expHall", // its name 0, // its mother volume 0, // its mother volume false, // no boolean operations false, // no boolean operations 0); // its copy number 0); // its copy number Example : Create a Logical Volume G4LogicalVolume* experimentalHall_log = newG4LogicalVolume(experimentalHall_box,Ar,"expHall_log");

Materials in the Detector G4Element Ex: atomic number, atomic mass ……etc Ex: atomic number, atomic mass ……etc G4Material G4Material Ex: density, temperature, Ex: density, temperature, pressure ……etc pressure ……etc

Example: water a = 1.01*g/mole; a = 1.01*g/mole; G4Element* elH G4Element* elH = new G4Element(name="Hydrogen",symbol="H", z= 1., a); = new G4Element(name="Hydrogen",symbol="H", z= 1., a); a = 16.00*g/mole; a = 16.00*g/mole; G4Element* elO G4Element* elO = new G4Element(name="Oxygen",symbol="O", z= 8., a); = new G4Element(name="Oxygen",symbol="O", z= 8., a); density = 1.000*g/cm3; density = 1.000*g/cm3; G4Material* H2O G4Material* H2O = new G4Material(name="Water",density,ncomponents=2); = new G4Material(name="Water",density,ncomponents=2); H2O->AddElement(elH, natoms=2); H2O->AddElement(elH, natoms=2); H2O->AddElement(elO, natoms=1); H2O->AddElement(elO, natoms=1);

Example : air a = 14.01*g/mole; G4Element* elN G4Element* elN = new G4Element(name="Nitrogen",symbol="N", z= 7., a); = new G4Element(name="Nitrogen",symbol="N", z= 7., a); a = 16.00*g/mole; G4Element* elO G4Element* elO = new G4Element(name="Oxygen",symbol="O", z= 8., a); = new G4Element(name="Oxygen",symbol="O", z= 8., a); density = 1.290*mg/cm3; G4Material* Air G4Material* Air = new G4Material(name="Air ",density,ncomponents=2); = new G4Material(name="Air ",density,ncomponents=2); Air->AddElement(elN, fractionmass=70*perCent); Air->AddElement(elO, fractionmass=30*perCent);

G4VuserPhysicsList ConstructParticle(); // construction of particles // construction of particlesConstructProcess(); // construct processes and register them to particles // construct processes and register them to particlesSetCuts(); // setting a range cut value for all particles // setting a range cut value for all particles

Example : Construct a proton and a geantino. Construct a proton and a geantino. void ExN01PhysicsList::ConstructParticle() { G4Proton::ProtonDefinition(); G4Proton::ProtonDefinition(); G4Geantino::GeantinoDefinition(); G4Geantino::GeantinoDefinition(); }

G4BosonConstructorG4LeptonConstructorG4MesonConstructorG4BarionConstructorG4IonConstructorG4ShortlivedConstructor.

Example : Construct all leptons. void ExN05PhysicsList::ConstructLeptons() { // Construct all leptons // Construct all leptons G4LeptonConstructor pConstructor; G4LeptonConstructor pConstructor; pConstructor.ConstructParticle(); pConstructor.ConstructParticle(); }

Dictionary of Particles G4ParticleTable FindParticle(G4String name); FindParticle(G4String name); // find the particle by name // find the particle by name FindParticle(G4int PDGencoding) FindParticle(G4int PDGencoding) // find the particle by PDG encoding. // find the particle by PDG encoding.

G4ParticleDefinition* GetIon ( G4int atomicNumber, G4int atomicNumber, G4int atomicMass, G4int atomicMass, G4double excitationEnergy G4double excitationEnergy);