Introduction to SimTools
-
Upload
kirsten-damia -
Category
Documents
-
view
22 -
download
0
description
Transcript of Introduction to SimTools
![Page 1: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/1.jpg)
1
Introduction to SimTools
Akiya Miyamoto
KEK
Feb 2007
![Page 2: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/2.jpg)
2
Plan of Tutorials
KEK ILC Computing JSF
Intorudction, Go through examples learn how to access JSF classes
Jupiter / Satellites Intorudction Go through examples
Kick-off studies
![Page 3: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/3.jpg)
3
CPU Configuration
jlclogin2 SL4.2
/home/data4/jlc, /data7/jlc ; generic user files/data5, /data6 : for soft files.
![Page 4: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/4.jpg)
4
Local commands
Submit job $ submit [-h host] command
Submit job as a batch job $ submit command > log 2>&1 & ( in case of bash )
Show job status in CPU server $ showjob
Monitor CPU loads of each CPU server $ cpui
To kill job running at CPU server $ rsh jlccpuXX “ps –ef | grep username” $ rsh jlccpuXX “kill –15 XXXX”
![Page 5: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/5.jpg)
5
How to setup your account
$ cd $ cp /home/miyamoto/Tutorials/misc/dot.rootrc
~/.rootrc
$ mkdir Tutorials$ cd Tutorials$ cp /proj/soft/Release/1.35/setup.bash .$ source setup.bash
You are ready to run jsf/jupiter/satellites program
![Page 6: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/6.jpg)
6
Information on the web
http://acfahep.kek.jp/subg/sim/simtools
http://www-jlc.kek.jp/subg/offl/jsf
http://jlccvs.kek.jp/
![Page 7: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/7.jpg)
7
Files in SimTools SimTools tools lcbase
Leda
jsf
Jupiter
Uranus
Satellites docs
examples
Jupiter
exam01 QuickSim
Satellites setup.bash Readme
.....
Physsim
![Page 8: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/8.jpg)
8
Functions of each components
lcbase : configuration files
Leda : Analysis tools (Kalman fitter, 4vector and jet findinder utilities )
jsf : Root-based framework lclib : QuickSim and other fortran based utilities physsim : Helas-based generator
Jupiter : Full simulation based on Geant4 Uranus : Data analysis packages Satellites : Data analysis packages for MC data
We use only C++, except old fortran tools. Link to various tools at http://acfahep.kek.jp/subg/sim/soft All packages are kept in the CVS. Accessible from http://jlccvs.kek.jp/
![Page 9: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/9.jpg)
9
JSF
JSF provides common framework for studies using
Quick Simulator
Jupiter/Satellites
To start interactive session of jsf, do
$ jsf gui.C
JSF control panel popes up
![Page 10: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/10.jpg)
10
Using JSF Control Panel
Controls menu
run mode
generator type
generator parameters pythia
– event type zh
save parameters
Next Event button
![Page 11: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/11.jpg)
11
Batch Run
root option:
-b : run without X
-q : quit at the end
jsf option
--maxevt=N : N is number of events
$ jsf -b -q --maxevt=100 gui.C
![Page 12: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/12.jpg)
12
JSF Basics
![Page 13: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/13.jpg)
13
JSF features - 1
JSF is based on ROOT User needs to lean just one language, C+
JSF provides a framework for modular analyses Common framework for event generation,
detector simulation, and analyses. Same framework for beam test data analysis
Unified framework for interactive and batch jobs GUI for control of an interactive run Histogram
and event display packages included A file similar to .rootrc is used to set parameter. Default values an be overidden by command
line argument at run time.
![Page 14: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/14.jpg)
14
JSF Features – 2
Object I/O Each modules can save/read their event data as
branches of a root tree. Job parameters, histograms, ntuples and private
analysis tree can be saved in the same file Packages
Included in the release Pythia6.3, Bases/Spring++, ZVTOP, JETNET, BSGEN
Provided as separated packages Physsim (Event generators and analysis utilities) LCLIB (QuickSim, Helas) Jupiter (Geant4) Uranus/Satellites
![Page 15: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/15.jpg)
15
JSF Conponents Libraries ( $JSFROOT/lib )
Pre-compiled C++ classes to build JSF applicationsuch as libJSFGenerator.so, libJSFQuickSim.so, …
Executables (main program ) ($JSFROOT/bin) “jsf” command : built with ROOT+libJSF.so
Macros ($JSFROOT/macro) C++ program is used as Macro thanks to CINT
(No need to compile and link) In JSF, Macros are used to set run parameters
and provide a simple analysis code.gui.C, GUIMainMacro.C, UserAnalysis.C
![Page 16: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/16.jpg)
16
JSF Kernel JSF is a framework for event-by-event data analysis Provides a modular framework suitable for analysis
consists of several sub-detectors Job flow control
Create modules Jon Initialization
Begin Run Event analysis
End RunJob Termination
Job flow is controlled by a class, JSFSteer Analysis modules are inherited from a class, JSFModule
Member functions of JSFModule Initialize(), BeginRun(..), Process(…), EndRun(), Terminate()
JSF job flow concept
A simple example without Macrosis prepared in $JSFROOT/example/ZHStudy
![Page 17: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/17.jpg)
17
JSF Kernel - FileIO
A class, JSFEventBuf, is defined by JSFModule It is used to define branch of a ROOT Tree
( used to save/get event data ) JSFModule JSFEventBuf : 1-to-1
correspondance Information of JSFModule written in a root file is
used to define branch for read-in data.
In a user program, To get pointer to JSFModule objects,
mod= (JSFModule*) gJSF->FindModule(“module_name”) To get pointer to JSFEventBuf objects,
buf=(JSFEventBuf*)mod->EventBuf()
![Page 18: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/18.jpg)
18
Access to JSFModule and JSFEventBuf
In script
JSFSteer *jsf (defined in gui.C) jsf->GetEventNumber(); JSFXXX *mod=(JSFXXX*)jsf->FindModule("JSFXXX"); JSFXXXBuf *buf=(JSFXXXBuf*)mod->EventBuf();
In compiled code,
JSFSteer *gJSF (defined in JSFSteer.h)
![Page 20: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/20.jpg)
20
Parameter file All parameters are managed by JSFEnv class
In the userprogram, they are obtained by a method, JSFEnv::GetValue(“Parameter.name”,default)
At run time, paremetercan be changed by three method In a file, jsf.conf
Parameter.Name: value #!argname # comments ….
As a command line argument, like $ jsf –argname=value gui.C
Through the popup menues of JSF Control Panel Each user can add their own menu by a function, UserMenu()
argname is an alias of Parameter.Name used to parse command line argument
![Page 21: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/21.jpg)
21
Macro in JSF In JSF, macros ( xxx.C file ), are used extensively
to define type of jobs and job parameters.
GUIMainMacro.C : Define a standard set of modules and their parametersgui.C : Load GUIMainMacro.C and libraries for GUIUserAnalysis.C : An sample user macro file for Initialization, event analysis and drawing histogram
Important macro files in $JSFROOT/macro directory
![Page 22: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/22.jpg)
22
JSF – First example in SimTols
Examples inSimTools
$ cd [SimTools]/examples/JSF_QuickSim/exam01$ jsf gui.C
JSF control panel popes up
![Page 23: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/23.jpg)
23
UserAnalsis.C
Example in $JSFROOT/macro/UserAnalysis.C
Three functions:
UserInitialize() : Called at Job initializationdefine Histgrams, etc.
UserAnalysis() : Called at each eventfor event analysis
DrawHist() : Called to draw histogram
![Page 24: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/24.jpg)
24
GUIMainMacro
![Page 25: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/25.jpg)
25
Build Compilied library
buildjsf command
![Page 26: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/26.jpg)
26
Other examples
Exam02
Exam03
Exam04
![Page 27: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/27.jpg)
27
JSF Generators
JSFGenerator
PythiaGenerator
JSFBases - JSFSpring - JSFHadronizer
JSFMEGenerator - JSFSHGenerator JSFReadMEGenerator - JSFPythiaHadronizer
![Page 28: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/28.jpg)
28
PythiaGenerator
Parameters
Process : ZH, ZZ, WW, enW, eeZ, gammaZ
BeamStrahlung
Decay: Z, W, H
InitPythia.C
![Page 29: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/29.jpg)
29
![Page 30: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/30.jpg)
30
JSFGeneratorParticle
Particle informationID, Mass, Charge, P, X, DLPointers to Mother, 1st_Daughter, NDaughter
Example
jsf/generator using JSFGeneratorParticle
EventShape
![Page 31: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/31.jpg)
31
JSFQuickSim
Quick Simulator module
Detector parameter file $(LCLIBROOT)/simjlc/param/detect7.com-- "JLC-I” Green Book
Detector (2 Tesla) , default $(LCLIBROOT)/simjlc/param/jlc3T.com-- "ACFA Report" (3
Tesla) $(LCLIBROOT)/simjlc/param/gld_v1.com-- “GLD_V1" (3 Tesla)
(performance needs to be checked.)
JSFQuickSimParam : parameter class
JLCQuickSim.ParameterFile: env. param.
Simulator Output data
JSFQuickSimBufVTX (+IT), CDC, EMC, HDC, LTKCLTrack
![Page 32: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/32.jpg)
32
SIMDSTBuf
The format agreed among ACFA group.
JSFQuickSIM + JSFGenerator
Same information can be written to a fileaccesible by FORTRAN program.
![Page 33: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/33.jpg)
33
Classes for QuickSim OutputJSFSIMDSTBuf
Int_t GetNLTKCLTracks(); Int_t GetNCDCTracks(); Int_t GetNVTXHits(); Int_t GetNEMCHits(); Int_t GetNHDCHits(); Int_t GetNSMHits(); Int_t GetNGeneratorParticles();
TObjArray *GetLTKCLTracks(); // Pointers to LTKCLTracks objects array TClonesArray *GetCDCTracks(); // Pointers to CDCTracks object array TClonesArray *GetVTXHits(); // Pointers to VTXhits object array TClonesArray *GetEMCHits(); // Pointers to EMhits object array TClonesArray *GetHDCHits(); // Pointers to HDhits object array TClonesArray *GetSMHits(); // Pointers to SMhits object array TClonesArray *GetGeneratorParticles(); // Pointers to GeneratorParticle
objects array
important Member functions:
![Page 34: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/34.jpg)
34
JSFLTKCLTrack
Information based on "Combined Track Bank" http://www-jlc.kek.jp/subg/offl/lib/docs/cmbtrk/main.html
Data in class P at closest approach to IP Particle type: 1=Pure gamma, 2=Gamma in mixed EMC, 3=Pure neutral Hadron, 4=Hadron in mixed HDC, 5=Pure charged hadron, 6=Unmached Track 11=Electron candidate, 13=muon candidate
Source of information : 100*IHDC + 10*IEMC + ICDC
Nsig Pointer to CDC Tracks
![Page 35: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/35.jpg)
35
Anlib
ANL4DVector: TLorentz , Lockable ANLEventSahpe
Using TObjArray of ANL4DVector Calculate Thrust, Oblateness, Major/Minor Axis
ANLJetFinder base class for Jade, JadeE, Durham jet finder
ANLJet : ANL4DVector
See examples in $(LEDAROOT)/Anlib/examples
![Page 36: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/36.jpg)
36
JLCCVS
Latest packages are available at http://jlccvs.kek.jp. How to get:
$ cvs -d :pserver:[email protected]/home/cvs/soft login <RETURN>Password: <RETURN>$ cvs -d :pserver:[email protected]:/home/cvs/soft co jsf <RETURN>
Update$ cvs update -P
See CVS log$ cvs log
Web interface to see a code history http://jlccvs.kek.jp/cgi-bin/cvsweb.cgi/jsf/
![Page 37: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/37.jpg)
37
Information on Web
Home page of ACFA-Sim grouphttp://acfahep.kek.jp/subg/sim
SimTools http://acfahep.kek.jp/subg/sim/simtools
![Page 38: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/38.jpg)
38
Backup slides
![Page 39: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/39.jpg)
39
jsf gui.C
Construct JSFSteer
IsBatch ?
gui=new JSFGUIFrame()
Start Interactive session
BatchRun()
yesno
![Page 40: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/40.jpg)
40
Setup.bash
# .bashrc
# Following two lines are essential
export SIMTOOLS_DIR=/home/sample/SimTools
export ROOTSYS=/home/root/root-4.03.04
# next three lines are required to compile package
export JDK_HOME=/home/soft/JDK/j2sdk1.4.2_06
export G4INSTALL=/home/soft/Geant4/geant4.6.1
export LCIO=/home/soft/lcio/v01-03
..........
![Page 41: Introduction to SimTools](https://reader035.fdocuments.us/reader035/viewer/2022081603/568138a8550346895da06762/html5/thumbnails/41.jpg)
41
.rootrc
ROOT uses .rootrc file to set configuration parameters.
Following two parameters must be defined to run JSF.
.rootrc file is in your current directory or in your home directory.
Unix.*.Root.DynamicPath: .:$(ROOTSYS)/lib:$(JSFROOT)/lib:$(LEDAROOT)/libUnix.*.Root.MacroPath: .:$(ROOTSYS)/macros:$(JSFROOT)/macro