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