1 / 25

Working with HGeant

Working with HGeant. HADES analysis workshop, Darmstadt, Germany, 31 January - 1 February 2012. Part 1 by Ilse Koenig: Overview of HGeant How to install it How to run it Initialisation (geaini file, geometry from Oracle or files) Interactive session Output of HGeant Simple example macro

maryjimenez
Download Presentation

Working with HGeant

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Working with HGeant HADES analysis workshop, Darmstadt, Germany, 31 January - 1 February 2012 Part 1 by Ilse Koenig: • Overview of HGeant • How to install it • How to run it • Initialisation (geaini file, geometry from Oracle or files) • Interactive session • Output of HGeant • Simple example macro Part 2 by Jochen Markert: • Looping on the output

  2. Hydra2 libHydra (base, geom, geantutil) libSimulation libOraSim ROOT Cernlib Oracle HGEANT2 geant,grich, gmdc, gtof, grpc, gshower, gwall HGeant, the HADES simulation package Executable hgeant geaini file (geometry,events,…) ROOT file Hydra2 DST • based on GEANT 3.21 • tracks particles through the HADES geometry • generates detector hits based on a realistic modeling of the physical processes occurring along the tracks • stores track information and hits in an HTree The analysis reads this tree, digitizes the hits, which are then handled like real events with the track numberas additional data member (gives access to the original track and hit data).

  3. How-to install HGeant2 • Checkout hgeant2:svn co https://subversion.gsi.de/hades/hgeant2/trunk hgeant2 • Setup your shell environment (including Root, Cernlib and Hydra2 settings): Example: /misc/hadessoftware/etch32/install/hydra-dev/defall.sh • Copy Makefile from sub-directory adm to main directory.Change INSTALL_DIR to your local directory. • Build it:make • Install it:make install • Eventually remove the files created during build:make distclean

  4. Initialisation: geaini_ora.dat Example: Au+Au, 1.25GeV/A, ideal geometry Read by GEANT (ffread package) Be careful with comments! (FORTRAN code) Read by HGeant2 C++ interface (class HGeantInput) Control by keywords and file extensions

  5. The GEANT keywords in geaini_ora.dat General control of the simulation, of the physics processes, the user applications see GEANT manual BASE040-1ff, PHYS001-3 http://hades-wiki.gsi.de/cgi-bin/view/SimAna/HGeantHowToRun read events from .evt event files automatic computation of the tracking medium parameters internal 1-shot generator OFF TOSCA field map scaling and polarity of magnetic field maximum number of steps allowed in tracking vertex sampling (here: emission from segmented target, 2-dim Gauss beam spot) 6 beam parameters: sig(X) sig(Y) Ebeam sig(Ebeam) offsetX offsetY (in mm and MeV) store all secondaries, but only active tracks generation of Cerenkov light continuous energy loss ON Delta-ray production ON number of events Reset eta branching (check against latest PDG value!) user defined GEANT switches (here: track all particle, no printing or plotting, input in lab GEANT time limits frame, all decays allowed, sample event plane angle ) size of output file (where tree is split) HGeant output mode (ROOT file) Vertex sampling with JVER, BEAM, TARG see http://hades-wiki.gsi.de/cgi-bin/view/SimAna/HGeantHowToRun and files geant/makevertex.F, geant/makevertex.F and geant/rantarg.F for details Pluto events with vertex: do not specify JVER, BEAM or TARG Always check vertex distribution before running large amount of statistics!

  6. .setup file for detector subsets The geometry, input, output in geaini_ora.dat Reads actual geometry from Oraclefor simulation reference run .map file for field map xxx.tup enables output of detector hits in the tree .evt for event input file .root for output file

  7. Simulations on the batch farm • Initialisation of geometry from Oracle possible, but • not recommended for small simulation (one or two jobs) • No-Go for large scale simulations (many jobs in parallel) • Use geometry files created from Oracle! • Advantage: • faster (no waiting for active Oracle session) • same geometry for all runs (not guaranteed for history date ”now”) • listing of media possible (macro listMedia.C) Macro: ora2files.C Analysis on the batch farm:Use parameter ROOT file!

  8. The macro ora2files.C Reads the geometry from Oracle and creates all .geo and .hit files Class HGeomInterface: Manages input/output from/to Oracle, files creates geometry, media, hit definitions in GEANT or ROOT

  9. The geometry files in geaini_files.dat Reads all from files (no Oracle connection) To be used on the batch farm Oracle support OFF Id of simulation reference run (stored in the event header), found in Oracle WebDB .geo geometry files for the different detector parts (key words!) (retrieved from Oracle: “detector part”_”time”.geo) .hit hit definition for the different detectors

  10. How to run HGEANT cd ~/analysis_workshop/2012/working_with_hgeant/macros // run in batch mode ~/svn/hgeant2/hgeant -c -f geaini_files.dat Problem: maximum of 63 characters for directory+geaini filename !

  11. Interactive session ~/svn/hgeant2/hgeant -f geaini_files.dat Creates ROOT session with small menu (macro hgeant2/geant/menu.C KUIP interface: (GEANT manual XINT001 and XINT002) dcut cave 1 0 5 10 .04 .04Cut volume cave at x=0 => yz plane satt rtam colo 2Where is the target? Set colors! satt targ colo 4 nextClear window dcut cave 1 0 5 10 .04 .04Redraw zoomZooming: mark region with mouse, clear window and redrawuse "zoom 0" to unzoom daxis 0 0 0 5Where is 0? (parameters x, y, z, scaling factor for size) picVolumes and materials? Click in a volume with left mouse (leave menu with right mouse click) measDistance between 2 points? (Click at points with left mouse keep pressed, move mouse to the second point and release key) Result in cm! draw rtam 60 30 0 77 30 2 23d-drawing (3 angles, x y origin, x y scaling) dtree cave 2Command: dtree volume sub-levels => shows tree of volumes Left mouse click on a volume to see volume, daughters, ... on an arrow to see additional sub-levels (leave menu with right mouse click) quitLeave KUIP interface => ROOT

  12. Output ROOT file HGeantKineData ofGEANT tracks HGeantMdc MDC hits HGeantRichPhoton RICH hit data for Cherenkov photons HGeantRichDirect RICH direct hits on photon detector HGeantRichMirror RICH hits on the mirror HGeantShower Shower hits HGeantTof Tof hits HGeantWall Forward Wall hits HGeantRpc RPC hits The detector hit classes are derived from class HLinkedDataObject and inherit from it as data memberthe index of the next hit.

  13. HGeantKine (Part1/2)GEANT KINE data on primary and secondary particles in the simulated event

  14. HGeantKine (Part2/2)

  15. HGeantMdc

  16. Looping on the output detector 1 3 1 decay 2 secondary 4 primary getPrimary(4) Loop forward on kine tracks and MDC hits Loop backwards from MDC hits: see talk by Jochen Markert

  17. Exercise: Protons • Simulation: shoot 500 MeV/c protons, one per sector, with fixed theta = 35deg, phi = 30deg • Analysis: Loop (forward) on output: • plot vertex distribution for primaries • plot incident angle on MDC plane 1 and 2 for primaries => multiple scattering • print history of secondary tracks

  18. Example: geaini_protons.dat No event file shoot 500 MeV/c protons, one per sector, with fixed theta=35deg, phi=30deg KINE ikine pkine(10) Controls 1-shot generator ikine > 0 : generate ikine particle(s) or pair(s) per shot with fixed kinematics ikine = -1: generate one particle per sector (phi range must be set to 0..60) pkine(1), pkine(2) = theta (min, max in degrees)pkine(3), pkine(4) = phi (min, max in degrees)pkine(5), pkine(6) = momentum (min, max in MeV/c)pkine(7) = particle id1 (+1000*id2 for pairs)pkine(8), pkine(9) = pair opening angle (min, max in degrees)pkine(10) = orientation of pair in degrees (if>360, random) GEANT particles and ions: see GEANT manual CONS300 1000 events Remove event file Set output file name

  19. Example macro: hloop_protons.C(Part1/4) Plots vertex distribution of primary tracks, incident angle theta on MDC plane 1 and 2 Print history of secondary particles

  20. Example macro: hloop_protons.C(Part2/4)

  21. Example macro: hloop_protons.C(Part3/4)

  22. Example macro: hloop_protons.C(Part4/4)

  23. Output of example macro: hloop_protons.C Run with compilation Output of pKine->printHistory() Creation: see GEANT manual ZZZZ010-22 Medium: see macro listMedia.C

  24. Histograms of example macro hloop_protons.C Tilting angle plane1: 44.2° Tilting angle plane2: 53.0°

  25. List all media with macro listMedia.C Lists media and their ids Same as in GEANT for same .dat file Works only with geo files, not with Oracle! Create the ROOT browser to explore the geometry inside ROOT

More Related