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