g3Config_new.C 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // $Id: g3Config.C,v 1.1.1.1 2005/06/23 07:14:09 dbertini Exp $
  2. //
  3. // Configuration macro for Geant3 VirtualMC
  4. void Config()
  5. {
  6. FairRunSim *fRun = FairRunSim::Instance();
  7. TString* gModel = fRun->GetGeoModel();
  8. TGeant3* geant3 = NULL;
  9. if ( strncmp(gModel->Data(),"TGeo",4) == 0 ) {
  10. geant3
  11. = new TGeant3TGeo("C++ Interface to Geant3");
  12. cout << "-I- G3Config: Geant3 with TGeo has been created."
  13. << endl;
  14. }else{
  15. geant3
  16. = new TGeant3("C++ Interface to Geant3");
  17. cout << "-I- G3Config: Geant3 native has been created."
  18. << endl;
  19. }
  20. // create Fair Specific Stack
  21. MpdStack *st = new MpdStack();
  22. st->SetMinPoints(0);
  23. geant3->SetStack( st ) ;
  24. // ******* GEANT3 configuration for simulated Runs *******
  25. geant3->SetTRIG(1); //Number of events to be processed
  26. geant3->SetSWIT(4, 100);
  27. geant3->SetDEBU(0, 0, 1);
  28. geant3->SetDCAY(1);
  29. geant3->SetPAIR(1);
  30. geant3->SetCOMP(1);
  31. geant3->SetPHOT(1);
  32. geant3->SetPFIS(0); //
  33. geant3->SetDRAY(1);
  34. geant3->SetANNI(1);
  35. geant3->SetBREM(1);
  36. geant3->SetMUNU(1);
  37. geant3->SetCKOV(1);
  38. geant3->SetHADR(3); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) //5==GCALOR
  39. geant3->SetLOSS(1);
  40. geant3->SetMULS(1);
  41. geant3->SetRAYL(1);
  42. geant3->SetSTRA(1);
  43. geant3->SetAUTO(0); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
  44. geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
  45. geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
  46. geant3->SetERAN(5.e-7);
  47. Float_t cut = 1. e-3; // 1MeV cut by default
  48. Float_t tofmax = 1.e10;
  49. // Float_t cut2 = 1.e-10; // 1 keV?
  50. Float_t cut2 = cut;
  51. Float_t cut3 =50.e-6 ; // Threshold for delta electrons
  52. Float_t cut5[5] ={0,0,0,0,0};
  53. // set cuts here
  54. // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
  55. // geant3->SetCUTS(cut2, cut2, cut2, cut2, cut, cut2, cut2, cut3, cut2, cut2,
  56. // tofmax);
  57. geant3->SetCUTS(cut2, cut2, cut2, cut2, cut, cut2, cut2, cut2, cut2, cut2,
  58. tofmax,cut5);
  59. }