/** Macro for running fast simulation it will only fill the * MCStack without any transport(M. Al-Turany) */ { TStopwatch timer; timer.Start(); gDebug=0; // Load basic libraries gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); basiclibs(); // Load this example libraries gSystem->Load("libGeoBase"); gSystem->Load("libParBase"); gSystem->Load("libBase"); gSystem->Load("libMCStack"); gSystem->Load("libGen"); //gSystem->Load("libPassive"); //gSystem->Load("libPGen"); // gSystem->Load("libFastSim"); gSystem->Load("libfsim"); CbmRunSim *fRun = new CbmRunSim(); fRun->SetOutputFile("fastsim.root"); // Create and Set Event Generator //------------------------------- CbmPrimaryGenerator* primGen = new CbmPrimaryGenerator(); fRun->SetGenerator(primGen); CbmEvtGenGenerator* evtGen = new CbmEvtGenGenerator("output.evt"); primGen->AddGenerator(evtGen); primGen->DoTracking(kFALSE); CbmFastSim* fastSim = new CbmFastSim(); fastSim->SetVerbosity(0); fastSim->AddDetector("EmcBarrel"); fastSim->AddDetector("EmcFwCap"); fastSim->AddDetector("EmcBwCap"); fastSim->AddDetector("EmcFS"); fastSim->AddDetector("Stt"); fastSim->AddDetector("MdcTS"); fastSim->AddDetector("MdcFS"); fastSim->AddDetector("DrcBarrel"); fastSim->AddDetector("DrcDisc"); fastSim->AddDetector("Rich"); fastSim->AddDetector("Tof"); fRun->AddTask(fastSim); /*CbmRootManager* ioman = CbmRootManager::Instance(); // Get MCTrack array fMCTracks = (TClonesArray*) ioman->GetObject("MCTrack"); if (fMCTracks) { cout <GetEntriesFast()<Print(); } */ fRun->Init(); Int_t nEvents = 500; fRun->Run(nEvents); timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); printf("RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime); }