Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
geant3tasks.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_legacy
3/// This script is a representation using TTasks of the Geant3 simulation program
4/// This example uses directly TTask objects.
5/// A real implementation would require one class per task derived from TTask.
6///
7/// \macro_code
8///
9/// \author Rene Brun
10
11void geant3tasks()
12{
13 TTask *geant3 = new TTask("geant3","Geant3 simulation main program");
14 gROOT->GetListOfTasks()->Add(geant3);
15 TTask *uginit = new TTask("uginit","Initialisation manager");
16 TTask *grun = new TTask("grun","Run manager");
17 TTask *uglast = new TTask("uglast","Termination manager");
18 geant3->Add(uginit);
19 geant3->Add(grun);
20 geant3->Add(uglast);
21 TTask *ginit = new TTask("ginit","Geant3 initialisation");
22 TTask *ugeom = new TTask("ugeom","Geometry initialisation manager");
23 TTask *gphysi = new TTask("gphysi","Initialise cross-sections and energy loss tables");
24 TTask *ggclos = new TTask("ggclos","Geometry analyzer and optimizer");
25 uginit->Add(ginit);
26 uginit->Add(ugeom);
27 uginit->Add(gphysi);
28 uginit->Add(ggclos);
29 TTask *gtrigi = new TTask("gtrigi","Event initialisation");
30 TTask *gtrig = new TTask("gtrig","Event manager");
31 TTask *gtrigc = new TTask("gtrigc","Event cleaner");
32 grun->Add(gtrigi);
33 grun->Add(gtrig);
34 grun->Add(gtrigc);
35 TTask *glast = new TTask("glast","Geant3 termination");
36 TTask *igend = new TTask("igend","Graphics package termination");
37 uglast->Add(glast);
38 uglast->Add(igend);
39 TTask *gukine = new TTask("gukine","Event generator manager");
40 TTask *gutrev = new TTask("gutrev","Event application manager");
41 TTask *gudigi = new TTask("gudigi","Event digitisation manager");
42 TTask *guout = new TTask("guout","Event termination manager");
43 gtrig->Add(gukine);
44 gtrig->Add(gutrev);
45 gtrig->Add(gudigi);
46 gtrig->Add(guout);
47 TTask *gtreve = new TTask("gtreve","Geant3 event manager");
48 gutrev->Add(gtreve);
49 TTask *gltrac = new TTask("gltrac","Initialize tracking parameters");
50 TTask *gftrac = new TTask("gftrac","select next track segment from stack JTRACK");
51 TTask *gutrak = new TTask("gutrak","Application track manager");
52 gtreve->Add(gltrac);
53 gtreve->Add(gftrac);
54 gtreve->Add(gutrak);
55 TTask *gtrack = new TTask("gtrack","Geant3 track manager");
56 gutrak->Add(gtrack);
57 TTask *gtgama = new TTask("gtgama","photon propagator");
58 TTask *gtelec = new TTask("gtelec","electron propagator");
59 TTask *gtneut = new TTask("gtneut","neutron propagator");
60 TTask *gthadr = new TTask("gthadr","hadron propagator");
61 TTask *gtmuon = new TTask("gtmuon","muon propagator");
62 TTask *gtnino = new TTask("gtnino","geantino propagator");
63 TTask *gtckov = new TTask("gtckov","Cherenkov light propagator");
64 TTask *gthion = new TTask("gthion","heavy ion propagator");
65 TTask *gustep = new TTask("gustep","Application step manager");
66 TTask *gtmedi = new TTask("gtmedi","Geometry volume finder");
67 gtrack->Add(gtgama);
68 gtrack->Add(gtelec);
69 gtrack->Add(gtneut);
70 gtrack->Add(gthadr);
71 gtrack->Add(gtmuon);
72 gtrack->Add(gtnino);
73 gtrack->Add(gtckov);
74 gtrack->Add(gthion);
75 gtrack->Add(gustep);
76 gtrack->Add(gtmedi);
77 TTask *gtnext = new TTask("gtnext","Geometry bounary manager");
78 TTask *gpairg = new TTask("gpairg","Generate pair production");
79 TTask *gcomp = new TTask("gcomp","Generate Compton scattering");
80 TTask *gphot = new TTask("gphot","Generate photo effect");
81 TTask *grayl = new TTask("grayl","Generate Rayleigh effect");
82 TTask *gpfis = new TTask("gpfis","Generate photo fission");
83 gtgama->Add(gtnext);
84 gtgama->Add(gpairg);
85 gtgama->Add(gcomp);
86 gtgama->Add(gphot);
87 gtgama->Add(grayl);
88 gtgama->Add(gpfis);
89 TTask *guswim = new TTask("guswim","magnetic field propagator");
90 TTask *ggckov = new TTask("ggckov","Generate Cherenkov photons");
91 TTask *gsync = new TTask("gsync","Generate synchrotron radiation");
92 TTask *gmults = new TTask("gmults","Apply multiple scattering");
93 TTask *gbreme = new TTask("gbreme","Generate Bremsstrahlung");
94 TTask *gdray = new TTask("gdray","Generate delta ray");
95 TTask *ganni = new TTask("ganni","Generate Positron annihilation");
96 TTask *gannir = new TTask("gannir","Stopped tracks and annihilation at rest");
97 gtelec->Add(gtnext);
98 gtelec->Add(guswim);
99 gtelec->Add(ggckov);
100 gtelec->Add(gsync);
101 gtelec->Add(gmults);
102 gtelec->Add(gbreme);
103 gtelec->Add(gdray);
104 gtelec->Add(ganni);
105 gtelec->Add(gannir);
106 TTask *guphad = new TTask("guphad","Hadronic cross-section manager");
107 TTask *guhadr = new TTask("guhadr","Hadronic cascade manager");
108 TTask *gdecay = new TTask("gdecay","Particle decay");
109 gtneut->Add(gtnext);
110 gtneut->Add(guphad);
111 gtneut->Add(guhadr);
112 gtneut->Add(gdecay);
113
114 gthadr->Add(gtnext);
115 gthadr->Add(guphad);
116 gthadr->Add(guswim);
117 gthadr->Add(ggckov);
118 gthadr->Add(gmults);
119 gthadr->Add(guhadr);
120 gthadr->Add(gdecay);
121 gthadr->Add(gdray);
122 TTask *gbremm = new TTask("gbremm","Generate Bremsstrahlung");
123 TTask *gpairm = new TTask("gpairm","Generate Pair production");
124 TTask *gmunu = new TTask("gmunu","Generate Nuclear interaction");
125 gtmuon->Add(gtnext);
126 gtmuon->Add(guswim);
127 gtmuon->Add(ggckov);
128 gtmuon->Add(gmults);
129 gtmuon->Add(gbremm);
130 gtmuon->Add(gpairm);
131 gtmuon->Add(gdecay);
132 gtmuon->Add(gdray);
133 gtmuon->Add(gmunu);
134 gtmuon->Add(gdecay);
135
136 gtnino->Add(gtnext);
137 TTask *glisur = new TTask("glisur","Photon is reflected");
138 gtckov->Add(gtnext);
139 gtckov->Add(glisur);
140
141 gthion->Add(gtnext);
142 gthion->Add(guswim);
143 gthion->Add(gmults);
144 gthion->Add(guhadr);
145 gthion->Add(gdray);
146
147 new TBrowser;
148 gDebug = 2;
149}
Int_t gDebug
Definition TROOT.cxx:590
#define gROOT
Definition TROOT.h:406
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
TTask is a base class that can be used to build a complex tree of Tasks.
Definition TTask.h:35
virtual void Add(TTask *task)
Add TTask to this.
Definition TTask.cxx:172
static int ginit
Definition rsalib.cxx:256