// Macro for running Panda simulation with Geant3 or Geant4 (M. Al-Turany) // This macro is supposed to run the full simulation of the panda detector // to run the macro: // root sim_complete.C or in root session root>.x sim_complete.C // to run with different options:(e.g more events, different momentum, Geant4) // root sim_complete.C"(100, "TGeant4",2)" void sim_complete(Int_t nEvents = 10, TString SimEngine ="TGeant4", Double_t BeamMomentum = 6.231552) { //-----User Settings:------------------------------------------------------ TString parAsciiFile = "all.par"; // TString inputGenerator = // EvtGen -> "xxxxxxxx.dec" // DPM -> "dpm_xxxxx" // FTF -> "ftf_xxxxx" TString inputGenerator = "dpm_qa"; gRandom->SetSeed(1234); //------------------------------------------------------------------------- // ----- Create the Simulation run manager ------------------------------ PndMasterRunSim *fRun = new PndMasterRunSim(); fRun->SetInput(inputGenerator); fRun->SetName(SimEngine); fRun->SetParamAsciiFile(parAsciiFile); fRun->SetNumberOfEvents(nEvents); fRun->SetBeamMom(BeamMomentum); // ----- Initialization ------------------------------------------------ fRun->Setup(); // ----- Geometry ----------------------------------------------------- fRun->CreateGeometry(); // ----- Event generator ---------------------------------------------- fRun->SetGenerator(); // ----- Add tasks ---------------------------------------------------- fRun->AddSimTasks(); // ----- Intialise and run -------------------------------------------- fRun->Init(); fRun->Run(nEvents); fRun->Finish(); //exit(0); };