June 4-8, 2007 G4ParisAnalysis 2 P. Gueye1 Analysis 2 Histograms and ntuples Paul Guèye Hampton University Hampton VA

Slides:



Advertisements
Similar presentations
Maria Grazia Pia, INFN Genova 1 Data analysis with R in an experimental physics environment Andreas Pfeiffer (CERN) and Maria Grazia Pia (INFN Genova)
Advertisements

Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Hyrax Installation and Customization ESIP ‘08 Summer Meeting Best Practices in Services and Data Interoperability Dan Holloway James Gallagher.
User Interface The full set of lecture notes of this Geant4 Course is available at
Computational Physics Java Analysis Studio Dr. Guy Tel-Zur.
Web Application Server Apache Tomcat Downloading and Deployment Guide.
Victor Serbo, SLACACAT’2002, Moscow, June 24-28, Status of AIDA and JAS 3 by Victor Serbo What is AIDA History/Collaboration/Documentation Some Details.
G.Barrand / LAL / IN2P3 / CNRS AIDA analysis tools and Geant4 A user roadmap.
4 November 2009 Geant4 Data Analysis J. Perl 1 Trivial Data Analysis for Geant4 Joseph Perl, SLAC Geant4 v9.2p02.
13 January 2011 Geant4 Data Analysis J. Perl 1 Trivial Data Analysis for Geant4 Joseph Perl, SLAC Geant4 v9.4.
CS115 HOW TO INSTALL THE JAVA DEVELOPMENT KIT (JDK)
Victor Serbo, SLAC30 September 2004, Interlaken, Switzerland JASSimApp plugin for JAS3: Interactive Geant4 GUI Serbo, Victor (SLAC) - presenter Donszelmann,
Susanna GuatelliGeant4 Workshop 2004 Use of Analysis Tools Geant4 Workshop 2004, Catania Susanna Guatelli, INFN Genova.
Russian Federation CDMS CLIREP GTS CLIMAT CLIMAT TEMP DBMS ACCESS Text files EXCEL Tables Key Entry Property files.
The Basic Java Tools A text editor to write Java program source code. A compiler to translate source code into bytecode. An interpreter to translate.
Software Installation The full set of lecture notes of this Geant4 Course is available at
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
Russian Federation CDMS1. 2 CLIREP GTS CLIMAT CLIMAT TEMP DBMS ACCESS Text files EXCEL Tables Key Entry Property files.
Installing and Configuring Tomcat A quick guide to getting things set up on Windows.
JAS3 – Current Status and Prospects by Victor Serbo, SLAC.
Operating Systems Programs for performing surgery NOT! –Sorry I got carried away.
ABAQUS Installation on LINUX Platform D. Hanumanthappa, A. Jérusalem May 5th, 2010.
How to Install and Run Prepared by: Shubhra Kanti Karmaker Santu Lecturer CSE Department BUET.
QT - a C++ based GUI QT’s Designer and Assistant.
G.Barrand, LAL-Orsay OpenScientist Status (v11) Relationship with AIDA
Introduction to Systems Programming (CS 0449) PalmOS Tools: Developer Studio & Cygwin.
Advanced Digital Circuits ECET 146 Week 2 Professor Iskandar Hack ET 221B,
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.
V. Serbo, SLAC ACAT03, 1-5 December 2003 Interactive GUI for Geant4 by Victor Serbo, SLAC.
Getting started: Basics Outline: I.Connecting to cluster: ssh II.Connecting outside UCF firewall: VPN client III.Introduction to Linux IV.Intoduction to.
07 Apr, 2000 GAUDI Histograms Pavel Binko, LHCb / CERN 1 LHCb Software Week GAUDI Histograms Pavel Binko LHCb / CERN.
RIGHT Mouse Button Formatting Cut Copy Paste Save LEFT Mouse Button MAIN BUTTON Single clicks Double clicks Drag Highlight.
C programming and compilers. At least 3 ways to compile C Using gcc in UNIX environment via chaos.cs.auckland.ac.nz Using gcc in Cygwin in Windows Using.
Setting up Cygwin Computer Organization I 1 May 2010 ©2010 McQuain Cygwin: getting the setup tool Free, almost complete UNIX environment emulation.
How to create and install packages in R Presenter: Roman Jandarov
CLAS12 software paradigm My two cents… Vardan Gyurjyan Friday, August 26, 2005.
GranSasso, Jul-2002 Andreas Pfeiffer, CERN/IT-API, AIDA Abstract Interfaces for Data Analysis Andreas Pfeiffer CERN IT/API
Fitting in AIDA General Concepts Requirements JAIDA Examples Interfaces Overview Conclusions.
Created by Harry H. Cheng,  2009 McGraw-Hill, Inc. All rights reserved. C for Engineers and Scientists: An Interpretive Approach Chapter 2: Getting Started.
Tool Install How to download & install Java 6 & Eclipse updated version based on Dr. G. L. Ray’s slides.
Lab 0 / Chapter 0 Windows XP Environment. 2 User Interfaces: A different perspective.
VDI-in-a-box TM 1 Kaviza Client End User Quick Start Manual.
1 Installing Java on Your PC. Installing Java To develop Java programs on your PC: Install JDK (Java Development Kit) Add the directory where JDK was.
Summary of the AIDA workshop AIDA Workshop, July What is AIDA  AIDA defines today interfaces for some common analysis data objects  IHistogram,
AIDA Abstract Interfaces for Data Analysis Massimiliano Turri, SLACCHEP, La Jolla, March “The goal of the AIDA project is to define abstract.
Tomcat Setup BCIS 3680 Enterprise Programming. One-Click Tomcat Setup 2  This semester we’ll try to set up Tomcat with a PowerShell script.  Preparation.
Utilizzo del codice GEANT4 in campo medico LNS (Mon 12-Oct Wed 14-Oct-2009) Gestione ed analisi dei dati prodotti.
ScienceTools Linux Instructions Windows Instructions.
Wouter Verkerke, NIKHEF Preparation for La Mainaz or how to run Unix apps and ROOT on your Windows Laptop without installing Linux Wouter Verkerke (NIKHEF)
 CSC 215 : Procedural Programming with C C Compilers.
Installing and Using Evolve Evolve is written in Java and runs on any system with Java 1.6 Download Evolve from Unzip.
GLAST Science Support Center July 16, July Ground Software Workshop Plotting Facilities for the GLAST Science Tools James Peachey, HEASARC Dan.
Cygwin: getting the setup tool
Introduction to iOS App Development Environment
CSC 215 : Procedural Programming with C
How to Program.
How to Start Programming in Linux Environment
Getting Eclipse for C/C++ Development
Install external command line softwares
SEEM4570 Tutorial 1:Software Installation
Analysis 2 Histograms and ntuples
Using Linux and Lab Setup OS Lab 1
CMPE 152: Compiler Design ANTLR 4 and C++
Content: What is JMeter? What can I do with JMeter?
G4/analysis G.Barrand, LAL-Orsay.
Installing and Using Evolve
Software Installation
CS115 HOW TO INSTALL THE JAVA DEVELOPMENT KIT (JDK)
Getting Eclipse for C/C++ Development
Cygwin: getting the setup tool
Presentation transcript:

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye1 Analysis 2 Histograms and ntuples Paul Guèye Hampton University Hampton VA

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye2 Outline I.Overview a)Downloading the AIDA utility package b)Turning on the analysis package c)Loading the package d)Producing/Analyzing first histograms e)The packages: JAS, ROOT, PAW, OpenScientist II.Few examples of advanced analysis a)JAS b)ROOT c)PAW d)OpenScientist III.“Fighting Geant4” with Momo IV.Conclusion

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye3 Overview

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye4 Downloading & Setting the AIDA utility package (thanks to Guy Barrand) If you do have AIDA installed, don’t worry about this slide If you DO NOT have AIDA installed, then (will take ~5-10 min): 1.Create AIDA directory under "geant4/work" directory mkdir geant4/work/AIDA 2.Download "osc_batch-v16r0-XX-i386-gcc_401.zip" into "AIDA" folder from –WindowsXX = CYGWIN –LinuxXX = Linux –MACOSXX = Darwin 3.Decompress the file using "unzip command” under unix or the windows unzip utility 4.Go into “osc_batch/v16r0” directory cd osc_batch/v16r0 5.Setup the AIDA environment source aida-setup.csh or source aida-setup.sh 6.Done!

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye5 Turning on the Analysis Package G4ANALYSIS_USE Set variable –setenv G4ANALYSIS_USE 1 (csh) –export G4ANALYSIS_USE=1 (bash) Is it on? (unix commands) –1 (on) or 0 (off) –“echo”echo $G4ANALYSIS_USE –“env” env then look for G4ANALYSIS_USE

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye6 Loading the analysis package I Required files #include  Define AnalysisManager.cc  Create & Fill AnalysisManager.hh

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye7 AIDA.h (Define) #include "AIDA/IAnalysisFactory.h" #include "AIDA/IAnnotation.h" #include "AIDA/IAxis.h" #include "AIDA/IAxisStyle.h" #include "AIDA/IBaseHistogram.h" #include "AIDA/IBaseStyle.h" #include "AIDA/IBrushStyle.h" #include "AIDA/ICloud.h" #include "AIDA/ICloud1D.h" #include "AIDA/ICloud2D.h" #include "AIDA/ICloud3D.h" #include "AIDA/IConstants.h" #include "AIDA/IDataPoint.h" #include "AIDA/IDataPointSet.h" #include "AIDA/IDataPointSetFactory.h" #include "AIDA/IDataStyle.h" #include "AIDA/IEvaluator.h" #include "AIDA/IFillStyle.h" #include "AIDA/IFilter.h" #include "AIDA/IFitData.h" #include "AIDA/IFitFactory.h" #include "AIDA/IFitParameterSettings.h" #include "AIDA/IFitResult.h" #include "AIDA/IFitter.h" #include "AIDA/IFunction.h" #include "AIDA/IFunctionCatalog.h" #include "AIDA/IFunctionFactory.h" #include "AIDA/IHistogram.h" #include "AIDA/IHistogram1D.h" #include "AIDA/IHistogram2D.h" #include "AIDA/IHistogram3D.h“ #include "AIDA/IHistogramFactory.h“ #include "AIDA/IAnalysisFactory.h" #include "AIDA/IHistogramFactory.h" #include "AIDA/IInfo.h" #include "AIDA/IInfoStyle.h" #include "AIDA/ILineStyle.h" #include "AIDA/IManagedObject.h" #include "AIDA/IMarkerStyle.h" #include "AIDA/IMeasurement.h" #include "AIDA/IModelFunction.h" #include "AIDA/IPlotter.h" #include "AIDA/IPlotterFactory.h" #include "AIDA/IPlotterLayout.h" #include "AIDA/IPlotterRegion.h" #include "AIDA/IPlotterStyle.h" #include "AIDA/IProfile.h" #include "AIDA/IProfile1D.h" #include "AIDA/IProfile2D.h" #include "AIDA/IRangeSet.h" #include "AIDA/ITextStyle.h" #include "AIDA/ITitleStyle.h" #include "AIDA/ITree.h" #include "AIDA/ITreeFactory.h" #include "AIDA/ITuple.h" #include "AIDA/ITupleFactory.h"

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye8 Loading the analysis package II: AnalysisManager.cc (create) From Extended Example A01 … A01AnalysisManager::A01AnalysisManager() :analysisFactory(0), hFactory(0), tFactory(0) { // Hooking an AIDA compliant analysis system. analysisFactory = AIDA_createAnalysisFactory(); if(analysisFactory) { ITreeFactory* treeFactory = analysisFactory->createTreeFactory(); tree = treeFactory->create("A01.aida","xml",false,true,"compress=yes"); hFactory = analysisFactory->createHistogramFactory(*tree); tFactory = analysisFactory->createTupleFactory(*tree); delete treeFactory; // Will not delete the ITree. } …

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye9 Loading the analysis package II: AnalysisManager.cc (create) From Extended Example AnaEx01: create histograms … std::string opts = "compress=no"; fTree = treeFactory->create("AnaEx01.aida","xml",false,true,opts); … if(!fTree) return; fTree->mkdir("histograms"); fTree->cd("histograms"); // Create an histo factory that will create histo in the tree : AIDA::IHistogramFactory* histoFactory = fAIDA->createHistogramFactory(*fTree); if (histoFactory) { fEAbs = histoFactory->createHistogram1D("EAbs",100,0,100); fLAbs = histoFactory->createHistogram1D("LAbs",100,0,100); … delete histoFactory; } …

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye10 Loading the analysis package III: AnalysisManager.cc (create) From Extended Example AnaEx01: create ntuples … fTree->cd(".."); fTree->mkdir("tuples"); fTree->cd("tuples"); // Get a tuple factory : AIDA::ITupleFactory* tupleFactory = fAIDA->createTupleFactory(*fTree); if (tupleFactory) { // Create a tuple : fTuple = tupleFactory->create("AnaEx01","AnaEx01", "double EAbs,double LAbs,double EGap,double LGap"); delete tupleFactory; } …

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye11 Loading the analysis package IV: AnalysisManager.cc (fill) From Extened Example AnaEx01: fill histograms and ntuples … if (CHC) { G4int n_hit = CHC->entries(); for (G4int i=0;i<n_hit;i++) { G4double EAbs = (*CHC)[i]->GetEdepAbs(); G4double LAbs = (*CHC)[i]->GetTrakAbs(); … fEAbs->fill(EAbs); fLAbs->fill(LAbs); … fTuple->fill(0,EAbs); fTuple->fill(1,LAbs); … fTuple->addRow(); } }…

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye12 Producing/Analyzing first histograms From example A01 1.Copy example into your work area: cp –r $G4INSTALL/examples/extended/A01app ~/geant4/work/. 2.Go into example directory: cd A01app 3.Compile: gmake or make 4.Run: ~/geant4/work/bin/Linux-g++/A01app aida.mac 5.A new file should appear: A01.aida 6.Start jas 7.Open the file: File  “Open File” then select A01.aida 8.Double click on “Blue Folder” (A01.aida) 9.Double click on histogram of interest

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye13 Few examples of advanced analysis Java Analysis Studio: JAS (all files) Physics Analysis Workstation: PAW (hbook files) The Root of Everything: ROOT (root files) OpenScientist (all files) From example AnaEx01 –Copy example into your work area: cp –r $G4INSTALL/examples/extended/AnaEx01 ~/geant4/work/. –Go into example directory: cd AnaEx01 –Compile: gmake or make –Edit analysis/jas/run.mac file: /run/BeamOn 100 –Run: ~/geant4/work/bin/Linux-g++/AnaEx01

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye14 Java Analysis Studio (JAS, In AnaEx01AnalysisManager.cc  Verify or type the following lines std::string opts = "compress=no"; fTree = treeFactory->create("AnaEx01.aida","xml",false,true,opts); cd analysis/jas ~/geant4/work/bin/Linux-g++/AnaEx01 run.mac Should get: AnaEx01.aida Start jas Open the file: File  “Open File” then select AnaEx01.aida Double click on “Blue Folder” (AnaEx01.aida) Double click on histogram and then the ones of interest Double click on tuples then “Yellow Folder” (AnaEx01)

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye15 ROOT ( In AnaEx01AnalysisManager.cc  Verify or type the following lines std::string opts = “export=root"; fTree = treeFactory->create("AnaEx01.root",“ROOT",false,true,opts); cd analysis/jas ~/geant4/work/bin/Linux-g++/AnaEx01 run.mac Should get: AnaEx01.root Start root Launch browser: new TBrowser() Open the file: File  “Open” then select AnaEx01.root Double click on “Yellow Folder” (ROOT Files) Double click on “Yellow Folder” (AnaEx01.root) Double click on “Yellow Folder” (histograms) and then the ones of interest Double click on “Yellow Folder” (tuples) then right-mouse on AnaEx01;1 and select Start Viewer Drag variables of interest into (X,Y,Z) (Ex: X=EAbs and Y=Labs) Select Draw Icon (bottom left corner) Create a cut: double click on E() then type: EGapcut (alias) and EGap<20 (expression) Drag cut into Scissor Select Draw Icon (bottom left corner) Can enable or disable the cut by double clicking on it

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye16 Physics Analysis Workstation (PAW, cernlib) PAW is no longer supported: you are on your own!!! In AnaEx01AnalysisManager.cc  Verify or type the following lines std::string opts = “export=hbook"; fTree = treeFactory->create("AnaEx01.hbook",“HBOOK",false,true,opts); cd analysis/jas ~/geant4/work/bin/Linux-g++/AnaEx01 run.mac Should get: AnaEx01.hbook Start paw++ Open file: h/file 0 [filepath]/AnaEx01.hbook Double click on logical unit 1 (lun1) Double click on histograms or ntuple Select a variable and double lick in (X,Y,Z) (Ex: X=EAbs and Y=Labs) Click on Plot Click on Cut Editor … Left box = variable, middle box = expression, right box = value (Ex: EGap<20) Click on Plot

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye17 OpenScientist ( ) Start OpenScientist via onx command Open file of interest under File menu Self explanatory from this point

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye18 Fighting Geant4 with MOMO ( Famous Japanese Samurai who used to fight Giants!! Needs GGE, GAG & GPE jar files Naruto.jp/momo Everything is a drag & drop!! Cannot do complicated geometries Does not have most features of current Geant4 An example from JLab

June 4-8, 2007 G4ParisAnalysis 2 P. Gueye19 Conclusion Several analysis tools Geant4 does not provide the “standard” Use as it suits your needs Best sources –users hypernews –analysis tools sites