CALICE testbeam data model and preparations

Similar documents
Table of Contents. TB2009DataAnalysis...1. Introduction...2 People Involved in Analysis/Software...2 Communication...2. Data Preparation...

A flexible approach to clusterfinding in generic calorimeters of the FLC detector

C++ Object Creation and Destruction

COP4530 Data Structures, Algorithms and Generic Programming Recitation 4 Date: September 14/18-, 2008

Frank Gaede, DESY, SLAC Simulation Meeting March 16/ Persistency and Data Model for ILC Software

Frank Gaede, DESY, LCWS 2005, Stanford, CA March Overview of Simulation and Reconstruction Tools in Europe

Arizona s First University. More ways to show off--controlling your Creation: IP and OO ECE 373

The Run 2 ATLAS Analysis Event Data Model

Lab 2: ADT Design & Implementation

pointers & references

MRO Delay Line. Coding and Documentation Guidelines for Prototype Delay Line Software. John Young. rev June 2007

Test Beam Task List - ECAL

LCIO: A Persistency Framework and Event Data Model for HEP. Steve Aplin, Jan Engels, Frank Gaede, Norman A. Graf, Tony Johnson, Jeremy McCormick

Lecture 7. Log into Linux New documents posted to course webpage

Object Oriented Programming COP3330 / CGS5409

Short Notes of CS201

B-Trees. nodes with many children a type node a class for B-trees. an elaborate example the insertion algorithm removing elements

CS201 - Introduction to Programming Glossary By

An Introduction to Root I/O

Object Oriented Programming. Assistant Lecture Omar Al Khayat 2 nd Year

UEE1303(1070) S12: Object-Oriented Programming Constructors and Destructors

the gamedesigninitiative at cornell university Lecture 7 C++ Overview

Expression Trees and the Heap

Review: C++ Basic Concepts. Dr. Yingwu Zhu

eprosima Dynamic Fast Buffers User Manual Version 0.2.0

Distributed Real-Time Control Systems. Lecture 17 C++ Programming Intro to C++ Objects and Classes

Hall-C Analyzer & Hall-C Replay

Inheritance and Polymorphism

SFU CMPT Topic: Classes

UEE1303(1070) S12: Object-Oriented Programming Constant Pointer and Class

ILC Software Overview and recent developments

CLAS 12 Reconstruction Software

CSCE 110 PROGRAMMING FUNDAMENTALS

The Class Construct Part 2

EECE.3220: Data Structures Spring 2017

CSI33 Data Structures

Overload Resolution. Ansel Sermersheim & Barbara Geller Amsterdam C++ Group March 2019

CBC calibration Kirika Uchida. Electronics for 2S and PS-Pt modules meeting 15/04/2014 1

Structure of a CRC card: Tips:

Frank Gaede, ILC Detector Workshop, Snowmass, Aug 14 27, Introduction to ILC LDC Simulation and Reconstruction Software

Marlin et al Introduction to ILC LDC Simulation and Reconstruction Software

CS93SI Handout 04 Spring 2006 Apr Review Answers

Lesson 12 - Operator Overloading Customising Operators

Heaps. A complete binary tree can be easily stored in an array - place the root in position 1 (for convenience)

PyROOT Automatic Python bindings for ROOT. Enric Tejedor, Stefan Wunsch, Guilherme Amadio for the ROOT team ROOT. Data Analysis Framework

selectors, methodsinsert() andto_string() the depth of a tree and a membership function

HippoDraw and Python

University of Illinois at Urbana-Champaign Department of Computer Science. First Examination

Looping and Counting. Lecture 3 Hartmut Kaiser hkaiser/fall_2012/csc1254.html

KMC API documentation

Looping and Counting. Lecture 3. Hartmut Kaiser hkaiser/fall_2011/csc1254.html

LCIO - A persistency framework for linear collider simulation studies

Page 1. Agenda. Programming Languages. C Compilation Process

Spare Matrix Formats, and The Standard Template Library

Class Destructors constant member functions

Intermediate Programming, Spring 2017*

Come and join us at WebLyceum

Function Overloading

Unified Modeling Language a case study

Default Values for Functions Enumeration constant Member Functions

Programming, numerics and optimization

Outline. User-dened types Categories. Constructors. Constructors. 4. Classes. Concrete classes. Default constructor. Default constructor

CpSc212 Goddard Notes Chapter 10. Linked Lists

3.Constructors and Destructors. Develop cpp program to implement constructor and destructor.

GELATIO The GERDA framework for digital signal analysis

Geant4 activities at DESY

ROOT. Introduction. Spring 2010 Lecture 5. S. Lehti and V.Karimäki. COMPUTING METHODS IN HIGH ENERGY PHYSICS (page 1)

DQM4HEP - A Generic Online Monitor for Particle Physics Experiments

OBJECT ORIENTED PROGRAMMING

Weekly Research Report

Chapter 12 - Templates

Coding conventions and C++-style

A light display for CDF

Exercise. Game Programming in C++ Overview. Art vs. Science in Programming. Organising your code. Organising your code

Renderscript. Lecture May Android Native Development Kit. NDK Renderscript, Lecture 10 1/41

CSE 333 Midterm Exam July 24, Name UW ID#

What are the characteristics of Object Oriented programming language?

Object-Oriented Programming for Scientific Computing

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Introduction To C#.NET

Abstraction and Encapsulation. Benefits of Abstraction & Encapsulation. Concrete Types. Using Typedefs to streamline classes.

CSE 333 Midterm Exam Sample Solution 5/10/13

Modern C++ for Computer Vision and Image Processing. Igor Bogoslavskyi

Object Oriented Design

Part of the Picture: Simulation

CS302 - Data Structures using C++

To represent weighted edges using adjacency matrices and adjacency lists ( 25.2).

DYNAMIC MEMORY ALLOCATION ON REAL-TIME LINUX

Distributed Real-Time Control Systems. Chapter 13 C++ Class Hierarchies

ROOT Analysis Framework (I) Introduction. Qipeng Hu March 15 th, 2015

Frank Gaede, ECFA SW & Physics Simulation Phone Meeting, June 21, News on Core Software Tools

Hashing. mapping data to tables hashing integers and strings. aclasshash_table inserting and locating strings. inserting and locating strings

Overload Resolution. Ansel Sermersheim & Barbara Geller ACCU / C++ June 2018

Magic Display Reference Manual. Generated by Doxygen

การทดลองท 8_2 Editor Buffer Array Implementation

Module Operator Overloading and Type Conversion. Table of Contents

R3BRoot Framework. D. Kresan GSI, Darmstadt. First R3BRoot Development Workshop July 28 30, 2015 GSI, Darmstadt

CS 31 Discussion: Final Week. Taylor Caulfield

LCP-USB Inclinometer sensor DLL Interface library description Page 1 of 5

CSc Introduc/on to Compu/ng. Lecture 8 Edgardo Molina Fall 2011 City College of New York

Transcription:

CALICE testbeam data model and preparations GMavromanolakis, University of Cambridge Data models Data flowchart GUI application 041208 CALICE Collaboration Meeting, DESY

Testbeam data model proposing a data model for the CALICE testbeam program persistency flexible implementation simple user interface efficiency use LCIO and ROOT frameworks for some simple test implementation and benchmarking general conversion scheme discussed (from raw/simulation data to analysis data)

LCIO event data entities (v01-03)

CALICE testbeam data model LCObject LCIO UserDefined LCGenericObject TBEcalHit TBTrackerHit TBPIDData TBEcalAux TBTrackerAux TBPIDAux

example class TBEcalAux ////////////////////////////////////////////////////////////////////////////// // // author : GMavromanolakis // // description: user defined concrete class derived from LCGenericObject class // // comments : uses LCIO v01-03 // ////////////////////////////////////////////////////////////////////////////// #ifndef class_tbecalaux #define class_tbecalaux #include "lcioh" #include "EVENT/LCGenericObjecth" #include "EVENT/LCObjecth" using namespace lcio; ////////////////////////////////////////////////////////////////////////////// class TBEcalAux : public LCGenericObject { private: int thek; int thel; int them; float thex; float they; float thez; public: TBEcalAux(); TBEcalAux(int*,float*); TBEcalAux(LCObject*); ~TBEcalAux(); const static std::string TypeName; const static std::string DataDescription; const static int NumOfIntegers; const static int NumOfFloats; const static int NumOfDoubles; static int counter; int GetK();// User Interface int GetL();// int GetM();// float GetX();// float GetY();// float GetZ();// int getnint() const; // LCIO Interface int getnfloat() const; // (LCGenericObject int getndouble() const; // virtual methods) int getintval(int index) const; // float getfloatval(int index) const; // double getdoubleval(int index) const;// bool isfixedsize() const; // const std::string& gettypename() const; // const std::string& getdatadescription()const ; // }; ////////////////////////////////////////////////////////////////////////////// #endif

alternative TObject ROOT UserDefined TTree instances of TTree treetbecalhits treetbtrackerhits treetbpiddata TBEcalAux TBTrackerAux TBPIDAux

Benchmarks configuration machine: Linux P4 266 GHz / 512 MB RAM libs: ROOT v400/08 and LCIO v01-03 task: write/read 1 ROOT tree or 1 LCIO collection of N events 100 hits (1 hit = 3 integers + 3 floats) L C I O R O O T 100k events size (MB) 28 4 time write (sec) 64 9 time read (sec) 71 19 500k events size (MB) 139 19 time write (sec) 365 48 time read (sec) 328 95

Data flowchart Testbeam RAW Data EXE Testbeam Data for Analysis Cell Mapping Calibration Constants Detector Alignment Simulation Data EXE Simulation Data for Analysis A n a l y s i s Digitization Noise - Pedestals

Data flowchart - details Cell Mapping Calibration Constants Detector Alignment Testbeam RAW Data Simulation Data IN REENGINEERING EXE OUT same as above Testbeam Data for Analysis Simulation Data for Analysis A n a l y s i s Digitization Noise - Pedestals

Graphical User Interface cross-platform GUI application under development for online histogramming basic analysis monitoring event display using ROOT GUI classes based on Xclass 95 widget library (!#"$&%'( &"*)$%,+$% ) basic layout has been implemented and tested on Redhat 73 (gcc 323 or 296) with ROOT 400 or 310

GUI: histograms and action widgets

GUI: tabs for expanded info, settings

GUI: status table

GUI: active pads to invoke ROOT actions

- - Summary : work on testbeam related software has started and rapid progress is expected : the running and analysis phases of the testbeam program will be fully supported

Calorimeter clustering with gniki general Nodes Interlaced Klustering Implementation GMavromanolakis, University of Cambridge wwwhepphycamacuk/ gmavroma/calice/gniki 041208 CALICE Collaboration Meeting, DESY

Clustering with gniki general Nodes Interlaced Klustering Implementation gniki : algorithm based on minimal spanning tree theory to implement a "top-down and then bottom-up" approach to calorimeter clustering in brief : use MST clustering algorithm with loose cut to perform coarse clustering : then go through MST clusters found in previous step and refine using a cone-like energy flow clustering algorithm

hits y (mm) -600-800 -1000-1200 -1400-1600 -1800-2000 -2200-2400 -2400-2200 -2000-1800 -1600-1400 -1200-1000 -800-600 x (mm) cluster MST y (mm) -600-800 -1000-1200 -1400-1600 -1800-2000 -2200-2400 -2400-2200 -2000-1800 -1600-1400 -1200-1000 -800-600 x (mm) y (mm) -600-800 MST -1000-1200 -1400-1600 -1800-2000 -2200-2400 -2400-2200 -2000-1800 -1600-1400 -1200-1000 -800-600 x (mm) recluster y (mm) -600-800 -1000-1200 -1400-1600 -1800-2000 -2200-2400 -2400-2200 -2000-1800 -1600-1400 -1200-1000 -800-600 x (mm)

d041130 LC Note: Calorimeter clustering with gniki general Nodes Interlaced Klustering Implementation G Mavromanolakis / University of Cambridge, Department of Physics Cavendish Laboratory, High Energy Physics Group Madingley Road, Cambridge, CB3 0HE, UK Contents draft only 1 Introduction 2 2 Graph theory and clusterng 2 21 2 3 Calorimeter clustering with gniki 2 31 2 32 2 4 Technical description 2 41 General Layout 2 42 Application Program Interface 2 43 Examples 2 5 Summary 2 References 2 0 email: gmavroma@hepphycamacuk or gmavroma@mailcernch

//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< // code : gniki (general Nodes Interlaced Klustering Implementation) // version : 00 // author : GMavromanolakis //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #ifndef class_mst #define class_mst #ifndef class_mstclusters #include "MSTclustersh" #endif ////////////////////////////////////////////////////////////////////////////// class MST { private: int then; // int *a_mst; //assignment int *b_mst; //connectivity double *c_mst; //point to point distance double *d_mst; //distance matrix public: MST(); MST(int); ~MST(); int GetNofNodes(); const int* Read_a_mst(); const int* Read_b_mst(); const double* Read_c_mst(); double* Get_d_mst(); double* GetDistanceMatrix(); void PassDistanceMatrix(double*); void FillDistanceMatrix(); void ConstructMST(); MSTclusters* MergeClusters(float); int GetNodeConnectedTo(int); float GetMSTLength(); void Dump(); static int counter; }; ////////////////////////////////////////////////////////////////////////////// #endif // D E S C R I P T I O N -- I N V E N T O R Y // // Given a set of nodes and a distance matrix the corresponding minimal // spanning tree is constructed by the Prim's method Then a single linkage // cluster analysis can be performed to merge the clusters See also class // MSTclusters // // then : the number of points // a_mst : integer array with bounds [2:N] a_mst[i]=1 if i is // already assigned to the tree, or 0 otherwise // b_mst : integer array with bounds [2:N] b_mst[i] contains the // index of a point to which i is joined // c_mst : real array with bounds [2:N] c_mst[i] is the distance // between points i and b_mst[i] // d_mst : the lower triangular distance matrix with bounds // [1:N(N-1)/2] // MST() : default constructor // MST(int) : constructor, input is then // ~MST() : destructor // GetNofNodes(): read then // Read_a_mst(): read array a_mst // Read_b_mst(): read array b_mst // Read_c_mst(): read array c_mst // Get_d_mst() : get array d_mst // GetDistanceMatrix(): same as Get_d_mst() // FillDistanceMatrix(): example how to create the distance matrix // GetNodeConnectedTo(int): get the point to which a point i is connected // to, input is the i // ConstructMST(): computes the mimimal spanning tree of a distance matrix // by the method of Prim // MergeClusters(float): uses the minimal spanning tree to compute a single // linkage cluster analysis, input is the threshold level to // cut the branches // GetMSTLength(): return the total length of the mst // Dump() : print out arrays a_mst, b_mst, c_mst // counter : static counter to check that all objects are deleted // API API //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< // code : gniki (general Nodes Interlaced Klustering Implementation) // version : 00 // author : GMavromanolakis //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #ifndef class_mstclusters #define class_mstclusters ////////////////////////////////////////////////////////////////////////////// class MSTclusters { friend class MST; private: int then; float thecutlevel; int *g_mst; int *h_mst; int *k_mst; int* Get_g_mst(); int* Get_h_mst(); int* Get_k_mst(); public: MSTclusters(); MSTclusters(int,float); ~MSTclusters(); int GetNofNodes(); float GetCutLevel(); const int* Read_g_mst(); const int* Read_h_mst(); const int* Read_k_mst(); const int* GetNodes(); const int* GetClustersIDs(); int GetNode(int); int GetClusterIDNode(int); int GetNofClusters(); void Dump(); static int counter; }; ////////////////////////////////////////////////////////////////////////////// #endif // D E S C R I P T I O N -- I N V E N T O R Y // // Class to hold objects created by MST::MergeClusters See also class MST // // then : the number of points // thecutlevel : the distance cut to merge clusters // g_mst : integer array with the point index // h_mst : h_mst[i]=0 if g_mst[i] belongs to the same cluster, // if h_mst[i]=1 then g_mst[i] is the last member of the cluster // k_mst : integer array with the cluster id that point g_mst[i] belongs // Get_g_mst() : get array g_mst // Get_h_mst() : get array h_mst // Get_k_mst() : get array k_mst // MSTclusters(): default constructor // MSTclusters(int,float): constructor, input then of nodes and thecutlevel // ~MSTclusters(): destructor // GetNofNodes() : read then // GetCutLevel() : read thecutlevel // Read_g_mst(): read array g_mst // Read_h_mst(): read array h_mst // Read_k_mst(): read array k_mst // GetNodes(): same as Read_g_mst() // GetClustersIDs(): same as Read_k_mst() // GetNode(int): input is i, returns g_mst[i] // GetClusterIDNode(int): input is i, returns k_mst[i] // GetNofClusters(): read number of clusters found by single linkage analysis // Dump() : print out arrays g_mst, h_mst, k_mst // counter : static counter to check that all objects are deleted // example // #include "MSTh" #include "MSTclustersh" #include "TClusterh" #include "TNodeh" #include "TCriteriah" // void DrawView(); void Draw(TCluster*); ////////////////////////////////////////////////////////////////////////////// Int_t main() {///////////////////////////////////////////////////////////////////////////// //Open rootfile with roottrees TFile *f = new TFile(input_root); TTree *tree = (TTree*)f->Get("treeCells"); int kmax = (int)tree->getmaximum("kcells");//max buffer size //Set/Get branches of roottree //Create some histograms // //Clustering criteria TCriteria *cuts = new TCriteria(); cuts->setmstcut(25*0012);//for MST clustering cuts->setreclusteringcut(09); cuts->setrange(150); //mm cuts->setpitchrange(9);//mm cuts->setpitchrest(30);//mm cuts->dump(); //Loop over events // for(int i_event=0; i_event<tree->getentries(); i_event++) {//start loop over events tree->getentry(i_event); int NofNodes = kcells; MST *tmst = new MST(NofNodes); //Fill Distance Matrix d_mst : lower triangular matrix with // diagonal elements omitted //Construct MST tmst->constructmst(); //Merge MST clusters MSTclusters *tmstclusters; float flevel = cuts->getmstcut(); tmstclusters = tmst->mergeclusters(flevel); //Loop over points of this event and fill theeventcluster TCluster *theeventcluster = new TCluster(NofNodes); theeventcluster->initcount(); TNode *Node = theeventcluster->getlistofnodes(); //Loop over MSTclusters of this event for(int i=1; i<=nmstclusters; i++) { TCluster *currentmstcluster = theeventcluster->getmstcluster(i); currentmstcluster->recluster(cuts); theeventcluster->updatewithdaughter(currentmstcluster); delete currentmstcluster; }//end loop over MSTclusters of this event //Do analysis, fill histos // Delete objects // delete tmst ; tmst=0; delete tmstclusters; tmstclusters=0; delete theeventcluster; theeventcluster=0; }//end loop over events // Save histos return 1; }//end main()/////////////////////////////////////////////////////////////////

gniki release version 00 : standalone C++ code arranged in 6 classes (programmatically not the best code you ve ever seen but it works) : get source from wwwhepphycamacuk/1 gmavroma/calice/gniki : example applications on howto link and read data from ROOT or LCIO included : write-up as LC Note in preparation (hopefully available soon), in the meantime a list of talks and documents are on the webpage