VMC Examples Version 6.8
Loading...
Searching...
No Matches
A01MCApplication Class Reference

Implementation of the TVirtualMCApplication. More...

#include <A01MCApplication.h>

Inheritance diagram for A01MCApplication:

Public Member Functions

 A01MCApplication (const char *name, const char *title)
 A01MCApplication ()
virtual ~A01MCApplication ()
void InitMC (const char *setup)
void RunMC (Int_t nofEvents)
void FinishRun ()
void ReadEvent (Int_t i)
virtual TVirtualMCApplicationCloneForWorker () const
virtual void InitOnWorker ()
virtual void FinishRunOnWorker ()
virtual void ConstructGeometry ()
virtual void InitGeometry ()
virtual void AddParticles ()
virtual void AddIons ()
virtual void GeneratePrimaries ()
virtual void BeginEvent ()
virtual void BeginPrimary ()
virtual void PreTrack ()
virtual void Stepping ()
virtual void PostTrack ()
virtual void FinishPrimary ()
virtual void FinishEvent ()
void SetCuts ()
void SetWriteStack (Bool_t writeStack)
void SetWriteHits (Bool_t writeHits)
void SetUseLocalMagField (Bool_t localMagField)
void SetVerboseLevel (Int_t verboseLevel)
A01RootDetectorConstructionGetDetectorConstruction () const
A01PrimaryGeneratorGetPrimaryGenerator () const
A01DriftChamberSDGetDriftChamberSD1 () const
A01DriftChamberSDGetDriftChamberSD2 () const
A01EmCalorimeterSDGetEmCalorimeterSD () const
A01HadCalorimeterSDGetHadCalorimeterSD () const
A01HodoscopeSDGetHodoscopeSD1 () const
A01HodoscopeSDGetHodoscopeSD2 () const
Bool_t GetUseLocalMagField () const

Private Member Functions

 A01MCApplication (const A01MCApplication &origin)
void RegisterStack () const

Private Attributes

TMCRootManager * fRootManager
 Root manager.
Bool_t fWriteStack
 Option to write stack.
Bool_t fWriteHits
Bool_t fUseLocalMagField
 Option to use local magnetic field (working only with Geant4 !).
TMCVerbose fVerbose
 VMC verbose helper.
Ex03MCStackfStack
 VMC stack.
A01RootDetectorConstructionfDetConstruction
 Detector construction.
A01DriftChamberSDfDriftChamberSD1
 Drift Chamber 1 SD.
A01DriftChamberSDfDriftChamberSD2
 Drift Chamber 2 SD.
A01EmCalorimeterSDfEmCalorimeterSD
 Em Calorimeter SD.
A01HadCalorimeterSDfHadCalorimeterSD
 Had Calorimeter SD.
A01HodoscopeSDfHodoscopeSD1
 Hodoscope 1 SD.
A01HodoscopeSDfHodoscopeSD2
 Hodoscope 2 SD.
A01PrimaryGeneratorfPrimaryGenerator
 Primary generator.
A01MagFieldfMagField
 Magnetic field.
Bool_t fIsMaster
 If is on master thread.

Detailed Description

Implementation of the TVirtualMCApplication.

Date
12/05/2012
Author
I. Hrivnacova; IPN, Orsay

Definition at line 42 of file A01MCApplication.h.

Constructor & Destructor Documentation

◆ A01MCApplication() [1/3]

A01MCApplication::A01MCApplication ( const char * name,
const char * title )

Standard constructor

Parameters
nameThe MC application name
titleThe MC application description

Definition at line 50 of file A01MCApplication.cxx.

51 : TVirtualMCApplication(name, title),
52 fRootManager(0),
53 fWriteStack(true),
54 fWriteHits(true),
55 fUseLocalMagField(false),
56 fVerbose(0),
57 fStack(0),
66 fMagField(0),
67 fIsMaster(kTRUE)
68{
69 /// Standard constructor
70 /// \param name The MC application name
71 /// \param title The MC application description
72
73 // Create a user stack
74 fStack = new Ex03MCStack(1000);
75
76 // Create detector construction
77 fDetConstruction = new A01RootDetectorConstruction("A01geometry.root");
78
79 // Create SDs
80 fDriftChamberSD1 = new A01DriftChamberSD("Chamber1", "wirePlane1Logical");
81 fDriftChamberSD2 = new A01DriftChamberSD("Chamber2", "wirePlane2Logical");
82 fEmCalorimeterSD = new A01EmCalorimeterSD("EmCalorimeter");
83 fHadCalorimeterSD = new A01HadCalorimeterSD("HadCalorimeter");
84 fHodoscopeSD1 = new A01HodoscopeSD("Hodoscope1", "hodoscope1Logical");
85 fHodoscopeSD2 = new A01HodoscopeSD("Hodoscope2", "hodoscope2Logical");
86
87 // Create a primary generator
88 fPrimaryGenerator = new A01PrimaryGenerator(fStack);
89
90 // Constant magnetic field (in kiloGauss)
91 // field value: 1.0*tesla (= 10.0 kiloGauss) in y
92 if (!fUseLocalMagField) {
93 fMagField = new A01MagField(0, 10.0, 0);
94 }
95}
A01HodoscopeSD * fHodoscopeSD2
Hodoscope 2 SD.
A01MagField * fMagField
Magnetic field.
A01DriftChamberSD * fDriftChamberSD1
Drift Chamber 1 SD.
Bool_t fIsMaster
If is on master thread.
A01RootDetectorConstruction * fDetConstruction
Detector construction.
A01DriftChamberSD * fDriftChamberSD2
Drift Chamber 2 SD.
TMCVerbose fVerbose
VMC verbose helper.
A01HadCalorimeterSD * fHadCalorimeterSD
Had Calorimeter SD.
Bool_t fWriteStack
Option to write stack.
Bool_t fUseLocalMagField
Option to use local magnetic field (working only with Geant4 !).
Ex03MCStack * fStack
VMC stack.
A01PrimaryGenerator * fPrimaryGenerator
Primary generator.
TMCRootManager * fRootManager
Root manager.
A01EmCalorimeterSD * fEmCalorimeterSD
Em Calorimeter SD.
A01HodoscopeSD * fHodoscopeSD1
Hodoscope 1 SD.

◆ A01MCApplication() [2/3]

A01MCApplication::A01MCApplication ( )

Default constructor

Definition at line 143 of file A01MCApplication.cxx.

144 : TVirtualMCApplication(),
145 fRootManager(0),
146 fWriteStack(true),
147 fWriteHits(true),
148 fUseLocalMagField(false),
149 fStack(0),
155 fHodoscopeSD1(0),
156 fHodoscopeSD2(0),
158 fMagField(0),
159 fIsMaster(kTRUE)
160{
161 /// Default constructor
162}

◆ ~A01MCApplication()

A01MCApplication::~A01MCApplication ( )
virtual

Destructor

Definition at line 165 of file A01MCApplication.cxx.

166{
167 /// Destructor
168
169 // cout << "A01MCApplication::~A01MCApplication " << this << endl;
170
171 delete fRootManager;
172 delete fStack;
173 if (fIsMaster) delete fDetConstruction;
174 delete fDriftChamberSD1;
175 delete fDriftChamberSD2;
176 delete fEmCalorimeterSD;
177 delete fHadCalorimeterSD;
178 delete fHodoscopeSD1;
179 delete fHodoscopeSD2;
180 delete fPrimaryGenerator;
181 delete fMagField;
182 delete gMC;
183
184 // cout << "Done A01MCApplication::~A01MCApplication " << this << endl;
185}

◆ A01MCApplication() [3/3]

A01MCApplication::A01MCApplication ( const A01MCApplication & origin)
private

Copy constructor (for clonig on worker thread in MT mode).

Parameters
originThe source object (on master).

Definition at line 98 of file A01MCApplication.cxx.

99 : TVirtualMCApplication(origin.GetName(), origin.GetTitle()),
100 fRootManager(0),
101 fWriteStack(origin.fWriteStack),
102 fWriteHits(origin.fWriteHits),
104 fVerbose(origin.fVerbose),
105 fStack(0),
111 fHodoscopeSD1(0),
112 fHodoscopeSD2(0),
114 fMagField(0),
115 fIsMaster(kFALSE)
116{
117 /// Copy constructor (for clonig on worker thread in MT mode).
118 /// \param origin The source object (on master).
119
120 // Create a user stack
121 fStack = new Ex03MCStack(1000);
122
123 // Create SDs
124 fDriftChamberSD1 = new A01DriftChamberSD(*(origin.fDriftChamberSD1));
125 fDriftChamberSD2 = new A01DriftChamberSD(*(origin.fDriftChamberSD2));
126 fEmCalorimeterSD = new A01EmCalorimeterSD(*(origin.fEmCalorimeterSD));
127 fHadCalorimeterSD = new A01HadCalorimeterSD(*(origin.fHadCalorimeterSD));
128 fHodoscopeSD1 = new A01HodoscopeSD(*(origin.fHodoscopeSD1));
129 fHodoscopeSD2 = new A01HodoscopeSD(*(origin.fHodoscopeSD2));
130
131 // Create a primary generator
133 new A01PrimaryGenerator(*(origin.fPrimaryGenerator), fStack);
134
135 // Constant magnetic field (in kiloGauss)
136 // field value: 1.0*tesla (= 10.0 kiloGauss) in y
137 if (!fUseLocalMagField) {
138 fMagField = new A01MagField(0, 10.0, 0);
139 }
140}

Member Function Documentation

◆ InitMC()

void A01MCApplication::InitMC ( const char * setup)

Initialize MC. The selection of the concrete MC is done in the macro.

Parameters
setupThe name of the configuration macro

Definition at line 207 of file A01MCApplication.cxx.

208{
209 /// Initialize MC.
210 /// The selection of the concrete MC is done in the macro.
211 /// \param setup The name of the configuration macro
212
213 fVerbose.InitMC();
214
215 if (TString(setup) != "") {
216 gROOT->LoadMacro(setup);
217 gInterpreter->ProcessLine("Config()");
218 if (!gMC) {
219 Fatal(
220 "InitMC", "Processing Config() has failed. (No MC is instantiated.)");
221 }
222 }
223
224// MT support available from root v 5.34/18
225#if ROOT_VERSION_CODE >= 336402
226 // Create Root manager
227 if (!gMC->IsMT()) {
228 fRootManager = new TMCRootManager(GetName(), TMCRootManager::kWrite);
229 // fRootManager->SetDebug(true);
230 }
231#else
232 // Create Root manager
233 fRootManager = new TMCRootManager(GetName(), TMCRootManager::kWrite);
234 // fRootManager->SetDebug(true);
235#endif
236
237 // Set data to MC
238 gMC->SetStack(fStack);
239 gMC->SetMagField(fMagField);
240
241 // Init MC
242 gMC->Init();
243 gMC->BuildPhysics();
244
246}
void RegisterStack() const

◆ RunMC()

void A01MCApplication::RunMC ( Int_t nofEvents)

Run MC.

Parameters
nofEventsNumber of events to be processed

Definition at line 249 of file A01MCApplication.cxx.

250{
251 /// Run MC.
252 /// \param nofEvents Number of events to be processed
253
254 fVerbose.RunMC(nofEvents);
255
256 gMC->ProcessRun(nofEvents);
257 FinishRun();
258}

◆ FinishRun()

void A01MCApplication::FinishRun ( )

Finish MC run.

Definition at line 261 of file A01MCApplication.cxx.

262{
263 /// Finish MC run.
264
265 fVerbose.FinishRun();
266
267 if (fRootManager && (fWriteStack || fWriteHits)) {
268 fRootManager->WriteAll();
269 fRootManager->Close();
270 }
271}

◆ ReadEvent()

void A01MCApplication::ReadEvent ( Int_t i)

Read i -th event and print hits.

Parameters
iThe number of event to be read

Definition at line 309 of file A01MCApplication.cxx.

310{
311 /// Read \em i -th event and print hits.
312 /// \param i The number of event to be read
313
314 if ( ! fRootManager ) {
315 fRootManager = new TMCRootManager(GetName(), TMCRootManager::kRead);
316 }
317
318 fDriftChamberSD1->Register();
319 fDriftChamberSD2->Register();
320 fEmCalorimeterSD->Register();
321 fHadCalorimeterSD->Register();
322 fHodoscopeSD1->Register();
323 fHodoscopeSD2->Register();
325 fRootManager->ReadEvent(i);
326}

◆ CloneForWorker()

TVirtualMCApplication * A01MCApplication::CloneForWorker ( ) const
virtual

Definition at line 274 of file A01MCApplication.cxx.

275{
276 // cout << "A01MCApplication::CloneForWorker " << this << endl;
277 return new A01MCApplication(*this);
278}

◆ InitOnWorker()

void A01MCApplication::InitOnWorker ( )
virtual

Definition at line 281 of file A01MCApplication.cxx.

282{
283 // cout << "A01MCApplication::InitForWorker " << this << endl;
284
285 // Create Root manager
286 Int_t threadRank = 1;
287 // The real thread rank will be set in MCRootManager
288 fRootManager = new TMCRootManager(GetName(), TMCRootManager::kWrite, threadRank);
289 // fRootManager->SetDebug(true);
290
291 // Set data to MC
292 gMC->SetStack(fStack);
293 gMC->SetMagField(fMagField);
294
296}

◆ FinishRunOnWorker()

void A01MCApplication::FinishRunOnWorker ( )
virtual

Definition at line 299 of file A01MCApplication.cxx.

300{
301 // cout << "A01MCApplication::FinishWorkerRun: " << endl;
302 if (fRootManager) {
303 fRootManager->WriteAll();
304 fRootManager->Close();
305 }
306}

◆ ConstructGeometry()

void A01MCApplication::ConstructGeometry ( )
virtual

Construct geometry using detector contruction class.

Definition at line 329 of file A01MCApplication.cxx.

330{
331 /// Construct geometry using detector contruction class.
332
333 fVerbose.ConstructGeometry();
334 fDetConstruction->ConstructGeometry();
335}

◆ InitGeometry()

void A01MCApplication::InitGeometry ( )
virtual

Initialize geometry

Definition at line 338 of file A01MCApplication.cxx.

339{
340 /// Initialize geometry
341
342 fVerbose.InitGeometry();
343
344 // Set cuts in G3 equivalent to 1mm cut in G4
345 if (TString(gMC->GetName()) == "TGeant3TGeo") SetCuts();
346
347 fDriftChamberSD1->Initialize();
348 fDriftChamberSD2->Initialize();
349 fEmCalorimeterSD->Initialize();
350 fHadCalorimeterSD->Initialize();
351 fHodoscopeSD1->Initialize();
352 fHodoscopeSD2->Initialize();
353}

◆ AddParticles()

void A01MCApplication::AddParticles ( )
virtual

Nothing to be done

Definition at line 356 of file A01MCApplication.cxx.

357{
358 /// Nothing to be done
359
360 fVerbose.AddParticles();
361}

◆ AddIons()

void A01MCApplication::AddIons ( )
virtual

Nothing to be done

Definition at line 364 of file A01MCApplication.cxx.

365{
366 /// Nothing to be done
367
368 fVerbose.AddIons();
369}

◆ GeneratePrimaries()

void A01MCApplication::GeneratePrimaries ( )
virtual

Fill the user stack (derived from TVirtualMCStack) with primary particles.

Definition at line 372 of file A01MCApplication.cxx.

373{
374 /// Fill the user stack (derived from TVirtualMCStack) with primary particles.
375
376 fVerbose.GeneratePrimaries();
377 fPrimaryGenerator->GeneratePrimaries();
378}

◆ BeginEvent()

void A01MCApplication::BeginEvent ( )
virtual

User actions at beginning of event

Definition at line 381 of file A01MCApplication.cxx.

382{
383 /// User actions at beginning of event
384
385 fVerbose.BeginEvent();
386
387 // Clear TGeo tracks (if filled)
388 if (TString(gMC->GetName()) == "TGeant3TGeo" &&
389 gGeoManager->GetListOfTracks() && gGeoManager->GetTrack(0) &&
390 ((TVirtualGeoTrack*)gGeoManager->GetTrack(0))->HasPoints()) {
391
392 gGeoManager->ClearTracks();
393 // if (gPad) gPad->Clear();
394 }
395}

◆ BeginPrimary()

void A01MCApplication::BeginPrimary ( )
virtual

User actions at beginning of a primary track.

Definition at line 398 of file A01MCApplication.cxx.

399{
400 /// User actions at beginning of a primary track.
401
402 fVerbose.BeginPrimary();
403}

◆ PreTrack()

void A01MCApplication::PreTrack ( )
virtual

User actions at beginning of each track

Definition at line 406 of file A01MCApplication.cxx.

407{
408 /// User actions at beginning of each track
409
410 fVerbose.PreTrack();
411}

◆ Stepping()

void A01MCApplication::Stepping ( )
virtual

User actions at each step

Definition at line 414 of file A01MCApplication.cxx.

415{
416 /// User actions at each step
417
418 fVerbose.Stepping();
419 fDriftChamberSD1->ProcessHits();
420 fDriftChamberSD2->ProcessHits();
421 fEmCalorimeterSD->ProcessHits();
422 fHadCalorimeterSD->ProcessHits();
423 fHodoscopeSD1->ProcessHits();
424 fHodoscopeSD2->ProcessHits();
425}

◆ PostTrack()

void A01MCApplication::PostTrack ( )
virtual

User actions after finishing each track

Definition at line 428 of file A01MCApplication.cxx.

429{
430 /// User actions after finishing each track
431
432 fVerbose.PostTrack();
433}

◆ FinishPrimary()

void A01MCApplication::FinishPrimary ( )
virtual

User actions after finishing each primary track

Definition at line 436 of file A01MCApplication.cxx.

437{
438 /// User actions after finishing each primary track
439
440 fVerbose.FinishPrimary();
441}

◆ FinishEvent()

void A01MCApplication::FinishEvent ( )
virtual

User actions after finishing an event

Definition at line 444 of file A01MCApplication.cxx.

445{
446 /// User actions after finishing an event
447
448 fVerbose.FinishEvent();
449
450 // Geant3 + TGeo
451 // (use TGeo functions for visualization)
452 if (TString(gMC->GetName()) == "TGeant3TGeo") {
453
454 // Draw volume
455 gGeoManager->SetVisOption(0);
456 gGeoManager->SetTopVisible();
457 gGeoManager->GetTopVolume()->Draw();
458
459 // Draw tracks (if filled)
460 // Available when this feature is activated via
461 // gMC->SetCollectTracks(kTRUE);
462 if (gGeoManager->GetListOfTracks() && gGeoManager->GetTrack(0) &&
463 ((TVirtualGeoTrack*)gGeoManager->GetTrack(0))->HasPoints()) {
464
465 gGeoManager->DrawTracks("/*"); // this means all tracks
466 }
467 }
468
469 if (fWriteStack || fWriteHits) {
470 fRootManager->Fill();
471 }
472
473 // Print info about primary particle
474 TParticle* primary = fStack->GetParticle(0);
475 cout << endl
476 << ">>> Event " << gMC->CurrentEvent()
477 << " >>> Simulation truth : " << primary->GetPDG()->GetName() << " ("
478 << primary->Px() * 1e03 << ", " << primary->Py() * 1e03 << ", "
479 << primary->Pz() * 1e03 << ") MeV" << endl;
480
481 // Call detectors
482 fHodoscopeSD1->EndOfEvent();
483 fHodoscopeSD2->EndOfEvent();
484 fDriftChamberSD1->EndOfEvent();
485 fDriftChamberSD2->EndOfEvent();
486 fEmCalorimeterSD->EndOfEvent();
487 fHadCalorimeterSD->EndOfEvent();
488
489 fStack->Reset();
490}

◆ SetCuts()

void A01MCApplication::SetCuts ( )

Set cuts for e-, gamma equivalent to 1mm cut in G4.

Definition at line 523 of file A01MCApplication.cxx.

524{
525 /// Set cuts for e-, gamma equivalent to 1mm cut in G4.
526
527 Int_t mediumId = gMC->MediumId("Air");
528 if (mediumId) {
529 gMC->Gstpar(mediumId, "CUTGAM", 990.e-09);
530 gMC->Gstpar(mediumId, "BCUTE", 990.e-09);
531 gMC->Gstpar(mediumId, "CUTELE", 990.e-09);
532 gMC->Gstpar(mediumId, "DCUTE", 990.e-09);
533 }
534
535 mediumId = gMC->MediumId("G4_Galactic");
536 if (mediumId) {
537 gMC->Gstpar(mediumId, "CUTGAM", 990.e-09);
538 gMC->Gstpar(mediumId, "BCUTE", 990.e-09);
539 gMC->Gstpar(mediumId, "CUTELE", 990.e-09);
540 gMC->Gstpar(mediumId, "DCUTE", 990.e-09);
541 }
542
543 mediumId = gMC->MediumId("Scintillator");
544 if (mediumId) {
545 gMC->Gstpar(mediumId, "CUTGAM", 2.40367 - 06);
546 gMC->Gstpar(mediumId, "BCUTE", 356.639e-06);
547 gMC->Gstpar(mediumId, "CUTELE", 356.639e-06);
548 gMC->Gstpar(mediumId, "DCUTE", 356.639e-06);
549 }
550
551 mediumId = gMC->MediumId("ArgonGas");
552 if (mediumId) {
553 gMC->Gstpar(mediumId, "CUTGAM", 990.e-09);
554 gMC->Gstpar(mediumId, "BCUTE", 990.e-09);
555 gMC->Gstpar(mediumId, "CUTELE", 990.e-09);
556 gMC->Gstpar(mediumId, "DCUTE", 990.e-09);
557 }
558
559 mediumId = gMC->MediumId("CsI");
560 if (mediumId) {
561 gMC->Gstpar(mediumId, "CUTGAM", 38.5665e-06);
562 gMC->Gstpar(mediumId, "BCUTE", 689.033e-06);
563 gMC->Gstpar(mediumId, "CUTELE", 689.033e-06);
564 gMC->Gstpar(mediumId, "DCUTE", 689.033e-06);
565 }
566
567 mediumId = gMC->MediumId("Lead");
568 if (mediumId) {
569 gMC->Gstpar(mediumId, "CUTGAM", 101.843e-06);
570 gMC->Gstpar(mediumId, "BCUTE", 1.36749e-03);
571 gMC->Gstpar(mediumId, "CUTELE", 1.36749e-03);
572 gMC->Gstpar(mediumId, "DCUTE", 1.36749e-03);
573 }
574}

◆ SetWriteStack()

void A01MCApplication::SetWriteStack ( Bool_t writeStack)
inline

(In)Activate writing stack on file

Parameters
writeStackThe new value of the option

Definition at line 121 of file A01MCApplication.h.

122{
123 fWriteStack = writeStack;
124}

◆ SetWriteHits()

void A01MCApplication::SetWriteHits ( Bool_t writeHits)

(In)Activate writing hits on file and propagate this option to all SDs

Parameters
writeHitsThe new value of the option

Definition at line 493 of file A01MCApplication.cxx.

494{
495 /// (In)Activate writing hits on file and propagate this option
496 /// to all SDs
497 /// \param writeHits The new value of the option
498
499 fWriteHits = writeHits;
500 fHodoscopeSD1->SetWriteHits(writeHits);
501 fHodoscopeSD2->SetWriteHits(writeHits);
502 fDriftChamberSD1->SetWriteHits(writeHits);
503 fDriftChamberSD2->SetWriteHits(writeHits);
504 fEmCalorimeterSD->SetWriteHits(writeHits);
505 fHadCalorimeterSD->SetWriteHits(writeHits);
506}

◆ SetUseLocalMagField()

void A01MCApplication::SetUseLocalMagField ( Bool_t localMagField)

Set the option to use local magnetic field (working only with Geant4 !)

Parameters
localMagFieldThe new value of the option

Definition at line 509 of file A01MCApplication.cxx.

510{
511 /// Set the option to use local magnetic field (working only with Geant4 !)
512 /// \param localMagField The new value of the option
513
514 fUseLocalMagField = localMagField;
515 fDetConstruction->SetUseLocalMagField(localMagField);
516
517 // delete existing global field
518 delete fMagField;
519 fMagField = 0;
520}

◆ SetVerboseLevel()

void A01MCApplication::SetVerboseLevel ( Int_t verboseLevel)
inline

Set verbosity

Parameters
verboseLevelThe new verbose level value

Definition at line 128 of file A01MCApplication.h.

129{
130 fVerbose.SetLevel(verboseLevel);
131}

◆ GetDetectorConstruction()

A01RootDetectorConstruction * A01MCApplication::GetDetectorConstruction ( ) const
inline
Returns
The detector construction

Definition at line 140 of file A01MCApplication.h.

141{
142 return fDetConstruction;
143}

◆ GetPrimaryGenerator()

A01PrimaryGenerator * A01MCApplication::GetPrimaryGenerator ( ) const
inline
Returns
The primary generator

Definition at line 146 of file A01MCApplication.h.

147{
148 return fPrimaryGenerator;
149}

◆ GetDriftChamberSD1()

A01DriftChamberSD * A01MCApplication::GetDriftChamberSD1 ( ) const
inline
Returns
The Drift Chamber 1 SD

Definition at line 152 of file A01MCApplication.h.

153{
154 return fDriftChamberSD1;
155}

◆ GetDriftChamberSD2()

A01DriftChamberSD * A01MCApplication::GetDriftChamberSD2 ( ) const
inline
Returns
The Drift Chamber 2 SD

Definition at line 158 of file A01MCApplication.h.

159{
160 return fDriftChamberSD2;
161}

◆ GetEmCalorimeterSD()

A01EmCalorimeterSD * A01MCApplication::GetEmCalorimeterSD ( ) const
inline
Returns
The Em Calorimeter SD

Definition at line 164 of file A01MCApplication.h.

165{
166 return fEmCalorimeterSD;
167}

◆ GetHadCalorimeterSD()

A01HadCalorimeterSD * A01MCApplication::GetHadCalorimeterSD ( ) const
inline
Returns
The Had Calorimeter SD

Definition at line 170 of file A01MCApplication.h.

171{
172 return fHadCalorimeterSD;
173}

◆ GetHodoscopeSD1()

A01HodoscopeSD * A01MCApplication::GetHodoscopeSD1 ( ) const
inline
Returns
The Hodoscope 1 SD

Definition at line 176 of file A01MCApplication.h.

177{
178 return fHodoscopeSD1;
179}

◆ GetHodoscopeSD2()

A01HodoscopeSD * A01MCApplication::GetHodoscopeSD2 ( ) const
inline
Returns
The Hodoscope 2 SD

Definition at line 182 of file A01MCApplication.h.

183{
184 return fHodoscopeSD2;
185}

◆ GetUseLocalMagField()

Bool_t A01MCApplication::GetUseLocalMagField ( ) const
inline
Returns
The option to use local magnetic field (working only with Geant4 !)

Definition at line 188 of file A01MCApplication.h.

189{
190 return fUseLocalMagField;
191}

◆ RegisterStack()

void A01MCApplication::RegisterStack ( ) const
private

Register stack in the Root manager.

Definition at line 192 of file A01MCApplication.cxx.

193{
194 /// Register stack in the Root manager.
195
196 if (fWriteStack && fRootManager) {
197 // cout << "A01MCApplication::RegisterStack: " << endl;
198 fRootManager->Register("stack", "Ex03MCStack", &fStack);
199 }
200}

Member Data Documentation

◆ fRootManager

TMCRootManager* A01MCApplication::fRootManager
mutableprivate

Root manager.

Definition at line 96 of file A01MCApplication.h.

◆ fWriteStack

Bool_t A01MCApplication::fWriteStack
private

Option to write stack.

Definition at line 97 of file A01MCApplication.h.

◆ fWriteHits

Bool_t A01MCApplication::fWriteHits
private

Option to write hits

Definition at line 98 of file A01MCApplication.h.

◆ fUseLocalMagField

Bool_t A01MCApplication::fUseLocalMagField
private

Option to use local magnetic field (working only with Geant4 !).

Definition at line 100 of file A01MCApplication.h.

◆ fVerbose

TMCVerbose A01MCApplication::fVerbose
private

VMC verbose helper.

Definition at line 101 of file A01MCApplication.h.

◆ fStack

Ex03MCStack* A01MCApplication::fStack
private

VMC stack.

Definition at line 102 of file A01MCApplication.h.

◆ fDetConstruction

A01RootDetectorConstruction* A01MCApplication::fDetConstruction
private

Detector construction.

Definition at line 103 of file A01MCApplication.h.

◆ fDriftChamberSD1

A01DriftChamberSD* A01MCApplication::fDriftChamberSD1
private

Drift Chamber 1 SD.

Definition at line 104 of file A01MCApplication.h.

◆ fDriftChamberSD2

A01DriftChamberSD* A01MCApplication::fDriftChamberSD2
private

Drift Chamber 2 SD.

Definition at line 105 of file A01MCApplication.h.

◆ fEmCalorimeterSD

A01EmCalorimeterSD* A01MCApplication::fEmCalorimeterSD
private

Em Calorimeter SD.

Definition at line 106 of file A01MCApplication.h.

◆ fHadCalorimeterSD

A01HadCalorimeterSD* A01MCApplication::fHadCalorimeterSD
private

Had Calorimeter SD.

Definition at line 107 of file A01MCApplication.h.

◆ fHodoscopeSD1

A01HodoscopeSD* A01MCApplication::fHodoscopeSD1
private

Hodoscope 1 SD.

Definition at line 108 of file A01MCApplication.h.

◆ fHodoscopeSD2

A01HodoscopeSD* A01MCApplication::fHodoscopeSD2
private

Hodoscope 2 SD.

Definition at line 109 of file A01MCApplication.h.

◆ fPrimaryGenerator

A01PrimaryGenerator* A01MCApplication::fPrimaryGenerator
private

Primary generator.

Definition at line 110 of file A01MCApplication.h.

◆ fMagField

A01MagField* A01MCApplication::fMagField
private

Magnetic field.

Definition at line 111 of file A01MCApplication.h.

◆ fIsMaster

Bool_t A01MCApplication::fIsMaster
private

If is on master thread.

Definition at line 112 of file A01MCApplication.h.


The documentation for this class was generated from the following files: