THE SIMULATION AND ANALYSISFRAMEWORK FAIRROOT CHEP 2012 New

  • Slides: 41
Download presentation
THE SIMULATION- AND ANALYSIS-FRAMEWORK FAIRROOT CHEP 2012, New York

THE SIMULATION- AND ANALYSIS-FRAMEWORK FAIRROOT CHEP 2012, New York

Outline 2 History Features New and Recent Projects Time Based Simulation Example Summary and

Outline 2 History Features New and Recent Projects Time Based Simulation Example Summary and Outlook Florian Uhlig CHEP 2012, New York 22. 05. 12

Fair. Root: timeline 3 Start testing the VMC concept for CBM 2004 First Release

Fair. Root: timeline 3 Start testing the VMC concept for CBM 2004 First Release of Cbm. Root Florian Uhlig Panda decided to join-> Fair. Root: same Base package for different experiments 2006 MPD (NICA) start also using Fair. Root R 3 B joined EIC (Electron Ion Collider BNL) EICRoot 2010 2011 ASYEOS joined (ASYEOSRo ot) GEM-TPC separated from PANDA branch (FOPIRoot) CHEP 2012, New York 22. 05. 12

Developer Team 4 Core Team: Mohammad Al-Turany 2003 Denis Bertini 2003 Florian Uhlig 2006

Developer Team 4 Core Team: Mohammad Al-Turany 2003 Denis Bertini 2003 Florian Uhlig 2006 Radek Karabowicz 2008 Dmytro Kresan 2011 Tobias Stockmanns GSI-IT CBM/IT PANDA/IT R 3 B/IT People participated major features: PANDA Ilse König Volker Friese Florian Uhlig long list of people who have contributed pieces of code to Fair. Root since the project started end of 2003 HADES CBM CHEP 2012, New York 22. 05. 12

Fair. Root 5 Framework for simulation, reconstruction and data analysis Very flexible � No

Fair. Root 5 Framework for simulation, reconstruction and data analysis Very flexible � No executable Use plug-in mechanism from Root to load libraries only when needed Use Root macros to define the experimental setup or the tasks for reconstruction/analysis Use Root macros to set the configuration (Geant 3, Geant 4, …) � No fixed simulation model Use different simulation models (Geant 3, Geant 4, …) with the same user code (VMC) Florian Uhlig CHEP 2012, New York 22. 05. 12

Fair. Root cont. 6 Very flexible � No fixed navigation engine / geometry management

Fair. Root cont. 6 Very flexible � No fixed navigation engine / geometry management Use Root TGeo. Manager for geometry management Geometry can be defined using different input formats ASCII files in format inherited from HADES Root files Defined directly in the source code Use TEve as base for general event display Geometry is described once. Then it can be converted (VGM) to choose between different MC’s and different navigations Florian Uhlig G 4 native geometry and navigation G 4 native geometry and Root … CHEP 2012, New York 22. 05. 12

Fair. Root cont. 7 Very flexible � No fixed output structure Use a dynamic

Fair. Root cont. 7 Very flexible � No fixed output structure Use a dynamic event structure based on Root TFolder and TTree which is created automatically � Depend on registered data classes Data output possible after each step Simulation and reconstruction can be done in one go or in several steps Use runtime data base Developed for the HADES experiment Decouple parameter handling in Fair. Root from parameter storage runtime data base IO to/from Florian Uhlig ASCII files Root files Database CHEP 2012, New York 22. 05. 12

Parameter IO 8 different versions Generic parameter container parameter name type: Int_t, Float_t, Double_t,

Parameter IO 8 different versions Generic parameter container parameter name type: Int_t, Float_t, Double_t, Char_t, Text_t, UChar_t, class type value(s) object stored as byte array (RAW or BLOB) number of values (single value or array) class version streamer info, root version for ROOT classes own version management any class derived from TObject decoded in the analysis interface by ROOT streamer Florian Uhlig CHEP 2012, New York 22. 05. 12

Fair. Root DB 9 ASCII File Configuration parameters. Fair. Root Run Manager IO Manager

Fair. Root DB 9 ASCII File Configuration parameters. Fair. Root Run Manager IO Manager Run. Time Database triggers on Init registered changing parameter containers Run. Id Root File MC-points Digits, etc Florian Uhlig Root File Configuration parameters. Oracle CHEP 2012, New York 22. 05. 12

Fair. Root DB extended 10 ASCII File Configuration parameters. Fair. Root Run Manager Run.

Fair. Root DB extended 10 ASCII File Configuration parameters. Fair. Root Run Manager Run. Time Database IO Manager DB Interface Root File MC-points Digits, etc Root File Configuration parameters. TSQLServer Oracle My. SQL Postgresql Florian Uhlig CHEP 2012, New York 22. 05. 12

Version management 11 Version STT CAL MVD TEMP Time Detector Validity time range (UTC)

Version management 11 Version STT CAL MVD TEMP Time Detector Validity time range (UTC) 1. 2. 3. 4. Florian Uhlig The Query process Context (Timestamp, Detector, Version) is the primary key Context converted to unique Seq. No used as keys to access all rows in main table System gives user access of all such rows CHEP 2012, New York 22. 05. 12

Proof in Fair. Root 12 PROOF - Parallel ROOt Facility. It allows parallel processing

Proof in Fair. Root 12 PROOF - Parallel ROOt Facility. It allows parallel processing of large amount of data. The output results can be directly visualized (e. g. the output histogram can be drawn at the end of the proof session). The data which you process with PROOF can reside on your computer, PROOF cluster disks or grid. The usage of PROOF is transparent: you use the same code you are running locally on your computer. No special installation of PROOF software is necessary to execute your code: PROOF is included in ROOT distribution. Proof runs on computing clusters as well as on your local many core computer Florian Uhlig CHEP 2012, New York 22. 05. 12

Trivial parallelism 13 Sequential processing data Unordered processing Parallel processing In Fair. Root change

Trivial parallelism 13 Sequential processing data Unordered processing Parallel processing In Fair. Root change one line in the macro to use data 1 data 2 data it: 1 Event 5 Event 3 *f. Run = new. Event Fair. Run. Ana(); 1 Event 2 Event 6 Event 2 2 To Event 3 Event 7 Event 1 3 Event 4 Event 5 Event 6 Event 7 Event 8 Event 9 Event 10 Event 11 Event 12 Event Fair. Run. Ana Event Event = 4 5 *f. Run 8 9 7 6 12 11 10 Event 4 Event 8 == new Fair. Run. Ana(“proof”); results 1 + results 2 + data 3 Event 9 Event 10 Event 11 Event 12 results 3 Σ results Florian Uhlig = results = CHEP 2012, New York results 22. 05. 12

Proof on Demand 14 Po. D: Anar Manafov, GSI ([22] 21/05; [21] Postersessio Florian

Proof on Demand 14 Po. D: Anar Manafov, GSI ([22] 21/05; [21] Postersessio Florian Uhlig CHEP 2012, New York 22. 05. 12

GPU support in Fair. Root 15 CUDA is fully integrated into the Fair. Root

GPU support in Fair. Root 15 CUDA is fully integrated into the Fair. Root build system • CMake creates shared libraries for cuda part • Fair. Cuda is a class which wraps CUDA implemented functions so that they can be used directly from ROOT CINT or compiled code See talk of Mohammad Al-Turany • � [353] Florian Uhlig 24/05, 5. 25 PM, Room 905/907 CHEP 2012, New York 22. 05. 12

16 Radiation length info Fair. Rad. Len. Manager Example: Contributions of different Functional parts

16 Radiation length info Fair. Rad. Len. Manager Example: Contributions of different Functional parts of the PANDA MVD to the overall material budget Florian Uhlig CHEP 2012, New York 22. 05. 12

Dose studies Fair. Rad. Map. Manager 17 What energy dose will be accumulated during

Dose studies Fair. Rad. Map. Manager 17 What energy dose will be accumulated during a certain time of operation? Create all physical volumes with correct material assignment Run the simulation engine Fair. Rad. Map. Manager will sum up every deposited energy in each volume in the geometry Florian Uhlig CHEP 2012, New York 22. 05. 12

18 Dose studies Fair. Rad. Grid. Manager Determine the particle fluency through a certain

18 Dose studies Fair. Rad. Grid. Manager Determine the particle fluency through a certain boundary (surface) and deduce a map. Knowing the volume and density of the object of interest and the specific energy loss doses can be estimated Florian Uhlig CHEP 2012, New York 22. 05. 12

Fair. Root for real data 19 Fair. Root was designed from the beginning to

Fair. Root for real data 19 Fair. Root was designed from the beginning to combine simulation and analysis in one tool. Using the same internal structure the user can compare easily at any time/level the real data with the simulation Reconstructed Beam EVENT The large GEM-TPC Prototype L. Fabbietti for the GEM-TPC Collaboration Florian Uhlig CHEP 2012, New York 22. 05. 12

20 Neu. LAND: The High Resolution Neutron Time-of-Flight Spectrometer for R 3 B Comparison

20 Neu. LAND: The High Resolution Neutron Time-of-Flight Spectrometer for R 3 B Comparison of LAND response to neutrons from 170 to 1050 Me. V from experiment (black lines) and from R 3 BRoot simulations (red lines). Florian Uhlig CHEP 2012, New York 22. 05. 12

Triggered Experiment 21 • Use SHIP (Separator for Heavy Ion reaction products) as example

Triggered Experiment 21 • Use SHIP (Separator for Heavy Ion reaction products) as example • If particle enters detector region the data tacking is triggered • When DAQ reads out the detectors everything belongs to this Florian Uhlig CHEP 2012, New 22. 05. 12 event York

Triggered Experiment 22 Florian Uhlig CHEP 2012, New York 22. 05. 12

Triggered Experiment 22 Florian Uhlig CHEP 2012, New York 22. 05. 12

Triggered Experiment 23 Florian Uhlig CHEP 2012, New York 22. 05. 12

Triggered Experiment 23 Florian Uhlig CHEP 2012, New York 22. 05. 12

The Challenge 24 • Central events have up to 1000 charged particles inside acceptance

The Challenge 24 • Central events have up to 1000 charged particles inside acceptance • Looking for rare probes require events rates up to 107 per second • Complicated trigger signature • Searching for secondary vertex requires reconstruction of a large part of the event Florian Uhlig CHEP 2012, New York 22. 05. 12

The Challenge 25 D 0 Florian Uhlig • Central events have up to 1000

The Challenge 25 D 0 Florian Uhlig • Central events have up to 1000 charged particles inside Kacceptance • Looking for rare probes require events rates up to 107 per second • Complicated trigger signature • Searching for secondary vertex requires reconstruction of a π+ large part of the event • Conventional hardware trigger not feasible: no dead time allowed • Self-triggered autonomous front. CHEP 2012, ends New pushing time-stamped data 22. 05. 12 York

The Challenge 26 Necessary to test this in simulation Florian Uhlig CHEP 2012, New

The Challenge 26 Necessary to test this in simulation Florian Uhlig CHEP 2012, New York 22. 05. 12

Task for Fair. Root 27 Florian Uhlig CHEP 2012, New York 22. 05. 12

Task for Fair. Root 27 Florian Uhlig CHEP 2012, New York 22. 05. 12

Time based simulation 28 Provide functionality for the tasks “event mixing” in the digitization

Time based simulation 28 Provide functionality for the tasks “event mixing” in the digitization stage and “time sorting” in the reconstruction stage Generator 1 … Event Generator N Track Finder Florian Uhlig Transport Simulatio n Hit Finder Digitizer Buffer Cluster Finder Sorter CHEP 2012, New York 22. 05. 12

Event Time 29 The absolute event time is calculated by the framework Experiments define

Event Time 29 The absolute event time is calculated by the framework Experiments define functions for event time calculation Time of detector digi is this absolute time + the time inside the MC event Florian Uhlig CHEP 2012, New York 22. 05. 12

Fair. Writeout. Buffer 30 Base class to store detector data (digis) between events Buffer

Fair. Writeout. Buffer 30 Base class to store detector data (digis) between events Buffer stores data together with absolute time until this data is active and can be influenced by later events � This time is detector dependent and is defined individually If the same detector element is hit at a later time the data can be/is modified � Modifications are detector and electronics dependent Result is a randomized data stream which is Florian Uhlig CHEP 2012, New 22. 05. 12 stored in a TClones. Array which Yorkwould be the input

Randomized Digi Data 31 Same color = same event Array index Florian Uhlig CHEP

Randomized Digi Data 31 Same color = same event Array index Florian Uhlig CHEP 2012, New York 22. 05. 12

32 Sorter – Technical Implementation Number of storage cells given by the spread of

32 Sorter – Technical Implementation Number of storage cells given by the spread of the time stamps within the data stream Width of one storage cell given by time resolution of detector 0 -Element Pointer Storage Pointer position calculated numerically from time stamp If a storage position is calculated which would override old data, the old data is saved to disk and the storage cell is freed Florian Uhlig CHEP 2012, New York 22. 05. 12

Sorted Digi Data 33 Array index Florian Uhlig CHEP 2012, New York 22. 05.

Sorted Digi Data 33 Array index Florian Uhlig CHEP 2012, New York 22. 05. 12

Sorted Digi Data 34 Florian Uhlig CHEP 2012, New York Array index 22. 05.

Sorted Digi Data 34 Florian Uhlig CHEP 2012, New York Array index 22. 05. 12

35 Task for Experiments Event Builder Florian Uhlig CHEP 2012, New York 22. 05.

35 Task for Experiments Event Builder Florian Uhlig CHEP 2012, New York 22. 05. 12

36 Read back the Data Eventbuilder Read data from IO Manager using different functions

36 Read back the Data Eventbuilder Read data from IO Manager using different functions Different algorithms already available � Read data up to a given absolute time � Read data in a given time window � Read data until next time gap of certain size Other algorithms can be (easily) implemented if needed Florian Uhlig CHEP 2012, New York 22. 05. 12

37 Example: Rutherford Experiment Scattering of 5 Me. V alpha particles at a 2μm

37 Example: Rutherford Experiment Scattering of 5 Me. V alpha particles at a 2μm gold foil Unexpected large scattering angles observed Implementation using Fair. Root needs 600 lines of c++ source code created mostly automatically (copied from a template) � 60 lines of code for the build system � 200 lines of code for the steering macros � 70 lines of code for the geometry and media definition � Florian Uhlig CHEP 2012, New York 22. 05. 12

Rutherford Experiment 38 • Change experimental setup • Change material properties • Change simulation

Rutherford Experiment 38 • Change experimental setup • Change material properties • Change simulation engine • Change physical processes Florian Uhlig CHEP 2012, New York 22. 05. 12

Summary and Outlook 39 Hope I could show you that Fair. Root � is

Summary and Outlook 39 Hope I could show you that Fair. Root � is flexible � is easy to use � is easy to extend Special tools to do dose studies Tools for time based simulation are implemented � Calculation of event time � Mixing of events by automatic buffering and write out when needed � Fast sorting of data � Several event builder functions Florian Uhlig CHEP 2012, New York 22. 05. 12

Summary and Outlook 40 Many more topics only touched or not showed at all

Summary and Outlook 40 Many more topics only touched or not showed at all � Proof integration � Database connectivity � GPU usage inside of Fair. Root � Build and test system �… Resources � Webpage: http: //fairroot. gsi. de � Forum: http: //forum. gsi. de � Test Dashboard: http: //cdash. gsi. de/CDash Florian Uhlig CHEP 2012, New York 22. 05. 12

41 Fair. Root related talks and poster [606] Future Experiments and Impact on Computing

41 Fair. Root related talks and poster [606] Future Experiments and Impact on Computing [394] Event reconstruction in the Panda. Root framework [353] Track finding and fitting on GPUs, first steps toward a software trigger [40] STEPto. Root – from CAD to monte carlo simulations [399] Electron reconstruction and identification capabilities of the CBM Experiment at FAIR Florian Uhlig CHEP 2012, New York 22. 05. 12