FAIR Simulation & Analysis FrameworkFAIR Simulation & Analysis FrameworkFairRoot FairRoot
Mohammad Al-Turany (IT-GSI)
Denis Bertini (IT-GSI)
Florian Uhlig (IT-GSI)
13.02.2008 M. Al-Turany Root@HeavyIon 2
OverviewOverview
• Motivation
• FairRoot Features
• CMake: Testing and building system
• Geometry Interface
• Runtime Database and Parameter Handling
• Fast simulation
• Integrated Track follower (Geane)
• Event display
• Grid
• Summary
13.02.2008 M. Al-Turany Root@HeavyIon 3
MotivationMotivation
• Which simulation engine to choose?
– One would like to use the modern and maintained GEANT4
– But: 1. We have to:
– Work fast ! ( LOI, TDR deadlines … )– Make reliable simulation
2. In the CBM community and locally at the GSI :– Better knowledge of “old” MC’s: GEANT3, FLUKA … – less knowledge about GEANT4 ( intrinsic cuts / physics list …)– It was extremely difficult to get support for working with Geant4
13.02.2008 M. Al-Turany Root@HeavyIon 4
Features Features
• No Executable: (Only Rootcint)– Compiled Tasks for analysis, reconstruction, etc.– Root macros for steering simulation or reconstruction – Root macros for configurations (G3, G4, external decyers, etc.)
• The same framework can be used for Simulation and Analysis
• VMC and VGM for simulation
• TTask to organize the analysis data flow
• Use of TGeoManager for Simulation and Reconstruction
• Eve (Alice Event display) as base for a general event display
• Dynamic Event structure based on ROOT tree
13.02.2008 M. Al-Turany Root@HeavyIon 5
FeaturesFeatures
• Use of a Geometry Interface.– G3 Native geometry– Geometry Modeller (TGeoManager)– Different geometry input format
• Grid: AliEn is working fine for us and we use it!
• CMake: Makefiles, dependencies , QM ,...
• Doxygen for class documentation
• Use PROOF for interactive analysis
13.02.2008 M. Al-Turany Root@HeavyIon 6
FairRoot IOFairRoot IO
• Dynamic Tree creation at initialization time– TFolder to organize memory– Simulation: CbmDetector::Init()– Analysis: CbmTask::Init()
• ( automatic partial IO )
• Chaining Input data– TChain services
• Connection of Data levels– Use of Root Friend mechanism
13.02.2008 M. Al-Turany Root@HeavyIon 7
Tasks MechanismTasks Mechanism
CBMTask *Task1=new CBMTask("Task1") CBMTask *Task2=new CBMTask("Task2")
CBMTask *Task3=new CBMTask("Task3")
CBMTask *Task4=new CBMTask("Task4")
CBMTask *Task5=new CBMTask("Task5")
CBMTask *Task6=new CBMTask("Task6")
Task1->Add(Task2)
Task1->Add(Task3)
Task2->Add(Task4)
Task2->Add(Task5)
Task3->Add(Task6)
Task1
Task2 Task3
Task4 Task6Task5
13.02.2008 M. Al-Turany Root@HeavyIon 8
Run Manager
Event Generator
Magnetic
FieldDetector base
IO Manager
Tasks
RTDataBase OracleConf, Par,Geo
Root filesConf, Par,Geo
Root files Hits, Digits, Tracks
ApplicationCuts, processes
Event Display
Track propagati
on
ROOT Virtual MC
Geant3
Geant4
FLUKA
G4VMC
FlukaVMC
G3VMC
Geometry
STS
TRD
TOF
RICH
ECAL
MVDZDC
MUCH
ASCII
Urqmd
Pluto
Track findin
g
digitizers
Hit ProducersDipole Map
Active Map
const. field
CBM Code
STT
MUO
TOF
DCH
EMC
MVDTPCDIRC
ASCII
EVT
DPM
Track finding
digitizers
Hit Producers
Dipole Map
Solenoid Map
const. field
Panda Code
comm
on developm
ents
Always in close
contact
Close contact
Design Design
13.02.2008 M. Al-Turany Root@HeavyIon 9
Simulation-Reconstruction ChainSimulation-Reconstruction Chain
Event Generator
Transport
Digitizer
Hit Finder
Reconstruction
Physics Analysis
Fu
ll S
imu
lati
on
An
alys
is
Determine particle properties
at target vertex
Transport particles through
the detector material
Determine detector response
Determine physical space point
parameters from detector hits
Determine momentum vector
and PID for all tracks
Calculate physics observables
Storage
Levels
SIM
RAW
Fas
t S
imu
lati
on
13.02.2008 M. Al-Turany Root@HeavyIon 10
CMake CMake
• Why CMake:
– It supports great variety of platforms • ( basically every *ix, Mac OS, Windows)• ( Win: Borland, MS Visual C++, cygwin, mingw)
– CMake generates out of simple rules native Makefiles for all supported platforms
– Input files (rules) are the same on all platforms– CMake additionally can produce project files for IDE's (KDevelop, XCode,
VStudio)
– Big community because Cmake is the build tool for KDE 4 – CMake has a testing framework– Porting FairRoot to Mac OS X took 30 minutes– Porting the rest of the needed Software (Root, Geant4 etc.) took more than 1
week
13.02.2008 M. Al-Turany Root@HeavyIon 11
Why test dailyWhy test daily
• Large code base is too large/complicated for a single developer to understand/maintain
• Identify problems when they occur
• Project depends on external packages which can cause problems
• Provide direct feedback to the developers as they experiment with new features
13.02.2008 M. Al-Turany Root@HeavyIon 12
Define automatic testingDefine automatic testing
• Update source from SVN
• Generate Makefiles
• Build the project
• Run Tests
• Submit results to a webserver
13.02.2008 M. Al-Turany Root@HeavyIon 13
Software Process DashboardsSoftware Process Dashboards
SVN maintains source code revision
Typical developerchecks in code
CTest/CMake compilesand test the newly commited source code on distributed clients
Developer reviews the results
13.02.2008 M. Al-Turany Root@HeavyIon 14
DashboardsDashboards
• Client/Server architecture
• Cross platform testing
• Memory testing (purify, valgrind)
• Coverage testing
• Create documentation on a nightly basis (Doxygen)
• Check coding conventions (Rule Checker)
If it's not tested it's not workingIf it's not tested it's not working
13.02.2008 M. Al-Turany Root@HeavyIon 15
CbmRoot Quality DashboardCbmRoot Quality Dashboard
13.02.2008 M. Al-Turany Root@HeavyIon 16
13.02.2008 M. Al-Turany Root@HeavyIon 17
Rule CheckerRule Checker
Need to change the rules according to CBM/Panda Coding Conventions
13.02.2008 M. Al-Turany Root@HeavyIon 18
Detector geometry in FairRootDetector geometry in FairRoot
• Hades Geometry interface – Advantage:
• more flexibility : different inputs can be used.• closer to technical drawings and analysis coordinate systems
– Oracle interface • Hades geometry table design reusable
• Step converter (Tobias Stockmann)– Step To Root
– Step To Hades ASCII
– Step To DDL (Not used in FairRoot)
• Defined directly (TGeo) in the detector code– (make sense for certain geometries CbmEcal, PandaEMC)
13.02.2008 M. Al-Turany Root@HeavyIon 19
Tobias Stockmanns, FZ Jülich
Step converterStep converter : Status? : Status?
Import STEPImport IGES
ReadCompound
ReadSolid
AnalyzeSolid
LoadMaterialMap
ReadCompound
Output
BuildSolid
supports now:boxtubeconetrapsubtraction-solidArb8Xtru
DDL outputCBM outputRoot output
13.02.2008 M. Al-Turany Root@HeavyIon 20
CAD converter, updates and improvements
Tobias Stockmanns
Usage of CAD converter tool was already successful for MVD
Usage of CAD converter tool was already successful for MVD
13.02.2008 M. Al-Turany Root@HeavyIon 21
CAD converter, updates and improvements
Tobias Stockmanns
Some geometries are too complex to convert “blindly”
Some geometries are too complex to convert “blindly”
Solenoid,Barrel Yoke
13.02.2008 M. Al-Turany Root@HeavyIon 22
RootBooleanPartRootBooleanPart
Tobias Stockmanns, FZ Jülich
-
13.02.2008 M. Al-Turany Root@HeavyIon 23
Finally in TGeo:Finally in TGeo:
13.02.2008 M. Al-Turany Root@HeavyIon 24
Runtime DatabaseRuntime Database
Runtime Database
2 Inputs
1 Output
List of Parameter Containers
ASCII File
ROOT File
Oracle
List of Runs
The Runtime Database is the manager class for all Parameter containers:
Creation, Initialization, Output
Container Factories
IO defined in the macro
Created in the init() function of the tasks via the container factories or in the macro
Filled during initialization
read()write()
13.02.2008 M. Al-Turany Root@HeavyIon 25
Version management in OracleVersion management in Oracle
• For time dependent information a version management is needed which fulfills the following requirements: – It must be possible to get a consistent set of information for any
date (e.g.the start time of a certain run). – To preserve the history, no information - even if wrong - should
be overwritten without trace, which means that only inserts should be made, no deletes nor updates.
– It must be possible to get an answer to the question: 'Which parameters were used when analyzing this run X years ago?' (The calibration might have been optimized several times since this date. Maybe some bugs have been detected and corrected in the mean time.)
13.02.2008 M. Al-Turany Root@HeavyIon 26
Version management in OracleVersion management in Oracle
Time dependant entries have a time stamp (date + time with
the precision of one second) in form of three columns (Format:
DATE):
• valid_since :First date when the entry is valid.
• valid_until :Last date when the entry is still valid
• invalid_since :Date when the entry is replaced by a correct entry or a better version in case of e.g. calibration parameters and therefore gets invalid.
13.02.2008 M. Al-Turany Root@HeavyIon 27
Initialisation scheme (Analysis)Initialisation scheme (Analysis)
RunId1
RunId2
File=1
File=2
Sim. Data
Sim. Data
CbmTask Parameters
RunId1
RunId2
Par. Cont.
Par. Cont
CbmTask::SetContainers()CbmTask::init()
CbmTask::Exec()
CbmTask::Exec()
CbmTask::Reinit()
CbmParIo
CbmParIo
Data
13.02.2008 M. Al-Turany Root@HeavyIon 28
Particle TransportDigitizationCalibrationReconstruction
Effective parametrization - acceptance cuts - resolution smearing - PID info
Full Simulation Fast Simulation
Event Generation
Physics Analysis
PANDA: Fast Simulations
Klaus Goetzen
13.02.2008 M. Al-Turany Root@HeavyIon 29
Compared to Full SimCompared to Full Sim
Comparison to Full Sim are reasonable(channel: pp DsDs0)
(10 k Signal events; absolute numbers)
13.02.2008 M. Al-Turany Root@HeavyIon 30
Split offs – Compared to Full SimSplit offs – Compared to Full Sim
Overall multiplicityper pp candidateare quite reasonable(channel: pp DsDs0)
0 mass shape andbackground also looksquite ok
13.02.2008 M. Al-Turany Root@HeavyIon 31
Geane Integration in FairRoot
• The integration into the VMC (TGeant3) is done
• In FairRoot:– Geane can be used in the analysis or from macro– Propagation to
– Length – Plane– Volume (Enter or Exit point)– To Line– To Point– Point of closest approch on a wire
New Methods introduced by Pavia
group in PANDA
13.02.2008 M. Al-Turany Root@HeavyIon 32
Muon Absorber in CBMMuon Absorber in CBM
13.02.2008 M. Al-Turany Root@HeavyIon 33
Pulls for the Panda STT500 MeV/cWe have defined a plane to which
we extrapolate the track parameters.
RMS 0.95 RMS 0.93 RMS 0.93 RMS 0.92
RMS 0.92
Kapton 1.42 g/cm3Isobutan 2.7e-3 g/cm3
13.02.2008 M. Al-Turany Root@HeavyIon 34
ROOT : New Event DisplayROOT : New Event Display
• A new package Eve (Event Visualization Environment )is introduced to ROOT 5.17.06
– Built on top of ROOT's GUI, GL and GED infrastructure
– Based on experiment-independant part of the ALICE event display
– It has been used in ALICE for more than a year to perform high-level event visualization, debugging of simulation and reconstruction code as well as for raw-data visualization.
13.02.2008 M. Al-Turany Root@HeavyIon 35
Eve in FairRootEve in FairRoot
• Integration is straight forward (already done)• Some features can be used directly (even from macro)
13.02.2008 M. Al-Turany Root@HeavyIon 36
Examples: Panda DetectorExamples: Panda Detector
13.02.2008 M. Al-Turany Root@HeavyIon 37
FairEventManagerFairEventManager
• FairEventManager: (Sub-class of TEveEventManager)
– Read Events directly from FairRoot Tree– Select Events for Display– Apply cuts to whole event– Navigation (Next Event, Previous Event and Event No)– Read and display the geometry
13.02.2008 M. Al-Turany Root@HeavyIon 38
FairRootManagerEditorFairRootManagerEditor
13.02.2008 M. Al-Turany Root@HeavyIon 39
Event Display MacroEvent Display Macropanda_eve()
{ ................
gSystem->Load("libEventDisplay");
CbmRunAna *fRun= new CbmRunAna();
fRun->SetInputFile("testsimu10.root");
fRun->LoadGeometry();
FairEventManager *fMan= new FairEventManager();
FairMCTracks *Track = new FairMCTracks ("Monte-Carlo Tracks");
FairMCPointDraw *MvdPoints = new FairMCPointDraw ("MVDPoint");
FairMCPointDraw *EMCPoints = new FairMCPointDraw ("EmcPoint");
fMan->AddTask(Track);
fMan->AddTask(MvdPoints);
fMan->AddTask(EMCPoints);
..................
fMan->Init();
}
13.02.2008 M. Al-Turany Root@HeavyIon 40
CBM: Points and TracksCBM: Points and Tracks
13.02.2008 M. Al-Turany Root@HeavyIon 41
CBM Muon detectorCBM Muon detector
13.02.2008 M. Al-Turany Root@HeavyIon 42
Examples: Panda Detector (MVD)Examples: Panda Detector (MVD)
13.02.2008 M. Al-Turany Root@HeavyIon 43
Examples: HADES DetectorExamples: HADES Detector
13.02.2008 M. Al-Turany Root@HeavyIon 44
Status Event DiplayStatus Event Diplay
• Any TGeoManager based geometry can be used directly
• Combined with trajectory visualization in FairRoot, it can be used directly from macro to display TGeoTracks (MC Tracks) and all sub-classes of CbmPoint
• A task which should handle CbmHit subclasses is in preparation.
• Digits has to be implemented by detectors
13.02.2008 M. Al-Turany Root@HeavyIon 45
Status Event Diplay: TracksStatus Event Diplay: Tracks
• TEveTrack and TEveTrackPropagator:– Can be used directly with Track visualization option in FairRoot
• MCTracks and Reconstructed Tracks – Need A realistic track propagator
– Field maps has to be taken into account
Possible solution would be Geane Propagator!!
13.02.2008 M. Al-Turany Root@HeavyIon 46
Existing sitesExisting sites
Upgraded to version 2-13 at the last GridWorkshop, Vienna, 1-5 October 2007
Ateneo/Manila
Kilian Schwarz and Dan Protopopescu
13.02.2008 M. Al-Turany Root@HeavyIon 47
Control panelControl panel
Centralised control of all sites is now implemented via MonALISA: services can be remotely (re)started/stopped,
Kilian Schwarz and Dan Protopopescu
13.02.2008 M. Al-Turany Root@HeavyIon 48
Simulation-analysis chainSimulation-analysis chain
In recent test productions on the Grid the simulation-analysis chain presented by S. Lange in the last PandaRoot status talk (September 2007 meeting) has been used
Kilian Schwarz and Dan Protopopescu
13.02.2008 M. Al-Turany Root@HeavyIon 49
Job jdl and scripts – Job jdl and scripts – FairRoot on GridFairRoot on Grid
Some arbitrary submission id
Kilian Schwarz and Dan Protopopescu
13.02.2008 M. Al-Turany Root@HeavyIon 50
ResultsResults
Message from the validation job
Message from the validation job
13.02.2008 M. Al-Turany Root@HeavyIon 51
FairRoot on GRID - ResultsFairRoot on GRID - Results
Kilian Schwarz and Dan Protopopescu
13.02.2008 M. Al-Turany Root@HeavyIon 52
Digitization, pattern recognition, tracking algorithms, and validation/tuning of simulations using REAL (=realistic) data
Digitization, pattern recognition, tracking algorithms, and validation/tuning of simulations using REAL (=realistic) data
13.02.2008 M. Al-Turany Root@HeavyIon 53
What we have now!What we have now!• CBM:
– Mainly using Geant3 for simulation– TFulka is ready but we still straggling to get a license – We have our own work around to use native FLUKA and put the
output in FairRoot format (Dosimetery study )
• PANDA:– Mainly using Geant4 and compare to Geant3 – Some prototypes for EMC, TPC are build, test beams data is
available and will be compared to Geant3 and Geant4
• HADES:– Mainly used by us to compare to the data and existing native
Geant3 simulation (e.g. Cerenkov production etc.)
• NUSTAR:– Still evaluating if FairRoot will be suitable for them.
13.02.2008 M. Al-Turany Root@HeavyIon 54
AvailabilityAvailability
• Tested on Linux and Mac OS • Some documentation: fairroot.gsi.de• subversion.gsi.de/fairroot/cbmroot• subversion.gsi.de/fairroot/pandaroot
Top Related