VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
E03
E03c
src
Ex03cMCApplication.cxx
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Virtual Monte Carlo examples
3
// Copyright (C) 2014 - 2018 Ivana Hrivnacova
4
// All rights reserved.
5
//
6
// For the licensing terms see geant4_vmc/LICENSE.
7
// Contact: root-vmc@cern.ch
8
//-------------------------------------------------
9
10
/// \file Ex03cMCApplication.cxx
11
/// \brief Implementation of the Ex03cMCApplication class
12
///
13
/// Geant4 ExampleN03 adapted to Virtual Monte Carlo
14
///
15
/// \date 21/08/2019
16
/// \author Benedikt Volkel, CERN
17
18
#include "
Ex03cMCApplication.h
"
19
#include "Ex03PrimaryGenerator.h"
20
#include "
Ex03cMCStack.h
"
21
22
#include <TMCRootManager.h>
23
24
#include <TMCManager.h>
25
26
#include <Riostream.h>
27
#include <TGeoManager.h>
28
#include <TGeoUniformMagField.h>
29
#include <TInterpreter.h>
30
#include <TPDGCode.h>
31
#include <TParticle.h>
32
#include <TROOT.h>
33
#include <TRandom.h>
34
#include <TTimer.h>
35
#include <TVector3.h>
36
#include <TVirtualGeoTrack.h>
37
#include <TVirtualMC.h>
38
39
#include <TLorentzVector.h>
40
41
using namespace
std;
42
43
/// \cond CLASSIMP
44
ClassImp(
Ex03cMCApplication
)
45
/// \endcond
46
47
//_____________________________________________________________________________
48
Ex03cMCApplication
::
Ex03cMCApplication
(
49
const
char
* name, const
char
* title, Bool_t isMulti, Bool_t splitSimulation)
50
:
TVirtualMCApplication
(name, title),
51
fRootManager
(0),
52
fPrintModulo
(1),
53
fEventNo
(0),
54
fVerbose
(0),
55
fStack
(0),
56
fDetConstruction
(0),
57
fCalorimeterSD
(0),
58
fPrimaryGenerator
(0),
59
fMagField
(0),
60
fOldGeometry
(kFALSE),
61
fIsControls
(kFALSE),
62
fIsMaster
(kTRUE),
63
fIsMultiRun
(isMulti),
64
fSplitSimulation
(splitSimulation),
65
fG3Id
(-1),
66
fG4Id
(-1),
67
fDebug
(0)
68
{
69
/// Standard constructor
70
/// \param name The MC application name
71
/// \param title The MC application description
72
73
if
(splitSimulation && !isMulti) {
74
Fatal(
"Ex03cMCApplication"
,
75
"Cannot split simulation between engines without \"isMulti\" being "
76
"switched on"
);
77
}
78
79
cout <<
"--------------------------------------------------------------"
80
<< endl;
81
cout <<
" VMC Example E03c: new version with multiple engines"
<< endl;
82
cout <<
"--------------------------------------------------------------"
83
<< endl;
84
85
// Create a user stack
86
fStack
=
new
Ex03cMCStack
(1000);
87
88
// Create detector construction
89
fDetConstruction
=
new
Ex03cDetectorConstruction
();
90
91
// Create a calorimeter SD
92
fCalorimeterSD
=
new
Ex03cCalorimeterSD
(
"Calorimeter"
,
fDetConstruction
);
93
94
// Create a primary generator
95
fPrimaryGenerator
=
new
Ex03PrimaryGenerator
(
fStack
);
96
97
// Constant magnetic field (in kiloGauss)
98
fMagField
=
new
TGeoUniformMagField();
99
100
if
(isMulti) {
101
RequestMCManager();
102
fMCManager->SetUserStack(
fStack
);
103
}
104
}
105
106
//_____________________________________________________________________________
107
Ex03cMCApplication::Ex03cMCApplication
(
const
Ex03cMCApplication
& origin)
108
:
TVirtualMCApplication
(origin.GetName(), origin.GetTitle()),
109
fRootManager
(0),
110
fPrintModulo
(origin.
fPrintModulo
),
111
fEventNo
(0),
112
fVerbose
(origin.
fVerbose
),
113
fStack
(0),
114
fDetConstruction
(origin.
fDetConstruction
),
115
fCalorimeterSD
(0),
116
fPrimaryGenerator
(0),
117
fMagField
(0),
118
fOldGeometry
(origin.
fOldGeometry
),
119
fIsControls
(origin.
fIsControls
),
120
fIsMaster
(kFALSE),
121
fIsMultiRun
(origin.
fIsMultiRun
),
122
fSplitSimulation
(origin.
fSplitSimulation
),
123
fG3Id
(origin.
fG3Id
),
124
fG4Id
(origin.
fG4Id
),
125
fDebug
(origin.
fDebug
)
126
{
127
/// Copy constructor for cloning application on workers (in multithreading
128
/// mode) \param origin The source MC application
129
130
// Create new user stack
131
fStack
=
new
Ex03cMCStack
(1000);
132
133
// Create a calorimeter SD
134
fCalorimeterSD
=
135
new
Ex03cCalorimeterSD
(*(origin.
fCalorimeterSD
),
fDetConstruction
);
136
137
// Create a primary generator
138
fPrimaryGenerator
=
139
new
Ex03PrimaryGenerator
(*(origin.
fPrimaryGenerator
),
fStack
);
140
141
// Constant magnetic field (in kiloGauss)
142
fMagField
=
new
TGeoUniformMagField(origin.
fMagField
->GetFieldValue()[0],
143
origin.
fMagField
->GetFieldValue()[1], origin.
fMagField
->GetFieldValue()[2]);
144
}
145
146
//_____________________________________________________________________________
147
Ex03cMCApplication::Ex03cMCApplication
()
148
:
TVirtualMCApplication
(),
149
fRootManager
(0),
150
fPrintModulo
(1),
151
fEventNo
(0),
152
fStack
(0),
153
fDetConstruction
(0),
154
fCalorimeterSD
(0),
155
fPrimaryGenerator
(0),
156
fMagField
(0),
157
fOldGeometry
(kFALSE),
158
fIsControls
(kFALSE),
159
fIsMaster
(kTRUE),
160
fIsMultiRun
(kFALSE),
161
fSplitSimulation
(kFALSE),
162
fG3Id
(-1),
163
fG4Id
(-1),
164
fDebug
(0)
165
{
166
/// Default constructor
167
}
168
169
//_____________________________________________________________________________
170
Ex03cMCApplication::~Ex03cMCApplication
()
171
{
172
/// Destructor
173
174
// cout << "Ex03cMCApplication::~Ex03cMCApplication " << this << endl;
175
176
delete
fRootManager
;
177
delete
fStack
;
178
if
(
fIsMaster
)
delete
fDetConstruction
;
179
delete
fCalorimeterSD
;
180
delete
fPrimaryGenerator
;
181
delete
fMagField
;
182
if
(!
fIsMultiRun
) {
183
delete
fMC;
184
}
185
186
// cout << "Done Ex03cMCApplication::~Ex03cMCApplication " << this << endl;
187
}
188
189
//
190
// private methods
191
//
192
193
//_____________________________________________________________________________
194
void
Ex03cMCApplication::RegisterStack
()
const
195
{
196
/// Register stack in the Root manager.
197
198
if
(
fRootManager
) {
199
// cout << "Ex03cMCApplication::RegisterStack: " << endl;
200
fRootManager
->Register(
"stack"
,
"Ex03cMCStack"
, &
fStack
);
201
}
202
}
203
204
//
205
// public methods
206
//
207
208
//_____________________________________________________________________________
209
void
Ex03cMCApplication::InitMC
(
const
char
* setup)
210
{
211
/// Initialize MC.
212
/// The selection (and creation) of the concrete MC is done in the macro.
213
/// If no macro is provided, the MC must be created before calling this
214
/// function. \param setup The name of the configuration macro.
215
216
fVerbose
.InitMC();
217
218
if
(TString(setup) !=
""
) {
219
gROOT->LoadMacro(setup);
220
gInterpreter->ProcessLine(
"Config()"
);
221
if
(!fMC) {
222
Fatal(
223
"InitMC"
,
"Processing Config() has failed. (No MC is instantiated.)"
);
224
}
225
}
226
227
// MT support available from root v 5.34/18
228
#if ROOT_VERSION_CODE >= 336402
229
// Create Root manager
230
if
(!fMC->IsMT()) {
231
fRootManager
=
new
TMCRootManager(GetName(), TMCRootManager::kWrite);
232
// fRootManager->SetDebug(true);
233
}
234
#else
235
// Create Root manager
236
fRootManager
=
new
TMCRootManager(GetName(), TMCRootManager::kWrite);
237
// fRootManager->SetDebug(true);
238
#endif
239
240
fMC->SetStack(
fStack
);
241
fMC->SetRootGeometry();
242
fMC->SetMagField(
fMagField
);
243
fMC->Init();
244
fMC->BuildPhysics();
245
246
RegisterStack
();
247
248
if
(
fDebug
> 0) {
249
Info(
"InitMC"
,
"Single run initialised"
);
250
}
251
}
252
253
//_____________________________________________________________________________
254
void
Ex03cMCApplication::InitMC
(std::initializer_list<const char*> setupMacros)
255
{
256
/// Initialize MC.
257
/// New function for initialization with multiple engines.
258
/// \param setupMacros The names of the configuration macros.
259
260
fVerbose
.InitMC();
261
262
if
(!
fIsMultiRun
) {
263
Fatal(
"InitMC"
,
264
"Initialisation of multiple engines not supported in single run"
);
265
}
266
267
if
(setupMacros.size() > 0) {
268
for
(
const
char
* setup : setupMacros) {
269
gROOT->LoadMacro(setup);
270
gInterpreter->ProcessLine(
"Config()"
);
271
if
(!fMC) {
272
Fatal(
273
"InitMC"
,
"Processing Config() has failed. (No MC is instantiated.)"
);
274
}
275
// gInterpreter->UnloadAllSharedLibraryMaps();
276
gInterpreter->UnloadFile(setup);
277
}
278
}
279
280
InitMC
();
281
}
282
283
//_____________________________________________________________________________
284
void
Ex03cMCApplication::InitMC
()
285
{
286
/// Initialize MC.
287
/// New function for initialization with multiple engines.
288
/// The MCs must be created before calling this function.
289
290
if
(!
fIsMultiRun
) {
291
Fatal(
"InitMC"
,
292
"Initialisation of multiple engines not supported in single run"
);
293
}
294
295
// MT support available from root v 5.34/18
296
#if ROOT_VERSION_CODE >= 336402
297
// Create Root manager
298
if
(!fMC->IsMT()) {
299
fRootManager
=
new
TMCRootManager(GetName(), TMCRootManager::kWrite);
300
// fRootManager->SetDebug(true);
301
}
302
#else
303
// Create Root manager
304
fRootManager
=
new
TMCRootManager(GetName(), TMCRootManager::kWrite);
305
// fRootManager->SetDebug(true);
306
#endif
307
308
fMCManager->Init([
this
](TVirtualMC* mc) {
309
mc->SetRootGeometry();
310
mc->SetMagField(this->
fMagField
);
311
mc->Init();
312
mc->BuildPhysics();
313
});
314
RegisterStack
();
315
316
fG3Id
= fMCManager->GetEngineId(
"TGeant3TGeo"
);
317
fG4Id
= fMCManager->GetEngineId(
"TGeant4"
);
318
if
(
fDebug
> 0) {
319
Info(
"InitMC"
,
"Multi run initialised"
);
320
std::cout <<
"Engine IDs\n"
321
<<
"TGeant3TGeo: "
<<
fG3Id
<<
"\n"
322
<<
"TGeant4: "
<<
fG4Id
<< std::endl;
323
}
324
}
325
326
//_____________________________________________________________________________
327
void
Ex03cMCApplication::RunMC
(Int_t nofEvents)
328
{
329
/// Run MC.
330
/// \param nofEvents Number of events to be processed
331
332
fVerbose
.RunMC(nofEvents);
333
334
// Prepare a timer
335
TTimer timer;
336
337
if
(!
fIsMultiRun
) {
338
if
(
fDebug
> 0) {
339
Info(
"RunMC"
,
"Start single run"
);
340
std::cout <<
"Simulation entirely done with engine "
<< fMC->GetName()
341
<< std::endl;
342
timer.Start();
343
}
344
fMC->ProcessRun(nofEvents);
345
}
346
else
{
347
if
(
fDebug
> 0) {
348
Info(
"RunMC"
,
"Start multi run"
);
349
if
(
fSplitSimulation
) {
350
std::cout <<
"GAPX simulated with engine "
351
<< fMCManager->GetEngine(0)->GetName() <<
"\n"
352
<<
"ABSO simulated with engine "
353
<< fMCManager->GetEngine(1)->GetName() << std::endl;
354
}
355
else
{
356
std::cout <<
"Simulation entirely done with engine "
357
<< fMCManager->GetCurrentEngine()->GetName() << std::endl;
358
}
359
timer.Start();
360
}
361
fMCManager->Run(nofEvents);
362
}
363
if
(
fDebug
> 0) {
364
timer.Stop();
365
Info(
"RunMC"
,
"Transport finished."
);
366
timer.Print();
367
}
368
FinishRun
();
369
}
370
371
//_____________________________________________________________________________
372
void
Ex03cMCApplication::FinishRun
()
373
{
374
/// Finish MC run.
375
376
fVerbose
.FinishRun();
377
// cout << "Ex03cMCApplication::FinishRun: " << endl;
378
if
(
fRootManager
) {
379
fRootManager
->WriteAll();
380
fRootManager
->Close();
381
}
382
}
383
384
//_____________________________________________________________________________
385
TVirtualMCApplication
*
Ex03cMCApplication::CloneForWorker
()
const
386
{
387
return
new
Ex03cMCApplication
(*
this
);
388
}
389
390
//_____________________________________________________________________________
391
void
Ex03cMCApplication::InitOnWorker
()
392
{
393
// cout << "Ex03cMCApplication::InitForWorker " << this << endl;
394
395
// Create Root manager
396
Int_t threadRank = 1;
397
// The real thread rank will be set in MCRootManager
398
fRootManager
=
new
TMCRootManager(GetName(), TMCRootManager::kWrite, threadRank);
399
// fRootManager->SetDebug(true);
400
401
// Set data to MC
402
fMC->SetStack(
fStack
);
403
fMC->SetMagField(
fMagField
);
404
405
RegisterStack
();
406
}
407
408
//_____________________________________________________________________________
409
void
Ex03cMCApplication::FinishRunOnWorker
()
410
{
411
// cout << "Ex03cMCApplication::FinishWorkerRun: " << endl;
412
if
(
fRootManager
) {
413
fRootManager
->WriteAll();
414
fRootManager
->Close();
415
}
416
}
417
418
//_____________________________________________________________________________
419
void
Ex03cMCApplication::ReadEvent
(Int_t i)
420
{
421
/// Read \em i -th event and prints hits.
422
/// \param i The number of event to be read
423
424
if
( !
fRootManager
) {
425
fRootManager
=
new
TMCRootManager(GetName(), TMCRootManager::kRead);
426
}
427
428
fCalorimeterSD
->Register();
429
RegisterStack
();
430
fRootManager
->ReadEvent(i);
431
}
432
433
//_____________________________________________________________________________
434
void
Ex03cMCApplication::ConstructGeometry
()
435
{
436
/// Construct geometry using detector contruction class.
437
/// The detector contruction class is using TGeo functions or
438
/// TVirtualMC functions (if oldGeometry is selected)
439
440
fVerbose
.ConstructGeometry();
441
442
if
(
fOldGeometry
) {
443
Fatal(
"ConstructGeometry"
,
"Cannot run with old geomtry"
);
444
}
445
fDetConstruction
->ConstructMaterials();
446
fDetConstruction
->ConstructGeometry();
447
// TGeoManager::Import("geometry.root");
448
// fMC->SetRootGeometry();
449
}
450
451
//_____________________________________________________________________________
452
void
Ex03cMCApplication::InitGeometry
()
453
{
454
/// Initialize geometry
455
456
fVerbose
.InitGeometry();
457
458
fDetConstruction
->SetCuts();
459
460
if
(
fIsControls
)
fDetConstruction
->SetControls();
461
462
fCalorimeterSD
->Initialize();
463
}
464
465
//_____________________________________________________________________________
466
void
Ex03cMCApplication::AddParticles
()
467
{
468
/// Example of user defined particle with user defined decay mode
469
470
fVerbose
.AddParticles();
471
472
// Define the 2 body phase space decay for He5
473
Int_t mode[6][3];
474
Float_t bratio[6];
475
476
for
(Int_t kz = 0; kz < 6; kz++) {
477
bratio[kz] = 0.;
478
mode[kz][0] = 0;
479
mode[kz][1] = 0;
480
mode[kz][2] = 0;
481
}
482
bratio[0] = 100.;
483
mode[0][0] = kNeutron;
// neutron (2112)
484
mode[0][1] = 1000020040;
// alpha
485
486
// Overwrite a decay mode already defined in MCs
487
// Kaon Short: 310 normally decays in two modes
488
// pi+, pi- 68.61 %
489
// pi0, pi0 31.39 %
490
// and we force only the mode pi0, pi0
491
492
Int_t mode2[6][3];
493
Float_t bratio2[6];
494
495
for
(Int_t kz = 0; kz < 6; kz++) {
496
bratio2[kz] = 0.;
497
mode2[kz][0] = 0;
498
mode2[kz][1] = 0;
499
mode2[kz][2] = 0;
500
}
501
bratio2[0] = 100.;
502
mode2[0][0] = kPi0;
// pi0 (111)
503
mode2[0][1] = kPi0;
// pi0 (111)
504
505
// Define particle
506
fMC->DefineParticle(1000020050,
"He5"
, kPTHadron, 5.03427, 2.0, 0.002,
"Ion"
,
507
0.0, 0, 1, 0, 0, 0, 0, 0, 5, kFALSE);
508
fMC->SetDecayMode(1000020050, bratio, mode);
509
fMC->SetDecayMode(kK0Short, bratio2, mode2);
510
}
511
512
//_____________________________________________________________________________
513
void
Ex03cMCApplication::AddIons
()
514
{
515
/// Example of user defined ion
516
517
fVerbose
.AddIons();
518
fMC->DefineIon(
"MyIon"
, 34, 70, 12, 0.);
519
}
520
521
//_____________________________________________________________________________
522
void
Ex03cMCApplication::GeneratePrimaries
()
523
{
524
/// Fill the user stack (derived from TVirtualMCStack) with primary particles.
525
526
fVerbose
.GeneratePrimaries();
527
528
TVector3 origin(
fDetConstruction
->GetWorldSizeX(),
529
fDetConstruction
->GetCalorSizeYZ(),
fDetConstruction
->GetCalorSizeYZ());
530
531
fPrimaryGenerator
->GeneratePrimaries(origin);
532
}
533
534
//_____________________________________________________________________________
535
void
Ex03cMCApplication::BeginEvent
()
536
{
537
/// User actions at beginning of event
538
539
fVerbose
.BeginEvent();
540
541
// Clear TGeo tracks (if filled)
542
if
(!
fIsMultiRun
&& TString(fMC->GetName()) ==
"TGeant3TGeo"
&&
543
gGeoManager->GetListOfTracks() && gGeoManager->GetTrack(0) &&
544
((TVirtualGeoTrack*)gGeoManager->GetTrack(0))->HasPoints()) {
545
546
gGeoManager->ClearTracks();
547
// if (gPad) gPad->Clear();
548
}
549
550
fEventNo
++;
551
if
(
fEventNo
%
fPrintModulo
== 0) {
552
cout <<
"\n---> Begin of event: "
<<
fEventNo
<< endl;
553
// ??? How to do this in VMC
554
// HepRandom::showEngineStatus();
555
}
556
}
557
558
//_____________________________________________________________________________
559
void
Ex03cMCApplication::BeginPrimary
()
560
{
561
/// User actions at beginning of a primary track.
562
/// If test for user defined decay is activated,
563
/// the primary track ID is printed on the screen.
564
565
fVerbose
.BeginPrimary();
566
567
if
(
fPrimaryGenerator
->GetUserDecay()) {
568
cout <<
" Primary track ID = "
<<
fStack
->GetCurrentTrackNumber() << endl;
569
}
570
}
571
572
//_____________________________________________________________________________
573
void
Ex03cMCApplication::PreTrack
()
574
{
575
/// User actions at beginning of each track
576
/// If test for user defined decay is activated,
577
/// the decay products of the primary track (K0Short)
578
/// are printed on the screen.
579
580
fVerbose
.PreTrack();
581
582
// print info about K0Short decay products
583
if
(
fPrimaryGenerator
->GetUserDecay()) {
584
Int_t parentID =
fStack
->GetCurrentParentTrackNumber();
585
586
if
(parentID >= 0 &&
587
fStack
->GetParticle(parentID)->GetPdgCode() == kK0Short &&
588
fStack
->GetCurrentTrack()->GetUniqueID() == kPDecay) {
589
// The production process is saved as TParticle unique ID
590
// via Ex03cMCStack
591
592
cout <<
" Current track "
<<
fStack
->GetCurrentTrack()->GetName()
593
<<
" is a decay product of Parent ID = "
594
<<
fStack
->GetCurrentParentTrackNumber() << endl;
595
}
596
}
597
}
598
599
//_____________________________________________________________________________
600
void
Ex03cMCApplication::Stepping
()
601
{
602
/// User actions at each step
603
604
fVerbose
.Stepping();
605
606
fCalorimeterSD
->ProcessHits();
607
608
TLorentzVector pos;
609
TLorentzVector mom;
610
611
fMC->TrackPosition(pos);
612
fMC->TrackMomentum(mom);
613
614
if
(
fDebug
> 1) {
615
std::cout <<
"Current engine "
<< fMC->GetName() <<
"\n"
616
<<
"Track ID="
<<
fStack
->GetCurrentTrackNumber() <<
"\n"
617
<<
"Momentum\n"
618
<<
"E="
<< mom.T() <<
", Px="
<< mom.X() <<
", Py="
<< mom.Y()
619
<<
", Pz="
<< mom.Z() << std::endl;
620
}
621
622
// Now transfer track
623
if
(
fSplitSimulation
) {
624
Int_t targetId = -1;
625
if
(fMC->GetId() == 0 && strcmp(fMC->CurrentVolName(),
"ABSO"
) == 0) {
626
targetId = 1;
627
}
628
else
if
(fMC->GetId() == 1 && strcmp(fMC->CurrentVolName(),
"GAPX"
) == 0) {
629
targetId = 0;
630
}
631
if
(targetId > -1) {
632
if
(
fDebug
> 1) {
633
Info(
"Stepping"
,
"Transfer track"
);
634
}
635
fMCManager->TransferTrack(targetId);
636
}
637
}
638
}
639
640
//_____________________________________________________________________________
641
void
Ex03cMCApplication::PostTrack
()
642
{
643
/// User actions after finishing of each track
644
fVerbose
.PostTrack();
645
}
646
647
//_____________________________________________________________________________
648
void
Ex03cMCApplication::FinishPrimary
()
649
{
650
/// User actions after finishing of a primary track
651
652
fVerbose
.FinishPrimary();
653
654
if
(
fPrimaryGenerator
->GetUserDecay()) {
655
cout << endl;
656
}
657
}
658
659
//_____________________________________________________________________________
660
void
Ex03cMCApplication::FinishEvent
()
661
{
662
/// User actions after finishing of an event
663
664
fVerbose
.FinishEvent();
665
666
// Geant3 + TGeo
667
// (use TGeo functions for visualization)
668
if
(!
fIsMultiRun
&& TString(fMC->GetName()) ==
"TGeant3TGeo"
) {
669
670
// Draw volume
671
gGeoManager->SetVisOption(0);
672
gGeoManager->SetTopVisible();
673
gGeoManager->GetTopVolume()->Draw();
674
675
// Draw tracks (if filled)
676
// Available when this feature is activated via
677
// fMC->SetCollectTracks(kTRUE);
678
if
(gGeoManager->GetListOfTracks() && gGeoManager->GetTrack(0) &&
679
((TVirtualGeoTrack*)gGeoManager->GetTrack(0))->HasPoints()) {
680
681
gGeoManager->DrawTracks(
"/*"
);
// this means all tracks
682
}
683
}
684
685
fRootManager
->Fill();
686
687
if
(
fEventNo
%
fPrintModulo
== 0)
fCalorimeterSD
->PrintTotal();
688
689
fCalorimeterSD
->EndOfEvent();
690
691
fStack
->Reset();
692
}
Ex03cMCApplication.h
Definition of the Ex03cMCApplication class.
Ex03cMCStack.h
Definition of the Ex03cMCStack class.
Ex03PrimaryGenerator
The primary generator.
Definition
Ex03PrimaryGenerator.h:34
Ex03cCalorimeterSD
The calorimeter sensitive detector.
Definition
Ex03cCalorimeterSD.h:39
Ex03cDetectorConstruction
The detector construction (via TGeo ).
Definition
Ex03cDetectorConstruction.h:40
Ex03cMCApplication
Implementation of the TVirtualMCApplication.
Definition
Ex03cMCApplication.h:46
Ex03cMCApplication::Ex03cMCApplication
Ex03cMCApplication(const char *name, const char *title, Bool_t isMulti=kFALSE, Bool_t splitSimulation=kFALSE)
Definition
Ex03cMCApplication.cxx:48
Ex03cMCApplication::fMagField
TGeoUniformMagField * fMagField
Magnetic field.
Definition
Ex03cMCApplication.h:107
Ex03cMCApplication::fRootManager
TMCRootManager * fRootManager
Root manager.
Definition
Ex03cMCApplication.h:99
Ex03cMCApplication::AddIons
virtual void AddIons()
Definition
Ex03cMCApplication.cxx:513
Ex03cMCApplication::BeginPrimary
virtual void BeginPrimary()
Definition
Ex03cMCApplication.cxx:559
Ex03cMCApplication::fPrimaryGenerator
Ex03PrimaryGenerator * fPrimaryGenerator
Primary generator.
Definition
Ex03cMCApplication.h:106
Ex03cMCApplication::InitOnWorker
virtual void InitOnWorker()
Definition
Ex03cMCApplication.cxx:391
Ex03cMCApplication::fDetConstruction
Ex03cDetectorConstruction * fDetConstruction
Dector construction.
Definition
Ex03cMCApplication.h:104
Ex03cMCApplication::BeginEvent
virtual void BeginEvent()
Definition
Ex03cMCApplication.cxx:535
Ex03cMCApplication::fG3Id
Int_t fG3Id
engine ID of Geant3
Definition
Ex03cMCApplication.h:113
Ex03cMCApplication::fVerbose
TMCVerbose fVerbose
VMC verbose helper.
Definition
Ex03cMCApplication.h:102
Ex03cMCApplication::InitMC
void InitMC()
Definition
Ex03cMCApplication.cxx:284
Ex03cMCApplication::fCalorimeterSD
Ex03cCalorimeterSD * fCalorimeterSD
Calorimeter SD.
Definition
Ex03cMCApplication.h:105
Ex03cMCApplication::GeneratePrimaries
virtual void GeneratePrimaries()
Definition
Ex03cMCApplication.cxx:522
Ex03cMCApplication::AddParticles
virtual void AddParticles()
Definition
Ex03cMCApplication.cxx:466
Ex03cMCApplication::RegisterStack
void RegisterStack() const
Definition
Ex03cMCApplication.cxx:194
Ex03cMCApplication::RunMC
void RunMC(Int_t nofEvents)
Definition
Ex03cMCApplication.cxx:327
Ex03cMCApplication::fOldGeometry
Bool_t fOldGeometry
Option for geometry definition.
Definition
Ex03cMCApplication.h:108
Ex03cMCApplication::fIsControls
Bool_t fIsControls
Option to activate special controls.
Definition
Ex03cMCApplication.h:109
Ex03cMCApplication::fPrintModulo
Int_t fPrintModulo
The event modulus number to be printed.
Definition
Ex03cMCApplication.h:100
Ex03cMCApplication::Ex03cMCApplication
Ex03cMCApplication()
Definition
Ex03cMCApplication.cxx:147
Ex03cMCApplication::~Ex03cMCApplication
virtual ~Ex03cMCApplication()
Definition
Ex03cMCApplication.cxx:170
Ex03cMCApplication::fIsMultiRun
Bool_t fIsMultiRun
Flag if having multiple engines.
Definition
Ex03cMCApplication.h:111
Ex03cMCApplication::CloneForWorker
virtual TVirtualMCApplication * CloneForWorker() const
Definition
Ex03cMCApplication.cxx:385
Ex03cMCApplication::fIsMaster
Bool_t fIsMaster
If is on master thread.
Definition
Ex03cMCApplication.h:110
Ex03cMCApplication::fSplitSimulation
Bool_t fSplitSimulation
Split geometry given user criteria.
Definition
Ex03cMCApplication.h:112
Ex03cMCApplication::PostTrack
virtual void PostTrack()
Definition
Ex03cMCApplication.cxx:641
Ex03cMCApplication::ReadEvent
void ReadEvent(Int_t i)
Definition
Ex03cMCApplication.cxx:419
Ex03cMCApplication::Stepping
virtual void Stepping()
Definition
Ex03cMCApplication.cxx:600
Ex03cMCApplication::FinishRun
void FinishRun()
Definition
Ex03cMCApplication.cxx:372
Ex03cMCApplication::fStack
Ex03cMCStack * fStack
VMC stack.
Definition
Ex03cMCApplication.h:103
Ex03cMCApplication::fEventNo
Int_t fEventNo
Event counter.
Definition
Ex03cMCApplication.h:101
Ex03cMCApplication::ConstructGeometry
virtual void ConstructGeometry()
Definition
Ex03cMCApplication.cxx:434
Ex03cMCApplication::FinishRunOnWorker
virtual void FinishRunOnWorker()
Definition
Ex03cMCApplication.cxx:409
Ex03cMCApplication::FinishEvent
virtual void FinishEvent()
Definition
Ex03cMCApplication.cxx:660
Ex03cMCApplication::fG4Id
Int_t fG4Id
engine ID of Geant4
Definition
Ex03cMCApplication.h:114
Ex03cMCApplication::PreTrack
virtual void PreTrack()
Definition
Ex03cMCApplication.cxx:573
Ex03cMCApplication::FinishPrimary
virtual void FinishPrimary()
Definition
Ex03cMCApplication.cxx:648
Ex03cMCApplication::InitGeometry
virtual void InitGeometry()
Definition
Ex03cMCApplication.cxx:452
Ex03cMCApplication::fDebug
Int_t fDebug
debug option for multiple run
Definition
Ex03cMCApplication.h:115
Ex03cMCStack
Implementation of the TVirtualMCStack interface.
Definition
Ex03cMCStack.h:37
TVirtualMCApplication
Generated on
for VMC Examples by
1.17.0