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