Geane.C 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // Configuration macro for Geane VirtualMC
  2. void Config()
  3. {
  4. gMC3= new TGeant3TGeo("C++ Interface to Geant3");
  5. cout << "-I- G3Config: Geant3 with TGeo has been created for Geane."
  6. << endl;
  7. // create Fair Specific Stack
  8. MpdStack *st = new MpdStack(10);
  9. gMC3->SetStack( st ) ;
  10. // ******* GEANEconfiguration for simulated Runs *******
  11. gMC3->SetDEBU(0, 0, 1);
  12. gMC3->SetSWIT(4, 10);
  13. gMC3->SetDCAY(0);
  14. gMC3->SetPAIR(0);
  15. gMC3->SetCOMP(0);
  16. gMC3->SetPHOT(0);
  17. gMC3->SetPFIS(0);
  18. gMC3->SetDRAY(0);
  19. gMC3->SetANNI(0);
  20. gMC3->SetBREM(1);
  21. gMC3->SetMUNU(0);
  22. gMC3->SetCKOV(0);
  23. gMC3->SetHADR(0); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)//4 fluka 5 gcalor
  24. gMC3->SetLOSS(4);
  25. gMC3->SetMULS(1); //1=Moliere,3=Gaussian
  26. gMC3->SetRAYL(0);
  27. gMC3->SetSTRA(0);
  28. gMC3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
  29. gMC3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
  30. gMC3->SetOPTI(0); //Select optimisation level for GEANT geometry searches (0,1,2)
  31. gMC3->SetERAN(5.e-7);
  32. // -------->>>>> PAY ATTENTION!!!!!
  33. // For a correct use of GEANE, you MUST use the cuts as set below!!!
  34. // i.e. Since GEANE is tracking only the primary particle, DCUTE, DCUTM, BCUTE and BCUTM must be put
  35. // at very high values (10 TeV) in order to calculate properly the energy loss.
  36. // For a more complete explanation of the chosen values, refer to GEANT manual
  37. Float_t cut = 1.e-3; // 1MeV cut by default
  38. Float_t cuth = 1.e-4; // 0.1MeV cut by default
  39. Float_t cutd = 1.e4 ; // Threshold for delta electrons
  40. Float_t tofmax = 1.e10; // seconds
  41. Float_t usrcuts[5]={0.,0.,0.,0.,0.}; // usercuts
  42. Float_t gcalpha=0.996;
  43. cout<<"Energy straggling area parameter from user set to: "<<gcalpha<<endl;
  44. if(gcalpha<0.9)
  45. {
  46. gcalpha=0.9;
  47. cout<<"User alpha parameter too low: forced to 0.9"<<endl;
  48. }
  49. // set cuts here
  50. // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
  51. gMC3->SetCUTS(cut, // CUTGAM = gammas
  52. cut, // CUTELE = electrons
  53. cuth, // CUTNEU = neutral hadrons
  54. cuth, // CUTHAD = charged hadrons
  55. cuth, // CUTMUO = muons
  56. cut, // BCUTE = electron bremsstrahlung
  57. cut, // BCUTM = muon bremsstrahlung
  58. cutd, // DCUTE = delta rays by electrons
  59. cut, // DCUTM = delta rays by muons
  60. cut, // PPCUTM = pair production by muons
  61. tofmax, // TOFMAX = time of flight cut
  62. usrcuts);
  63. gMC3->SetECut(gcalpha);
  64. }