FairRoot/PandaRoot
Geane.C
Go to the documentation of this file.
1 
2 // Configuration macro for Geane VirtualMC
3 
4 void Config()
5 {
6  TGeoMedium *m=gGeoManager->GetMedium("air");
7  if(m != NULL) m->SetParam(6, 0.005); // epsil
8  TGeoMedium *m2=gGeoManager->GetMedium("FscScint");
9  if(m2 != NULL) m2->SetParam(6, 0.005); // epsil
10  TGeoMedium *m3=gGeoManager->GetMedium("lead");
11  if(m3 != NULL) m3->SetParam(6, 0.005); // epsil
12 
13  TGeant3TGeo* gMC3= new TGeant3TGeo("C++ Interface to Geant3");
14  cout << "-I- G3Config: Geant3 with TGeo has been created for Geane."
15  << endl;
16  // create Cbm Specific Stack
17  PndStack *st = new PndStack(10);
18  gMC3->SetStack( st ) ;
19 
20  // only from geant3 rev. 252 on --------
21  // NOPRNT = 1 means no IERR printout
22  // NOPRNT = 0 means IERR are printed
23  if(gROOT->GetVersionCode() >= 334848)
24  {
25  Ertrio1_t *fErtrio1 = gMC3->fErtrio1;
26  fErtrio1->noprnt = 1;
27  cout << "-I- Geane.C: NOPRNT flag set to " << fErtrio1->noprnt << endl;
28  if(fErtrio1->noprnt == 1) {
29  cout << "-I- Geane.C: IERR flags are not printed. If you want to switch them on, please set fErtrio1->noprnt = 0 in Geane.C" << endl;
30  }
31  }
32  // -------------------------------------
33 
34  // ******* GEANEconfiguration for simulated Runs *******
35  gMC3->SetDEBU(0, 0, 1);
36  gMC3->SetSWIT(4, 10);
37 
38  gMC3->SetDCAY(0);
39  gMC3->SetPAIR(0);
40  gMC3->SetCOMP(0);
41  gMC3->SetPHOT(0);
42  gMC3->SetPFIS(0);
43  gMC3->SetDRAY(0);
44  gMC3->SetANNI(0);
45  gMC3->SetBREM(1);
46  gMC3->SetMUNU(0);
47  gMC3->SetCKOV(0);
48  gMC3->SetHADR(0); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)//4 fluka 5 gcalor
49  gMC3->SetLOSS(4);
50  gMC3->SetMULS(1); //1=Moliere,3=Gaussian
51  gMC3->SetRAYL(0);
52  gMC3->SetSTRA(0);
53 
54  gMC3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
55  gMC3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
56  gMC3->SetOPTI(0); //Select optimisation level for GEANT geometry searches (0,1,2)
57  gMC3->SetERAN(5.e-7);
58 
59 
60  // -------->>>>> PAY ATTENTION!!!!!
61  // For a correct use of GEANE, you MUST use the cuts as set below!!!
62  // i.e. Since GEANE is tracking only the primary particle, DCUTE, DCUTM, BCUTE and BCUTM must be put
63  // at very high values (10 TeV) in order to calculate properly the energy loss.
64  // For a more complete explanation of the chosen values, refer to GEANT manual
65 
66  Float_t cut = 1.e-3; // 1 MeV cut by default
67  Float_t cutd = 1.e4 ; // 10 TeV - Threshold for delta-rays
68  Float_t cutb = cutd; // 10 TeV - Cut for bremsstrahlung
69  Float_t tofmax = 1.e10; // seconds
70  Float_t usrcuts[5] = {0.,0.,0.,0.,0.}; // usercuts
71  Float_t gcalpha = 0.999; // Optimal value for alpha
72 
73 
74  cout<<"Energy straggling area parameter from user set to: "<<gcalpha<<endl;
75  if(gcalpha<0.9)
76  {
77  gcalpha=0.9;
78  cout<<"User alpha parameter too low: forced to 0.9"<<endl;
79  }
80 
81  // set cuts here
82  // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
83  gMC3->SetCUTS(cut, // CUTGAM = gammas
84  cut, // CUTELE = electrons
85  cut, // CUTNEU = neutral hadrons
86  cut, // CUTHAD = charged hadrons
87  cut, // CUTMUO = muons
88  cutb, // BCUTE = electron bremsstrahlung
89  cutb, // BCUTM = muon bremsstrahlung
90  cutd, // DCUTE = delta rays by electrons
91  cutd, // DCUTM = delta rays by muons
92  cutb, // PPCUTM = pair production by muons
93  tofmax, // TOFMAX = time of flight cut
94  usrcuts);
95 
96  gMC3->SetECut(gcalpha);
97 
98 }
99 
__m128 m
Definition: P4_F32vec4.h:28
TGeoManager * gGeoManager
double cut[MAX]
Definition: autocutx.C:36
TString m2(TString pts, TString exts="e px py pz")
Definition: invexp.C:117
void Config()
Definition: Geane.C:4