CBM Simulation&Analysis Framework Cbmroot Mohammad Al-Turany Denis Bertini Ilse König.

Slides:



Advertisements
Similar presentations
CBM Simulation & Analysis Framework Cbmroot
Advertisements

Software Summary Database Data Flow G4MICE Status & Plans Detector Reconstruction 1M.Ellis - CM24 - 3rd June 2009.
Status of software development for MPD Oleg Rogachevsky for MPD collaboration Round Table discussion III 5 November 2008 Dubna.
O. Stézowski IPN Lyon AGATA Week September 2003 Legnaro Data Analysis – Team #3 ROOT as a framework for AGATA.
25/03/2003Simulation Application for the LHCb Experiment CHEP March 2003 Presented by: W. Pokorski / CERN Authors: I. Belyaev, Ph. Charpentier,
JCE A Java-based Commissioning Environment tool Hiroyuki Sako, JAEA Hiroshi Ikeda, Visible Information Center Inc. SAD Workshop.
CBM Software Meeting 1 CBM Simulation & Analysis Framework M. Al-Turany, D. Bertini.
THE SIMULATION- AND ANALYSIS-FRAMEWORK FAIRROOT CHEP 2012, New York.
CBM Simulation&Analysis Framework Cbmroot Mohammad Al-Turany & Denis Bertini.
IFluka : a C++ interface between Fairroot and Fluka Motivations Design The CBM case: –Geometry implementation –Settings for radiation studies –Global diagnosis.
HPS Online Software Discussion Jeremy McCormick, SLAC Status and Plans.
Radiation levels in CBM Radiation effects iFluka (Fluka C++ interface to CbmRoot) Fluka Geometry Models Results Conclusion.
IFluka : a C++ interface between Fairroot and Fluka Motivations Design The CBM case: –Geometry implementation –Settings for radiation studies –Global diagnosis.
AUTOMATION OF WEB-FORM CREATION - KINNERA ANGADI – MS FINAL DEFENSE GUIDANCE BY – DR. DANIEL ANDRESEN.
Framework for Raw Data Thomas Kuhr Offline Week 29/06/2004.
David N. Brown Lawrence Berkeley National Lab Representing the BaBar Collaboration The BaBar Mini  BaBar  BaBar’s Data Formats  Design of the Mini 
FAIR Simulation & Analysis Framework FairRoot M. Al-Turany, D. Bertini, F. Uhlig GSI-IT.
PHOS offline status report Yuri Kharlov ALICE offline week 7 April 2008.
FAIR Simulation & Analysis Framework FairRoot Mohammad Al-Turany (IT-GSI) Denis Bertini (IT-GSI) Florian Uhlig (IT-GSI)
CBM Software week- M. Al-Turany 1 CBM Simulation & Analysis Framework Simulation Part M. Al-Turany, D. Bertini.
BESIII MC Release notes & planned development Dengzy, Hem, Liuhm, Youzy, Yuany Nov. 23, 2005.
Event Data History David Adams BNL Atlas Software Week December 2001.
SoLID simulation Zhiwen Zhao Uva SoLID Collaboration Meeting 2011/6/2 1.
Root based event display Dmitry Romanov October 19, 2010.
ALICE Simulation Framework Ivana Hrivnacova 1 and Andreas Morsch 2 1 NPI ASCR, Rez, Czech Republic 2 CERN, Geneva, Switzerland For the ALICE Collaboration.
CBM Software Workshop for Future Challenges in Tracking and Trigger Concepts, GSI, 9 June 2010 Volker Friese.
Andreas Morsch, CERN EP/AIP CHEP 2003 Simulation in ALICE Andreas Morsch For the ALICE Offline Project 2003 Conference for Computing in High Energy and.
A Technical Validation Module for the offline Auger-Lecce, 17 September 2009  Design  The SValidStore Module  Example  Scripting  Status.
Experience With CBM Muon Simulation Partha Pratim Bhaduri.
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
Simulations for CBM CBM-India Meeting, Jammu, 12 February 2008 V. Friese
Geant4 in production: status and developments John Apostolakis (CERN) Makoto Asai (SLAC) for the Geant4 collaboration.
The CMS Simulation Software Julia Yarba, Fermilab on behalf of CMS Collaboration 22 m long, 15 m in diameter Over a million geometrical volumes Many complex.
Online Reconstruction 1M.Ellis - CM th October 2008.
CBM Software Meeting 1 CBM Simulation & Analysis Framework Geant3 / Gean4 configuration M. Al-Turany, D. Bertini.
VMC workshop1 Ideas for G4 navigation interface using ROOT geometry A.Gheata ALICE offline week, 30 May 05.
CBM ECAL simulation status Prokudin Mikhail ITEP.
SoLID simulation with GEMC Zhiwen Zhao 2015/03/26.
Towards comparisons between TFluka and TGeant3 ( within CbmRoot Framework) Denis Bertini (IT-GSI) Antonin Maire (IPHC Strasbourg)
ROOT Data bases access1 LCG Data base deployment workshop 11 October Ren é Brun CERN.
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
CBM Simulation Walter F.J. Müller, GSI CBM Simulation Week, May 10-14, 2004 Tasks and Concepts.
ECAL software development Yuri Kharlov IHEP Protvino.
STAR Simulation. Status and plans V. Perevoztchikov Brookhaven National Laboratory,USA.
Go4 Workshop J.Adamczewski-Musch, S.Linev Go4 advanced features.
ROOT Geometry PackageL1 The New ROOT Geometry Package ACAT2002 Moscow 24 June Ren é Brun, Andrei & Mihaela Gheata CERN.
AliRoot Classes for access to Calibration and Alignment objects Magali Gruwé CERN PH/AIP ALICE Offline Meeting February 17 th 2005 To be presented to detector.
The HADES Oracle database and its interfaces for experimentalists Ilse Koenig, GSI Darmstadt for the HADES collaboration.
FAIRROOT SIMULATION Panda Computing Week 2012, Torino.
Status of PSD simulation in Shine Oleg Petukhov Institute for Nuclear Research, Moscow NA61 Analysis/Software/Calibration meeting , Warsaw.
MONTE CARLO TRANSPORT SIMULATION Panda Computing Week 2012, Torino.
4 Dec., 2001 Software Week Data flow in the LArG Reconstruction software chain Updated status for various reconstruction algorithm LAr Converters and miscellaneous.
MAUS Status A. Dobbs CM43 29 th October Contents MAUS Overview Infrastructure Geometry and CDB Detector Updates CKOV EMR KL TOF Tracker Global Tracking.
1 GlueX Software Oct. 21, 2004 D. Lawrence, JLab.
Tracking, Computing & other Stuff. Correlation of detector hits The track segments of inner and outer MDCs are matched on Cluster level The track segments.
HYDRA Framework. Setup of software environment Setup of software environment Using the documentation Using the documentation How to compile a program.
Monthly video-conference, 18/12/2003 P.Hristov1 Preparation for physics data challenge'04 P.Hristov Alice monthly off-line video-conference December 18,
An update on ECAL simulations
Graphical Data Engineering
GEANT4 for Future Linear Colliders
Current Status of the Geometry Database for the CBM Experiment
CMS High Level Trigger Configuration Management
A C++ generic model for the GLAST Geometric Description
FAIR Simulation&Analysis Framework FairRoot
Ideas for G4 navigation interface using ROOT geometry
Use of Geant4 in experiment interactive frameworks AliRoot
Geant4 in HARP V.Ivanchenko For the HARP Collaboration
Mantis a framework and toolkit for Geant4 simulation in CMS
Use of GEANT4 in CMS The OSCAR Project
Working with HADES WebDB HADES analysis workshop, Darmstadt, Germany, 31 January - 1 February 2012 Ilse Koenig, GSI Darmstadt Outline: Version management.
Presentation transcript:

CBM Simulation&Analysis Framework Cbmroot Mohammad Al-Turany Denis Bertini Ilse König

VMC Workshop 2 Overview CbmRoot Features Geometry Interface Runtime Database and Parameter Handling Examples (Simulation and Analysis) Summary

VMC Workshop 3 The FAIR project

VMC Workshop 4 CBM experiment tracking, vertex reconstruction: radiation hard silicon pixel/strip detectors (STS) in a magnetic dipole field electron ID: RICH1 & TRD (& ECAL)   suppression  10 4 hadron ID: TOF (& RICH2) photons,  0,  : ECAL high speed DAQ and trigger beam targetSTS TRDs TOF ECAL RICHs magnet

VMC Workshop 5 Features The same framework can be used for Simulation and Analysis Fully ROOT based: –VMC for simulation –IO scheme (TChain, friend TTrees, TFolders ) for persistency –TTask to organize the analysis data flow Completely configurable via ROOT macros Easy to maintain (only ROOT standard services are used) Reuse of HADES Geometry Interface. –G3 Native geometry –Geometry Modeller (TGeoManager)

VMC Workshop 6 Configuration and building Use of Autoconf/Automake –Configure script generating Makefiles./configure –prefix=$PWD –enable-geant3 –enable-geant4 Generating corresponding config.sh –Possiblity to configure the package with/without geant3/geant4 Automatic checking of correct packages –Gcc, Root, Geant3, Geant4, VMC ect … Automation of additional checks can be done easily.

VMC Workshop 7 ROOT Run Manager Virtual MC Geant3 Geant4 FLUKA Particle Generator ASCII PIPE Target STS TRD Cave TOF Magnet RICH EVGEN Primary Generator Urqmd Magnetic Field Module Detector Geometry Manager IO Manager Tasks Field Map CBM Simulation GeoInterface ECAL RunTime DataBase Pluto Oracle Configuration, Parameters, Geometry Root files Configuration, Parameters, Geometry

VMC Workshop 8 ROOT Run Manager Virtual MC EVGEN Primary Generator Magnetic Field Module Detector Geometry Manager IO Manager Tasks DeltaTracking CBM Analysis digitizers GeoInterface RunTime DataBase Root files Configuration, Parameters, Geometry Oracle Configuration, Parameters, Geometry Root files MCPoints, Hits, Digits, Tracks

VMC Workshop 9 CBM Geometry Interface Use the copy mechanism –reduce the size of ASCII files –Reduce the number of Volumes in Geant –Improve Geant tracking performance Oracle interface –Hades geometry table design reusable Advantage: –more flexibility : different inputs can be used. –closer to technical drawings and analysis coordinate systems

VMC Workshop 10 Material & Geometry Interface Oracle DB ASCII CbmGeoInterface TGeo Geometry/Material TGeoVolume TGeoNode TGeoMaterial RootBuilder G3Builder G3 Geometry/Material XYZ XYZ Geometry/Material Root files

VMC Workshop 11 Runtime Database The runtime database is not a database in the classical sense, but a parameter manager. It knows the I/Os defined by the user in the macro and all parameter containers needed for the actual analysis and/or Simulation. It manages the automatic initialization and saving of the parameter containers After all initialization the complete list of runs and related parameter versions are saved either to Oracle or to ROOT files.

VMC Workshop 12 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 Defined in the macro Created in the init function of the tasks via the container factories or in the macro Filled during initialization

VMC Workshop 13 Parameter handling Reuse of HADES Parameter containers. –Parameters can be stored and retrieved from: Root files Oracle ASCII files –Parameters are connected to a runId –CbmBaseParSet: used to store relevant info from a simulation run. –CbmDetGeoPar geometry parameters Stored for each detectors in CbmDetector::ConstructGeometry()

VMC Workshop 14 Runtime Database: Input/Output The class design for I/O was developed according to the following user requests: –Provide interfaces to Oracle, ROOT files and ASCII files –Each detector has its own classes implementing the concrete I/O –The actually used I/O is selected directly on ROOT interpreter level –The interface to Oracle is a shared library completely separated from all other libraries in the framework to avoid the oracle C* precompiler dependency.

VMC Workshop 15 Storage in Oracle Oracle does not know the parameter containers needed by the analysis. The data are stored not as 'objects' but in different tables related to each other (referential constraints) The tables were designed to minimize the storage of redundant information to guarantee data consistency and to save storage space.

VMC Workshop 16 Version 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.)

VMC Workshop 17 Version management in Oracle Time dependend 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.

VMC Workshop 18 Example: CbmGenericParSet class CbmParGenericSet : public CbmParSet { public: CbmParGenericSet(const char* name,const char* title,const char* context) : CbmParSet(name,title,context) {} virtual ~CbmParGenericSet() {} virtual Bool_t init(CbmParIo*); virtual Int_t write(CbmParIo*); virtual void putParams(CbmParamList*)=0; virtual Bool_t getParams(CbmParamList*)=0; virtual void printParams(); Base class for most parameter containers Advantage: only a few lines of code to be implemented all I/O interfaces exist already Allows to store various types of parameters (handled by CbmParamList): int, float, double, strings,… arrays TObjects (classes, histograms, …) in derived class implemented

VMC Workshop 19 Example: Parameter Class definition class CbmParTest : public CbmParGenericSet { public: Float_t p1; Int_t ai[5000]; TH1F* histo1; CbmParTest(const char* name="CbmParTest", const char* title="Test class for parameter io", const char* context="TestDefaultContext"); ~CbmParTest(void); void clear(void); void putParams(CbmParamList*); Bool_t getParams(CbmParamList*); ClassDef(CbmParTest,1) };

VMC Workshop 20 Example: Parameter Class Implementation CbmParTest::CbmParTest(const char* name,const char* title,const char* context) : CbmParGenericSet(name,title,context) { clear(); histo1=new TH1F("h1","test histogram",100,-3,3); histo1->SetDirectory(0); } void CbmParTest::putParams(CbmParamList* l) { if (!l) return; l->add("p1",p1); l->addBinary("ai",ai,5000); l->addBinary("histo1",histo1); } Bool_t CbmParTest::getParams(CbmParamList* l) { if (!l) return kFALSE; if (!l->fill("p1",&p1)) return kFALSE; if (!l->fillBinary("ai",ai,5000)) return kFALSE; if (!l->fillBinary("histo1",histo1)) return kFALSE; histo1->SetDirectory(0); return kTRUE; }

VMC Workshop 21 Simulation Macro – loading Libs // Load basic libraries gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); // Load Cbmroot libraries gSystem->Load("libGeoBase"); gSystem->Load("libCbm"); gSystem->Load("libPassive"); gSystem->Load("libGen"); gSystem->Load("libSts"); gSystem->Load("libTrd"); gSystem->Load("libTof"); gSystem->Load("libRich");

VMC Workshop 22 Simulation Macro //create the Run Class CbmRunSim *fRun = new CbmRunSim(); // set the MC version used fRun->SetName("TGeant3"); //for G4 use "TGeant4" //Choose the Geant 3 Navigation System fRun->SetGeoModel("G3Native"); // choose an output file name fRun->SetOutputFile("test.root");

VMC Workshop 23 Simulation Macro- Create Modules CbmModule *Cave= new CbmCave("WORLD"); Cave->SetGeometryFileName("PASSIVE/CAVE", "v03a"); fRun->AddModule(Cave); CbmModule *Target= new CbmTarget("Target"); Target->SetGeometryFileName("PASSIVE/TARGET", "v03a"); fRun->AddModule(Target); CbmModule *Pipe= new CbmPIPE("PIPE"); Pipe->SetGeometryFileName("PASSIVE/PIPE", "v03a"); fRun->AddModule(Pipe); CbmModule *Magnet= new CbmMagnet("MAGNET"); Magnet->SetGeometryFileName("PASSIVE/MAGNET", "v03a"); fRun->AddModule(Magnet);

VMC Workshop 24 Simulation Macro- Create Detectors CbmDetector *STS= new CbmSts("STS", kTRUE); STS->SetGeometryFileName("STS/STS", "v03c"); fRun->AddModule(STS); CbmDetector *TOF= new CbmTof("TOF", kTRUE ); TOF->SetGeometryFileName("TOF/TOF", "v03_v10"); fRun->AddModule(TOF); CbmDetector *TRD= new CbmTRD("TRD",kFALSE ); TRD->SetGeometryFileName("TRD/TRD", "v04b_9" ); fRun->AddModule(TRD);

VMC Workshop 25 Simulation Macro-Event Generators CbmPrimaryGenerator *priGen= new CbmPrimaryGenerator(); fRun->SetGenerator(priGen); CbmUrqmdGenerator *fGen1= new CbmUrqmdGenerator("00-03fm.100ev.f14"); CbmPlutoGenerator *fGen2= new CbmPlutoGenerator("jpsi.root"); CbmParticleGenerator *fGen3= new CbmParticleGenerator(); fRun->AddGenerator(fGen1); fRun->AddGenerator(fGen2); fRun->AddGenerator(fGen3);

VMC Workshop 26 Simulation Macro-Magnetic Field // setting a field map CbmField *fMagField= new CbmField("Dipole Field"); fMagField->readAsciifile("FieldIron.map"); // read ASCII file fMagField->readRootfile("FieldIron.root"); // read Root file // setting a constant field CbmConstField *fMagField=new CbmConstField(); fMagField->SetFieldXYZ(0, 30,0 ); // values are in kG // MinX=-75, MinY=-40,MinZ=-12,MaxX=75, MaxY=40,MaxZ=124 ); fMagField->SetFieldRegions(-74, -39,-22, 74, 39, 160 ); // values are in cm fRun->SetField(fMagField);

VMC Workshop 27 Simulation Macro- Run Simulation fRun->Init(); // Initialize the simulation Simulation: 1. Initialize the VMC (Simulation) 2. Initialize Tasks (if they are used in Simulation) fRun->Run(NoOfEvent);//Run the Simulation

VMC Workshop 28 Writing Parameters to Oracle gSystem->Load ( "libOra" ); CbmRuntimeDb* rtdb=fRun->GetRuntimeDb(); CbmParOraIo* ora=new CbmParOraIo; ora->open("cbm_sts_oper"); rtdb->setOutput(ora); CbmParTest* par=(CbmParTest*)(rtdb->getContainer("CbmParTest")); par->setAuthor("M. Al-Turany"); par->setDescription("Analysis interface test"); par->write(ora);

VMC Workshop 29 Accessing Parameters from Root file CbmRunSim * fRun = new CbmRunSim; CbmRuntimeDb* rtdb=fRun->GetRuntimeDb(); CbmParRootFileIo* input=new CbmParRootFileIo(); input->open("test.root"); rtdb->setFirstInput(input); CbmParTest* par=(CbmParTest*) (rtdb->getContainer("CbmParTest")); rtdb->initContainers(fRunId);

VMC Workshop 30 CBM Detector Geometry

VMC Workshop 31 Example: Rich Detector Xhit[cm] Yhit[cm]

VMC Workshop 32 Analysis Macro { gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gSystem->Load("libCbm"); gSystem->Load("libITrack"); CbmRunAna *fRun= new CbmRunAna(); fRun->SetInputFile(“/d/STS_AuAu25Gev_Urqmd.root"); fRun->SetOutputFile(“trackOutput.root");

VMC Workshop 33 Analysis Macro: Parameters // Init Simulation Parameters from Root File CbmRuntimeDb* rtdb=fRun->GetRuntimeDb(); CbmParRootFileIo* input=new CbmParRootFileIo(); input->open("parfiles/testparams.root"); // Init Digitization Parameters from Ascii File CbmParAsciiFileIo* input2 = new CbmParAsciiFileIo(); input2->open("sts_digi.par"); rtdb->setFirstInput(input); rtdb->setSecondInput(input2);

VMC Workshop 34 Reading Parameters: Oracle gSystem->Load ( "libOra" ); CbmRunAna * fRun = new CbmRunAna(); CbmRuntimeDb* rtdb=fRun->GetRuntimeDb(); CbmParOraIo* ora=new CbmParOraIo(); ora->open(); rtdb->setFirstInput(ora); CbmGenericParOraIo* genio= (CbmGenericParOraIo*)(ora->getDetParIo("CbmGenericParIo")); CbmParTest* par=(CbmParTest*)(rtdb->getContainer("CbmParTest")); genio->readFromLoadingTable(par,RunId); par->print(); par->printParams();

VMC Workshop 35 Initialisation scheme (Analysis) RunId1 RunId2 File=1 File=2 Sim. Data CbmTaskParameters RunId1 RunId2 Par. Cont. Par. Cont CbmTask::SetContainers() CbmTask::init() CbmTask::Exec() CbmTask::Reinit() CbmParIo Data

VMC Workshop 36 Track Visualization In the Simulation macro add: fRun->SetStoreTraj(kTRUE); fRun->Init(); // Set cuts for storing the trajectories CbmTrajFilter* trajFilter = CbmTrajFilter::Instance(); trajFilter->SetStepSizeCut(1); // 1 cm trajFilter->SetEnergyCut(0., 1.04); // 0 < Etot < 1.04 GeV trajFilter->SetStorePrimaries(kFALSE);

VMC Workshop 37 Example: Visualization macro { gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gSystem->Load("libCbm"); TFile* file = new TFile("test.root"); TGeoManager *geoMan = (TGeoManager*) file->Get("CBMGeom"); TCanvas* c1 = new TCanvas("c1", "", 100, 100, 800, 800); c1->SetFillColor(10); geoMan->DrawTracks("same/Nneutron"); geoMan->SetVisLevel(3); geoMan->GetMasterVolume()->Draw("same"); }

VMC Workshop 38 Track Visualization

VMC Workshop 39 Track Visualization

VMC Workshop Rich MDC 1,2 Coils Tof Shower MDC 3 MDC 4 Goal: Study of in-medium modifications (  properties –Produced in A+A, p+A,  +A collisions –Di-electrons are used as probes: V  e + e - Hexagonal symmetry around the beam axis Geometrical acceptance of 40% Invariant mass resolution of 1% Operates at reaction rates up to 10 6 /s  Tbyte/year ~ readout channels

VMC Workshop 41 Hades Simulation using Cbmroot, why? Need to simulate heavy system at High energy –Need external stack for Geant3: internal stack capacity reached –Check data with geant4 Easy to use CBM framework services The Only efforts: –Definition of Detector MC point container –Field map reader –Conversion from Lab. MC point definition to points defined in the local ref. Frame of the sensitive volume –Modification of some particles physical characteristics: Use of TVirtualMC::Gspart()

VMC Workshop 42 Hades Simulation

VMC Workshop 43

VMC Workshop 44 Summary A VMC based framework for CBM has been implemented –First released in March 2004 –Work on digitizers and full tracking is going on. Oct 04 release was used to produce data for the CBM technical report –Packages ( ROOT 4.01/02, GEANT3) June 05 release ( initialization scheme added ) –Packages ( ROOT 5.02, GEANT3 )

VMC Workshop 45 Availability Tested on –Red Hat 9.0 (gcc and icc 8.1) –Suse 9.0 (gcc 3.3.1) –Debian (gcc 3.2.3) –Fedora Core 2(gcc 3.3.3) –Fedora Core 4 (gcc 4.0 ) –AMD Opteron ( 64 bit architecture) Binaries are also available for these platforms

VMC Workshop 46 Other Applications Hades spectrometer has been fully integrated –Gives us the opportunity to tune Geant4 (cuts/physics list …) and compare with real Data ! –Realistic test of the framework. Gesellschaft für Forschungs- und Entwicklungsservice mbH –Gamma detector development for cancer therapy project at the GSI

VMC Workshop 47 Ongoing work Complete the Hades simulation implementation using Cbmroot. Design and development of a Geometry builder for Simulation: –First proto type already available –Based on TGeo Classes –Undo/Redo Manager Implemented (Mahmood Al-Turani and Wojciech Zietek )