Analysis 2 Histograms and ntuples

Slides:



Advertisements
Similar presentations
MICS4 Data Processing Workshop Multiple Indicator Cluster Surveys Data Processing Workshop CSPro Overview.
Advertisements

MICS Data Processing Workshop
An Introduction to Using
Presentation Heading – font Arial
Lesson 15: Editing, Viewing, and Printing Worksheets.
June 4-8, 2007 G4ParisAnalysis 2 P. Gueye1 Analysis 2 Histograms and ntuples Paul Guèye Hampton University Hampton VA
Logging into ITAMS as an Exempt Employee To Login to ITAMS for the first time: Open your web browser. Click File, Open, and type the following address:
Reverse Engineering In Rational Rose. Steps to take… Set up new Java project Click on class path.
Susanna GuatelliGeant4 Workshop 2004 Use of Analysis Tools Geant4 Workshop 2004, Catania Susanna Guatelli, INFN Genova.
1 Creating Icons for Commands When there is not an icon related to a command in your toolbars, you will see a question mark (?). No preview available …
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.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
ROOT An object oriented HEP analysis framework.. Computing in Physics Physics = experimental science =>Experiments (e.g. at CERN) Planning phase Physics.
Project 3 File, Document, Folder Management, Windows XP Explorer Windows XP Service Pack 2 Edition Comprehensive Concepts and Techniques.
LATTICE TECHNOLOGY, INC. For Version 3.0 and later iXVL Publisher Tutorial For Version 3.0 and later.
Introduction to Hall-D Software February 27, 2009 David Lawrence - JLab.
Mentor Tools tutorial Bold Browser Design Manager Design Architect Library Components Quicksim Creating and Compiling the VHDL Model.
1 ADVANCED MICROSOFT WORD Lesson 16 – Customizing Features Microsoft Office 2003: Advanced.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 2 Welcome Application Introducing the Visual Basic 2008 Express Edition IDE.
Introduction to Computers and Windows. Overview  What is a computer?  What is an operating system?  Starting and Shutting Down a computer  The mouse.
1 ITI 1120 Lab # 1 An Introduction to the Lab Environment Contributors: G. Arbez, M. Eid, D. Inkpen, A. Williams, D. Amyot.
University of Sunderland CDM105 Session 6 Dreamweaver and Multimedia Fireworks MX 2004 Creating Menus and Button images.
Introduction to the Visual Studio.NET IDE (LAB 1 )
Basic User Training for PACS
FTP for Windows How to get ftp to work in Windows -Navigate to control panel -> programs and features -On the left side click on Turn Windows features.
V. Serbo, SLAC ACAT03, 1-5 December 2003 Interactive GUI for Geant4 by Victor Serbo, SLAC.
RIGHT Mouse Button Formatting Cut Copy Paste Save LEFT Mouse Button MAIN BUTTON Single clicks Double clicks Drag Highlight.
Creating your Home Directory During Labs you will need to save all your work in a folder called CP120 (or PC120) in your Home Directory (drive I:) To get.
This is what we want to draw Extrude Mirror Round Edges.
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
Presented By: Weidong WU, Ph.D. Date: Part I Creating a Revolved Part 1. Start Pro/E wildfire. 2. File  set working directory…  Your directory.
Processing Lab 2 – Geometry Bryce Hutchinson Objectives: Add a dictionary Gain a better understanding of header issues Display geometry correctly Visualize.
Lab 0 / Chapter 0 Windows XP Environment. 2 User Interfaces: A different perspective.
Undertow Suite Tutorial. Set the license environment variables Set up environment variable for the license manager: setenv UT_ROOT_DIR path/undertow (distribution.
1.Introduction to SPSS By: MHM. Nafas At HARDY ATI For HNDT Agriculture.
Computer Skills Chapter 3. Computer Skills1 by Maram & Dareen windows It is a GUI (Graphical User Interface) operating system which is designed for personal.
From “Control Panel”, launch “Programs and Features” then select “Turn Windows features on or off” Lab 2: Setup Lab Environment.
Basics of Windows 95/98/NT. Versions of Windows Windows 95 and 98 used mainly on standalone computers Windows NT used on networked computers (as in our.
Inserting Hyperlinks  Purpose : Enables viewers to click the link and move directly to a slide  Directions : Make one link on slide one to move to each.
Managing Your Computer Staff Development Day January 14, 2008 Presenter: Jenny Wallskog.
WS 9-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. February 27, 2009 Inventory # Workshop 9 Taylor Impact Test – “What if” Study.
Go4 Workshop J.Adamczewski-Musch, S.Linev Go4 advanced features.
Utilizzo del codice GEANT4 in campo medico LNS (Mon 12-Oct Wed 14-Oct-2009) Gestione ed analisi dei dati prodotti.
Opening a File 1.Open Word 2.Click the Microsoft Office button(Very top left hand corner). A menu appears 3.Click Open. The Open dialog box appears 4.Use.
Split, Demote and Outline View Overview Computer Literacy.
NX Documentation Using Windows IIS (Internet Information Services) as a http server for NX documentation.
Using MIT Scratch for Programming and Control Programming 9.
C# Programming: From Problem Analysis to Program Design1 Visual Studio Configuration C# Programming: From Problem Analysis to Program Design 4th Edition.
Dive Into® Visual Basic 2010 Express
WORKSHOP 2 VALVETRAIN MECHANISM
WORKSHOP 2 VALVETRAIN MECHANISM
Computer Skills windows.
IBM Rational Rhapsody Advanced Systems Training v7.5
The full set of lecture notes of this Geant4 Course is available at
Using a set-up file to read ASCII data into SPSS
User Interface
Lesson 9 Windows Management
An Installation Guide of PGP on Windows 2000
G4/analysis G.Barrand, LAL-Orsay.
Computer Skills Chapter 3.
Software Installation
Making Objects Move in Unison: Using Lists
Using Eclipse.
Geant4 course - exercices
Software Installation, release 4.0
Lesson 2: Editing, Viewing, and Printing Worksheets
Making Objects Move in Unison: Using Lists
Visualisation and (G)UI
Computer Skills windows.
Computer Skills windows.
Presentation transcript:

Analysis 2 Histograms and ntuples Paul Guèye Hampton University Hampton VA gueye@jlab.org June 4-8, 2007 G4Paris Analysis 2 P. Gueye

Outline Overview Few examples of advanced analysis Turning on the analysis package Loading the package Producing/Analyzing first histograms The packages: JAS, ROOT, PAW, OpenScientist Few examples of advanced analysis JAS ROOT PAW OpenScientist “Fighting Geant4” with Momo Conclusion June 4-8, 2007 G4Paris Analysis 2 P. Gueye

Overview June 4-8, 2007 G4Paris Analysis 2 P. Gueye

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 G4Paris Analysis 2 P. Gueye

Loading the analysis package I Required files #include <AIDA/AIDA.h>  Define AnalysisManager.cc  Create & Fill AnalysisManager.hh June 4-8, 2007 G4Paris Analysis 2 P. Gueye

AIDA.h (Define) June 4-8, 2007 G4Paris Analysis 2 P. Gueye #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" AIDA.h (Define) June 4-8, 2007 G4Paris Analysis 2 P. Gueye

Loading the analysis package II: AnalysisManager.cc (create) From Advanced 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 G4Paris Analysis 2 P. Gueye

Loading the analysis package II: AnalysisManager.cc (create) From Advanced 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 G4Paris Analysis 2 P. Gueye

Loading the analysis package III: AnalysisManager.cc (create) From Advanced 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 G4Paris Analysis 2 P. Gueye

Loading the analysis package IV: AnalysisManager.cc (fill) From Advanced 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 G4Paris Analysis 2 P. Gueye

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

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/advanced/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 G4Paris Analysis 2 P. Gueye

Java Analysis Studio (JAS, http://jas.freehep.org/jas3) 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 G4Paris Analysis 2 P. Gueye

ROOT (http://root.cern.ch/) 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 Can enable or disable the cut by double clicking on it June 4-8, 2007 G4Paris Analysis 2 P. Gueye

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) June 4-8, 2007 G4Paris Analysis 2 P. Gueye

OpenScientist (http://openscientist.lal.in2p3.fr/) Start OpenScientist via onx command Open file of interest under File menu Self explanatory from this point June 4-8, 2007 G4Paris Analysis 2 P. Gueye

Fighting Geant4 with MOMO (http://erpc1.naruto-u.ac.jp/~geant4/) 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 G4Paris Analysis 2 P. Gueye

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