SlideShare une entreprise Scribd logo
1  sur  4
Télécharger pour lire hors ligne
Test49: Geant4 Monte-Carlo Models Testing Tools
CERN Summer Student Project Report
PH-SFT Group, CERN
R. Atachiants (roman.atachiants@gmail.com)
Supervised by: M. Kosov (mikhail.kossov@cern.ch)
August 25, 2009
1 Project Overview
During the CERN Summer Student program, I
worked in Geant4 team (PH-SFT). The project
contained several different objectives:
• a full conversion of all Test19 PAW-tests[3] of
existing Geant4 [4] Monte Carlo models testing
to ROOT environment [5] and creation of a
fully automated testing system.
• creation of a special DB (DataBase) for the ex-
perimental data with an automatic process of
comparison of the MC distributions with data.
During the summer student work, the both objec-
tives were accomplished and even more various im-
provements has been made: auto-scaling features
for the plots, graphical user interfaces for the tools,
secondary nuclear fragments retrieval, etc. The cre-
ated tools were designed with the flexibility and
ease-of-use in mind.
2 PAW to ROOT Conversion
Fist step of the project was to convert the several
.kumac files counting approximately 3000 lines of
code. Learning curve of the PAW and ROOT[1]
environments was steeply, therefore the conversion
was achieved in about 1 month. Few insights for
the PAW to ROOT portin can be found on the
CERN ROOT website (http://root.cern.ch/root/
HowtoConvertFromPAW.html), but it was rather
insufficient for the big scale porting and mostly
targeted the people who want to switch from PAW
to ROOT.
During the porting, experience shown that the
C++ methods of ROOT are more comprehensive
and therefore more verbose. First kumac macro
conversion implementation showed 40% increase of
the length of the simple macro port.
3 Simulation and Analysis
After the conversion of all macro files to ROOT,
three comprehensive tools were developed.
• Experimental DB Creation Tool: a graph-
ical tool has been developed for the creation of
publication files (cf. 4) from ASCII data. Fig-
ure 4 shows the GUI of this tool.
• Simulation Tool: the goal of the tool is to
take the publication file as the input and us-
ing a Geant4 testing program (currently only
Test19 executable) to perform a simulation on
a Monte Carlo Model. The output of the
test then transformed from ASCII files, cuts
and rescaling for different secondaries are per-
formed. The histogram data are then saved in
the so-called simulation files for further analy-
sis. The tool also produces a plot for the anal-
ysis of the model on which the simulation was
performed, as illustrated on figure 3.
• Analysis Tool: the goal of the tool is to take
several simulation files produced by the simu-
lation tool and to draw the comparison graphs
in order to compare different MC models in be-
tween. The goal of the analysis is to compare
the data points (spectra, experimental data)
with the simulation curves. Figure 1 shows an
example of the output of the tool.
1
5 ADDITIONAL FEATURES
Figure 1: Output of the analysis tool
4 Universal DataBase for
Geant4 MC Models Testing
The second part of my work at CERN was creating
of a universal DB for Geant4 MC models testing.
The created database consists of a collection of two
types of elements:
• Publication: contains an experimental data
information, with the description a a function,
cuts and secondaries.
• Simulation: contains the simulated data (af-
ter cuts) for a particular publication file.
The publication and simulation files have exactly
the same structure and are different only by seman-
tics. The data is stored in ROOT files (TTrees)
with headers in order to distinguish the items. Fig-
ure 2 shows the structure of the c++ classes, cre-
ated in order to represent the publication and simu-
lation concepts. The header of G4TData class con-
tains the projectile PDG code, target PDG code,
argument (ex: T) and the MC model name which
is only needed if the file is a simulation. The body
of the G4TData contains a vector of G4TDataItem
classes, which have the secondary fragment PDG
code, cut variable (ex.: Θ, 45 degrees), the argu-
ment (ex.: T) and the function (ex.: ∆S
∆E ).
The records of the DB are organised in .root files,
on the Linux file system, in particular the ext3 file
system on Scientific Linux 5, which allows a sin-
gle file of maximum 2TB. Ex-data (ASCII files)
Figure 2: Representation of the Data and DataItem
classes for both publications and simulations stor-
age and manipulation.
are in the test49/ascii directory and the publica-
tions/simulations are in the test49/database direc-
tory.
5 Additional Features
5.1 Automatic Scaling and Layout
Management
An auto-scale feature have been implemented in or-
der to scale automatically the axis of plots, pro-
duced by both analysis and simulation tools. The
scale features supports logarithmic scaling of y-axis
and linear scaling of x-axis.
5.2 Automatic Secondary Frag-
ments Nuclear Mass Calcula-
tions
A feature for the nuclear mass calculation for
secondary fragments have been implemented in
the tools, the API is based on ROOT Geometry
package, made by ALICE experiment, using the
lastest data (NUBASE2003).
August 25, 2009 2 R. Atachiants
7 CONCLUSIONS
5.3 Graphical User Interfaces
Figure 3: A graphical user interface for simulation
tool
Several graphical user interfaces have been made
for the tools in order to give the possibility to
use them in the simplest possible way. The GUIs
have been built using ROOT widgets platform
and therefore portable to different platforms (Mac
OSX, Windows, Linux, ...).
One can see on Figure 4 the GUI created in order to
ease the use of creating publication files, and Fig-
ure 3 shows a GUI for the simulation tool, where
one can simply select the publication file and run
the MC simulation.
5.4 Documentation and ROOT Con-
tributions
An extensive amount of documentation for the tool
have been written, a simple User Guide can be
found in the Geant4 Hadronics Wiki [2] . This User
Guide shows how to get started and work with both
simulation and analysis tools, and create publica-
tion data files from ASCII files (both using ROOT
macros or available GUIs).
A contribution to ROOT also have been made, sev-
eral bugs have been found during the work, submit-
ted to ROOT team of PH-SFT and their correction
have been initiated.
Figure 4: A graphical user interface for making
publication files from ASCII files
6 Results
One of the main goals of the project was the PAW
to ROOT conversion. The goal of this conversion
were mainly to be able to run the simulations and
process (analyse) bigger statistics than in old sys-
tem. In order to prove that the system can han-
dle big statistics, a Monte Carlo simulation using
BERTINI MC Model was performed. This simula-
tion produced 10,000,000 events, 52,508,486 entries
and the output file of about 7.5 GB (Figure 5).
7 Conclusions
In this paper my contribution to Geant4 testing fa-
cility has been discussed. It has been proven that
old PAW .kumac files can be completely ported to
the ROOT platform and exactly the same result
can be achieved. It has also been shown that the
created simulation tool can produce practically un-
limited results, in order of 2 TB statistics, limited
purely by the file system. The simulation and anal-
ysis tools that have been created also have been
designed with the extensibility and ease-of-use in
mind. The extensibility is achieved by using the
abstract classes, data access layers and wrappers.
The ease-of-use is achieved by building a very easy
August 25, 2009 3 R. Atachiants
REFERENCES REFERENCES
Figure 5: The post-simulation output of a simula-
tion of 10,000,000 events
to use API and graphical user interfaces.
The experimental DB and different tools are
implemented in ROOT classes, compiled in
libG4ModelTester.so extension library for ROOT
and placed in tests/test49 directory of Geant4 test-
ing facility.
References
[1] The ROOT Users Guide. CERN, 2006.
[2] R. Atachiants. http://geant4hadronics.wikispaces.com/
geant4+test49+documentation. Geant4 Test19
Documentation.
[3] CERN. http://wwwasd.web.cern.ch/wwwasd/paw.
PAW − Physics Analysis Workstation.
[4] CERN. http://www.geant4.org/geant4.
Geant4 Website.
[5] Rademakers F. Introduction to root. CERN
Summer Student Lecture.
August 25, 2009 4 R. Atachiants

Contenu connexe

Tendances

Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithms
guest084d20
 

Tendances (18)

Assigment 3
Assigment 3Assigment 3
Assigment 3
 
Stack Data structure
Stack Data structureStack Data structure
Stack Data structure
 
I012255862
I012255862I012255862
I012255862
 
Memory allocation
Memory allocationMemory allocation
Memory allocation
 
Stack and heap
Stack and heapStack and heap
Stack and heap
 
Python Pyplot Class XII
Python Pyplot Class XIIPython Pyplot Class XII
Python Pyplot Class XII
 
4
44
4
 
AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BA...
AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BA...AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BA...
AN OPTIMAL FUZZY LOGIC SYSTEM FOR A NONLINEAR DYNAMIC SYSTEM USING A FUZZY BA...
 
Functions with heap and stack
Functions with heap and stackFunctions with heap and stack
Functions with heap and stack
 
Manual orange
Manual orangeManual orange
Manual orange
 
Heap Management
Heap ManagementHeap Management
Heap Management
 
Advanced SQL Selects
Advanced SQL SelectsAdvanced SQL Selects
Advanced SQL Selects
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithms
 
Stack and Queue by M.Gomathi Lecturer
Stack and Queue by M.Gomathi LecturerStack and Queue by M.Gomathi Lecturer
Stack and Queue by M.Gomathi Lecturer
 
Improvement in Traditional Set Partitioning in Hierarchical Trees (SPIHT) Alg...
Improvement in Traditional Set Partitioning in Hierarchical Trees (SPIHT) Alg...Improvement in Traditional Set Partitioning in Hierarchical Trees (SPIHT) Alg...
Improvement in Traditional Set Partitioning in Hierarchical Trees (SPIHT) Alg...
 
Presemt presentation
Presemt presentationPresemt presentation
Presemt presentation
 
ADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONS
ADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONSADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONS
ADAPTIVE MAP FOR SIMPLIFYING BOOLEAN EXPRESSIONS
 
Matlab: Discrete Linear Systems
Matlab: Discrete Linear SystemsMatlab: Discrete Linear Systems
Matlab: Discrete Linear Systems
 

Similaire à Report: Test49 Geant4 Monte-Carlo Models Testing Tools

School of Computing, Science & EngineeringAssessment Briefin.docx
School of Computing, Science & EngineeringAssessment Briefin.docxSchool of Computing, Science & EngineeringAssessment Briefin.docx
School of Computing, Science & EngineeringAssessment Briefin.docx
anhlodge
 
PREDICTING PERFORMANCE OF CLASSIFICATION ALGORITHMS
PREDICTING PERFORMANCE OF CLASSIFICATION ALGORITHMSPREDICTING PERFORMANCE OF CLASSIFICATION ALGORITHMS
PREDICTING PERFORMANCE OF CLASSIFICATION ALGORITHMS
Samsung Electronics
 
1 Project 2 Introduction - the SeaPort Project seri.docx
1  Project 2 Introduction - the SeaPort Project seri.docx1  Project 2 Introduction - the SeaPort Project seri.docx
1 Project 2 Introduction - the SeaPort Project seri.docx
honey725342
 

Similaire à Report: Test49 Geant4 Monte-Carlo Models Testing Tools (20)

An integrated approach for designing and testing specific processors
An integrated approach for designing and testing specific processorsAn integrated approach for designing and testing specific processors
An integrated approach for designing and testing specific processors
 
PRETZEL: Opening the Black Box of Machine Learning Prediction Serving Systems
PRETZEL: Opening the Black Box of Machine Learning Prediction Serving SystemsPRETZEL: Opening the Black Box of Machine Learning Prediction Serving Systems
PRETZEL: Opening the Black Box of Machine Learning Prediction Serving Systems
 
On the Choice of Models of Computation for Writing Executable Specificatoins ...
On the Choice of Models of Computation for Writing Executable Specificatoins ...On the Choice of Models of Computation for Writing Executable Specificatoins ...
On the Choice of Models of Computation for Writing Executable Specificatoins ...
 
Scaling Application on High Performance Computing Clusters and Analysis of th...
Scaling Application on High Performance Computing Clusters and Analysis of th...Scaling Application on High Performance Computing Clusters and Analysis of th...
Scaling Application on High Performance Computing Clusters and Analysis of th...
 
Gsoc proposal
Gsoc proposalGsoc proposal
Gsoc proposal
 
Gsoc proposal 2021 polaris
Gsoc proposal 2021 polarisGsoc proposal 2021 polaris
Gsoc proposal 2021 polaris
 
Project Report
Project ReportProject Report
Project Report
 
Opensource gis development - part 5
Opensource gis development - part 5Opensource gis development - part 5
Opensource gis development - part 5
 
5212303961620480 1585670953 joanna_stachera_proposal_g_soc2020
5212303961620480 1585670953 joanna_stachera_proposal_g_soc20205212303961620480 1585670953 joanna_stachera_proposal_g_soc2020
5212303961620480 1585670953 joanna_stachera_proposal_g_soc2020
 
final
finalfinal
final
 
An Introduction to OMNeT++ 5.4
An Introduction to OMNeT++ 5.4An Introduction to OMNeT++ 5.4
An Introduction to OMNeT++ 5.4
 
A Novel Method For Making Cut-Copy-Paste Operations Using Clipboard
A Novel Method For Making Cut-Copy-Paste Operations Using ClipboardA Novel Method For Making Cut-Copy-Paste Operations Using Clipboard
A Novel Method For Making Cut-Copy-Paste Operations Using Clipboard
 
Fem lab manual 2
Fem lab manual 2Fem lab manual 2
Fem lab manual 2
 
Osss manual-5-extract data
Osss manual-5-extract dataOsss manual-5-extract data
Osss manual-5-extract data
 
Group technology
Group technologyGroup technology
Group technology
 
School of Computing, Science & EngineeringAssessment Briefin.docx
School of Computing, Science & EngineeringAssessment Briefin.docxSchool of Computing, Science & EngineeringAssessment Briefin.docx
School of Computing, Science & EngineeringAssessment Briefin.docx
 
Accelerating Real Time Applications on Heterogeneous Platforms
Accelerating Real Time Applications on Heterogeneous PlatformsAccelerating Real Time Applications on Heterogeneous Platforms
Accelerating Real Time Applications on Heterogeneous Platforms
 
PREDICTING PERFORMANCE OF CLASSIFICATION ALGORITHMS
PREDICTING PERFORMANCE OF CLASSIFICATION ALGORITHMSPREDICTING PERFORMANCE OF CLASSIFICATION ALGORITHMS
PREDICTING PERFORMANCE OF CLASSIFICATION ALGORITHMS
 
Predicting performance of classification algorithms
Predicting performance of classification algorithmsPredicting performance of classification algorithms
Predicting performance of classification algorithms
 
1 Project 2 Introduction - the SeaPort Project seri.docx
1  Project 2 Introduction - the SeaPort Project seri.docx1  Project 2 Introduction - the SeaPort Project seri.docx
1 Project 2 Introduction - the SeaPort Project seri.docx
 

Plus de Roman Atachiants

Geant4 Model Testing Framework: From PAW to ROOT
Geant4 Model Testing Framework:  From PAW to ROOTGeant4 Model Testing Framework:  From PAW to ROOT
Geant4 Model Testing Framework: From PAW to ROOT
Roman Atachiants
 

Plus de Roman Atachiants (7)

Spike-Engine Flyer
Spike-Engine FlyerSpike-Engine Flyer
Spike-Engine Flyer
 
Geant4 Model Testing Framework: From PAW to ROOT
Geant4 Model Testing Framework:  From PAW to ROOTGeant4 Model Testing Framework:  From PAW to ROOT
Geant4 Model Testing Framework: From PAW to ROOT
 
Research: Applying Various DSP-Related Techniques for Robust Recognition of A...
Research: Applying Various DSP-Related Techniques for Robust Recognition of A...Research: Applying Various DSP-Related Techniques for Robust Recognition of A...
Research: Applying Various DSP-Related Techniques for Robust Recognition of A...
 
Research: Developing an Interactive Web Information Retrieval and Visualizati...
Research: Developing an Interactive Web Information Retrieval and Visualizati...Research: Developing an Interactive Web Information Retrieval and Visualizati...
Research: Developing an Interactive Web Information Retrieval and Visualizati...
 
B.Sc Thesis: Moteur 3D en XNA pour un simulateur de vol
B.Sc Thesis: Moteur 3D en XNA pour un simulateur de volB.Sc Thesis: Moteur 3D en XNA pour un simulateur de vol
B.Sc Thesis: Moteur 3D en XNA pour un simulateur de vol
 
Master Thesis: The Design of a Rich Internet Application for Exploratory Sear...
Master Thesis: The Design of a Rich Internet Application for Exploratory Sear...Master Thesis: The Design of a Rich Internet Application for Exploratory Sear...
Master Thesis: The Design of a Rich Internet Application for Exploratory Sear...
 
Ahieving Performance C#
Ahieving Performance C#Ahieving Performance C#
Ahieving Performance C#
 

Dernier

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Dernier (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 

Report: Test49 Geant4 Monte-Carlo Models Testing Tools

  • 1. Test49: Geant4 Monte-Carlo Models Testing Tools CERN Summer Student Project Report PH-SFT Group, CERN R. Atachiants (roman.atachiants@gmail.com) Supervised by: M. Kosov (mikhail.kossov@cern.ch) August 25, 2009 1 Project Overview During the CERN Summer Student program, I worked in Geant4 team (PH-SFT). The project contained several different objectives: • a full conversion of all Test19 PAW-tests[3] of existing Geant4 [4] Monte Carlo models testing to ROOT environment [5] and creation of a fully automated testing system. • creation of a special DB (DataBase) for the ex- perimental data with an automatic process of comparison of the MC distributions with data. During the summer student work, the both objec- tives were accomplished and even more various im- provements has been made: auto-scaling features for the plots, graphical user interfaces for the tools, secondary nuclear fragments retrieval, etc. The cre- ated tools were designed with the flexibility and ease-of-use in mind. 2 PAW to ROOT Conversion Fist step of the project was to convert the several .kumac files counting approximately 3000 lines of code. Learning curve of the PAW and ROOT[1] environments was steeply, therefore the conversion was achieved in about 1 month. Few insights for the PAW to ROOT portin can be found on the CERN ROOT website (http://root.cern.ch/root/ HowtoConvertFromPAW.html), but it was rather insufficient for the big scale porting and mostly targeted the people who want to switch from PAW to ROOT. During the porting, experience shown that the C++ methods of ROOT are more comprehensive and therefore more verbose. First kumac macro conversion implementation showed 40% increase of the length of the simple macro port. 3 Simulation and Analysis After the conversion of all macro files to ROOT, three comprehensive tools were developed. • Experimental DB Creation Tool: a graph- ical tool has been developed for the creation of publication files (cf. 4) from ASCII data. Fig- ure 4 shows the GUI of this tool. • Simulation Tool: the goal of the tool is to take the publication file as the input and us- ing a Geant4 testing program (currently only Test19 executable) to perform a simulation on a Monte Carlo Model. The output of the test then transformed from ASCII files, cuts and rescaling for different secondaries are per- formed. The histogram data are then saved in the so-called simulation files for further analy- sis. The tool also produces a plot for the anal- ysis of the model on which the simulation was performed, as illustrated on figure 3. • Analysis Tool: the goal of the tool is to take several simulation files produced by the simu- lation tool and to draw the comparison graphs in order to compare different MC models in be- tween. The goal of the analysis is to compare the data points (spectra, experimental data) with the simulation curves. Figure 1 shows an example of the output of the tool. 1
  • 2. 5 ADDITIONAL FEATURES Figure 1: Output of the analysis tool 4 Universal DataBase for Geant4 MC Models Testing The second part of my work at CERN was creating of a universal DB for Geant4 MC models testing. The created database consists of a collection of two types of elements: • Publication: contains an experimental data information, with the description a a function, cuts and secondaries. • Simulation: contains the simulated data (af- ter cuts) for a particular publication file. The publication and simulation files have exactly the same structure and are different only by seman- tics. The data is stored in ROOT files (TTrees) with headers in order to distinguish the items. Fig- ure 2 shows the structure of the c++ classes, cre- ated in order to represent the publication and simu- lation concepts. The header of G4TData class con- tains the projectile PDG code, target PDG code, argument (ex: T) and the MC model name which is only needed if the file is a simulation. The body of the G4TData contains a vector of G4TDataItem classes, which have the secondary fragment PDG code, cut variable (ex.: Θ, 45 degrees), the argu- ment (ex.: T) and the function (ex.: ∆S ∆E ). The records of the DB are organised in .root files, on the Linux file system, in particular the ext3 file system on Scientific Linux 5, which allows a sin- gle file of maximum 2TB. Ex-data (ASCII files) Figure 2: Representation of the Data and DataItem classes for both publications and simulations stor- age and manipulation. are in the test49/ascii directory and the publica- tions/simulations are in the test49/database direc- tory. 5 Additional Features 5.1 Automatic Scaling and Layout Management An auto-scale feature have been implemented in or- der to scale automatically the axis of plots, pro- duced by both analysis and simulation tools. The scale features supports logarithmic scaling of y-axis and linear scaling of x-axis. 5.2 Automatic Secondary Frag- ments Nuclear Mass Calcula- tions A feature for the nuclear mass calculation for secondary fragments have been implemented in the tools, the API is based on ROOT Geometry package, made by ALICE experiment, using the lastest data (NUBASE2003). August 25, 2009 2 R. Atachiants
  • 3. 7 CONCLUSIONS 5.3 Graphical User Interfaces Figure 3: A graphical user interface for simulation tool Several graphical user interfaces have been made for the tools in order to give the possibility to use them in the simplest possible way. The GUIs have been built using ROOT widgets platform and therefore portable to different platforms (Mac OSX, Windows, Linux, ...). One can see on Figure 4 the GUI created in order to ease the use of creating publication files, and Fig- ure 3 shows a GUI for the simulation tool, where one can simply select the publication file and run the MC simulation. 5.4 Documentation and ROOT Con- tributions An extensive amount of documentation for the tool have been written, a simple User Guide can be found in the Geant4 Hadronics Wiki [2] . This User Guide shows how to get started and work with both simulation and analysis tools, and create publica- tion data files from ASCII files (both using ROOT macros or available GUIs). A contribution to ROOT also have been made, sev- eral bugs have been found during the work, submit- ted to ROOT team of PH-SFT and their correction have been initiated. Figure 4: A graphical user interface for making publication files from ASCII files 6 Results One of the main goals of the project was the PAW to ROOT conversion. The goal of this conversion were mainly to be able to run the simulations and process (analyse) bigger statistics than in old sys- tem. In order to prove that the system can han- dle big statistics, a Monte Carlo simulation using BERTINI MC Model was performed. This simula- tion produced 10,000,000 events, 52,508,486 entries and the output file of about 7.5 GB (Figure 5). 7 Conclusions In this paper my contribution to Geant4 testing fa- cility has been discussed. It has been proven that old PAW .kumac files can be completely ported to the ROOT platform and exactly the same result can be achieved. It has also been shown that the created simulation tool can produce practically un- limited results, in order of 2 TB statistics, limited purely by the file system. The simulation and anal- ysis tools that have been created also have been designed with the extensibility and ease-of-use in mind. The extensibility is achieved by using the abstract classes, data access layers and wrappers. The ease-of-use is achieved by building a very easy August 25, 2009 3 R. Atachiants
  • 4. REFERENCES REFERENCES Figure 5: The post-simulation output of a simula- tion of 10,000,000 events to use API and graphical user interfaces. The experimental DB and different tools are implemented in ROOT classes, compiled in libG4ModelTester.so extension library for ROOT and placed in tests/test49 directory of Geant4 test- ing facility. References [1] The ROOT Users Guide. CERN, 2006. [2] R. Atachiants. http://geant4hadronics.wikispaces.com/ geant4+test49+documentation. Geant4 Test19 Documentation. [3] CERN. http://wwwasd.web.cern.ch/wwwasd/paw. PAW − Physics Analysis Workstation. [4] CERN. http://www.geant4.org/geant4. Geant4 Website. [5] Rademakers F. Introduction to root. CERN Summer Student Lecture. August 25, 2009 4 R. Atachiants