LCSim Tutorial for Muon Collider Detector Studies Jeremy McCormick, Norman Graf SLAC Hans Wenzel FNAL.

Slides:



Advertisements
Similar presentations
Distributor meeting October 2007
Advertisements

Developing in CAS. Why? As distributed you edit CAS 3 with Eclipse and build with Maven 2 – Best Practice for Release Engineering – Difficult edit-debug.
1 OBJECTIVES To generate a web-based system enables to assemble model configurations. to submit these configurations on different.
LCFI physics studies meeting, 28 th June 05 Sonja Hillertp. 1 Report from ILC simulation workshop, DESY June Aim of workshop: preparation for Snowmass;
Org.lcsim ILC Reconstruction and Analysis Tony Johnson SLAC March 2005.
6/23/20031 NICADD LCD Simulations: Capability Overview and Future Plans Guilherme Lima, Jeremy McCormick.
Victor Serbo, SLAC30 September 2004, Interlaken, Switzerland JASSimApp plugin for JAS3: Interactive Geant4 GUI Serbo, Victor (SLAC) - presenter Donszelmann,
Software Installation The full set of lecture notes of this Geant4 Course is available at
1 SLAC LCD Simulations Group Jeremy McCormick ILC Detector Simulation using SLIC LDC: ttbar SiD May05: 100 muonsSiD Aug05: ttbarCDC Aug05: ttbar 6 jets.
Slic A Geant4-based detector simulation package Norman Graf, Jeremy McCormick SLAC October 15, 2009.
Lcsim A Java-based Reconstruction package for Particle Physics Tony Johnson on behalf of Norman Graf SLAC Scientific Computing Workshop June
ROOT An object oriented HEP analysis framework.. Computing in Physics Physics = experimental science =>Experiments (e.g. at CERN) Planning phase Physics.
LCIO A persistency framework for LC detector simulation studies Frank Gaede, DESY, IT 4 th ECFA/DESY LC Workshop Amsterdam April 1 st -4 th 2003.
SiD Software Status. Framework Overview Pythia, WHIZARD, etc. Pythia, WHIZARD, etc. SLIC Tracking, PFA, etc. LCSim StdHep LCIO Events JAS3 (or any AIDA.
Simulating the Silicon Detector August 16, 2005 Norman Graf SLAC.
ALCPG Software Status: Simulation & Reconstruction Norman Graf (for the sim/reco team) LCWS 2010, Beijing March 27, 2010.
Mokka and integration of the geometry AIDA kick-off meeting WP2 session: Common software tools 17 February 2011 – CERN Paulo Mora de Freitas and Gabriel.
Introduction to Hall-D Software February 27, 2009 David Lawrence - JLab.
JAS3 + AIDA LC Simulations Workshop SLAC 19 th May 2003.
ALCPG October 25 th 2007 Hans Wenzel Calorimetry in slic How-to Motivation for dual readout Calorimeter What are our requirements Why did we choose SLIC.
ALCPG Simulation Status and Plans ECFA LC Workshop, Durham Sep. 2, 2004 Norman Graf (SLAC)
ALCPG Simulation Status and Plans ACFA LC Workshop, Taipei Nov. 10, 2004 Norman Graf (SLAC)
ALCPG Software Tools Jeremy McCormick, SLAC LCWS 2012, UT Arlington October 23, 2012.
HPS Online Software Discussion Jeremy McCormick, SLAC Status and Plans.
JAS/Wired + Geant 4 Tony Johnson July Contents What is JAS? What is WIRED? –Future Directions JAS+AIDA+GAG+Wired + Geant 4= ? Making it easy to.
Org.lcsim Reconstruction and Analysis framework for ILC Detectors Tony Johnson SLAC July 2006.
Implementing a dual readout calorimeter in SLIC and testing Geant4 Physics Hans Wenzel Fermilab Friday, 2 nd October 2009 ALCPG 2009.
Simulation and Reconstruction: ALCPG Framework & Toolkit Norman Graf (for the ALCPG Simulation & Reconstruction Team) ILC-ECFA Meeting November 8, 2006.
As of 28 Juni 2005Getting Starged with GEM - Shuei Yamada 1 Getting Started with GEM Shuei YAMADA ICEPP, University of Tokyo What is GEM? Before you start.
Writing Extension Modules (Plugins) for JAS 3 Mark Donszelmann Tony Johnson Victor Serbo Max Turri CHEP2004, 27 september-1 october 2004, Interlaken, Switzerland.
Dual Readout Dec 18 th 2007 Hans Wenzel SLIC and multiple readouts. Hans Wenzel Fermilab Warning: Work in progress! Current Status Where to find executables,
Detector Simulation Software Norman Graf (SLAC) CLIC08 Workshop CERN October 15, 2008.
Simulation and Reconstruction: ALCPG Framework & Toolkit Norman Graf (for the ALCPG Simulation & Reconstruction Team) ILC Software and Tools Workshop May.
V. Serbo, SLAC ACAT03, 1-5 December 2003 Interactive GUI for Geant4 by Victor Serbo, SLAC.
An Introduction to Designing and Executing Workflows with Taverna Aleksandra Pawlik materials by: Katy Wolstencroft University of Manchester.
Summary of Simulation and Reconstruction Shaomin CHEN (Tsinghua University)  Framework and toolkit  Application in ILC detector design Jupiter/Satellites,
ALCPG Software Framework Overview & Updates Jeremy McCormick, SLAC SiD Group ALCPG 2009.
Sim/Recon DBD Editors Report Norman Graf (SLAC) Jan Strube (CERN) SiD Workshop SLAC, August 22, 2012.
SiD Workshop October 2013, SLACDmitry Onoprienko SiD Workshop SLAC, October 2013 Dmitry Onoprienko SLAC, SCA FreeHEP based software status: Jas 3, WIRED,
1 Using Jupiter and Satellites Akiya Miyamoto KEK Jan 2006.
Tool Install How to download & install Java 6 & Eclipse updated version based on Dr. G. L. Ray’s slides.
Java Analysis Studio and the hep.lcd class library Mike Ronan - LBNL Joanne Bogart, Gary Bower, Tony Johnson - SLAC Nick Sinev - Oregon Don Benton - U.
Updates to Tracker Digitization Jeremy McCormick, SLAC.
LCIO A persistency framework and data model for the linear collider CHEP 04, Interlaken Core Software, Wednesday Frank Gaede, DESY -IT-
25 Oct 2007Jeremy McCormick, ALCPG MC1 ALCPG Monte Carlo Framework.
FreeHEP, JAS and WIRED Mark Dönszelmann, CERN/IT Charles Loomis, UC, Santa Cruz ATLAS Software Week, 30 November 2000.
1 Software tools in Asia Akiya Miyamoto KEK 18-March-2005 Simulation and Reconstruction Session LCWS2005 Representing acfa-sim-j activity M.C.Chang 1,K.Fujii.
Mokka, main guidelines and future P. Mora de Freitas Laboratoire Leprince-Ringuet Ecole polytechnique - France Linear collider Workshop 2004, Paris.
WIRED for LCD Analysis Mark Dönszelmann Linear Collider Simulation Workshop May 19-22, 2003, SLAC.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
Oct HPS Collaboration Meeting Jeremy McCormick (SLAC) HPS Web 2.0 OR Web Apps and Databases (Oh My!) Jeremy McCormick (SLAC)
JAS and JACO – Status Report Atlas Graphics Group August 2000 Tony Johnson.
DD4hep-Based Simulation Nikiforos Nikiforou CERN/PH-LCD ILD Meeting 2014 Oshu City, September 9 th, 2014.
Slic A Geant4-based detector simulation package Jeremy McCormick, Norman Graf, Ron Cassell, Tony Johnson SLAC June 8, 2006.
Lcsim Status for Muon Collider Physics and Detector Studies Norman Graf (SLAC) MAP 2012 Winter Meeting SLAC, March 8, 2012.
“A Comprehensive Java-based Simulation Environment for Particle Physics” Tony Johnson SLAC September 2006.
CS520 Web Programming Introduction to Maven Chengyu Sun California State University, Los Angeles.
1 Overview of Benchmarking Tools Tim Barklow SLAC Oct 10, 2006.
1 SLAC simulation workshop, May 2003 Ties Behnke Mokka and LCDG4 Ties Behnke, DESY and SLAC MOKKA: european (france) developed GEANT4 based simulation.
Data Model: LCIO to LCIO2.0 Norman Graf (SLAC) ILC-CLIC Software, CERN May 28, 2009.
Optimizing SiD for the LOI: Simulation and Reconstruction Norman Graf (for the ALCPG Simulation & Reconstruction Team) October 9, 2007.
Simulation and Reconstruction: ALCPG Framework & Toolkit Norman Graf (for the ALCPG Simulation & Reconstruction Team) LCWS07 May 31, 2007.
GEANT4 for Future Linear Colliders
org.lcsim Recon XML Framework
slicPandora: slic + pandoraPFANew
HEP detector description supporting the full experiment life cycle
Simulation Framework Norman Graf SLAC June 10, 2005.
General Software Issues at SiD
Linear Collider Simulation Tools
Linear Collider Simulation Tools
Presentation transcript:

LCSim Tutorial for Muon Collider Detector Studies Jeremy McCormick, Norman Graf SLAC Hans Wenzel FNAL

What can LCSim Framework do? SLIC – simulation of diverse detector geometries and readout technologies with SLIC LCSim – track-based and calorimeter reconstruction algorithms – analysis, histogramming, etc. JAS3 – event display / visualization – histogram display – data browser 2

Framework Overview Pythia, WHIZARD, etc. Pythia, WHIZARD, etc. SLIC Tracking, PFA, etc. LCSim StdHep LCIO Events JAS3 (or any AIDA tool) JAS3 (or any AIDA tool) LCIO PFOs AIDA Event Gen Simulation Reconstruction Analysis Visualization LCDD Compact XML APPLICATIONS DATA DETECTOR DESCR 3

Full Workflow event generation – generate StdHep physics events using generator of choice (Pythia, etc.) full detector simulation – run SLIC with LCDD detector and StdHep file – produces LCIO with sim data LCSim – run reconstruction and analysis in batch mode using XML steering files – produces LCIO with sim + recon data – create histograms using AIDA and save them JAS3 – load LCIO file and view in browser and event display – load AIDA histograms to view/style 4

Preliminaries analysis in Java – Java JDK 1.6 – Maven 3 – Netbeans or other IDE such as Eclipse simulation – StdHep event generators for creating physics events usually best to have 1 person in charge of this for consistency – SimDist for building SLIC g++, Make, CMake, wget, etc. configure script will tell you what you’re missing 5

CVS All projects in LCSim are contained in SLAC’s Freehep CVS repository. – Need to get a CVS account to checkin changes. – contact tony_johnson AT slac.stanford.edu setting the CVSROOT (uses anonymous instead of your real CVS user name) export checking out a project (with CVSROOT set) cvs co lcsim cvs co SimDist etc. 6

SLIC Simulator for the Linear Collider LCDD XML format for detector representation grid compatible fast, easy to use command line interface Geant4 backend with built-in visualization output (OpenGL, VRML, HepRep, etc.) LCIO output 7

SLIC SLIC Frontend Geant4 LCDD LCIO HepPDT LCDD Geometry LCDD Geometry StdHep Events StdHep Events LCIO Events LCIO Events slic –g geometry.lcdd –m stuff.mac –i events.stdhep –o output.slcio –l QGSP_BERT –r 1000 slic –h # print help slic –m run.mac # run with macro only slic –n # run interactively Example Command Line Usage:  Flexible command-line simulation tool with Geant4 backend  StdHep event input  LCIO event output  Grid ready (no ext. DB or internet connection required)  Fully descriptive runtime geometry with no “magic numbers” (LCDD)  Extended particle set from HepPDT (SUSY, resonances, etc.) with generic tracking + edep  Maintained by SLAC  Also used by non-ILC experiments 8

SimDist for building SLIC locally cvs co SimDist cd SimDist./configure [options] make for batch build./batch_configure to test (should show splash screen)./scripts/slic.sh 9

Running SLIC interactive mode./scripts/slic.sh –g./geometry.lcdd –n run a macro with Geant4 commands./scripts/slic.sh –g./geometry.lcdd –m commands.mac batch mode, deleting old output and automatically generating file name./scripts/slic.sh –g geometry.lcdd –i events.stdhep –r 1000 –x –O batch mode, skipping some events./scripts/slic.sh –g./geometry.lcdd –s 50 –r 1 10

LCSim Java package providing analysis and reconstruction tools Maven build system AIDA for histogramming and data analysis LCIO input format command-line with XML steering files plugin to JAS3/Wired – event browser 11

Building LCSim checkout from CVS and build cvs co lcsim cd lcsim mvn check the build java –jar./lcsim/target/lcsim-2.6-SNAPSHOT-bin.jar 12

Running LCSim This is the template for running LCSim. java –jar./lcsim/target/lcsim-[version]-bin.jar [steeringFile] For instance, this will print the event numbers in an LCIO input file. java –jar./lcsim/target/lcsim-2.6-SNAPSHOT-bin.jar./lcsim/examples/template.lcsim –DinputFile=myevents.slcio 13

Drivers module of analysis code event processor can have child sub-drivers called through super – ex. to call child process methods => super.process(event) access to all event and detector information package org.lcsim; // imports here class MyAnalysis extends Driver { public void process(EventHeader event) { // my event analysis here } Driver Template 14

Accessing Event Data Drivers – process(EventHeader event) <= primary access EventHeader provides access to all event data – detector, LCIO event specific class and name => get(type, name) List hits = event.get(CalorimeterHit.class, “HcalHits”); all collections with specific type List > hitCollections = event.get(CalorimeterHit.class); Detector object Detector det = event.getDetector(); 15

LCIO Data Format Simulation – SimCalorimeterHit – SimTrackerHit – MCParticle Reconstruction – CalorimeterHit – Cluster – RawTrackerHit – TrackerHit – Track TrackState – ReconstructedParticle 16

LCSim XML command line utility for running lcsim in batch mode (e.g. in batch computing env or grid) basically a list of Drivers to execute on a set of input files, along with control parameters Driver XML parameters map to set methods external variables – resolved using –D command-line parameter Full guide here 17

Anatomy of an LCSim XML File ${inputFile} 1 Input file with variable N events to run (-1 means all) Driver to execute Driver definition Driver parameter 18

Driver Parameters package org.lcsim; class MyAnalysis extends Driver { int importantNumber = 0; public MyAnalysis() {} public void setImportantNumber(int i) { importantNumber = i; } Dummy Driver Example <driver name=“MyAnalysis” type=“org.lcsim.MyAnalysis”> 1234 LCSim XML basic Java set methods are mapped automatically to XML elements by convention decapitalize first letter, setMyVar => 1234 Java primitive types supported (float, double, int, etc.) as well as arrays of these supports parsing of arbitrary data using form: setSomething(Element node) see full guide for details (references) 19

Booking Histograms public class MyDriver extends Driver { // default instance of AIDA AIDA aida = AIDA.defaultInstance(); // create a cloud public void process(EventHeader event) { List hits = event.get(CalorimeterHit.class, "HcalHits"); for (CalorimeterHit hit : hits) { aida.cloud1D("Hit Energy").fill(hit.getCorrectedEnergy()); } // save plots public void endOfData() { try { aida.saveAs(“plots.aida”); } catch (IOException x) { throw new RuntimeException(x); } Simple Cloud Example 20

AIDA 1, 2, 3D Histograms 1,2, 3D Clouds DataPointSet Profile Fitting addition, subtraction, division of histos see AIDA class in LCSim for access to full API graphical display of 3D objects not supported but this data can still be stored/loaded to/from XML 21

Saving Output from XML <driver name=“LCIODriver” type=“org.lcsim.util.loop.LCIODriver”> myEvents.slcio Save an LCIO File <driver name=“AidaSaveDriver” type=“org.lcsim.job.AidaSaveDriver”> plots.aida Save an AIDA File 22

MCD Analysis package for MCD detector studies separates LCSim code from MCD-specific algorithms/Drivers To checkout and build cvs co mcd-analysis cd mcd-analysis mvn 23

Running MCD Analysis Sample Code assuming already built mcd-analysis run command-line XML java –jar./mcd-analysis/target/mcd-analysis-1.0-SNAPSHOT-bin.jar./mcd-analysis/resources/org/lcsim/mcd/steering/mcd_cal_occupancy.lcsim -DinputFile=mucalEvents.slcio 24

JAS3 / Wired JAS3 provides a Java workbench with a plugin architecture. LCSim is installed as plugin (should build locally as covered previously). view/style histograms Wired event display – detector wireframe + LCIO data display (hits, particles, tracks, etc.) 25

JAS3 Setup install and run JAS3 locally wget tar –zxf./jas-assembly distribution.tar.gz cd jas-assembly /jas3 & get JAS3 plugins Plugin Manager select “Wired 4”, “Wired 4 Base Library” + click “Update installed...” install MCD tools build lcsim, mcd-analysis (see previous slides) to install the jars restart JAS 26

Working with JAS3 load LCIO events File > Open > [select LCIO file] > click “Open” event display File > New > Wired4 View browser File > New > LCSim Event Browser step through events Click the “Next” button (after loading LCIO file) create some analysis code File > New > Java file (write code and Save) load a Driver File > Load > input Driver name e.g. “org.lcsim.MyDriver” > click “OK” 27

Detectors Detector data is associated to events via a unique tag in the event header. The files can be either fetched from the web or built into a jar. (We use 2 nd method.) mcd-analysis has dependency on mcd- detectors jar which is deployed to maven repo. – This jar contains all detector description data for the analysis/reconstruction. – Also has LCDD file for running SLIC. 28

GeomConverter Compact Detector Compact Detector GeomConverter HepRep GDML / LCDD Pandora XML Java Runtime Wired SLIC, ROOT, Geant4 SlicPandora (PandoraPFANew) LCSim java –jar GeomConverter-bin.jar –o lcdd compact.xml mydet.lcdd Convertor Example: 29  Compact subdetector types added as needed/requested.

Sample Detector Data 30 FastMC Calorimetric sampling fractions FastMC tracking parameters compact detector description detector name LCDD file for SLIC

Hidden Directories (Where is everything?!) detector data cache (when.zip files are downloaded from www) ~/.lcsim/cache data cache (when FileCache class is used e.g. in test cases or from your code) ~/.cache local JAS3 installation ~/.JAS3/classes <= compiled classes from the editor ~/.JAS3/extensions <= installed plugin jars (‘mvn install’) Maven dirs (default) ~/.m2/repo <= Maven jar repository ~/.m2/settings.xml <= user settings (create yourself) 31

Links ILC Confluence Wiki LCSim Tutorials 32