Presentation is loading. Please wait.

Presentation is loading. Please wait.

CBM Simulation & Analysis Framework Cbmroot

Similar presentations

Presentation on theme: "CBM Simulation & Analysis Framework Cbmroot"— Presentation transcript:

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

2 CBM Framework: Features
The same framework can be used for Simulation and Analysis Fully ROOT based: VMC for simulation Geometry Modeller (TGeoManager) : Overlaps checking, visualization and/or navigation system of G3 IO scheme (TChain, friend TTrees, TFolders ) for persistency TTask to organize analysis data flow Completely configurable via ROOT macros Easy to maintain (only ROOT standard services are used) Reuse of HADES Geometry Interface. Reuse of HADES Parameter containers. Event merging before and/or after transport CBM Collaboration Meeting

3 CBM Collaboration Meeting
CBM Simulation (Old) ROOT Geant3 Geometry Manager Virtual MC Geant4 Root files MCPoints, Configuration Magnet FLUKA Target IO Manager GeoInterface Run Manager PIPE Primary Generator Cave Module STS Magnetic Field Detector Tasks Urqmd EVGEN TRD Pluto TOF Particle Generator RICH Delta Tracking Field Map ASCII ECAL digitizers CBM Collaboration Meeting

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

5 CBM Collaboration Meeting
CBM Analysis (Old) ROOT ROOT FILES Input: MC Points, Configuration Output: Hits, Digits, Tracks Geometry Manager Virtual MC IO Manager GeoInterface Run Manager Primary Generator Module Magnetic Field Detector Tasks EVGEN Delta Tracking digitizers CBM Collaboration Meeting

6 Configuration, Parameters,
CBM Analysis Root files MCPoints, Hits, Digits, Tracks IO Manager GeoInterface Run Manager Oracle Configuration, Parameters, Geometry RunTime DataBase Module Primary Generator Magnetic Field Detector Tasks EVGEN Root files Configuration, Parameters, Geometry Delta digitizers Tracking CBM Collaboration Meeting

7 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 CBM Collaboration Meeting

8 Material & Geometry Interface
Oracle DB TGeo Geometry/Material TGeoVolume TGeoNode TGeoMaterial CbmGeoInterface ASCII G3 Geometry/Material G3Builder RootBuilder CBM Collaboration Meeting

9 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"); CBM Collaboration Meeting

10 CBM Collaboration Meeting
Simulation Macro //create the Simulation Run Class CbmRunSim *fRun = new CbmRunSim(); // set the MC version used fRun->SetName("TGeant3"); //for G4 use "TGeant4" fRun->SetGeoModel("G3Native"); //use G3 native geometry // chose an output file name fRun->SetOutputFile("test.root"); CBM Collaboration Meeting

11 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); CBM Collaboration Meeting

12 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); CBM Collaboration Meeting

13 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); CBM Collaboration Meeting

14 Simulation Macro-Magnetic Field
// setting a field map CbmFieldMap *fMagField= new CbmFieldMap(""); // 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); CBM Collaboration Meeting

15 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 CBM Collaboration Meeting

16 Saving Parameters: ROOT Files
//Fill the Parameter containers for this run */ CbmRuntimeDb *rtdb=fRun->GetRuntimeDb(); rtdb->addRun(1); //add run with run Id CbmParRootFileIo* output=new CbmParRootFileIo(); output->open("SimPar.root","RECREATE"); rtdb->setOutput(output); CbmBaseParSet* par=(CbmBaseParSet*)(rtdb->getContainer("CbmBaseParSet")); par->SetField(fMagField); par->SetGen(primGen); par->setChanged(); par->setInputVersion(1,1); rtdb->saveOutput(); CBM Collaboration Meeting

17 Saving Parameters: 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); CBM Collaboration Meeting

18 CBM Collaboration Meeting
Analysis Macro { gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); gSystem->Load("libCbm"); gSystem->Load("libTrack"); CbmRunAna *fRun= new CbmRunAna(); fRun->SetInputFile(“/d/STS_AuAu25Gev_Urqmd.root"); fRun->SetOutputFile(“trackOutput.root"); CBM Collaboration Meeting

19 Analysis Macro: Reading Parameters
CbmTrack *tr= new CbmTrack("Tracking Algorithm"); fRun->AddTask(tr); CbmRuntimeDb* rtdb=fRun->GetRuntimeDb(); CbmParRootFileIo* input=new CbmParRootFileIo(); input->open("test.root"); rtdb->setFirstInput(input); CbmBaseParSet* par = (CbmBaseParSet*)(rtdb->getContainer ("CbmBaseParSet") ); rtdb->initContainers(1); // runId = 1 par->print(); fRun->Init(); fRun->Run(); CBM Collaboration Meeting

20 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,1); // runId =1 par->print(); par->printParams(); CBM Collaboration Meeting

21 CBM Collaboration Meeting
Chaining root files Chaining mechanism supported in the Analysis: { // … CbmRunAna *fRun = new CbmRunAna(); fRun->SetInputFile(“myfile1.root”); fRun->AddFile(“myfile2.root”); fRun->AddFile(“myfile3.root”); // loop over all entries fRun->Run(); } CBM Collaboration Meeting

22 CBM Collaboration Meeting
Summary The G3 Native geometry builder is implemented, the validation of the modified G3 is being performed. (TGeo as a navigation system for G3) Inconsistency in the Cerenkov effect has been found and a report has been send to the VMC group. Hades spectrometer has been fully integrated Gives us the opportunity to tune Geant4 (cuts/physics list …) and compare with real Data ! Validate TGeo and G3 with data Realistic test of the framework. HADES Parameter containers are implemented and ready to use The Hades Oracle interface is integrated within the framework CBM Collaboration Meeting

Download ppt "CBM Simulation & Analysis Framework Cbmroot"

Similar presentations

Ads by Google