ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RE04Trajectory.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RE04Trajectory.hh
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
//
28
//
29
//
30
#ifndef RE04Trajectory_h
31
#define RE04Trajectory_h 1
32
33
#include "
G4VTrajectory.hh
"
34
#include "
G4Allocator.hh
"
35
#include <stdlib.h>
// Include from 'system'
36
#include "
G4ios.hh
"
// Include from 'system'
37
#include <vector>
// G4RWTValOrderedVector
38
#include "
globals.hh
"
// Include from 'global'
39
#include "
G4ParticleDefinition.hh
"
// Include from 'particle+matter'
40
#include "
RE04TrajectoryPoint.hh
"
// Include from 'tracking'
41
#include "
G4Track.hh
"
42
#include "
G4Step.hh
"
43
44
class
G4Polyline
;
// Forward declaration.
45
46
typedef
std::vector<G4VTrajectoryPoint*>
TrajectoryPointContainer
;
47
48
//
87
//
89
class
RE04Trajectory
:
public
G4VTrajectory
91
{
92
93
//--------
94
public
:
95
//--------
96
97
// Constructor/Destrcutor
98
99
RE04Trajectory
();
100
101
RE04Trajectory
(
const
G4Track
* aTrack);
102
RE04Trajectory
(
RE04Trajectory
&);
103
virtual
~RE04Trajectory
();
104
105
// Operators
106
inline
void
*
operator
new
(size_t);
107
inline
void
operator
delete
(
void
*);
108
inline
int
operator ==
(
const
RE04Trajectory
&
right
)
const
109
{
return
(
this
==&right);}
110
111
// Get/Set functions
112
inline
virtual
G4int
GetTrackID
()
const
113
{
return
fTrackID
; }
114
inline
virtual
G4int
GetParentID
()
const
115
{
return
fParentID
; }
116
inline
virtual
G4String
GetParticleName
()
const
117
{
return
fParticleName
; }
118
inline
virtual
G4double
GetCharge
()
const
119
{
return
fPDGCharge
; }
120
inline
virtual
G4int
GetPDGEncoding
()
const
121
{
return
fPDGEncoding
; }
122
inline
virtual
G4double
GetInitialKineticEnergy
()
const
123
{
return
fInitialKineticEnergy
; }
124
inline
virtual
G4ThreeVector
GetInitialMomentum
()
const
125
{
return
fInitialMomentum
; }
126
127
// Other member functions
128
virtual
void
ShowTrajectory
(std::ostream& os=G4cout)
const
;
129
//virtual void DrawTrajectory() const;
130
virtual
void
DrawTrajectory
()
const
;
131
virtual
void
AppendStep
(
const
G4Step
* aStep);
132
virtual
int
GetPointEntries
()
const
{
return
fPositionRecord
->size(); }
133
virtual
G4VTrajectoryPoint
*
GetPoint
(
G4int
i)
const
134
{
return
(*
fPositionRecord
)[i]; }
135
virtual
void
MergeTrajectory
(
G4VTrajectory
* secondTrajectory);
136
137
G4ParticleDefinition
*
GetParticleDefinition
();
138
139
virtual
const
std::map<G4String,G4AttDef>*
GetAttDefs
()
const
;
140
virtual
std::vector<G4AttValue>*
CreateAttValues
()
const
;
141
142
//---------
143
private
:
144
//---------
145
146
TrajectoryPointContainer
*
fPositionRecord
;
147
G4int
fTrackID
;
148
G4int
fParentID
;
149
G4int
fPDGEncoding
;
150
G4double
fPDGCharge
;
151
G4String
fParticleName
;
152
G4double
fInitialKineticEnergy
;
153
G4ThreeVector
fInitialMomentum
;
154
155
};
156
157
extern
G4ThreadLocal
G4Allocator<RE04Trajectory>
*
faTrajAllocator
;
158
159
inline
void
* RE04Trajectory::operator
new
(size_t)
160
{
161
if
(!
faTrajAllocator
)
faTrajAllocator
=
new
G4Allocator<RE04Trajectory>
;
162
return
(
void
*)
faTrajAllocator
->MallocSingle();
163
}
164
165
inline
void
RE04Trajectory::operator
delete
(
void
* aTrajectory)
166
{
167
faTrajAllocator
->FreeSingle((
RE04Trajectory
*)aTrajectory);
168
}
169
170
#endif
171
geant4
tree
geant4-10.6-release
examples
extended
runAndEvent
RE04
include
RE04Trajectory.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:10
using
1.8.2 with
ECCE GitHub integration