[Experiment Shortcut]T[Task Name] - MEG

bricklayerbelchedInternet and Web Development

Feb 5, 2013 (4 years and 6 months ago)

140 views

Shuei YAMADA @ MEG review meeting, 2 July 2004

1

MEG Software Status

MEG Software Group


Framework


Large Prototype software updates


Database


ROME


Monte Carlo Simulation

Shuei YAMADA @ MEG review meeting, 2 July 2004

2

Framework

Online


ROME

-

Root based Object oriented Midas Extension

Offline / reconstruction


ROOT/C++ based



See Corrado’s presentation

Monte Carlo simulation


GEANT3 / FORTRAN77

Shuei YAMADA @ MEG review meeting, 2 July 2004

3

New DAQ for Large Prototype


DAQ computer divided
into 3 PCs:

1. Front
-
end for trigger &
data logging

2. Back
-
end for online
analyzer, ROOT server

3. Run control, slow control &
event display

Shuei YAMADA @ MEG review meeting, 2 July 2004

4

Software Modifications for
Large Prototype

Online


ROOT based analyzer


Monitor online histograms thru network

Offline


Two analyzers: ROOT based & ntuple based


kumacs are merged in the ROOT
-
analyzer


Database : run catalog & connection table

Testing to use ROME

Shuei YAMADA @ MEG review meeting, 2 July 2004

5

Another CEX beam test at
p
E5

Further modification required


DAQ using wave
-
form digitizer


Database update during data taking


Run catalog


Hardware configurations


Cable connection, HV value, …


Shuei YAMADA @ MEG review meeting, 2 July 2004

6

RDBMS

CD

title

tune_title

artist_name

company_name

Composer

name

category

Tune

title

composer_name

rating

Artist

name

instrument

Relational Database Management System


Table format database consists from several tables


Tables are connected with relations

Shuei YAMADA @ MEG review meeting, 2 July 2004

7

SQL

Standard Query Language


Standard format of statement to access to database



SELECT


title
FROM

Tune
WHERE

composer = “Juno Reactor”;


INSERT INTO


Tune(title,rating)
VALUE

(“High Energy Protons”, 3);


UPDATE


Tune
SET

rating=5
WHERE

title = “High Energy Protons”;


DELETE


Artist
WHERE

name = “DJ19”;


Shuei YAMADA @ MEG review meeting, 2 July 2004

8

MySQL

Network access

Open source

Large : 10000ch x 8M runs

Fast : <
10 sec for 256ch x 1000 run pedestals

Multi platform : Linux, Macintosh, Solaris, Windows…

Server replication




XML database


if no network connection available

PSI

Italy

Russi
a

Japan

Shuei YAMADA @ MEG review meeting, 2 July 2004

9

How to access?

UNIX command

C/C++


DAQ

ROOT


Analysis tool

Web browser


PHP/Perl/Ruby

ODBC/JDBC


MS Excel, Access

Shuei YAMADA @ MEG review meeting, 2 July 2004

10

Large Prototype database

Run catalog

Connection table

Shuei YAMADA @ MEG review meeting, 2 July 2004

11

ROME

R
oot based
O
bject oriented
M
idas
E
xtension


Tool for Event based Data Analysis


Fully Object Oriented


Root based


Full connection to the Midas Environment


Online and Offline


Based on Tasks, Containers and Folders for a good Data and Program
Structure


Experiment independent Base Classes


Experiment dependent Classes are generated out of simple XML
-
Files


The Users write only experiment specific code (physics)


Administrative code is implemented in the generated code


Self Documenting Code


Self Linking Project

Shuei YAMADA @ MEG review meeting, 2 July 2004

12

ROME Objects

Folders


Objects, where data is stored in


Stores the data of one detector (or sub
detector) component


Hierarchically arranged


Data inside of Folders is structured

Tasks


Tasks are objects, which provides actions


They make calculations


Store and read data in folders


Fill trees and histograms


Hierarchically arranged


Task also own histograms

Trees


Data Objects : only written, never read


Used to write data on files

Histograms


Graphical Data Objects : only written


Belong to one Task

Steering Parameters


Task steering


Framework steering

Shuei YAMADA @ MEG review meeting, 2 July 2004

13

Interconnections

Folders

Tasks

Tasks

Tasks

Fill

Read

Trees

Trees

Trees

Read

Flag

Histograms

Histograms

Histograms

Histograms

Histograms

Histograms

Histograms

Histograms

Histograms

Fill

Fill

Disk

(Output)

Write (ROOT)

Disk

(Input)

Read (any Format)

Shuei YAMADA @ MEG review meeting, 2 July 2004

14

The ROME Environment



experiment independent ‘ROME’
-
Classes

o
Base classes for the generated, experiment dependent classes



ROMEBuilder

o
Builds all experiment dependent classes out of simple XML Files

o
XML files describe Tasks, Folders, Trees, Histos, Steering Parameters and Midas
Banks

o
Links the generated project

o
Documents the generated project

ROME classes

ROME classes

ROME classes

XML File

ROME classes

ROME classes

Exp. classes

ROMEBuilder

Executable

Documentation

Project

ROME Environment

Shuei YAMADA @ MEG review meeting, 2 July 2004

15

<
Experiment Shortcut
>

<Task>

<SubTask

Name=“
Task Name
”>

<Histos>

<
Histo Name

Type=“
Variable Type
” ArraySize=“
Array Size

Title=“
Title
” FolderName=”
Histo Folder Name



FolderTitle=”
Histo Folder Title
” NumberOfBinsX=“
# of X bins
” XMin=“
X
min
” XMax=“
X max
”/>

</Histos>

</SubTask
>

</Task>

</
Experiment Shortcut
>

XML File


void [
Experiment Shortcut
]T[
Task Name
]::Init() { }

void [
Experiment Shortcut
]T[
Task Name
]::BeginOfRun() { }

void [
Experiment Shortcut
]T[
Task Name
]::Event() { }

void [
Experiment Shortcut
]T[
Task Name
]::EndOfRun() { }

void [
Experiment Shortcut
]T[
Task Name
]::Terminate() { }


Fill[
Histo Name
](double value,double weight)

Draw[
Histo Name
]()

Get[
Histo Name
]Handle()


Fill[
Histo Name
]At(int index,double value,double weight)

Draw[
Histo Name
]At()

Get[
Histo Name
]HandleAt(int index)

Code

Tasks

Histogram Arrays

Single Histograms

Shuei YAMADA @ MEG review meeting, 2 July 2004

16

Benefit of a Generated Framework


Consistent Program Structure

o
All classes look the same

o
Better readability



Less Handwritten Code

o
Code of a class is written once (in the builder) and
reproduced many times



Easier Maintenance

o
Modification are done once (in the builder) and then
available in the whole framework


C++/OO knowledge not required for programmers,
just write code in C

Shuei YAMADA @ MEG review meeting, 2 July 2004

17

Monte Carlo Simulation

GEANT3 / FORTRAN77

Requires


Sync LXe geometry with PMT folder design


Geometry Database


MC run catalog Database


m

e
g
signal MC


Background MC


Digitization


Trigger simulation


How to combine signal & BG into one “triggered”
-
event?


Programmers’ manual and End
-
users’ manual


Human resource assignment

Shuei YAMADA @ MEG review meeting, 2 July 2004

18

MC schedule/man power


By end of April

2004


Liq. Xe geometry:
S.Yamada/F.Cei



By end of June 2004


Digitization

XE:
S.Yamada/F.Cei

DC:
H.Nishiguchi

TC:
P.Cattaneo

July

September

Shuei YAMADA @ MEG review meeting, 2 July 2004

19

Summary

Offline framework


use ROOT/C++

Another CEX beam test using new software


ROME
-

ROOT/C++ based online software


MySQL database


Wave
-
form digitizer

Monte Carlo Simulation


GEANT3 / FORTRAN77