1 - indico in2p3

Download Report

Transcript 1 - indico in2p3

Geant4 on Web for Education, …
- recent updates Koichi Murakami
(KEK/CRC)
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
1
Geant4 for Education
An educational Courseware for leaning
elementary particle physics with Geant4.
A hybrid e-learning system of
 wiki-like online textbooks (course materials)
 Geant4 Web application a.k.a.
Geant4 Virtual Laboratory
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
2
Ajax-powered GUI on Web
+ Python Web framework
Hands-on-ware on Web,
Geant4 Virtual Laboratory
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
3
Concerning Issues
 Contents
 Educational materials
 Self-description for Geant4 physics performance
 Wiki
 Media Wiki, Confluence
 Python web framework
 Turbo Gears, Pylons, Django
 Web service
 Multi G4 instance
 Scalability
 Deployment
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
4
Usecases of Geant4 on Web
Geant4 Education
 Not to teach Geant4 but use Geant4 to teach Physics
 for HEP experiment, radiological physics and
dosimetry,…
 hyper document with textbook and hands-on work
G4 examples on Web with user manual
 hyper experience with G4 for instant users
Explorer inside Geant4
 particle, material, cross section, etc.
 framework of presenting physics performance
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
5
Summary
G4 Physics Performance
An example for Photoelectric
Standard
LowE
Class
G4PhotoElectricEffect
G4LowEnergyPhotoElectric
Subshell Structure
G4AtomicShells (material category)
${G4LEDATA}/fluor/binding.dat
Cross Section
Sandia parameterization
(G4StaticSandiaData.hh)
${G4LEDATA}/phot/pe-cs-##.dat
Photoelectron Spectrum
Most inner shell only
${G4LEDATA}/phot/pe-ss-cs##.dat
Electron Angular
Distribution
XXXX
simple / XXX / Polarized
Local Energy Deposit
binding energy
binding energy
Python can access the data inside G4.
This kind of table can be generated on-line.
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
6
Educational Material
 Michel’s documentations
 There exists a lot of contents, which can be a good
starting point.
 Documentation about each EM process
 documents/training/electromagnetic/processes/ in CVS
repository
 similar to Geant4 Physics Reference Manual
 http://confluencegeant4.kek.jp/display/g4edu/Photoelectric+absorption
 How about exercise course?
 for learning Geant4 and/or Physics?
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
7
An Example of Media Wiki implementation
Math expressions can be handled
with Latex format
Images
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
8
Confluence
Enterprise wiki
Better document management
 access control
 document structure
 move, remove, …
Better handling images / attached files
Support for math formula with LaTex
 evaluation for jsMath
 JavaScript for displaying math formula
Commercial license (for multi users)
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
9
Inside Geant4 on Web
 Run Geant4 as web service
 independent of client enviroment
 Python web application framework
• TurboGears / Pylons / Django
• MVC(Model/View/Control) model
 MVC model
 Model: Geant4 / Python-interface / document
management
 View: HTMLtemplate(Kids/Genshi/Mako)/ XHTML+CSS
 Control: URL mapping of Python functions
• CherryPy, route
 Rich client
 Ajax (Javascript) powered
• Ext, jQuery
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
10
Structure of Geant4 Virtual Laboratory
Client side
Ajax-powered GUI
as Control Panel of G4 applications
Job Dispatcher /
Load Balancer
G4 Application Modules
Python Software Bus
Web Framework
URL maper
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
Server side
11
Python Web Framework
 Turbo Gears
 Mega framework.
 Various functional components are covered.
 A collection of many python tools
• Complicated software structure
 Pylons
 New framework based on WSGI. Lighter than Turbo
Gears
 Still developing
 Django
 Everything in a single package
• No software dependency
 Well matured. Easy to use. Many users and information
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
12
Django
 OR mapper
 automatic mapping from Python class to DB schema
 DB management tools (admin site)
 URL configuration
 based on regular expression
 Template engine
 included
 simple, easy to use, powerful
 Support for Ajax
 object serializer with JSON
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
13
Django
.html
View
Kids
Genshi
CSS
template engine
MVC model
Control
View on client
XMLHTTP Request
route
JS libs
Rich client
using Ajax, Javascript
URL mapper of
Python objects
XML/JSON
Ajax MVC model
Model
histogramming
tools
Client
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
14
Server
Ext 2.0
Ext JS 2.x released
 matured and more powerful
 complete widget set
 some APIs are changed from 1.x
 need to update for 2.x
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
15
How to realize multiple Geant4 instances
So far Geant4 instance is stuck to the web server.
 The process of web server runs Geant4
 can handle only single instance
 cannot work as web service
 cannot response for multiple requests
Web server invokes Geant4 instance in remote
hosts.
 master-worker nodes model
 Each Geant4 instance runs in a worker node.
 remote python call with RPyC
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
16
Remote Python Call with RPyC
The RPyC python module (3.x) can realize
remote python call.
A forking server runs in worker nodes
Geant4 instances are invoked by a forking server.
Scalable with # of worker nodes
Web Server (master)
Forking Server
G4
G4
G4
G4
Koichi Murakami
Forking Server
G4
G4
G4
G4
Geant4 FFJPL Meeting (02/Sep/2008)
Forking Server
G4
G4
G4
G4
17
Working items
Design of object model for web application
 user management
Implementation with Django
Forking server with RpyC (done)
Connection between master (django) and worker
(RPyC) servers
update for ExtJS 2.x
Ajax-based communication
 Ajax request / JSON object handling
handling visualization data
Koichi Murakami
Geant4 FFJPL Meeting (02/Sep/2008)
18