CBM Simulation&Analysis Framework Cbmroot Mohammad Al-Turany & Denis Bertini.

Slides:



Advertisements
Similar presentations
CBM Calorimeter System CBM collaboration meeting, October 2008 I.Korolko(ITEP, Moscow)
Advertisements

H.G.Essel: Go4 - J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel, S.Linev CHEP 2004 Go4 v2.8 Analysis Design.
CBM Simulation & Analysis Framework Cbmroot
Status of software development for MPD Oleg Rogachevsky for MPD collaboration Round Table discussion III 5 November 2008 Dubna.
Andreas Morsch CERN/ALICE 3rd LHC Computing WorkshopMarseille, September 30, 1999 Base Classes for Simulation The ALICE Simulation Strategy Andreas Morsch.
O. Stézowski IPN Lyon AGATA Week September 2003 Legnaro Data Analysis – Team #3 ROOT as a framework for AGATA.
Ties Behnke, Vasiliy Morgunov 1SLAC simulation workshop, May 2003 Pflow in SNARK: the next steps Ties Behnke, SLAC and DESY; Vassilly Morgunov, DESY and.
25/03/2003Simulation Application for the LHCb Experiment CHEP March 2003 Presented by: W. Pokorski / CERN Authors: I. Belyaev, Ph. Charpentier,
CMS Full Simulation for Run-2 M. Hildrith, V. Ivanchenko, D. Lange CHEP'15 1.
D 0  K -,  + reconstruction with CBM STS detector I.Vassiliev (GSI) CBM collaboration meeting 06-Oct-04 Simulation tools (cbmroot) & geometry Signal.
CBM Software Meeting 1 CBM Simulation & Analysis Framework M. Al-Turany, D. Bertini.
THE SIMULATION- AND ANALYSIS-FRAMEWORK FAIRROOT CHEP 2012, New York.
IFluka : a C++ interface between Fairroot and Fluka Motivations Design The CBM case: –Geometry implementation –Settings for radiation studies –Global diagnosis.
CBM Collaboration Meeting 1 Simulation Status V. Friese.
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.
Framework for Raw Data Thomas Kuhr Offline Week 29/06/2004.
FAIR Simulation & Analysis Framework FairRoot M. Al-Turany, D. Bertini, F. Uhlig GSI-IT.
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.
SoLID simulation Zhiwen Zhao Uva SoLID Collaboration Meeting 2011/6/2 1.
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.
The ALICE Simulation Strategy Andreas Morsch For the ALICE Offline Group Joint STAR/ALICE Offline Meeting Brookhaven National Laboratory, Upton, NY April.
Experience With CBM Muon Simulation Partha Pratim Bhaduri.
FLUKA dose and fluence simulations for CBM experiment I.Kadenko, O.Bezshyyko, V.Pluyko, V.Shevchenko National Taras Shevchenko University of Kiev.
The Virtual MonteCarlo D.Adamova 2, V.Berejnoi 1, R.Brun 1, F.Carminati 1, A.Fassó 1, E.Futo 1, I.Gonzalez 3, I.Hrivnacova 4, A.Morsch 1 1 CERN, Geneva;
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.
CBM Simulation&Analysis Framework Cbmroot Mohammad Al-Turany Denis Bertini Ilse König.
H.G.Essel: Go4 - J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel, S.Linev CHEP 2003 GSI Online Offline Object Oriented Go4.
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.
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.
H.G.Essel: Go4 - J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel, S.Linev ROOT 2002 GSI Online Offline Object Oriented Go4.
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.
CBM Simulation Walter F.J. Müller, GSI CBM Simulation Week, May 10-14, 2004 Tasks and Concepts.
Statistical feature extraction, calibration and numerical debugging Marian Ivanov.
Claudio Grandi INFN-Bologna CHEP 2000Abstract B 029 Object Oriented simulation of the Level 1 Trigger system of a CMS muon chamber Claudio Grandi INFN-Bologna.
Features needed in the “final” AliRoot release P.Hristov 26/10/2006.
ECAL software development Yuri Kharlov IHEP Protvino.
20/12/2011Christina Anna Dritsa1 The model: Input Charge generation The charge of the cluster is taken by random sampling of the experimental distribution.
1 Software tools in Asia Akiya Miyamoto KEK 18-March-2005 Simulation and Reconstruction Session LCWS2005 Representing acfa-sim-j activity M.C.Chang 1,K.Fujii.
Page 1 of 18 Bjorn S. Nilsen, ALICE November 16 ITS Software meeting ITS Alignment Status Plus other things By Bjørn S. Nilsen The Ohio State University.
Development of the parallel TPC tracking Marian Ivanov CERN.
STAR Simulation. Status and plans V. Perevoztchikov Brookhaven National Laboratory,USA.
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.
Object-Oriented Track Reconstruction in the PHENIX Detector at RHIC Outline The PHENIX Detector Tracking in PHENIX Overview Algorithms Object-Oriented.
1 SLAC simulation workshop, May 2003 Ties Behnke Mokka and LCDG4 Ties Behnke, DESY and SLAC MOKKA: european (france) developed GEANT4 based simulation.
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,
Go4 v2.2 Status & Overview CHEP 2003
GEANT4 for Future Linear Colliders
Current Status of the Geometry Database for the CBM Experiment
EicRoot: a brief overview
FAIR Simulation&Analysis Framework FairRoot
Ideas for G4 navigation interface using ROOT geometry
FEDRA operation with EmuRec
SoLID simulation with GEMC
Use of Geant4 in experiment interactive frameworks AliRoot
Presentation transcript:

CBM Simulation&Analysis Framework Cbmroot Mohammad Al-Turany & Denis Bertini

M. Al-Turany, DVEE Palaver 2 CBM Framework: Features The same framework can be used for Simulation and Analysis Fully ROOT based: –VMC for simulation –Geometry Modeller (TGeoManager) for geometry definition –IO scheme (TChain, friend TTrees, TFolders ) for persistency –TTask to organize analysis data flow Improved ROOT IO: Combined Chaining & Friend mechanism Completely configurable via ROOT macros Reuse of HADES Geometry Interface. Reuse of HADES Parameter containers. Easy to maintain (only ROOT standard services are used) Event merging before and/or after transport

M. Al-Turany, DVEE Palaver 3 CBMROOT is based on The Virtual Monte Carlo (VMC) User Code VMC Virtual Geometrical Modeller G3 G3 transport G4 transport G4 FLUKA transport FLUKA Geometrical Modeller Reconstruction Visualisation

M. Al-Turany, DVEE Palaver 4 ROOT Run Manager Virtual MC Geant3 Geant4 FLUKA Pluto Particle Generator ASCII PIPE Target STS TRD Cave TOF Magnet RICH EVGEN Primary Generator Urqmd Magnetic Field Module Detector Geometry Manager IO Manager Tasks DeltaTracking Field Map CBM Analysis and Simulation Framework digitizers GeoInterface ECAL

M. Al-Turany, DVEE Palaver 5 ROOT Run Manager Virtual MC EVGEN Primary Generator Magnetic Field Module Detector Geometry Manager IO Manager Tasks DeltaTracking CBM Analysis and Simulation Framework digitizers GeoInterface ROOT FILES Input: MC Points, Configuration Output: Hits, Digits, Tracks

M. Al-Turany, DVEE Palaver 6 HYDRA Geometry Interface, why ? 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

M. Al-Turany, DVEE Palaver 7 Advantage: more flexibility : different inputs can be used. closer to technical drawings and analysis coordinate systems Disadvantage more points than really needed for the basic shapes HYDRA Geometry Interface, why ?

M. Al-Turany, DVEE Palaver 8 Material & Geometry Interface Geometry/Material CBM Geometry TGeoManager input Builder Interface Oracle DB ASCII CbmGeoInterface CbmGeoRootBuilder CBM Geometry/Material TGeoVolume TGeoNode TGeoMaterial ROOT

M. Al-Turany, DVEE Palaver 9 Full Simulation-Analysis Chain Event Generator Transport Digitizer Hit Finder Reconstruction Physics Analysis Simulation Analysis 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

M. Al-Turany, DVEE Palaver 10 Event merging before transport Event Generator 1 Transport Digitizer Hit Finder Reconstruction Physics Analysis Event Generator 2 Merger Pluto UrQMD

M. Al-Turany, DVEE Palaver 11 Event Generator 1 Transport Digitizer Hit Finder Reconstruction Physics Analysis Event Generator 2 Transport Merger Pluto UrQMD Storage at SIM level is more efficient when digitizers are fast compared to transport Event merging after transport

M. Al-Turany, DVEE Palaver 12 Tasks and interfaces Digitizer Hit Finder Reconstruction Merger MC POINT SIM RAW MC POINT DIGIT HIT TRACK Storage Levels Data Objects Tasks Input of a task is from storage or other task

M. Al-Turany, DVEE Palaver 13 Adding a detector or a Module ? Material definitions Geometry definitions Create a detector (or Module) subclass Create the library

M. Al-Turany, DVEE Palaver 14 Simulation Macro Load the Libraries Create the Run Manager Choose Simulation engine Choose an output file name Create Modules and detectors and add them to the Run Manager Create and Set the Event generator(s) Create and set the Magnetic field Initialize and run the simulation

M. Al-Turany, DVEE Palaver 15 Simulation Macro – loading Libs // Load basic libraries gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); // Load Cbmroot libraries gSystem->Load("libCbm"); gSystem->Load("libPassive"); gSystem->Load("libGen"); gSystem->Load("libSts"); gSystem->Load("libTrd"); gSystem->Load("libTof"); gSystem->Load("libRich");

M. Al-Turany, DVEE Palaver 16 Simulation Macro //create the Run Class CBMRun *fRun = new CBMRun(); // set the MC version used fRun->SetName("TGeant4"); //for G3 use "TGeant3" // chose an output file name fRun->SetOutputFile("test.root");

M. Al-Turany, DVEE Palaver 17 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);

M. Al-Turany, DVEE Palaver 18 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);

M. Al-Turany, DVEE Palaver 19 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);

M. Al-Turany, DVEE Palaver 20 Simulation Macro-Magnetic Field // setting a field map CbmFieldMap *fMagField= new CbmFieldMap("FIELD.v03b.map"); // 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);

M. Al-Turany, DVEE Palaver 21 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

M. Al-Turany, DVEE Palaver 22 CBM Detector Geometry

M. Al-Turany, DVEE Palaver 23 Example: Rich Detector

M. Al-Turany, DVEE Palaver 24 CbmTask Tasks can be organized into a hierarchy and displayed in the browser. The CbmTask class is the base class from which the tasks are derived. To give task functionality, you need to subclass the CbmTask class and override: –Init();//Initialization –Exec(Option_t * option);

M. Al-Turany, DVEE Palaver 25 Tasks 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 Task4Task5 Task3 Task6

M. Al-Turany, DVEE Palaver 26 CbmTasks

M. Al-Turany, DVEE Palaver 27 Analysis : creating a Task class CbmITrack : public CbmTask { public: CbmDITrack(const char *name, const char *title="CBM Task"); virtual void Init();//Initialization virtual void Exec(Option_t * option);//called for each event virtual void Finish();//called for each event virtual ~CbmITrack(); ClassDef(CbmITrack,1) //CbmITrack }

M. Al-Turany, DVEE Palaver 28 Analysis Task- Init example void CbmITrack::Init() { // Get a pointer to the ROOT Manager ( data store ) CbmRootManager *fManager =CbmRootManager::Instance(); // Get the relevant data for the Task // activate in IO the corresponding TTree branch fListSTSpts=(TClonesArray *)fManager->ActivateBranch("STSPoint"); //Create a new branch in the output file for the results fHitCollection = new TClonesArray("CBMSTSDoubleHit"); fManager->Register("STSDoubleHit","STS", fHitCollection); }

M. Al-Turany, DVEE Palaver 29 Analysis Task- Exec example void CBMITrack::Exec(Option_t * option) { CBMSTSDoublePoint *pt=NULL; CBMSTSDoubleHit *hit=NULL; for (int j=0; j GetEntries(); j++ ) { pt = (CBMSTSDoublePoint*) fListSTSpts->At(j); if (pt && ( pt->GetDetectorID(0) == pt->GetDetectorID(1)) ) { hit =AddHit(); hit->SetDetectorID( pt->GetDetectorID(1)); } else continue; hit->SetPos_in( pt->GetPos_in() ); hit->SetPos_out( pt->GetPos_out() ); TVector3 xy(gRandom->Gaus(0,fDx), gRandom->Gaus(0,fDy),0.0); hit->SetDPos_in( xy ); hit->SetDPos_out( xy ); }

M. Al-Turany, DVEE Palaver 30 Analysis Macro { gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gSystem->Load("libCbm"); gSystem->Load("libITrack"); CBMRun *fRun= new CBMRun(); fRun->SetInputFile(“/d/STS_AuAu25Gev_Urqmd.root"); fRun->SetOutputFile(“trackOutput.root"); CBMITrack *tr= new CBMITrack("Tracking Algorithm"); fRun->AddTask(tr); fRun->Init(); fRun->Run(); }

M. Al-Turany, DVEE Palaver 31 Chaining root files Chaining mechanism supported in the Analysis: { // … CbmRun *fRun = new CbmRun(); fRun->SetInputFile(“myfile1.root”); fRun->AddFile(“myfile2.root”); fRun->AddFile(“myfile3.root”); // loop over all entries fRun->Run(); }

M. Al-Turany, DVEE Palaver 32 Combined Chain & Friend (ROOT) ROOT IO problem: { // … TChain ch(“cbmsim”); ch.Add(“rich_hit1.root”); ch.Add(“rich_hit2.root”); TFile f1(“Rguidance1.root”); TFile f2(“Rguidance2.root”); ch.AddFriend(“cbmsim”, &f1); ch.AddFriend(“cbmsim”, &f2); // … Does NOT Work !!

M. Al-Turany, DVEE Palaver 33 Combined Chain& Friend (CbmRoot) Make use of our CbmRootManager (IO): – When the TChain switch to new file: Clear the global list of friends Add the correct next friend to the list Update the corresponding pointers (TTree, Friend Tree..) Problem is solved : { //… CbmRun *fRun = new CbmRun(); fRun->SetInputFile(“rich_hit1.root”); fRun->AddFriend(“Rguidance1.root”); fRun->AddFile(“rich_hit2.root”); fRun->AddFriend(“Rguidance2.root”); //… fRun->Init(); fRun->Run(); … }

M. Al-Turany, DVEE Palaver 34 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);

M. Al-Turany, DVEE Palaver 35 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"); }

M. Al-Turany, DVEE Palaver 36 Track Visualization

M. Al-Turany, DVEE Palaver 37 Track Visualization

M. Al-Turany, DVEE Palaver 38 Code Convention CodeWizard is being used as automatic rule checker Will be integrated with “cvs commit”

M. Al-Turany, DVEE Palaver 39 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()

M. Al-Turany, DVEE Palaver 40 ROOT Run Manager Virtual MC Geant3 Geant4 FLUKA Pluto Particle Generator ASCII PIPE Target MDC TOF/TOFINO Cave SHOWER Magnet RICH EVGEN Primary Generator Urqmd Magnetic Field Module Detector Geometry Manager IO Manager Tasks Field Map Hades Simulation GeoInterface

M. Al-Turany, DVEE Palaver 41 Hades Simulation

M. Al-Turany, DVEE Palaver 42 Summary A VMC based framework for CBM has been implemented –First released in March 2004 –Work on digitizers and full tracking is going on. OCT04 release of Cbmroot was used to produce data for the progress report – Packages ( ROOT 4.01/02, GEANT3/GEANT4.6.2 ) 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) Binaries are also available for these platforms

M. Al-Turany, DVEE Palaver 43 Summary Hades spectrometer has been fully integrated –Gives us the opportunity to tune Geant4 (cuts/physics list …) to real Data ! –Realistic test of the framework. FLUKA simulation will be also possible with no efforts ! CBM Convention rules will be forced via CodeWizard very soon HADES Parameter containers are implemented and ready to use The Hades Oracle interface is already available and will be integrated within the next months