Download presentation
Presentation is loading. Please wait.
Published byRafe Howard Modified over 9 years ago
1
Detector Simulation Writing a Detector Simulaton Program Bockjoo Kim Seoul N. Univ. CHEP, Summer School 2002 Kyunpook N. Univ., October 24-26, 2002 This talk will be made available on http://susy07.snu.ac.kr/~bockjoo/ss2002.ppt
2
Goal of the Lecture (Overall) What is the detector simulation How simulation proceeds How to write the detector simulation code in Geant3 (in Geant4) Compiling, linking, running (Tommorow) Some taste of simulation from exercises (Tommorow) Installation of Geant 4 if time permits(Tommorow) Make understand…
3
Learns What What is a particle physics detector? What is a detector simulation? Why detector simulation? What is Geant? How simulation proceeds in Geant? Geant codes from an eample Geant4, what is it? Where do we go from here?
4
Accelerators (Time Structure) Fermilab Tevatron (CDF and D0 exp) √S = 1.96 TeV 36 bunches and 396x10 -9 sec www-bd.fnal.gov/runII/index.html KEK-B (BELLE exp) Asignment KEK-Neutrino beam line (K2K exp) Every 2.2 sec 1.3 sec width beam LHC (CMS, ATLAS, … ) Asignment Zoom A bunch A collider experiment An accelerator 빵 --- 2.7x10 11 protons for Fermilab RunIIa ~37cm Numbers in magenta is Tevatron RunIIa parameters 396 x 10 -19 sec Asignment: Given Tevatron RunIIa parameters, calculate instant luminosity, assuming P = P-bar Answer is:~10 32 cm -2 sec – 1,explain!
5
Particle Physics Detectors Detectors ≡ An experiment Each layer(detector) identifies and measures energy of particles No single detector measures all the particle ID. and E/p Muons ( ) Hadrons (h) e ±, Charged Tracks e ±, ±, h ± Heavy absorber, e.g., Fe Zone where only and remain Lightweight High Z materials, e.g., lead tungstate crystals Heavy material, Iron+active material Tracker E.M.Cal. HADCal. MuonCham. Photons e±e±e±e± ±±±± ±, P±, P±, P±, P n
6
CDFII CDF II: All front-end, DAQ and trigger replaced!!! New L1 tracking trigger New L2 secondary vertex trigger New Time of Flight New Full acceptance 7(8) layer silicon system: | |<2 coverage New COT drift chamber: B=1.4 T, N axial = 48, N stereo = 48, p t /p t < 0.001 p t New Plug calorimeter has smaller inner hole Central muon chambers up to | | < 1.5 – Some new Forward calorimeters and muons removed
7
CDF, Detector Roll-In
8
Calorimeters Tracker Muon System Beamline Shielding Electronics protons antiprotons 20 m
9
K2K Experiment P To SuperKamiokande Spectrum Measurement
10
Silicon Detectors (SVXII)
11
Sense wires Potential wires Cathode
12
Calorimeter Data Dijets jets with Et ~ 400 GeV W -> e Missing E t = 38 GeV
13
Trigger and DAQ Upgrade Calorimeter energy Central Tracker (Pt, ) Muon stubs Cal Energy-track match E/P, EM shower max Silicon secondary vertex Multi object triggers Farm of PC’s running fast versions of Offline Code more sophisticated selections
14
What is a detector simulatoin Describe particle passage through detectors Probabilistic treatment of particle passages, i.e., xsec of particle interactions with matter. Knowing timing and geometry (detector) Knowing material (detector) Tracking (tracing) particles Describing responses
15
Why detector simualtion Physics processes needed to be checked in advance to understand data reconstruction HEP apparatus requires huge expenses. Detector optimization is necessary ahead of detector construction: It’s possible to see what is happened at detector itself, and to shorten a period of time of detector completion Detector performance can be compared with data.
16
ADC Distribution : Data vs Sim ADC (East) ADC (West) ADC_peak/ ADC (East) ADC_peak/ ADC (West) Black : Store832 Red : Simulation 2 4 6 8 10 x 10 3 6 6
17
M t Systematics Better control of the jet energy scales using Z bb and W qq (in double tagged top events).
18
Simulation Considerations Beam Crossings Geometry description Material description Response Speed needs to be fast preferably Practically most important
19
From where to where to simulate From: a physics event from a event generator (x,y,z,px,py,pz,t) Nparticles Particle type Added Particles To: End of detector boundaries Electronics reponses need to be simulated in (typically) parametric way All possible physics processes inside detector, active or inactive
20
All possible physics processes ( 이런 process 들을 알고 싶다.) Photon Processes (e +,e - ) pair conversion Compton collision Photoelectric effect Photo fission of heavy elements Rayleigh effect e - /e + Processes Multiple scattering Ionization and -rays production Bremsstrahlung Annihilation of positron Generation of Cerenkov light Synchrotron radiation Hadrons Processes Decay in flight Multiple scattering Ionization and -rays production Hadronic interaction Generation of Cerenkov light - / + Processes Decay in flight Multiple scattering Ionization and -rays production Ionisation by heavy ions Bremsstrahlung Direct (e +,e - ) pair production Photonuclear interaction Generation of Cerenkov light
21
Recording All readout channels from each subdetector should be recorded as real experiment Hit and Digitization information are recorded Simulation package gives more detailed information to make system debugging possible.
22
Simulation Packages Geant Experiment dependent fast simulations
23
Describes particle passage through matter Experimental setup Energy loss Particle track (time and space) Designed originally for high energy physics Application in the medical and biological sciences Application in the radioprotection and astronautics Geant3: written in traditional Fortan Geant4: written in C++ Include hadronic package FLUKA, GHEISHA,… Geant
24
Geant and Packages ZEBRA : memory mangement and data structure (bank) HBOOK : package for histogramming and fitting HIGZ : High level Interface to Graphics and ZEBRA PAW : Physics Analysis Workstation GEANT : Detector Description and Simulation Tool ROOT : OO Data Analysis Framework
25
Geant Event Simulation Framework Initialization – part 1 Initialize common block /GCBANK/ Read free format data to modify default values Initialize memory manager (ZEBRA) Initialize drawing package Fill partilce properties data structure Fill characteristics of the materials used Initialization – part 2 – user code Geometry – shape (cylindrical, rectangle, ….) and boundaries Medium – materials (Aluminium, air, scintillator, Iron,…) Digitizability – sensitive detectors (length of particle path, energy deposit, …) Fence WS Reserved Event Div Const Div System Div GCBANK
26
Geant Event Simulation Framework… 계속 Initialization – part 3 Process all the user provided informaton Book standard Geant histogram~~^^~~ Compute energy loss and cross section tables and store them in the data structure MaterialsJMATE/JTMED GeometryJVOLUM/JROTM TrackingGUSTEP JSTAK Event Processing History JVERTX/JKINE Simulated Raw Data JHITS/JDIGI JSET DrawingJDRAW PHYSICS ParticlesJPART Initialization of Kinematics Relation between GEANT data structure
27
Geant Event Simulation Framework… 계속 Geant Event Simulation Framework… 계속 Event processing Initialize dynamic memory banks for next event and create event head bank Process an event Read an event kiinematics (x,y,z,px,py,pz,t) For each vertex, A. JKINE→JSTAK B. each particle is tracked. (User stores useful information for user’s own use, e.g., energy deposit when sensitive material is traversed.) Secondary particles generated for each particle processed first (Geant does not process secondaries by default. User should indicate, see GSKING/GSKPHO) Next particle is taken care User can store (x,y,z) to JXYZ Hadronic interactions by GHEISHA or FLUKA User can skip unwated tracking Can steer particles according to B-field Simulate detector response (JDIGI) End of event processing Clean up memory used by the event and check time for next event Termination : close files, hbook, print stats. Head (Bank name, etc) Tail (EOF, etc) JKINE JSTAK (LIFO) 1234512345 Q:Common block 2ndary particles are stored(2) A: /GCKING/ /GCKIN2/ (Cerenkov photons)
28
Geant Program Flow Chart See next slide
29
MAIN user routine GZEBRA initialisation of ZEBRA system, dynamic core allocation UGINIT user routine GINIT initialisation of GEANT variables GFFGO interpretation of data records GZINIT initialisation of ZEBRA core divisions and link areas GPART/GSPART creation of the particle data structure JPART GMATE/GSMATE creation of the material data structure JMATE user code description of the geometrical setup, of the sensitive detectors, creation of data structures JVOLUM, JTMED, JROTM, JSETS GPHYSI preparation of cross-section and energy-loss tables for all used materials GRUN loop over events GTRIGI initialisation for event processing GTRIG event processing GUKINE (user) generation (or input) of event initial kinematics GUTREV (user) GTREVE loop over tracks, including any secondaries generated GUTRAK (user) GTRACK control tracking of current track GFINDS find current volume in the geometry tree GUSTEP (user) recording of hits in data structure JHITS and of space points in data structure JXYZ GUPARA called if the particle falls below the tracking threshold GTGAMA/GTELEC/... tracking of particle according to type GFSTAT fill banks for volume statistics GSTRAC store information of the current track segment GUSTEP (user) recording of hits in data structure JHITS and of space points in data structure JXYZ GTMEDI finds in which volume/medium the current space point is GUSTEP (user) recording of hits in data structure JHITS and of space points in data structure JXYZ GUDIGI computation of digitisations and recording in data structure JDIGI GUOUT output of current event GTRIGC clearing of memory for next event UGLAST (user) GLAST standard GEANT termination
30
Geant Constants Material numbers and medium numbers are the constants stored for tracking Described in Geant manual CONSXXXX
31
Geant Drawing Based on HIGZ which uses X11 and other graphics system Drawing package visualizes Detector components Logical tree of detector components Geometrical dimensions Particle trajectories Hits recorded in the sensitive detector components Documented in DRAWXXXX
32
Geant Geometry At init., define the geometry in which the particles will be tracked Communicate with tracking codes Volume ID for a given point Distance to the nearest volume along the track Distance to the nearest volume Given point in the current volume or exited? Experimental setup consists of various shape, material, conditions (.e.g. magnetic field) Geant describes experimental setup by defining shape, material, conditions of detector components Local reference frame should be defined
33
Geant Geometry… 계속 Mother volume: a volume that has contents New volume: predefined volumes or by division Positioning a volume : by specifying its rotation and translation and a number is given to a positioned volume Experimental setup consists of various shape, material, conditions (.e.g. magnetic field) 16 basic shapes are used(2 nd order surfaces) Tracking of particles through the geometrical data structure is the key functionality of Geant
34
Geant Geometry… 계속 CADINT: Geant Geom CAD (IGES) Uses concept of overlapping volume Reduces tracking time Can be used to compose any kind of shape Can be used to ellimiate regions “ONLY” and “MANY” distinguishes overlapping Q:List all 16 shapes used in Geant A:Box, TRD1, TRD2, ….
35
Geant Hit Hit : User-defined info recorded during tracking Example: dE/dx in a sensitive detector Digitization : User-defined info for detector response TDC counts and ADC counts for a hit
36
Geant KINE, Phys, … Stores and retrieves kinematic Information and physics processes inside detectorStores and retrieves kinematic Information and physics processes inside detector Sometimes one can provided one’s own parameters for physics processesSometimes one can provided one’s own parameters for physics processes
37
Geant tracking Continuous tracks a set of points Step size : estimated a priori by Particle type Type of current medium Geometry (particularly around boundaries between different medium) Can be optimized by the user Every particle is transported by a tracking type G GTGAMA GTRACK E GTELEC GTRACK … Magnetic filed transport All the user action is taken by GUSTEP
38
Interactive Geant PROGRAM GXINT * * GEANT main program. To link with the MOTIF user interface * the routine GPAWPP(NWGEAN,NWPAW) should be called, whereas * the routine GPAW(NWGEAN,NWPAW) gives access to the basic * graphics version. * PARAMETER (NWGEAN=3000000,NWPAW=1000000) COMMON/GCBANK/GEANT(NWGEAN) COMMON/PAWC/PAW(NWPAW) * CALL GPAWPP(NWGEAN,NWPAW) * END Initializes Geant and PAW Stores for Geant and PAW
39
Requires Geant library (libgeant321.a), X11 library (libX11.a), +system libs Compile gxint321.F using a compiler gcc – c – o gxint321.o gxint321.F ; gcc – c – o uginit.o uginit.F ; gcc – c – o uglast.o uglast.F Link (make the executable) gcc -o gxint -O -L/usr/X11R6/lib -L/cern/2000/lib gxint321.o uglast.o uginit.o -lX11 - lgeant321 -lpawlib -lmathlib -lpacklib -lgraflib -lgrafX11 -lpacklib -lkernlib - lmathlib -lstdc++ -lg2c -lm -ldl -lcrypt -lnsl Building Interactive Geant Practice: link gxint without –lg2c
40
Invoking Interactive Geant Execute gxint created in previous slide ./gxint Will show GEANT> prompt Getting help At GEANT> prompt, ‘ GEANT>help ’ ‘ GEANT> help geant ’ for geant help Example of Creating a Volume GEANT>geant/create/sbox ‘ mybox ’ 1 10 10 10 EXAMPLE – dopt hide on satt * seen -2 draw mybox 40 40 0 10 10.01.01 next box mybox 0 1000 0 1000 0 1000 draw mybox 40 40 0 10 10.01.01 box.
41
Geant in Batch Mode Given experimental setup and process Runs in a number of events Need to provide input files Execute ./gbatch < gbatch.inp Examine output histogram and data
42
Example Batch Code PROGRAM MAIN_BATCH CGEANT main program for batch running PARAMETER (NGBANK=5000000, NHBOOK=1000000) COMMON/GCBANK/Q(NGBANK) COMMON/PAWC/H(NHBOOK) Cinitialize HBOOK and GEANT memory CALLGZEBRA(NGBANK) CALLHLIMIT(-NHBOOK) Cinitialize GEANT CALLUGINIT Cstart event processing CALLGRUN Cend of run; terminate CALLUGLAST END
43
Geant 4 : c++ version of Geant3 Totally written in OO language Physics is same Supplementory features: CAD Geant4 Serves for Geant3 in coming HEP Exp
44
Where do we go from here? Practice and apply Geant3 knowledge to actual experimental setup One of best way of understanding detector simulation is to install Geant Geant4 is the next generation tool for detector simulation. Learn it and you will be ready for next generation particle physics experiments
45
Summary Detector simulation is explained by focusing on Geant3 Detector simulation requires knowledges on experimental setup and thus geometry and material Geant4 hopefully will ease some of the tasks like complex shaped detector construction in simulation Installing and practicing is the best way to farmiliarize one with the Geant simulation
46
References Collider Physics Particle Detectors, C.Grupen, Cambridge Univ. Press, 1996 Experimental techniques in HEP, T.Ferbel, World Scientific, 1991 http://www.cern.ch/Physics/ParticleDetector/BriefBook http://wwwinfo.cern.ch/asd/geant4/genat4.html
47
Inside Programming Techniques Search for undefined references by using ‘ nm – o *.a | grep something_a | more ‘ Debuging : gdb program core ; where Unrecognized library?: move around libraries … ^^ …
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.