Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "CBM Simulation & Analysis Framework Cbmroot Mohammad Al-Turany Denis Bertini Ilse König."— Presentation transcript:

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

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

3 CBM Collaboration Meeting 3 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 Simulation (Old) digitizers GeoInterface ECAL Root files MCPoints, Configuration

4 CBM Collaboration Meeting 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 Field Map CBM Simulation GeoInterface ECAL RunTime DataBase Root files Configuration, Parameters, Geometry Oracle Configuration, Parameters, Geometry Root files MCPoints

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

6 CBM Collaboration Meeting 6 Run Manager EVGEN Primary Generator Magnetic Field Module Detector 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

7 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

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

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

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

11 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);

12 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);

13 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);

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

15 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

16 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();

17 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);

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

19 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();

20 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();

21 CBM Collaboration Meeting 21 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(); }

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


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

Similar presentations


Ads by Google