java analysis studio and the java framework for future linear colliders. cern - january 13th 1998...
TRANSCRIPT
Java Analysis Studio and the Java Framework for Future Linear Colliders.
CERN - January 13th 1998CERN - January 13th 1998
Tony Johnson - SLACTony Johnson - SLAC
ContentsContents
Introduction to JavaIntroduction to Java• Pro’s and Con’s of Java for HEPPro’s and Con’s of Java for HEP
Java Framework for LC Detector studiesJava Framework for LC Detector studies Java Analysis StudioJava Analysis Studio
• FeaturesFeatures• Beta Release InformationBeta Release Information• DemoDemo• FutureFuture• Opportunities for CollaborationOpportunities for Collaboration
ConclusionConclusion
What is Java?What is Java?History
Originally designed (1991) as a small language for consumer electronics (cable boxes, toasters etc.)Eventually (1994) HotJava Browser appeared, which allowed Java Applets to appear in web pages.Adopted by Netscape, Microsoft, Sun etc. as Web Programming Language.
More than just a Web ToolJava is a fully functional, platform independent, object oriented programming language + powerful set of machine independent libraries, including GUI libraries.
Java Source code
Java “Bytecodes”
Compiler
Mac Unix PC
Bytecode
Interpreter
JITCompiler
Machine Code
Totally Buzzword Totally Buzzword CompliantCompliant
Simplewell, simpler than C++
Object Orientatedmore so than C++
DistributedBuilt in support for Internet protocols, URL’s, HTTP, Remote Method Invocation, DB access etc.
Robust“Impossible” to create memory leaks, go beyond the end of an array, corrupt stack or code
SecureBytecode “verifier”, padded cell
Architecture Neural, PortableRuns on PC, MAC, Unix, VMS
Interpreted“Compiler” converts code into machine independent “bytecodes”
High PerformanceWith JIT compiler still 2-3 times slower than native C++, but...
MultithreadedLanguage has direct support for writing multithreaded applications
DynamicLibraries can change without recompiling programs that use them
Why Java for HEP Why Java for HEP Computing?Computing?
Highly Portable• Java works today on NT, Win95/8,
Unix, Mac, VMS etc.
• Programs written in Java are very portable
– care needed for browsers, AWT
Fast• Within factor of 3 of compiled C++
code today, getting faster.
• Bottlenecks may be elsewhere anyway (IO, GUI, Geant, Physicist).
• Very fast turnaround time (compilation, dynamic loading)
Simple to Learn• More object oriented than C++
– Without all the tricky bits
– Memory management
– No pointers
– No backwards compatibility
• Spend time designing program + solving physics problems, not working around language problems
• Programs written in Java much more likely to work as intended.
– Much easier to debug if they don’t
Why Java for HEP Why Java for HEP Computing?Computing?
Previous generation of experiments used Fortran + Data Management System (== Jazelle, Zebra, BOS)
Solves Three Problems• Ability to Represent
Complex Data Structures
• Persistence (i.e. read in and write out complex structures)
• Run time access to named data in structures (for analysis)
Now time has marched on and modern experiments use C++ Represent Complex Data Persistence Run time access to data• Still need to build (or buy and
deploy) data management system (e.g. Root, Objectivity)
Java Represent Complex Data Persistence (serialization) Run time access to data
(reflection)• support built-in to language
Why Java for HEP Why Java for HEP computing?computing?
Java is more than a language Java is more than a language • very large set of very large set of standard librariesstandard libraries (API’s) (API’s)
– Distributed computing, networking, CORBA, RMIDistributed computing, networking, CORBA, RMI– Graphics, 2D and 3D, GUI’sGraphics, 2D and 3D, GUI’s– Collections, Hash tables, Maps, VectorsCollections, Hash tables, Maps, Vectors– IO, Compression, EncryptionIO, Compression, Encryption– Security, sand-boxSecurity, sand-box
• Wide Wide industry supportindustry support– Databases, oracle, objectivityDatabases, oracle, objectivity– Tools, IDE’s, Debugger’s, Optimizer’s, UML toolsTools, IDE’s, Debugger’s, Optimizer’s, UML tools
Why Java for HEP Why Java for HEP Computing?Computing?
Built-inBuilt-in support for support for distributed distributed computingcomputing and and NetworkingNetworking• take code to datatake code to data
– Download JAVA analysis Download JAVA analysis “agents” into remote server“agents” into remote server
– flexible flexible built-in padded cellbuilt-in padded cell protects server from protects server from analysis modulesanalysis modules
– Rather than move all the data to Rather than move all the data to Remote institute, transparently Remote institute, transparently move code to datamove code to data
• possible to have distributed farm of possible to have distributed farm of processors analyzing dataprocessors analyzing data
• Give user impression code is Give user impression code is running locallyrunning locally
Why Why notnot Java for HEP Java for HEP computing?computing?
No No operator overloadingoperator overloading• Annoying for complex numbers, matrices, 4-vectorsAnnoying for complex numbers, matrices, 4-vectors• Perhaps more often abused than sensibly usedPerhaps more often abused than sensibly used
Floating pointFloating point performance performance• Requirement for identical results can be a problemRequirement for identical results can be a problem• Being addressed by Java Grande Forum + SunBeing addressed by Java Grande Forum + Sun
– http://www.javagrande.org/http://www.javagrande.org/
BugsBugs sometimes slow to be fixed sometimes slow to be fixed• Printing, Imaging existed for >1 yearPrinting, Imaging existed for >1 year• Perhaps “Community Source License” will helpPerhaps “Community Source License” will help
Little control overLittle control over Memory Allocation Memory Allocation Integration with Integration with C++C++ could be better could be better
Where would HEP use Where would HEP use Java?Java?
GUI systemsGUI systems online + controlonline + control offline (event display)offline (event display)
Data Analysis tasksData Analysis tasks OfflineOffline OnlineOnline
Reconstruction packages? Reconstruction packages? GeneratorsGenerators
Java for Linear Collider Java for Linear Collider Detector StudiesDetector Studies
Dual Goals:Dual Goals:Contribute to Linear Collider Detector/Physics Contribute to Linear Collider Detector/Physics Studies in USStudies in USExperiment with using Java for full offline Experiment with using Java for full offline reconstruction and analysis packagereconstruction and analysis package
LC Detector studies in US LC Detector studies in US
Goals:Goals:• Detailed Study of physics signals Detailed Study of physics signals
in a variety of possible LC in a variety of possible LC Detectors.Detectors.
– Reference Small and Large Reference Small and Large detectorsdetectors
• 3 year study3 year study– Start with simulation studiesStart with simulation studies
– Preliminary results by Preliminary results by Barcelona meeting in MayBarcelona meeting in May
– Move on to detector R&DMove on to detector R&D• Full simulation with GISMO Full simulation with GISMO
– Switch to Geant4, now releasedSwitch to Geant4, now released
• Analysis using Paw, Root, JASAnalysis using Paw, Root, JAS
Java package hep.lcd ?Java package hep.lcd ?
hep.lcd a Java framework for rapid development hep.lcd a Java framework for rapid development ofof• Fast simulation toolsFast simulation tools• Reconstruction (Clustering and Track Finding)Reconstruction (Clustering and Track Finding)• Analysis algorithmsAnalysis algorithms
Built-in event display, histograming and Built-in event display, histograming and diagnostic tools.diagnostic tools.
Flexible architecture for adding new detector Flexible architecture for adding new detector geometries and architectures.geometries and architectures.
Can be run inside JAS or standaloneCan be run inside JAS or standalone
hep.lcd current statushep.lcd current status
ReconstructionReconstruction• Track finder written, Track finder written,
track fitter in progresstrack fitter in progress• Several clustering Several clustering
algorithmsalgorithms Parameterized MCParameterized MC
• Can read generator Can read generator input or Gismo outputinput or Gismo output
• Track and Cluster Track and Cluster smearingsmearing
Analysis UtilitiesAnalysis Utilities• Thrust calculator (Lund)Thrust calculator (Lund)• Jet finder [Durham]Jet finder [Durham]
FrameworkFramework• Processor + Driver systemProcessor + Driver system
– interactively controlinteractively control– which processors calledwhich processors called– debugging/histogrammingdebugging/histogramming
• Parameter (Constant] Parameter (Constant] accessaccess
– driven by detector driven by detector geometrygeometry
• IO system based on Java IOIO system based on Java IO– random access filesrandom access files
• Histograming - built in to JASHistograming - built in to JAS Event DisplayEvent Display
hep.lcd frameworkhep.lcd framework
Event DisplayEvent Display
Event DisplayEvent Display
Event DisplayEvent Display
Event DisplayEvent Display
Is Java fast Enough for HEP Is Java fast Enough for HEP offline?offline?
Current (266Mhz PII, JDK Current (266Mhz PII, JDK 1.1.7)1.1.7)
– Clustering .6 secs/event Clustering .6 secs/event – 13.5 Million Calorimeter Cells13.5 Million Calorimeter Cells
– Fast MC 5-50ms/eventFast MC 5-50ms/event– Track Finding <2secs/eventTrack Finding <2secs/event
Getting better!!!Getting better!!!– JDK 1.2JDK 1.2– HotSpot - Run-time HotSpot - Run-time
optimizationoptimization In real life may be faster than In real life may be faster than
C++ (c.f. Babar)C++ (c.f. Babar)– Better, cheaper analysis toolsBetter, cheaper analysis tools– Manageable complexityManageable complexity
Java Analysis StudioJava Analysis Studio
Experiment independent Experiment independent analysis tool for High Energy analysis tool for High Energy Physics dataPhysics data
What is Java Analysis What is Java Analysis Studio?Studio?
HEP Data Analysis ApplicationHEP Data Analysis Application Easy to use + powerful GUI Easy to use + powerful GUI Support Analysis Modules written in JavaSupport Analysis Modules written in Java Experiment and Data Format IndependentExperiment and Data Format Independent Supports n-tuple or Structured (object) DataSupports n-tuple or Structured (object) Data Data Location Independent (Local or Remote)Data Location Independent (Local or Remote) Extensible (via Plug-ins and Data Interface Modules Extensible (via Plug-ins and Data Interface Modules
(DIMS))(DIMS)) Web + Internet compatibleWeb + Internet compatible Combination of custom and Commercial Combination of custom and Commercial
components (but no runtime license fees)components (but no runtime license fees) Based on Industry StandardsBased on Industry Standards
Java Analysis Studio Java Analysis Studio FeaturesFeatures
Rich, easy to use GUI Rich, easy to use GUI
Java Analysis Studio Java Analysis Studio FeaturesFeatures
Data Format IndependentData Format Independent• Currently SupportCurrently Support
– PAWPAW n-tuples, n-tuples, HippoHippo n-tuples, any n-tuples, any SQLSQL database, database, flat-fileflat-file n-tuples, n-tuples, StdHepStdHep MC events MC events
– Any data format via user supplied Data Interface Any data format via user supplied Data Interface Module (DIM)Module (DIM)
• Experimenting withExperimenting with– Object databases (Object databases (ObjectstoreObjectstore, , ObjectivityObjectivity))– Random access Java based IO (similar to root IO]Random access Java based IO (similar to root IO]
• FutureFuture– XMLXML, , RootRoot, CDF/HDF , CDF/HDF
Java Analysis Studio Java Analysis Studio FeaturesFeatures
Supports Supports bothboth n-tuplesn-tuples and and Structured Structured DataData• n-tuples are fast and allow for simplifications in GUIn-tuples are fast and allow for simplifications in GUI
– Simple Interactive cutsSimple Interactive cuts– Simple plot generationSimple plot generation
but n-tuples ultimately limitingbut n-tuples ultimately limiting• Arbitrarily Structured Data provides ultimate Arbitrarily Structured Data provides ultimate
flexibilityflexibility– Requires slightly more work from end-userRequires slightly more work from end-user– Complete Object Oriented Analysis EnvironmentComplete Object Oriented Analysis Environment– Flexible enough to write (or prototype) Flexible enough to write (or prototype)
reconstruction codereconstruction code
Java Analysis Studio Java Analysis Studio FeaturesFeatures
Histogram/ScatterPlot DisplayHistogram/ScatterPlot Display• Commercial plot package used in earlier Commercial plot package used in earlier
versions replaced with custom plot packageversions replaced with custom plot package– Supports strings, dates, multiple axes, direct Supports strings, dates, multiple axes, direct
user interaction, overlays, fitting, scatter user interaction, overlays, fitting, scatter plots plots
Java Analysis Studio Java Analysis Studio FeaturesFeatures
User analysis modules written in JavaUser analysis modules written in Java• Java Excellent Language for Physics Java Excellent Language for Physics
AnalysisAnalysis– Easy to learnEasy to learn yet very yet very powerfulpowerful, fully , fully OOOO
languagelanguage– FastFast (and getting faster] (and getting faster]– Very fast code, load, test, fix cycleVery fast code, load, test, fix cycle
• JAS provides JAS provides built-in editor, compilerbuilt-in editor, compiler, plus:, plus:– hep.analysis package hep.analysis package
– for creating/filling/manipulating histogramsfor creating/filling/manipulating histograms
– hep.physics packagehep.physics package– simple particle, track manipulation packagesimple particle, track manipulation package
hep.analysis packagehep.analysis package
Histogram delegates binning to:Histogram delegates binning to: • ““partition classespartition classes” [idea stolen from LHC++]” [idea stolen from LHC++]
– Map from X, Y to bin numberMap from X, Y to bin number– supports real, integer, string, date’s etc.supports real, integer, string, date’s etc.
– Calculation of contents, errors in binCalculation of contents, errors in bin– allows efficiency plots, mean/rms plots etcallows efficiency plots, mean/rms plots etc
– Data storage method Data storage method – immediate binning (c.f. Hbook)immediate binning (c.f. Hbook)– delayed binning, allows rebinning, axis changes via GUIdelayed binning, allows rebinning, axis changes via GUI
• Many standard partitions provided.Many standard partitions provided.• User can provide own partition functionsUser can provide own partition functions
Java Analysis Studio Java Analysis Studio FeaturesFeatures
User Extensible, viaUser Extensible, via• Analysis ModulesAnalysis Modules• Data Interface ModulesData Interface Modules
– Access to experiment specific data, Access to experiment specific data, native language modulesnative language modules
• Plug In’sPlug In’s (c.f. Web Applets] (c.f. Web Applets]– Event Displays, etc.Event Displays, etc.
• FitterFitter, , FunctionsFunctions, , PartitionsPartitions
Java Analysis Studio Java Analysis Studio FeaturesFeatures
Analyze local or remote data Analyze local or remote data
• User interface independent of Data LocationUser interface independent of Data Location• Does not assume fast network (works well at 28.8 bps]Does not assume fast network (works well at 28.8 bps]• Analysis code moves (transparently) to dataAnalysis code moves (transparently) to data
Desktop Client DIM
Local Data
Network Data Server DIM
Remote Data
JAS ImplementationJAS Implementation
““100% Java100% Java” Application” Application• Uses Sun’s Java Foundation Classes (Uses Sun’s Java Foundation Classes (SwingSwing) for GUI) for GUI• [optional] interfaces to legacy data (PAW, hippo, [optional] interfaces to legacy data (PAW, hippo,
StdHep) uses StdHep) uses Java Native InterfaceJava Native Interface [JNI] [JNI]
Leverage Commercial ComponentsLeverage Commercial Components• Java itselfJava itself
– compiler, GUI, debugger, networking, Remote compiler, GUI, debugger, networking, Remote Method InvocationMethod Invocation
• Help system from OracleHelp system from Oracle• Plot component (not currently used]Plot component (not currently used]• Object databases, SQL databasesObject databases, SQL databases• No runtime license feesNo runtime license fees
JAS Implementation JAS Implementation
Modular DesignModular Design• Can use individual partsCan use individual parts
– hep.analysis packagehep.analysis package– Histogram display packageHistogram display package
– (e.g. for online display)(e.g. for online display)
– Plot packagePlot package– Analysis toolsAnalysis tools
• Can add or replace partsCan add or replace parts
Java ExperienceJava Experience
Very ProductiveVery Productive• No memory leaksNo memory leaks• No subtle c++ problemsNo subtle c++ problems• fun to writefun to write
Cross Platform EasyCross Platform Easy• Develop under NT,Develop under NT,
– It just works elsewhere!It just works elsewhere!
Getting faster all the time:Getting faster all the time:• Swing 1.1 Swing 1.1 • Faster Java Virtual Machines + Hot-SpotFaster Java Virtual Machines + Hot-Spot
1.0 Beta Release now 1.0 Beta Release now availableavailable
Windows (Windows (NTNT, , 9595, , 9898] self extracting ] self extracting executableexecutable
Unix (Unix (SolarisSolaris++LinuxLinux) binary distribution ) binary distribution availableavailable
Should be easy to port to other Unix, Mac etc.Should be easy to port to other Unix, Mac etc. LimitationsLimitations
• Detailed documentation still under developmentDetailed documentation still under development• May still be some changes to user APIMay still be some changes to user API
Download from: Download from: • http://www-sldnt.slac.stanford.edu/jashttp://www-sldnt.slac.stanford.edu/jas
DemoDemo
FutureFuture
Next Release (1.0 final)Next Release (1.0 final)• More types of plots More types of plots
– 2d plots, lego plots etc.2d plots, lego plots etc.• More flexible control of histogramsMore flexible control of histograms• More n-tuple handling tools (c.f. HippoDraw]More n-tuple handling tools (c.f. HippoDraw]
FutureFuture• More Data Interface Modules More Data Interface Modules
– Objectivity, RootObjectivity, Root• Built in debugger, code profiler, scriptingBuilt in debugger, code profiler, scripting
You tell us!!You tell us!!
CollaborationCollaboration
Integrate Wired event display as Integrate Wired event display as “Plug In” (M.Donszelmann, CERN) “Plug In” (M.Donszelmann, CERN)
Working with Babar, CMS, LCDWorking with Babar, CMS, LCD Looking for more collaborators Looking for more collaborators
and/or experiments interested in and/or experiments interested in trying Java Analysis Studio out and trying Java Analysis Studio out and giving us feedback.giving us feedback.
How to try it outHow to try it out
Please try it:Please try it:• http://www-sldnt.slac.stanford.edu/jashttp://www-sldnt.slac.stanford.edu/jas
Please give us feedbackPlease give us feedback• [email protected]@sld-mail.slac.stanford.edu
Mailing List:Mailing List:• http://www.slac.stanford.edu/cgi-bin/lwgate/JAS-L/http://www.slac.stanford.edu/cgi-bin/lwgate/JAS-L/
Also general mailing list for Java in Also general mailing list for Java in HEP:HEP:• http://www.slac.stanford.edu/cgi-bin/lwgate/HEP-JAVA/http://www.slac.stanford.edu/cgi-bin/lwgate/HEP-JAVA/
ConclusionsConclusions
Java is a very useful Java is a very useful language+environment language+environment that could be very that could be very beneficial to HEP in many beneficial to HEP in many areas.areas.
Could Java be used for Could Java be used for entire offline for major entire offline for major experiment (e.g. linear experiment (e.g. linear collider detector?)collider detector?)
• Technically - YesTechnically - Yes• Politically - ?Politically - ?