Geant4 VMC
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
source
physics_list
src
TG4GflashFastSimulation.cxx
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Geant4 Virtual Monte Carlo package
3
// Copyright (C) 2007 - 2015 Ivana Hrivnacova
4
// All rights reserved.
5
//
6
// For the licensing terms see geant4_vmc/LICENSE.
7
// Contact: root-vmc@cern.ch
8
//-------------------------------------------------
9
14
15
#include "
TG4GflashFastSimulation.h
"
16
#include "
TG4GflashFastSimulationMessenger.h
"
17
#include "
TG4Globals.h
"
18
19
#include <G4Material.hh>
20
#include <G4RegionStore.hh>
21
#include <GFlashHitMaker.hh>
22
#include <GFlashHomoShowerParameterisation.hh>
23
#include <GFlashParticleBounds.hh>
24
#include <GFlashShowerModel.hh>
25
26
#include <Riostream.h>
27
28
using namespace
std;
29
30
//_____________________________________________________________________________
31
TG4GflashFastSimulation::TG4GflashFastSimulation
()
32
:
TG4VUserFastSimulation
(),
33
fMessenger
(0),
34
fMaterialName
(),
35
fGflashShowerModel
(0)
36
{
38
39
// create the model in contsructor
40
// to make available its messenger commands
41
fGflashShowerModel
=
new
GFlashShowerModel(
"GflashShowerModel"
);
42
// region will be set via the model configuration
43
44
fMessenger
=
new
TG4GflashFastSimulationMessenger
(
this
);
45
}
46
47
//_____________________________________________________________________________
48
TG4GflashFastSimulation::~TG4GflashFastSimulation
()
49
{
51
}
52
53
//
54
// protected methods
55
//
56
57
//_____________________________________________________________________________
58
void
TG4GflashFastSimulation::Construct
()
59
{
62
63
if
(!
fMaterialName
.size()) {
64
TG4Globals::Warning
(
"TG4GflashFastSimulation"
,
"Construct"
,
65
"The material for Gflash parameterisation is not defined."
);
66
return
;
67
}
68
69
// Get material from G4MaterialTable
70
G4Material* material = G4Material::GetMaterial(
fMaterialName
);
71
if
(!material) {
72
TString text =
"The material "
;
73
text +=
fMaterialName
.data();
74
text +=
" was not found."
;
75
TG4Globals::Warning
(
"TG4GflashFastSimulation"
,
"Construct"
, text);
76
return
;
77
}
78
79
// Initializing shower model
80
//
81
G4cout <<
"Configuring shower parameterization model"
<< G4endl;
82
83
fGflashShowerModel
->SetFlagParamType(1);
84
85
GFlashHomoShowerParameterisation* parameterisation =
86
new
GFlashHomoShowerParameterisation(material);
87
fGflashShowerModel
->SetParameterisation(*parameterisation);
88
89
// Energy cuts to kill particles:
90
GFlashParticleBounds* particleBounds =
new
GFlashParticleBounds();
91
fGflashShowerModel
->SetParticleBounds(*particleBounds);
92
93
// Makes the EnergieSpots
94
GFlashHitMaker* hitMaker =
new
GFlashHitMaker();
95
fGflashShowerModel
->SetHitMaker(*hitMaker);
96
97
// Register model in VMC frameworks
98
Register
(
fGflashShowerModel
);
99
100
G4cout <<
"end configuring shower parameterization."
<< G4endl;
101
//
102
// end Initializing shower model
103
}
TG4GflashFastSimulationMessenger.h
Definition of the TG4GflashFastSimulationMessenger class.
TG4GflashFastSimulation.h
Definition of the TG4GflashFastSimulation class.
TG4Globals.h
Definition of the TG4Globals class and basic container types.
TG4GflashFastSimulationMessenger
Messenger class that defines commands for the Gflash fast simulation model.
Definition
TG4GflashFastSimulationMessenger.h:35
TG4GflashFastSimulation::~TG4GflashFastSimulation
virtual ~TG4GflashFastSimulation()
Definition
TG4GflashFastSimulation.cxx:48
TG4GflashFastSimulation::fGflashShowerModel
GFlashShowerModel * fGflashShowerModel
Gflash shower model.
Definition
TG4GflashFastSimulation.h:49
TG4GflashFastSimulation::TG4GflashFastSimulation
TG4GflashFastSimulation()
Definition
TG4GflashFastSimulation.cxx:31
TG4GflashFastSimulation::fMaterialName
G4String fMaterialName
The name of material for shower parameterisation.
Definition
TG4GflashFastSimulation.h:46
TG4GflashFastSimulation::Construct
virtual void Construct()
Method to be overriden by user.
Definition
TG4GflashFastSimulation.cxx:58
TG4GflashFastSimulation::fMessenger
TG4GflashFastSimulationMessenger * fMessenger
Messenger.
Definition
TG4GflashFastSimulation.h:43
TG4Globals::Warning
static void Warning(const TString &className, const TString &methodName, const TString &text)
Definition
TG4Globals.cxx:48
TG4VUserFastSimulation::TG4VUserFastSimulation
TG4VUserFastSimulation()
Definition
TG4VUserFastSimulation.cxx:24
TG4VUserFastSimulation::Register
void Register(G4VFastSimulationModel *fastSimulationModel)
Method to be utilized to register each fast simulation model.
Definition
TG4VUserFastSimulation.cxx:64
Generated on
for Geant4 VMC by
1.17.0