Introduction: ROOT/C++ Analyzer



Similar documents





HowPros and Cons of Owning a Home-Based Business










universe nonself self detection system false negatives false positives

Universitat Autònoma de Barcelona





Author manuscript, published in "1st International IBM Cloud Academy Conference - ICA CON 2012 (2012)" hal , version 1-20 Apr 2012








TheHow and Why of Having a Successful Home Office System






Downloaded from SPIE Digital Library on 29 Aug 2011 to Terms of Use:

Client URL. List of object servers that contain object

Chen Ding Yutao Zhong Computer Science Department University of Rochester Rochester, New York U.S.A.


Applications. Decode/ Encode ... Meta- Data. Data. Shares. Multi-read/ Multi-write. Intermediary Software ... Storage Nodes



Bud row 1. Chips row 2. Coors. Bud. row 3 Milk. Chips. Cheesies. Coors row 4 Cheesies. Diapers. Milk. Diapers

FRAME. ... Data Slot S. Data Slot 1 Data Slot 2 C T S R T S. No. of Simultaneous Users. User 1 User 2 User 3. User U. No.


In Proceedings of the 1999 USENIX Symposium on Internet Technologies and Systems (USITS 99) Boulder, Colorado, October 1999

Primitives. Ad Hoc Network. (a) User Applications Distributed Primitives. Routing Protocol. Ad Hoc Network. (b)

autocorrelation analysis

Archiving Scientific Data

(a) Hidden Terminal Problem. (b) Direct Interference. (c) Self Interference

(a) Original Images. (b) Stitched Image

application require ment? reliability read/write caching disk

Sliding Window ... Basic Window S[0] S[k 1] S[k] Digests Digests Digests

Best Place to Find Information For a Wedding?

Application. handle layer. access layer. reference layer. transport layer. ServerImplementation. Stub. Skeleton. ClientReference.

Push-communities. Pull-communities. Wrapped Services processors hardwarecircuits peripherals PCshopping

PROCESSOR IS OCCUPIED BY T i

hospital physician(2)... disease(4) treat(2) W305(2) leukemia(3) leukemia(2) cancer

PROTOCOLS FOR SECURE REMOTE DATABASE ACCESS WITH APPROXIMATE MATCHING

Real Business Cycles with Disequilibrium in the Labor Market: A Comparison of the U.S. and German Economies

} diff. } make. fetch. diff. (a) Standard LRC. (c) Home-based LRC. (b) AURC. Node 0 Node 1 Node 2 (home) Node 0 Node 1 Node 2 (home) Compute


Optimal Crawling Strategies for Web Search Engines

drop probability maxp

desired behaviour (global constraints) composite system putative behaviour: putative agents, actions, etc.

P1 P2 P3. Home (p) 1. Diff (p) 2. Invalidation (p) 3. Page Request (p) 4. Page Response (p)

Resource Management for Scalable Disconnected Access to Web Services

An Investigation of Geographic Mapping Techniques for Internet Hosts

Finding Near Rank Deficiency in Matrix Products

Open Programmable Architecture for Java-enabled Network Devices

Working Paper Simulating Tail Probabilities in GI/GI.1 Queues and Insurance Risk Processes with Subexponentail Distributions

Development process for multimedia applications

CLAS12 Offline Software Tools. G.Gavalian (Jlab)

How to create OpenDocument URL s with SAP BusinessObjects BI 4.0

The ASCII Character Set

é é ä ä é ö é é ò é ó é Ü ä Ü ä ä

HTML Codes - Characters and symbols

Automated Testing of Bluetooth Connectivity. Technical Brief from Missing Link Electronics:

Transcription:

Introduction: ROOT/C++ Analyzer Hall A Analysis Workshop 10 December 2003 Development Team Rob Feuerbach Bob Michaels Ole Hansen Contributors Bodo Reitz Bryan Moffit Robert Stringer (summer student)

The C++ Analyzer Developed by Hall A team from scratch, starting in Spring 2000 Object-oriented. Built on top of ROOT as an interactive ROOT application Organized as a collection of analysis modules: apparatuses, detectors, physics modules. Everything is a plug-in. Completely configurable to the needs of experiments. Easily extensible with user modules CODA event decoder Predefined event loop, initialization, etc. minimizes work for users, but users can customize if necessary Tests, cuts, and output can be defined dynamically without recompiling Centralized, time-dependent database (text files or SQL) provides clear data organization Almost all of ESPACE functionality implemented Available now ROOT/C++ Analyzer 10 December 2003 2

Physics Analysis Capabilities Available in v1.0 (v1.1): HRS spectrometers with VDCs and all basic detectors (scintillators, Cherenkovs, showers) VDC tracking, target reconstruction Basic shower cluster analysis Single-arm kinematics Reaction point (vertex) calculations Extended target (Ü Ø ) corrections Beamline with BPMs & raster Intelligent helicity analysis Scalers EPICS Scintillator timewalk corrections, beta calculation Coincidence time Coincidence kinematics ROOT/C++ Analyzer 10 December 2003 3

Important Concepts Detector Code/data for analyzing a type of detector. Examples: Scintillator, Cherenkov, Shower, VDC, BPM Generic design: One class describes any number of similar detectors, differing only by name and database entries Must have Decode() function SpectrometerDetectors must also have Coarse/FineProcess() (or Coarse/FineTrack() for tracking detectors) Embedded in Apparatus or standalone Must not assume presence of other detectors Apparatus/Spectrometer Collection of Detectors Generic, as with detectors Must have Decode() and Reconstruct() functions May combine decoded data from detectors ROOT/C++ Analyzer 10 December 2003 4

Spectrometer is an apparatus with support for tracks and a standard Reconstruct() function Physics Module May combine data from several apparatuses Typical applications: kinematics calculations, corrections Must have Process() function Analysis Object Common base class for Apparatus/Spectrometer, Detector, Physics Module One optional database file (or group of entries) per object Name of object is important unique identifier Provides support for naming objects, debugging, global variables, database access and similar Defines common interface (API) for processing analysis objects Useful virtual functions that actual objects may implement: DefineVariables(), ReadDatabase(), Init(), Clear() ROOT/C++ Analyzer 10 December 2003 5

Event loop THaAnalyzer Handles initialization Manages lists of objects, output, cuts, decoder, file names, etc. Not required. Can create custom event loop, even in script Decoder THaEvData Decodes raw CODA event buffer into crate/slot/channel data Supports Fastbus & VME Run objects THaRun, THaOnlRun Stores run info, e.g. raw data file name, time, run number, etc. Stores global run parameters, e.g. beam energy, target mass, etc. Provides access to CODA file or ET data ROOT/C++ Analyzer 10 December 2003 6

My Very First Script À ÔÔ ¹ Ò Û ÌÀ ÀÊË Ê Ê Ø ÀÊË µ µ ÑÝÖÙÒ Ò Û ÌÀ ÊÙÒ» Ø» ½¾ º Ø µ Ò ÐÝÞ Ö Ò Û ÌÀ Ò ÐÝÞ Ö Ò ÐÝÞ Ö¹ Ë ØÇÙØ лÛÓÖ» ½¾ ºÖÓÓØ µ Ò ÐÝÞ Ö¹ ÈÖÓ ÑÝÖÙÒµ»» ÒÓÛ Ò Ô Ø Ö ÙÐØ Ò Ñ ÑÓÖÝ ÓÖ ÕÙ Ø Requires: Database output.def ROOT/C++ Analyzer 10 December 2003 7

Resources for Getting Started C++ Analyzer documentation at: ØØÔ»» ÐÐ Û º Ð ºÓÖ»ÖÓÓØ» ROOT User s Guide at: ØØÔ»»ÖÓÓØº ÖÒº» Pre-installed C++ Analyzer on adaq machines. Login as adaq and type Ò ÐÝÞ Ö. See $ANALYZER directory. Example scripts in $ANALYZER/examples Online analysis setup for E94-107 (adaq account) ROOT/C++ Analyzer 10 December 2003 8

Transition Guide for ESPACE Users ESPACE kumac detmap database header files reaction string masses.dat variables (block data var.f) logicals spectra ntuples paw/paw++ optimization hacking/recompiling ESPACE private ESPACE version (no programming docs) difficult to integrate new detectors C++ Analyzer C++ script (full C/C++!) part of detector s database file part of detector s database file run database (db run.dat) (configuration of physics modules) (parameters to physics modules) global variables (ghavars) cuts/tests (cuts.def, ghacuts) output definitions (output.def) ROOT tree C++ Analyzer (=interface to ROOT) (not yet available) writing user module(s) shared lib private shared library auto-generated HTML ref. manual trivial (std det), easy (new det) ROOT/C++ Analyzer 10 December 2003 9

Event Display Summer student project (Robert Stringer, CSLA) Prototype 3D visualization of detector stack VDC clusters Active elements of scintillator and shower counters Reconstructed track(s) Detailed VDC display (planes, clusters, hits) ROOT/C++ Analyzer 10 December 2003 10

Event Display ROOT/C++ Analyzer 10 December 2003 11

Physics Modules Perform post-reconstruction analysis. May combine information from several apparatuses Plug-in design. Use & combine as needed. Allow rapid extension of analyzer Typical applications: kinematics calculations, vertex finding, corrections, coincidence time, statistics Special applications: debugging, event display, custom output Any other event-by-event usercode. (But: direct analysis of actual hardware data should be done by a detector.) Output from modules that correct tracking info can be used as input for modules that operate on tracking info, etc. Modules may export variables, define histograms, etc., that can be written to output ROOT file ROOT/C++ Analyzer 10 December 2003 12

Current/Future Physics Modules Kinematics Single-arm THaPrimaryKine THaElectronKine Coincidence THaSecondaryKine Photoproduction to do Vertex Single-arm THaReactionPoint Two-arm THaTwoarmVertex THaAvgVertex Corrections Extended target THaExtTarCor Energy loss to do Kin. broadening to do Timing HRS coincidence THaCoincidenceTime Special Debugging THaDebugModule Golden Track THaGoldenTrack Event Display prototype Current limitation: Only operate on Golden Track Suggestions for additions welcome ROOT/C++ Analyzer 10 December 2003 13

My Very First Script À ÔÔ ¹ Ò Û ÌÀ ÀÊË Ê Ê Ø ÀÊË µ µ ÑÝÖÙÒ Ò Û ÌÀ ÊÙÒ» Ø» ½¾ º Ø µ Ò ÐÝÞ Ö Ò Û ÌÀ Ò ÐÝÞ Ö Ò ÐÝÞ Ö¹ Ë ØÇÙØ лÛÓÖ» ½¾ ºÖÓÓØ µ Ò ÐÝÞ Ö¹ ÈÖÓ ÑÝÖÙÒµ»» ÒÓÛ Ò Ô Ø Ö ÙÐØ Ò Ñ ÑÓÖÝ ÓÖ ÕÙ Ø Requires: Database output.def ROOT/C++ Analyzer 10 December 2003 14

How to Set Up a New Analysis Write C++ analysis script: Set up experimental configuration (apparatuses & detectors) Define desired physics analysis chain, if any (e.g. kinematics, corrections) Define run(s) to be analyzed Define input & output file names Configure additional parameters, if any (e.g. file compression, number of events, reconstruction flags, etc.) Optional: Start analysis Optional: Post-processing Optional: Loop over runs Create new time-dependent database directory & review/update database files for all used detectors Create run database Define output Optional: Define tests & cuts Details on the Web ROOT/C++ Analyzer 10 December 2003 15

Extending the Analyzer The core Analyzer is treated as a library that users do not normally modify. All experiment-specific extensions are incorporated through external libraries dynamically loaded at run time. If new modules (detectors, apparatuses, physics modules) are needed: Write the code for the module(s) and compile it into a shared library Take advantage of inheritance Use utility functions provided in core Analyzer (e.g. for database access) Create database files for the module(s) Once experiment-specific library is written, using it is a simple matter: ËÝ Ø Ñ¹ ÄÓ Ð Ã ÓÒº Ó µ ÀÊËĹ Ø ØÓÖ Ò Û ÌÀ ÊÁ À Ö Ì À ÐÐ ÊÁ À µµ To help you get started with building user libraries, get the Software Development Kit ROOT/C++ Analyzer 10 December 2003 16