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