Presentation is loading. Please wait.

Presentation is loading. Please wait.

Логашенко И.Б. Современные методы обработки экспериментальных данных GEANT4 – программный пакет для моделирования взаимодействия элементарных частиц с.

Similar presentations


Presentation on theme: "Логашенко И.Б. Современные методы обработки экспериментальных данных GEANT4 – программный пакет для моделирования взаимодействия элементарных частиц с."— Presentation transcript:

1 Логашенко И.Б. Современные методы обработки экспериментальных данных GEANT4 – программный пакет для моделирования взаимодействия элементарных частиц с веществом

2 Логашенко И.Б.Современные методы обработки экспериментальных данных 2 Документация Веб-страница http://geant4.cern.ch Руководство пользователя http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/index.html Подробное описание классов http://geant4.cern.ch/bin/SRM/G4GenDoc.csh?flag=1 http://www-geant4.kek.jp/lxr/source/

3 Логашенко И.Б.Современные методы обработки экспериментальных данных 3 Запуск примера 1.Зайдите на class-lin 2.Скопируйте директорию mkdir geant4 cd geant4 cp /home/Logashenko/geant4/setenv.sh. cp –r /home/Logashenko/geant4/simple. 3.Отредактируйте setenv.sh 4.Откомпилируйте пример source setenv.sh cd simple gmake 5.Запустите пример../bin/Linux-g++/exampleN03 run1.mac

4 Maria Grazia Pia, INFN Genova http://cern.ch/geant4/geant4 http://www.ge.infn.it/geant4 Overview of applications

5 Maria Grazia Pia, INFN Genova ATLAS Courtesy of ATLAS Collaboration -1001000200300400500 0 600 100 200 300 400 500 700 800 Calorimeter Signal [nA] Events/10 nA 180 GeV μ HEC Testbeam: Muon Response Comparisons Extensive comparisons with test beam data (activity in progress)

6 Maria Grazia Pia, INFN Genova

7  astrophysics  - ray bursts AGILE GLAST Typical telescope: Tracker Calorimeter Anticoincidence   conversion  electron interactions  multiple scattering   -ray production  charged particle tracking GLAST

8 Maria Grazia Pia, INFN Genova CT-simulation with a Rando phantom Experimental data with TLD LiF dosimeter CT images used to define the geometry: a thorax slice from a Rando anthropomorphic phantom Comparison with commercial treatment planning systems M. C. Lopes IPOFG-CROC Coimbra Oncological Regional Center L. Peralta, P. Rodrigues, A. Trindade LIP - Lisbon Central-Axis depth dose Profile curves at 9.8 cm depth PLATO overestimates the dose at ~ 5% level

9 Maria Grazia Pia, INFN Genova Dosimetry in interplanetary missions Aurora Programme Dose in astronaut resulting from Galactic Cosmic Rays vehicle concept

10 Maria Grazia Pia, INFN Genova GATE a Geant4 based simulation platform, designed for PET and SPECT Recently released as an open source software system under GPL >400 registered users worldwide GATE Collaboration

11 Maria Grazia Pia, INFN Genova Current implementation ORNL and MIRD5 phantoms Male and Female Geant4 analytical phantom ORNL model, female 1 skull 2 thyroid 3 spine 4 lungs 5 breast 6 heart 7 liver 8 stomach 9 spleen 10 kidneys 11 pancreas 12 intestine 13 uterus and ovaries 14 bladder 15 womb 16 leg bones 17 arm bones Geant4 analytical phantoms

12 Maria Grazia Pia, INFN Genova Heavy ion beams Geant4 simulation Beam Track Reconstruction 135 MeV/u 12 C beam NIRS N. Kanematsu, M. Komori - Nagoya K. Niwa, T.Toshito, T.Nakamura, T.Ban, N.Naganawa, S.Takahashi - Uchu-ken M.Ozaki - Kobe S. Aoki - Aichi Y.Kodama - Naruto H.Yoshida - Ritsumei S.Tanaka - SLAC M. Asai, T. Koi - Tokyo N.Kokubu - Gunma K. Yusa - Toho H.Shibuya, R.Ogawa, A. Shibazaki, T.Fukushima - KEK K. Amako, K.Murakami, T. Sasaki high spatial resolution emulsion chamber Medical ion beam Events with > 50000 particles/event in detector acceptance CMS ~ 180 minutes to simulate 1 event with 55K generator tracks

13 Maria Grazia Pia, INFN Genova - DNA Relevance for space: astronaut and airline pilot radiation hazards, biological experiments Applications in radiotherapy, radiobiology… http://www.ge.infn.it/geant4/dna/ Prototyping Multi-disciplinary Collaboration of n astrophysicists/space scientists n particle physicists n medical physicists n computer scientists n biologists n physicians 5.3 MeV  particle in a cylindrical volume. The inner cylinder has a radius of 50 nm. What if the geometry to describe with Geant4 were DNA and the process were mutagenesis? Study of radiation damage at the cellular and DNA level in the space radiation environment (and other applications, not only in the space domain)

14 User Application http://cern.ch/geant4

15 EGS4, EGS5, EGSnrc Geant3, Geant4 MARS MCNP, MCNPX, A3MCNP, MCNP-DSP, MCNP4B MVP, MVP-BURN Penelope Peregrine Tripoli-3, Tripoli-3 A, Tripoli-4 DPM EA-MC FLUKA GEM HERMES LAHET MCBEND MCU MF3D NMTC MONK MORSE RTS&T-2000 SCALE TRAX VMC++...and I probably forgot some more Many codes not publicly distributed A lot of business around MC The zoo Monte Carlo codes presented at the MC200 Conference, Lisbon, October 2000

16 Geant4 Collaboration CERN, ESA, KEK, SLAC, TRIUMF, TJNL INFN, IN2P3, PPARC Barcelona Univ., Budker Inst., Frankfurt Univ., Karolinska Inst., Helsinki Univ., Lebedev Inst., LIP, Northeastern Univ. etc. MoU based Distribution, Development and User Support of Geant4

17 Toolkit + User application toolkit Geant4 is a toolkit –i.e. you cannot “run” it out of the box –You must write an application, which uses Geant4 tools Consequences –There are no such concepts as “Geant4 defaults” –You must provide the necessary information to configure your simulation –You must deliberately choose which Geant4 tools to use examples Guidance: we provide many examples –Novice Examples –Novice Examples: overview of Geant4 tools –Advanced Examples –Advanced Examples: Geant4 tools

18 Basic concepts MUST What you MUST do: experimental set-up –Describe your experimental set-up primary particles –Provide the primary particles input to your simulation particlesphysics models –Decide which particles and physics models you want to use out of those available in Geant4 and the precision of your simulation (cuts to produce and track secondary particles) You may also want control –To interact with Geant4 kernel to control your simulation visualise –To visualise your simulation configuration or results histograms, tuples –To produce histograms, tuples etc. to be further analysed

19 Geant4 Kernel Provides central functionality of the toolkit –handles runs, events, tracks, steps, hits, trajectories –implements Geant4 as a state machine –provides a framework for:  physics processes  visualization drivers  GUIs  persistency  histogramming/analysis  user code 1

20 Run A run is a collection of events which are produced under identical conditions Within a run, a user cannot change: –Detector or apparatus geometry –Physics process settings By analogy to high energy physics a Geant4 run begins with the command “BeamOn” –Detector is inaccessible once beam is on At beginning of run: –Geometry is optimized for navigation –Cross sections are calculated according to materials in the setup –Low-energy cutoff values are defined 1

21 Event At beginning of processing, an event contains primary particles (from generator, particle gun,...), which are pushed into a stack During processing, each particle is popped from the stack and tracked When the stack is empty, processing of the event is over The class G4Event represents an event At the end of processing it has the following objects: –List of primary vertices and particles (the input) –Hits collections –Trajectory collections (optional) –Digitizations collections (optional) 1

22 Track A track is a snapshot of a particle within its environment –as the particle moves, the quantities in the snapshot change –at any particular instance, a track has position, physical quantities –it is not a collection of steps Track object lifetime –created by a generator or physics process (e.g. decay) –deleted when it:  leaves world volume  disappears (particle decays or is absorbed)  goes to zero energy and no “at rest” process is defined  user kills it No track object survives the end of an event (not persistent) –User must take action to store track record in trajectory 1

23 Step The step is the basic unit of simulation –Has two points (pre-step, post-step) –Contains the incremental particle information (energy loss, elapsed time, etc.) –Each point contains volume and material information –If step is limited by a boundary, the end point stands exactly on the boundary, but is logically part of next volume –Hence boundary processes such as refraction and transition radiation can be simulated 1

24 Interaction with Geant4 kernel tools Geant4 design provides tools for a user application –To tell the kernel about your simulation configuration –To interact with Geant4 kernel itself base classes Geant4 tools for user interaction are base classes your own concrete class –You create your own concrete class derived from the base classes (polymorphism) –Geant4 kernel handles your own derived classes transparently through their base class interface (polymorphism) Abstract base classes Abstract base classes for user interaction –User derived concrete classes are mandatory Concrete base classes Concrete base classes (with virtual dummy methods) for user interaction optional –User derived classes are optional

25 Initialisation classes Invoked at the initialization G4VUserDetectorConstruction G4VUserPhysicsList Action classes Invoked during the execution loop G4VUserPrimaryGeneratorAction G4UserRunAction G4UserEventAction G4UserTrackingAction G4UserStackingAction G4UserSteppingAction Mandatory classes: G4VUserDetectorConstruction describe the experimental set-up G4VUserPhysicsList select the physics you want to activate G4VUserPrimaryGeneratorAction generate primary events User classes

26 The main program main() Geant4 does not provide the main() –Geant4 is a toolkit! –The main() is part of the user application must In his/her main(), the user must G4RunManager –construct G4RunManager (or his/her own derived class) –notify the G4RunManager mandatory user classes derived from  G4VUserDetectorConstruction  G4VUserPhysicsList  G4VUserPrimaryGeneratorAction The user may define in his/her main() –optional user action classes – VisManager, (G)UI session

27 { … // Construct the default run manager G4RunManager ; G4RunManager* runManager = new G4RunManager ; // Set mandatory user initialization classes MyDetectorConstruction ; MyDetectorConstruction* detector = new MyDetectorConstruction ; runManager->SetUserInitialization(detector); MyPhysicsList runManager->SetUserInitialization( new MyPhysicsList); // Set mandatory user action classes MyPrimaryGeneratorAction runManager->SetUserAction( new MyPrimaryGeneratorAction ); // Set optional user action classes MyEventAction(); MyEventAction* eventAction = new MyEventAction(); runManager->SetUserAction(eventAction); MyRunAction(); MyRunAction* runAction = new MyRunAction(); runManager->SetUserAction(runAction); … } main()

28 Describe the experimental set-up G4VUserDetectorConstruction Derive your own concrete class from the G4VUserDetectorConstruction abstract base class Construct() Implement the Construct() method –construct all necessary materials –define shapes/solids required to describe the geometry –construct and place volumes of your detector geometry –define sensitive detectors and identify detector volumes to associate them to –associate magnetic field to detector regions –define visualisation attributes for the detector elements

29 How to define materials PVPhysicalVolume* MyDetectorConstruction::Construct() { … a = 207.19*g/mole; density = 11.35*g/cm3; new G4Material G4Material* lead = new G4Material(name="Pb", z=82., a, density); density = 5.458*mg/cm3; pressure = 1*atmosphere; temperature = 293.15*kelvin; new G4Material G4Material* xenon = new G4Material(name="XenonGas", z=54., a=131.29*g/mole, density, kStateGas, temperature, pressure);... } Different kinds of materials can be defined Isotopes Elements Molecules Compounds and mixtures Lead Xenon gas

30 For example, a scintillator consisting of Hydrogen and Carbon: G4double a = 1.01*g/mole; G4Element G4Element* H = new G4Element(name="Hydrogen", symbol="H", z=1., a); a = 12.01*g/mole; G4Element G4Element* C = new G4Element(name="Carbon", symbol="C", z=6., a); G4double density = 1.032*g/cm3; G4Material* scintillatorG4Material G4Material* scintillator = new G4Material(name = "Scintillator", density, numberOfComponents = 2); scintillator -> AddElement(C, numberOfAtoms = 9); scintillator -> AddElement(H, numberOfAtoms = 10); How to define a compound material

31 Define detector geometry Three conceptual layers –G4VSolid shape, size –G4LogicalVolume material, sensitivity, magnetic field, etc. –G4VPhysicalVolume position, rotation A unique physical volume (the world volume), which represents the experimental area, must exist and fully contain all other components World Volume B (daughter) Volume A (mother) e.g.: Volume A is mother of Volume B The mother must contain the daughter volume entirely

32 solidWorld = new G4Box(“World", halfWorldLength, halfWorldLength, halfWorldLength); logicWorld = new G4LogicalVolume(solidWorld, air, "World", 0, 0, 0); physicalWorld = new G4PVPlacement(0, //no rotation G4ThreeVector(), // at (0,0,0) logicWorld, // its logical volume "World", // its name 0, // its mother volume false, // no boolean operations 0); // no magnetic field solidTarget = new G4Box(“Target", targetSize, targetSize, targetSize); logicTarget = new G4LogicalVolume(solidTarget, targetMaterial, "Target",0,0,0); physicalTarget = new G4PVPlacement(0, // no rotation positionTarget, // at (x,y,z) logicTarget, // its logical volume "Target", // its name logicWorld, // its mother volume false, // no boolean operations 0); // no particular field How to build the World How to build a volume inside the World

33 Select physics processes Geant4 does not have any default particles or processes Derive your own concrete class from the G4VUserPhysicsList abstract base class –define all necessary particles –define all necessary processes and assign them to proper particles –define production thresholds (in terms of range) Pure virtual methods of G4VUserPhysicsList to be implemented by the user in his/her concrete derived class ConstructParticles() ConstructProcesses() SetCuts()

34 PhysicsList: particles and cuts void MyPhysicsList :: ConstructParticles() { G4Electron::ElectronDefinition(); G4Positron::PositronDefinition(); G4Gamma::GammaDefinition(); } the particles Define the particles involved in the simulation void MyPhysicsList :: SetCuts() { SetCutsWithDefault(); } Set the production threshold MyPhysicsList :: MyPhysicsList(): G4VUserPhysicsList() { defaultCutValue = 1.0*cm; } production thresholds Define production thresholds (the same for all particles)

35 PhysicsList: more about cuts MyPhysicsList :: MyPhysicsList(): G4VUserPhysicsList() { // Define production thresholds cutForGamma = 1.0*cm; cutForElectron = 1.*mm; cutForPositron = 0.1*mm; } ; void MyPhysicsList :: SetCuts() { // Assign production thresholds SetCutValue(cutForGamma, "gamma"); SetCutValue(cutForElectron, "e-"); SetCutValue(cutForPositron, "e+"); } The user can define different cuts for different particles or different regions

36 void MyPhysicsList :: ConstructParticles() { if (particleName == "gamma") { pManager->AddDiscreteProcess(new G4PhotoElectricEffect()); pManager->AddDiscreteProcess(new G4ComptonScattering()); pManager->AddDiscreteProcess(new G4GammaConversion()); } else if (particleName == "e-") { pManager->AddProcess(new G4MultipleScattering(), -1, 1,1); pManager->AddProcess(new G4eIonisation(), -1, 2,2); pManager->AddProcess(new G4eBremsstrahlung(), -1,-1,3); } else if (particleName == "e+") { pManager->AddProcess(new G4MultipleScattering(), -1, 1,1); pManager->AddProcess(new G4eIonisation(), -1, 2,2); pManager->AddProcess(new G4eBremsstrahlung(), -1,-1,3); pManager->AddProcess(new G4eplusAnnihilation(), 0,-1,4); } Select physics processes to be activated for each particle type Physics List: processes The Geant4 Standard electromagnetic processes are selected in this example

37 Primary events Derive your own concrete class from the G4VUserPrimaryGeneratorAction abstract base class Implement the virtual member function GeneratePrimaries() Define primary particles providing: Particle type Initial position Initial direction Initial energy

38 MyPrimaryGeneratorAction:: My PrimaryGeneratorAction() { G4int numberOfParticles = 1; G4ParticleGun particleGun = new G4ParticleGun (numberOfParticles); G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable(); G4ParticleDefinition* particle = particleTable->FindParticle(“e-“); particleGun->SetParticleDefinition(particle); particleGun->SetParticlePosition(G4ThreeVector(x,y,z)); particleGun->SetParticleMomentumDirection(G4ThreeVector(x,y,z)); particleGun->SetParticleEnergy(energy);} void MyPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent) { particleGun->GeneratePrimaryVertex(anEvent); } Generate primary particles

39 Optional User Action classes virtual member functions Five concrete base classes whose virtual member functions the user may override to gain control of the simulation at various stages –G4UserRunAction –G4UserEventAction –G4UserTrackingAction –G4UserStackingAction –G4UserSteppingAction Each member function of the base classes has a dummy implementation –Empty implementation: does nothing The user may implement the member functions he desires in his/her derived classes Objects of user action classes must be registered with G4RunManager

40 Optional User Action classes G4UserRunAction BeginOfRunAction(const G4Run*) –For example: book histograms EndOfRunAction(const G4Run*) –For example: store histogramsG4UserEventAction BeginOfEventAction(const G4Event*) –For example: perform and event selection EndOfEventAction(const G4Event*) –For example: analyse the eventG4UserTrackingAction PreUserTrackingAction(const G4Track*) –For example: decide whether a trajectory should be stored or not PostUserTrackingAction(const G4Track*)

41 Optional User Action classes G4UserSteppingAction UserSteppingAction(const G4Step*) –For example: kill, suspend, postpone the track –For example: draw the stepG4UserStackingAction PrepareNewEvent() –For example: reset priority control ClassifyNewTrack(const G4Track*) –Invoked every time a new track is pushed –For example: classify a new track (priority control)  Urgent, Waiting, PostponeToNextEvent, Kill NewStage() –Invoked when the Urgent stack becomes empty –For example: change the classification criteria –For example: event filtering (event abortion)

42 Initialisation Describe your experimental set-up Activate physics processes appropriate to your experiment

43 Beam On Generate primary events according to distributions relevant to your experiment

44 Event processing Record the physics quantities generated by the simulation, that are relevant to your experiment

45 Define three kinds of actions: – AtRest – AtRest actions: decay, annihilation … – AlongStep – AlongStep actions: continuous interactions occuring along the path, like ionisation – PostStep – PostStep actions: point-like interactions, like decay in flight, hard radiation… A process can implement any combination of the three AtRest, AlongStep and PostStep actions: eg: decay = AtRest + PostStep Each action defines two methods: –GetPhysicalInteractionLength() used to limit the step size either because the process triggers an interaction or a decay or in other cases, like fraction of energy loss, geometry boundary, user’s limit… –DoIt() implements the actual action to be applied to the track implements the related production of secondaries G4VProcess AlongStep PostStep Abstract class defining the common interface of all processes in Geant4

46 Multiple scattering Bremsstrahlung Ionisation Annihilation Photoelectric effect Compton scattering Rayleigh effect  conversion e + e - pair production Synchrotron radiation Transition radiation Cherenkov Refraction Reflection Absorption Scintillation Fluorescence Auger Electromagnetic physics High energy extensions –needed for LHC experiments, cosmic ray experiments… Low energy extensions –fundamental for space and medical applications, dark matter and  experiments, antimatter spectroscopy etc. Alternative models for the same process energy loss  electrons and positrons , X-ray and optical photons muons n charged hadrons n ions Comparable to Geant3 already in the  release (1997) Further extensions (facilitated by the OO technology) All obeying to the same abstract Process interface  transparent to tracking

47 Detector Description Alexander Howard, CERN Acknowledgements: Slides produced by J.Apostolakis, G.Cosmo, M. Asai http://cern.ch/geant4

48 48 Unit system Geant4 has no default unit. To give a number, unit must be “ multiplied ” to the number. for example : G4double width = 12.5*m; G4double density = 2.7*g/cm3; If no unit is specified, the internal G4 unit will be used, but this is discouraged ! Almost all commonly used units are available. The user can define new units. Refer to CLHEP: SystemOfUnits.h Divide a variable by a unit you want to get. G4cout << dE / MeV << “ (MeV) ” << G4endl;

49 49 System of Units System of units are defined in CLHEP, based on: millimetre ( mm ), nanosecond ( ns ), Mega eV ( MeV ), positron charge ( eplus ) degree Kelvin ( kelvin ), the amount of substance ( mole ), luminous intensity ( candela ), radian ( radian ), steradian ( steradian ) All other units are computed from the basic ones. In output, Geant4 can choose the most appropriate unit to use. Just specify the category for the data ( Length, Time, Energy, etc … ): G4cout << G4BestUnit(StepSize, “Length”); StepSize will be printed in km, m, mm or … fermi, depending on its value

50 50 Isotopes, Elements and Materials G4Isotope and G4Element describe the properties of the atoms: Atomic number, number of nucleons, mass of a mole, shell energies Cross-sections per atoms, etc… G4Material describes the macroscopic properties of the matter: temperature, pressure, state, density Radiation length, absorption length, etc…

51 51 Material: molecule A Molecule is made of several elements (composition by number of atoms): a = 1.01*g/mole; G4Element* elH = new G4Element("Hydrogen",symbol="H",z=1.,a); a = 16.00*g/mole; G4Element* elO = new G4Element("Oxygen",symbol="O",z=8.,a); density = 1.000*g/cm3; G4Material* H2O = new G4Material("Water",density,ncomp=2); H2O->AddElement(elH, natoms=2); H2O->AddElement(elO, natoms=1);

52 52 Material: compound Compound: composition by fraction of mass a = 14.01*g/mole; G4Element* elN = new G4Element(name="Nitrogen",symbol="N",z= 7.,a); a = 16.00*g/mole; G4Element* elO = new G4Element(name="Oxygen",symbol="O",z= 8.,a); density = 1.290*mg/cm3; G4Material* Air = new G4Material(name="Air",density,ncomponents=2); Air->AddElement(elN, 70.0*perCent); Air->AddElement(elO, 30.0*perCent);

53 53 Material: mixture Composition of compound materials G4Element* elC = …; // define “carbon” element G4Material* SiO2 = …; // define “quartz” material G4Material* H2O = …; // define “water” material density = 0.200*g/cm3; G4Material* Aerog = new G4Material("Aerogel",density,ncomponents=3); Aerog->AddMaterial(SiO2,fractionmass=62.5*perCent); Aerog->AddMaterial(H2O,fractionmass=37.4*perCent); Aerog->AddElement (elC,fractionmass= 0.1*perCent);

54 54 Example: gas It may be necessary to specify temperature and pressure (dE/dx computation affected) G4double density = 27.*mg/cm3; G4double temperature = 325.*kelvin; G4double pressure = 50.*atmosphere; G4Material* CO2 = new G4Material(“CarbonicGas", density, ncomponents=2 kStateGas, temperature, pressure); CO2->AddElement(C,natoms = 1); CO2->AddElement(O,natoms = 2);

55 55 Define detector geometry G4Box G4Tubs G4VSolid G4VPhysicalVolume G4Material G4VSensitiveDetector G4PVPlacement G4PVParameterised G4VisAttributes G4LogicalVolume Three conceptual layers G4VSolid -- shape, size G4LogicalVolume -- daughter physical volumes, material, sensitivity, user limits, etc. G4VPhysicalVolume -- position, rotation

56 56 Define detector geometry Basic strategy G4VSolid* pBoxSolid = new G4Box(“aBoxSolid”, 1.*m, 2.*m, 3.*m); G4LogicalVolume* pBoxLog = new G4LogicalVolume( pBoxSolid, pBoxMaterial, “aBoxLog”, 0, 0, 0); G4VPhysicalVolume* aBoxPhys = new G4PVPlacement( pRotation, G4ThreeVector(posX, posY, posZ), pBoxLog, “aBoxPhys”, pMotherLog, 0, copyNo); A volume is placed in its mother volume. Position and rotation of the daughter volume is described with respect to the local coordinate system of the mother volume. The origin of mother volume’s local coordinate system is at the center of the mother volume. Daughter volume cannot protrude from mother volume. Solid : shape and size Logical volume : + material, sensitivity, etc. Physical volume : + rotation and position

57 57 G4LogicalVolume G4LogicalVolume(G4VSolid* pSolid, G4Material* pMaterial, const G4String& name, G4FieldManager* pFieldMgr=0, G4VSensitiveDetector* pSDetector=0, G4UserLimits* pULimits=0, G4bool optimise=true); Contains all information of volume except position: Shape and dimension (G4VSolid) Material, sensitivity, visualization attributes Position of daughter volumes Magnetic field, User limits Shower parameterisation Physical volumes of same type can share a logical volume. The pointers to solid and material must be NOT null Once created it is automatically entered in the LV store It is not meant to act as a base class

58 58 G4PVPlacement G4PVPlacement(G4RotationMatrix* pRot, const G4ThreeVector& tlate, G4LogicalVolume* pCurrentLogical, const G4String& pName, G4LogicalVolume* pMotherLogical, G4bool pMany, G4int pCopyNo); Single volume positioned relatively to the mother volume In a frame rotated and translated relative to the coordinate system of the mother volume Three additional constructors: A simple variation: specifying the mother volume as a pointer to its physical volume instead of its logical volume. Using G4Transform3D to represent the direct rotation and translation of the solid instead of the frame The combination of the two variants above

59 59 G4PVPlacement G4PVPlacement(G4RotationMatrix* pRot, // rotation of mother frame const G4ThreeVector &tlate, // position in rotated frame G4LogicalVolume *pDaughterLogical, const G4String &pName, G4LogicalVolume *pMotherLogical, G4bool pMany, // ‘true’ is not supported yet… G4int pCopyNo, // unique arbitrary integer G4bool pSurfChk=false); // optional boundary check Single volume positioned relatively to the mother volume. rotation translation in rotated frame Mother volume

60 60 Alternative G4PVPlacement G4PVPlacement( G4Transform3D(G4RotationMatrix &pRot, // rotation of daughter frame const G4ThreeVector &tlate), // position in mother frame G4LogicalVolume *pDaughterLogical, const G4String &pName, G4LogicalVolume *pMotherLogical, G4bool pMany, // ‘true’ is not supported yet… G4int pCopyNo, // unique arbitrary integer G4bool pSurfChk=false); // optional boundary check Single volume positioned relatively to the mother volume. rotation Mother volume translation in mother frame

61 61 G4VSolid Abstract class. All solids in Geant4 derive from it Defines but does not implement all functions required to: compute distances to/from the shape check whether a point is inside the shape compute the extent of the shape compute the surface normal to the shape at a given point Once constructed, each solid is automatically registered in a specific solid store

62 62 CSG: G4Box, G4Tubs G4Box(const G4String &pname, // name G4double half_x, // X half size G4double half_y, // Y half size G4double half_z); // Z half size G4Tubs(const G4String &pname, // name G4double pRmin, // inner radius G4double pRmax, // outer radius G4double pDz, // Z half length G4double pSphi, // starting Phi G4double pDphi); // segment angle

63 63 Other CSG solids G4Cons G4Para (parallelepiped) G4Trd G4Trap G4Sphere G4Orb (full solid sphere) G4Torus Consult to Section 4.1.2 of Geant4 Application Developers Guide for all available shapes. Section 4.1.2 of Geant4 Application Developers Guide Section 4.1.2 of Geant4 Application Developers Guide

64 64 Other Specific CSG solids G4Polyhedra G4EllipticalTube G4Ellipsoid G4EllipticalCone G4HypeG4Tet (tetrahedra) G4TwistedBox G4TwistedTrd G4TwistedTrap G4TwistedTubs Consult to Section 4.1.2 of Geant4 Application Developers Guide for all available shapes. Section 4.1.2 of Geant4 Application Developers Guide Section 4.1.2 of Geant4 Application Developers Guide

65 65 Boolean Solids Solids can be combined using boolean operations: G4UnionSolid, G4SubtractionSolid, G4IntersectionSolid Requires: 2 solids, 1 boolean operation, and an (optional) transformation for the 2 nd solid 2 nd solid is positioned relative to the coordinate system of the 1 st solid Result of boolean operation becomes a solid. Thus the third solid can be combined to the resulting solid of first operation. Solids to be combined can be either CSG or other Boolean solids. Note: tracking cost for the navigation in a complex Boolean solid is proportional to the number of constituent CSG solids G4UnionSolidG4IntersectionSolid G4SubtractionSolid


Download ppt "Логашенко И.Б. Современные методы обработки экспериментальных данных GEANT4 – программный пакет для моделирования взаимодействия элементарных частиц с."

Similar presentations


Ads by Google