Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
tracking
src
G4TrajectoryPoint.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
//
27
// $Id: G4TrajectoryPoint.cc 67009 2013-01-29 16:00:21Z gcosmo $
28
//
29
// ---------------------------------------------------------------
30
//
31
// G4TrajectoryPoint.cc
32
//
33
// ---------------------------------------------------------------
34
35
#include "
G4TrajectoryPoint.hh
"
36
37
#include "
G4AttDefStore.hh
"
38
#include "
G4AttDef.hh
"
39
#include "
G4AttValue.hh
"
40
#include "
G4UnitsTable.hh
"
41
42
//#define G4ATTDEBUG
43
#ifdef G4ATTDEBUG
44
#include "
G4AttCheck.hh
"
45
#endif
46
47
G4Allocator<G4TrajectoryPoint>
aTrajectoryPointAllocator
;
48
49
G4TrajectoryPoint::G4TrajectoryPoint
()
50
{
51
fPosition =
G4ThreeVector
(0.,0.,0.);
52
}
53
54
G4TrajectoryPoint::G4TrajectoryPoint
(
G4ThreeVector
pos)
55
{
56
fPosition = pos;
57
}
58
59
G4TrajectoryPoint::G4TrajectoryPoint
(
const
G4TrajectoryPoint
&
right
)
60
:
G4VTrajectoryPoint
(),fPosition(right.fPosition)
61
{
62
}
63
64
G4TrajectoryPoint::~G4TrajectoryPoint
()
65
{
66
}
67
68
const
std::map<G4String,G4AttDef>*
G4TrajectoryPoint::GetAttDefs
()
const
69
{
70
G4bool
isNew;
71
std::map<G4String,G4AttDef>* store
72
=
G4AttDefStore::GetInstance
(
"G4TrajectoryPoint"
,isNew);
73
if
(isNew) {
74
G4String
Pos
(
"Pos"
);
75
(*store)[
Pos
] =
76
G4AttDef
(Pos,
"Position"
,
"Physics"
,
"G4BestUnit"
,
"G4ThreeVector"
);
77
}
78
return
store;
79
}
80
81
std::vector<G4AttValue>*
G4TrajectoryPoint::CreateAttValues
()
const
82
{
83
std::vector<G4AttValue>* values =
new
std::vector<G4AttValue>;
84
85
values->push_back(
G4AttValue
(
"Pos"
,
G4BestUnit
(fPosition,
"Length"
),
""
));
86
87
#ifdef G4ATTDEBUG
88
G4cout
<<
G4AttCheck
(values,
GetAttDefs
());
89
#endif
90
91
return
values;
92
}
Generated on Sat May 25 2013 14:34:12 for Geant4 by
1.8.4