1 / 29

MPD Simulation&Analysis Framework

MPD Simulation&Analysis Framework. Mohammad Al-Turany, Ilse K ő nig, Denis Bertini, Florian Uhlig, Oleg Rogachevsky. VHMP-2007 Dubna. Motivations The Virtual Monte Carlo concept CbmRoot Features Geometry Interface Runtime Database and Parameter Handling

rusty
Download Presentation

MPD Simulation&Analysis Framework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MPD Simulation&Analysis Framework Mohammad Al-Turany, Ilse Kőnig, Denis Bertini, Florian Uhlig, Oleg Rogachevsky VHMP-2007 Dubna

  2. Motivations The Virtual Monte Carlo concept CbmRoot Features Geometry Interface Runtime Database and Parameter Handling Examples (Simulation and Analysis) Summary Overview NICA@VHMP

  3. Which simulation engine to choose? Need to move to modern and maintained MC: GEANT4 Need for Working fast ! ( LOI, TDR deadlines … ) Making reliable simulation Usually: better knowledge of “old” MC’s: GEANT3, FLUKA … A cross-check of simulation results between different MC is needed Better understanding of GEANT4 ( intrinsic cuts / physics list …) Preparing for full simulation Use of VMC (Virtual Monte Carlo ) : an interface between MCs With the same code, the user can switch between different MCs Motivations NICA@VHMP

  4. G3 G3 transport User Code VMC G4 G4 transport FLUKA transport FLUKA Reconstruction Geometrical Modeller Visualisation Virtual Monte Carlo (VMC) NICA@VHMP

  5. 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) Geometry / navigation system models G3/G4 Native geometrical models Geometry Modeller (TGeoManager) ( G3/FLUKA + G4?) CbmRoot Features NICA@VHMP

  6. Geant3 ROOT Geometry Manager Virtual MC Geant4 Magnet FLUKA Target IO Manager GeoInterface Run Manager PIPE RunTime DataBase Cave Module Primary Generator Magnetic Field STS Root files Configuration, Parameters, Geometry Detector TRD EVGEN Tasks TOF Oracle Configuration, Parameters, Geometry Particle Generator RICH Pluto Field Map ECAL ASCII Urqmd CbmRoot: Simulation NICA@VHMP

  7. Oracle Configuration, Parameters, Geometry MpdRoot: Simulation Geant3 ROOT Geometry Manager Virtual MC Geant4 Magnet FLUKA PIPE IO Manager GeoInterface Run Manager Cave RunTime DataBase Module Primary Generator Magnetic Field TPC Root files Configuration, Parameters, Geometry Detector IT Tasks EVGEN TOF Particle Generator ZDC Field Map Pluto ECAL Urqmd ASCII NICA@VHMP

  8. Root files MCPoints, Hits, Digits, Tracks ROOT Geometry Manager IO Manager GeoInterface Run Manager RunTime DataBase Module Primary Generator Magnetic Field Root files Configuration, Parameters, Geometry Detector Tasks EVGEN Oracle Configuration, Parameters, Geometry digitizers Delta Tracking CbmRoot: Analysis NICA@VHMP

  9. Creation of a volume Volume name Shape Shape parameters Medium Positioning of the volume in a mother (Node) Mother Transformation (position and rotation matrix) ASCII: Input format for the Geometry TUBE NICA@VHMP

  10. Advantage: more flexibility : different inputs can be used. Material & Geometry Interface TGeo Geometry/Material TGeoVolume TGeoNode TGeoMaterial Oracle DB CbmGeoInterface ASCII G3 Geometry/Material G3Builder RootBuilder XYZ Geometry/Material Root files XYZBuilder NICA@VHMP

  11. The Runtime Database is the manager class for all Parameter containers: Creation, Initialization, Output Runtime Database Created in the init() function of the tasks via the container factories or in the macro Container Factories 2 Inputs 1 Output List of Parameter Containers List of Runs read() write() Filled during initialization ASCII File ROOT File Oracle IO defined in the macro CBM Runtime Database NICA@VHMP

  12. Dynamic Tree creation at initialisation time Simulation: CbmDetector::Init() Analysis: CbmTask::Init() ( automatic partial IO ) Chaining Input data TChain services Connection of Data levels Use of Root Friend mechanism Combined Chaining & Friend Mechanism IO Features NICA@VHMP

  13. Simulation Macro – loading Libs // Load basic libraries gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); // Load CBMROOT libraries gSystem->Load("libGeoBase"); gSystem->Load("libParBase"); gSystem->Load("libCbm"); gSystem->Load("libPassive"); gSystem->Load("libGen"); gSystem->Load("libSts"); gSystem->Load("libTrd"); gSystem->Load("libTof"); gSystem->Load("libRich"); Base Libs Cbm Spec. Libs NICA@VHMP

  14. //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"); // "TGeo" flag in case of TGeoManager // choose an output file name fRun->SetOutputFile("test.root"); Simulation Macro NICA@VHMP

  15. 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); Simulation Macro- Create Modules NICA@VHMP

  16. 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); Simulation Macro- Create Detectors NICA@VHMP

  17. 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); Simulation Macro-Event Generators NICA@VHMP

  18. // 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); Simulation Macro-Magnetic Field NICA@VHMP

  19. 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 Simulation Macro- Run Simulation NICA@VHMP

  20. CBM Detector Geometry NICA@VHMP

  21. MPD Detector Geometry NICA@VHMP

  22. { 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"); Analysis Macro NICA@VHMP

  23. Tasks can be organized into a hierarchy and displayed in the browser. The CBMTask base class (TTask): Init(); //Initialization Exec(Option_t * option); In Analysis macro: { // Algorithm definition CbmStsTrackFinder *tr = CbmStsTrackFinder("track finder"); // Add the algorithm in the list of algorithms fRun->AddTask(tr); } Algorithms : CBMTask NICA@VHMP

  24. 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) NICA@VHMP

  25. CbmTask Parameters Data CbmParIo RunId1 RunId1 CbmTask::SetContainers() CbmTask::init() Par. Cont. Sim. Data CbmTask::Exec() CbmParIo CbmTask::Reinit() RunId2 RunId2 Par. Cont Sim. Data CbmTask::Exec() Initialisation scheme (Analysis) File=1 File=2 NICA@VHMP

  26. Track Visualization NICA@VHMP

  27. FAIRROOT was tested for CBM, PANDA, HADES and NUSTAR experiments New branch of FAIRROOT – MpdRoot framework for MPD detector is implemented now First released will be in October 2007 Work on detector geometry and tracking is going on. Summary NICA@VHMP

  28. { 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"); } Example: Visualization macro NICA@VHMP

  29. CBM Silicon Tracker Station NICA@VHMP

More Related