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
WLSTrajectory.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file WLSTrajectory.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
//
26
//
29
//
30
31
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
32
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
33
34
#ifndef WLSTrajectory_h_seen
35
#define WLSTrajectory_h_seen 1
36
37
#include <vector>
38
#include <stdlib.h>
39
40
#include "
globals.hh
"
41
42
#include "
G4ios.hh
"
43
#include "
G4Step.hh
"
44
#include "
G4Track.hh
"
45
#include "
G4Allocator.hh
"
46
#include "
G4VTrajectory.hh
"
47
#include "
G4ParticleDefinition.hh
"
48
#include "
G4TrajectoryPoint.hh
"
49
50
typedef
std::vector<G4VTrajectoryPoint*>
WLSTrajectoryPointContainer
;
51
52
class
WLSTrajectory
:
public
G4VTrajectory
53
{
54
55
//--------
56
public
:
// without description
57
//--------
58
59
// Constructor/Destructor
60
61
WLSTrajectory
();
62
WLSTrajectory
(
const
G4Track
* );
63
WLSTrajectory
(
WLSTrajectory
&);
64
virtual
~WLSTrajectory
();
65
66
// Operators
67
68
inline
void
*
operator
new
(size_t);
69
inline
void
operator
delete
(
void
*);
70
inline
int
operator ==
(
const
WLSTrajectory
&
right
)
const
71
{
return
(
this
==&right); }
72
73
// Get/Set functions
74
75
inline
virtual
G4int
GetTrackID
()
const
{
return
fTrackID
; }
76
inline
virtual
G4int
GetParentID
()
const
{
return
fParentID
; }
77
inline
virtual
G4String
GetParticleName
()
const
{
return
fParticleName
; }
78
inline
virtual
G4double
GetCharge
()
const
{
return
fPDGCharge
; }
79
inline
virtual
G4int
GetPDGEncoding
()
const
{
return
fPDGEncoding
; }
80
inline
virtual
G4ThreeVector
GetInitialMomentum
()
const
81
{
return
fInitialMomentum
;}
82
83
// Other member functions
84
85
virtual
void
ShowTrajectory
(std::ostream& os=G4cout)
const
;
86
virtual
void
AppendStep
(
const
G4Step
* aStep);
87
virtual
void
MergeTrajectory
(
G4VTrajectory
* secondTrajectory);
88
89
G4ParticleDefinition
*
GetParticleDefinition
();
90
91
virtual
int
GetPointEntries
()
const
92
{
return
fpPointsContainer
->size(); }
93
virtual
G4VTrajectoryPoint
*
GetPoint
(
G4int
i)
const
94
{
return
(*
fpPointsContainer
)[i]; }
95
96
virtual
const
std::map<G4String,G4AttDef>*
GetAttDefs
()
const
;
97
virtual
std::vector<G4AttValue>*
CreateAttValues
()
const
;
98
99
//---------
100
private
:
101
//---------
102
103
// Member data
104
105
WLSTrajectoryPointContainer
*
fpPointsContainer
;
106
107
G4int
fTrackID
;
108
G4int
fParentID
;
109
G4double
fPDGCharge
;
110
G4int
fPDGEncoding
;
111
G4String
fParticleName
;
112
G4ThreeVector
fInitialMomentum
;
113
114
G4ParticleDefinition
*
fParticleDefinition
;
115
116
};
117
118
extern
G4ThreadLocal
G4Allocator<WLSTrajectory>
*
WLSTrajectoryAllocator
;
119
120
inline
void
* WLSTrajectory::operator
new
(size_t) {
121
if
(!
WLSTrajectoryAllocator
)
122
WLSTrajectoryAllocator
=
new
G4Allocator<WLSTrajectory>
;
123
return
(
void
*)
WLSTrajectoryAllocator
->MallocSingle();
124
}
125
126
inline
void
WLSTrajectory::operator
delete
(
void
* aTrajectory) {
127
WLSTrajectoryAllocator
->FreeSingle((
WLSTrajectory
*)aTrajectory);
128
}
129
130
#endif
geant4
tree
geant4-10.6-release
examples
extended
optical
wls
include
WLSTrajectory.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:08
using
1.8.2 with
ECCE GitHub integration