VMC Examples Version 6.6
Loading...
Searching...
No Matches
VMC::ExGarfield::FastSimulation Class Reference

Special class for definition of fast simulation models. More...

#include <FastSimulation.h>

Inheritance diagram for VMC::ExGarfield::FastSimulation:

Public Member Functions

 FastSimulation ()
 
virtual ~FastSimulation ()
 
virtual void Construct ()
 

Private Attributes

GarfieldMessengerfMessenger
 

Detailed Description

Special class for definition of fast simulation models.

Author
I. Hrivnacova; IPN, Orsay

Definition at line 35 of file FastSimulation.h.

Constructor & Destructor Documentation

◆ FastSimulation()

VMC::ExGarfield::FastSimulation::FastSimulation ( )

Standard constructor

Definition at line 45 of file FastSimulation.cxx.

46{
47 /// Standard constructor
48
49 cout << "FastSimulation::FastSimulation" << endl;
50
51 // Choose the Random engine
52 G4Random::setTheEngine(new CLHEP::RanecuEngine);
53 G4Random::setTheSeed(1);
54 // Set seed to Garfield random engine
55 ::Garfield::randomEngine.Seed(1);
56
57 // Construct the Garfield messenger which defines the Garfield physics
58 // specific command
60
61 /*
62 // In the following calls users can select the particles and regions
63 // which the fast simulation model(s) will be applied to.
64 // The setting is an alternative to the setting via UI commands
65 // in physics.in macro.
66
67 // Create fast simulation model configuration.
68 // This will generate UI commands which can be used to set particles
69 // and regions where the model will be applied
70 SetModel("garfieldModel");
71
72 // In the following calls users can select the particles and regions
73 // which the fast simulation model(s) will be applied to.
74 // The setting can be done also interactively via UI commands.
75 SetModelParticles("garfieldModel", "all");
76 SetModelRegions("garfieldModel", "AirB");
77
78 // Enable GarfieldModel for different particle types and energy ranges
79 double minEnergy_keV = 100;
80 double maxEnergy_keV = 1e+12;
81
82 //GarfieldPhysics* garfieldPhysics = GarfieldPhysics::GetInstance();
83 //garfieldPhysics->AddParticleName("e-", minEnergy_keV, maxEnergy_keV);
84 //garfieldPhysics->AddParticleName("e+", minEnergy_keV, maxEnergy_keV);
85
86 //garfieldPhysics->AddParticleName("mu-", minEnergy_keV, maxEnergy_keV);
87 garfieldPhysics->AddParticleName("mu+", minEnergy_keV, maxEnergy_keV);
88
89 //garfieldPhysics->AddParticleName("pi-", minEnergy_keV, maxEnergy_keV);
90 //garfieldPhysics->AddParticleName("pi+", minEnergy_keV, maxEnergy_keV);
91 //garfieldPhysics->AddParticleName("kaon-", minEnergy_keV, maxEnergy_keV);
92 //garfieldPhysics->AddParticleName("kaon+", minEnergy_keV, maxEnergy_keV);
93 //garfieldPhysics->AddParticleName("proton", minEnergy_keV, maxEnergy_keV);
94 //garfieldPhysics->AddParticleName("anti_proton", minEnergy_keV,
95 maxEnergy_keV);
96 //garfieldPhysics->AddParticleName("deuteron", minEnergy_keV,
97 maxEnergy_keV);
98 //garfieldPhysics->AddParticleName("alpha", minEnergy_keV, maxEnergy_keV);
99
100 //garfieldPhysics->EnableCreateSecondariesInGeant4(false);
101 */
102}

◆ ~FastSimulation()

VMC::ExGarfield::FastSimulation::~FastSimulation ( )
virtual

Destructor

Definition at line 105 of file FastSimulation.cxx.

106{
107 /// Destructor
108
109 // can't we just delete the instance ??
111
112 delete fMessenger;
113}
static void Dispose()

Member Function Documentation

◆ Construct()

void VMC::ExGarfield::FastSimulation::Construct ( )
virtual

This function must be overriden in user class and users should create the simulation models and register them to VMC framework

Definition at line 120 of file FastSimulation.cxx.

121{
122 /// This function must be overriden in user class and users should create
123 /// the simulation models and register them to VMC framework
124
125 G4cout << "Construct Garfield model." << G4endl;
126
127 // Create the fast simulation model
128 GarfieldG4FastSimulationModel* garfieldModel =
129 new GarfieldG4FastSimulationModel("garfieldModel");
130
131 // Register the model in the VMC framework
132 Register(garfieldModel);
133
134 G4cout << "end construct Garfield model." << G4endl;
135 //
136 // end Initializing shower model
137}

Member Data Documentation

◆ fMessenger

GarfieldMessenger* VMC::ExGarfield::FastSimulation::fMessenger
private

Definition at line 45 of file FastSimulation.h.


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