Transcript Histograms
MEG Software Status
Framework
Large Prototype software updates
Database
ROME
Monte Carlo Simulation
MEG Software Group
Shuei YAMADA @ MEG review meeting, 2 July 2004
1
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
2
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
3
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
4
Another CEX beam test at pE5
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
5
RDBMS
Relational Database Management System
Table format database consists from several tables
Tables are connected with relations
CD
Tune
title
tune_title
artist_name
company_name
title
composer_name
rating
Artist
Composer
name
instrument
name
category
Shuei YAMADA @ MEG review meeting, 2 July 2004
6
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
7
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
Italy
PSI
Russi
a
Japan
XML database
if no network connection available
Shuei YAMADA @ MEG review meeting, 2 July 2004
8
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
9
Large Prototype database
Connection table
Run catalog
Shuei YAMADA @ MEG review meeting, 2 July 2004
10
ROME
Root based Object oriented Midas Extension
• 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
11
ROME Objects
Folders
Tasks
• Objects, where data is stored in
• Tasks are objects, which provides actions
• Stores the data of one detector (or sub
detector) component
• They make calculations
• Hierarchically arranged
• Data inside of Folders is structured
• Store and read data in folders
• Fill trees and histograms
• Hierarchically arranged
• Task also own histograms
Trees
• Data Objects : only written, never read
Histograms
• Used to write data on files
• Graphical Data Objects : only written
Steering Parameters
• Belong to one Task
• Task steering
• Framework steering
Shuei YAMADA @ MEG review meeting, 2 July 2004
12
Interconnections
Disk
Read (any Format)
(Input)
Read
Histograms
Histograms
Histograms
Fill
Tasks
Tasks
Tasks
Fill
Histograms
Histograms
Histograms
Folders
Fill
Histograms
Histograms
Histograms
Flag
Read
Trees
Trees
Trees
Write (ROOT)
Disk
(Output)
Shuei YAMADA @ MEG review meeting, 2 July 2004
13
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 Environment
ROMEclasses
classes
ROME
classes
ROME
ROMEBuilder
Project
ROME
classes
ROME
classes
Exp. classes
Executable
Documentation
XML File
Shuei YAMADA @ MEG review meeting, 2 July 2004
14
Tasks
XML File
<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>
Code
void
void
void
void
void
[Experiment
[Experiment
[Experiment
[Experiment
[Experiment
Shortcut]T[Task
Shortcut]T[Task
Shortcut]T[Task
Shortcut]T[Task
Shortcut]T[Task
Name]::Init() { }
Name]::BeginOfRun() { }
Name]::Event() { }
Name]::EndOfRun() { }
Name]::Terminate() { }
Fill[Histo Name](double value,double weight)
Draw[Histo Name]()
Get[Histo Name]Handle()
Single Histograms
Fill[Histo Name]At(int index,double value,double weight)
Draw[Histo Name]At()
Get[Histo Name]HandleAt(int index)
Shuei YAMADA @ MEG review meeting, 2 July 2004
Histogram Arrays
15
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
16
Monte Carlo Simulation
GEANT3 / FORTRAN77
Requires
Sync LXe geometry with PMT folder design
Geometry Database
MC run catalog Database
megsignal 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
17
MC schedule/man power
July
By end of April 2004
Liq. Xe geometry: S.Yamada/F.Cei
September
By end of June 2004
Digitization
XE: S.Yamada/F.Cei
DC: H.Nishiguchi
TC: P.Cattaneo
Shuei YAMADA @ MEG review meeting, 2 July 2004
18
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
Shuei YAMADA @ MEG review meeting, 2 July 2004
19