Download
|
User Forum
|
Contact Us
|
Bug Reports
Home
>
Examples
Loading...
Searching...
No Matches
extended
runAndEvent
RE04
src
RE04TrajectoryPoint.cc
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
/// \file runAndEvent/RE04/src/RE04TrajectoryPoint.cc
27
/// \brief Implementation of the RE04TrajectoryPoint class
28
//
29
//
30
#include "
RE04TrajectoryPoint.hh
"
31
32
#include "G4AttDefStore.hh"
33
#include "G4AttDef.hh"
34
#include "G4AttValue.hh"
35
#include "G4UnitsTable.hh"
36
37
#include "G4Material.hh"
38
39
//#define G4ATTDEBUG
40
#ifdef G4ATTDEBUG
41
#include "G4AttCheck.hh"
42
#endif
43
44
G4ThreadLocal
G4Allocator<RE04TrajectoryPoint>
*
faTrajPointAllocator
= 0;
45
46
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
47
RE04TrajectoryPoint::RE04TrajectoryPoint
()
48
:
G4VTrajectoryPoint
(),
49
fPosition(G4ThreeVector(0.,0.,0.)),
50
fpMaterial(0)
51
{
52
}
53
54
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
55
RE04TrajectoryPoint::RE04TrajectoryPoint
(G4ThreeVector pos,
56
const
G4Material
* mat)
57
:
G4VTrajectoryPoint
(),
58
fPosition(pos),
59
fpMaterial(mat)
60
{
61
}
62
63
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
64
RE04TrajectoryPoint::RE04TrajectoryPoint
(
const
RE04TrajectoryPoint
&
right
)
65
:
G4VTrajectoryPoint
(),
66
fPosition(
right
.fPosition),
67
fpMaterial(
right
.fpMaterial)
68
{
69
}
70
71
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
72
RE04TrajectoryPoint::~RE04TrajectoryPoint
()
73
{
74
}
75
76
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
77
const
std::map<G4String,G4AttDef>*
RE04TrajectoryPoint::GetAttDefs
()
const
78
{
79
G4bool isNew;
80
std::map<G4String,G4AttDef>* store
81
= G4AttDefStore::GetInstance(
"RE04TrajectoryPoint"
,isNew);
82
if
(isNew) {
83
G4String
pos(
"Pos"
);
84
(*store)[pos] =
85
G4AttDef
(pos,
"Position"
,
"Physics"
,
"G4BestUnit"
,
"G4ThreeVector"
);
86
G4String
mat(
"Mat"
);
87
(*store)[mat] =
88
G4AttDef
(mat,
"Mat"
,
"Physics"
,
"Name"
,
"G4String"
);
89
}
90
return
store;
91
}
92
93
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
94
std::vector<G4AttValue>*
RE04TrajectoryPoint::CreateAttValues
()
const
95
{
96
std::vector<G4AttValue>* values =
new
std::vector<G4AttValue>;
97
98
values->push_back(
G4AttValue
(
"Pos"
,
G4BestUnit
(
fPosition
,
"Length"
),
""
));
99
values->push_back(
G4AttValue
(
"Mat"
,
fpMaterial
->GetName(),
""
));
100
101
#ifdef G4ATTDEBUG
102
G4cout <<
G4AttCheck
(values,
GetAttDefs
());
103
#endif
104
105
return
values;
106
}
right
@ right
Definition
F04UserTrackInformation.hh:36
faTrajPointAllocator
G4ThreadLocal G4Allocator< RE04TrajectoryPoint > * faTrajPointAllocator
Definition
RE04TrajectoryPoint.cc:44
RE04TrajectoryPoint.hh
Definition of the RE04TrajectoryPoint class.
G4Allocator
G4AttCheck
G4AttDef
G4AttValue
G4BestUnit
G4Material
G4String
G4VTrajectoryPoint
RE04TrajectoryPoint
Trajectory point class.
Definition
Doxymodules_runAndEvent.h:92
RE04TrajectoryPoint::fPosition
G4ThreeVector fPosition
Definition
RE04TrajectoryPoint.hh:92
RE04TrajectoryPoint::~RE04TrajectoryPoint
virtual ~RE04TrajectoryPoint()
Definition
RE04TrajectoryPoint.cc:72
RE04TrajectoryPoint::fpMaterial
const G4Material * fpMaterial
Definition
RE04TrajectoryPoint.hh:93
RE04TrajectoryPoint::RE04TrajectoryPoint
RE04TrajectoryPoint()
Definition
RE04TrajectoryPoint.cc:47
RE04TrajectoryPoint::CreateAttValues
virtual std::vector< G4AttValue > * CreateAttValues() const
Definition
RE04TrajectoryPoint.cc:94
RE04TrajectoryPoint::GetAttDefs
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
Definition
RE04TrajectoryPoint.cc:77
Generated on Tue Jan 30 2024 12:18:45 for Geant4 examples by
1.9.8
Applications
|
User Support
|
Publications
|
Collaboration