Skip to content
Snippets Groups Projects
full_simulation.rst 2.63 KiB
Newer Older
  • Learn to ignore specific revisions
  • Dmitry Romanov's avatar
    Dmitry Romanov committed
    Full simulation
    ===============
    
    Tutorials
    ---------
    
    Tutorials are available on a dedicated websites:
    
    Detector simulation
    ~~~~~~~~~~~~~~~~~~~
    
    - `Full simulation tutorials <https://eic.phy.anl.gov/tutorials/eic_tutorial/getting-started/quickstart>`_
    - `Quick start guide <https://eic.phy.anl.gov/tutorials/eic_tutorial/getting-started/quickstart>`_
    - `Part I. Simple detecotor <https://eic.phy.anl.gov/tutorials/eic_tutorial/part1/simple_detector>`_
    - `Part II. Part 2: Modifying and Adding Detectors <https://eic.phy.anl.gov/tutorials/eic_tutorial/part2/adding_detectors>`_
    
    
    `Perticipate in feedback! <https://docs.google.com/forms/d/e/1FAIpQLSclPBXv13pVtawt35XeaCDMOcmdo8fhKTapdmjFO_6gPTV-8w/viewform?usp=sf_link>`_
    
    Tracking
    ~~~~~~~~
    
    - `(in development) ACTS tracking repo <https://eicweb.phy.anl.gov/EIC/documentation/guide_to_tracking>`_
    
    
    
    Particle gun
    ------------
    
    
    There are at least 2 ways of running a particle gun out of the box:
    
    - using npsim command line
    - using geant macro file and invoke gps
    
    
    Using npsim (wrapper around ddsim) command line: 
    
    .. code:: bash
    
        # Assumed to run from the root of Athena detector repo
        # no spread
        npsim --compactFile=athena.xml --runType=run -G -N=2 --outputFile=test_gun.root --gun.position "0.0 0.0 1.0*cm" --gun.direction "1.0 0.0 1.0" --gun.energy 100*GeV --part.userParticleHandler='' 
    
        # uniform spread inside an angle:
        npsim --compactFile=athena.xml --random.seed 1 --enableGun --gun.energy 2*GeV --gun.thetaMin 0*deg --gun.thetaMax 90*deg --gun.distribution uniform --outputFile test.root
    
    
    
    
    Dmitry Romanov's avatar
    Dmitry Romanov committed
    Geometry visualization
    ----------------------
    
    There are many ways to see the geometry and tracks: 
    
    1. Through Geant4 event display
    2. geoDisplay (root geoViewer)
    3. ddeve (root EVE based event display...)
    4. dd_web_display (using browser and jsroot library)
    
    
    Geometry conversion
    -------------------
    
    
    Dmitry Romanov's avatar
    Dmitry Romanov committed
    Convert to GDML
    
    Dmitry Romanov's avatar
    Dmitry Romanov committed
    ~~~~~~~~~~~~~~~
    
    Dmitry Romanov's avatar
    Dmitry Romanov committed
    
    There is a convert_to_gdml.py script in the detector repository 
    (https://eicweb.phy.anl.gov/EIC/detectors/athena/-/blob/master/scripts/convert_to_gdml.py). 
    That can be used to export ALL of ATHENA to gdml, but not individual detector systems. 
    
    
    Dmitry Romanov's avatar
    Dmitry Romanov committed
    This is actually `done <https://eicweb.phy.anl.gov/EIC/detectors/athena/-/blob/master/.gitlab-ci.yml#L168>`_ on every commit
    
    Dmitry Romanov's avatar
    Dmitry Romanov committed
    and the results are saved as job artifacts. 
    
    `The latest athena.gdml from the master branch <https://eicweb.phy.anl.gov/api/v4/projects/473/jobs/artifacts/master/raw/geo/athena.gdml?job=report&item=default>`_
    
    
    Dmitry Romanov's avatar
    Dmitry Romanov committed
    
    Convert to root
    ~~~~~~~~~~~~~~~
    
    One can use dd_web_display to actually just save root geometry
    
    .. code:: bash
    
        dd_web_display --export athena.xml  # will create a .root file with the geometry