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
G4PrimaryTransformer.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4PrimaryTransformer.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
//
27
//
28
29
#ifndef G4PromaryTransformer_h
30
#define G4PromaryTransformer_h 1
31
32
#include "
G4TrackVector.hh
"
33
#include "
G4ParticleTable.hh
"
34
#include "
globals.hh
"
35
class
G4Event
;
36
class
G4PrimaryVertex
;
37
#include "
G4PrimaryParticle.hh
"
38
#include "
G4DynamicParticle.hh
"
39
40
// class description:
41
//
42
// This class is exclusively used by G4EventManager for the conversion
43
// from G4PrimaryVertex/G4PrimaryParticle to G4DynamicParticle/G4Track.
44
//
45
46
class
G4PrimaryTransformer
47
{
48
public
:
49
G4PrimaryTransformer
();
50
virtual
~G4PrimaryTransformer
();
51
52
G4TrackVector
*
GimmePrimaries
(
G4Event
* anEvent,
G4int
trackIDCounter=0);
53
void
CheckUnknown
();
54
55
protected
:
56
G4TrackVector
TV
;
57
G4ParticleTable
*
particleTable
;
58
G4int
verboseLevel
;
59
G4int
trackID
;
60
61
G4ParticleDefinition
*
unknown
;
62
G4bool
unknownParticleDefined
;
63
G4ParticleDefinition
*
opticalphoton
;
64
G4bool
opticalphotonDefined
;
65
66
G4int
nWarn
;
67
68
public
:
69
inline
void
SetVerboseLevel
(
G4int
vl)
70
{
verboseLevel
= vl; };
71
72
public
:
//with description
73
void
SetUnknnownParticleDefined
(
G4bool
vl);
74
// By invoking this Set method, the user can alter the treatment of unknown
75
// particle. The ideal place to invoke this method is in the BeginOfRunAction.
76
77
inline
G4bool
GetUnknownParticleDefined
()
const
78
{
return
unknownParticleDefined
; }
79
80
protected
:
81
void
GenerateTracks
(
G4PrimaryVertex
* primaryVertex);
82
void
GenerateSingleTrack
(
G4PrimaryParticle
* primaryParticle,
83
G4double
x0,
G4double
y0,
G4double
z0
,
G4double
t0,
G4double
wv);
84
void
SetDecayProducts
(
G4PrimaryParticle
* mother,
85
G4DynamicParticle
* motherDP);
86
G4bool
CheckDynamicParticle
(
G4DynamicParticle
*DP);
87
88
protected
:
//with description
89
// Following two virtual methods are provided to customize the use of PrimaryTransformer
90
// for particle types exotic to Geant4.
91
92
virtual
G4ParticleDefinition
*
GetDefinition
(
G4PrimaryParticle
*
pp
);
93
// Return appropriate G4ParticleDefinition w.r.t. the primary particle.
94
// If NULL is returned, the particle will not be treated as a track, but its daughters
95
// will be examined in case it has "pre-assigned decay products".
96
97
virtual
G4bool
IsGoodForTrack
(
G4ParticleDefinition
*pd);
98
// Return true if a primary particle should be converted into a track.
99
// By default, all particles of non-shortlived and shortlived with valid decay
100
// tables are converted.
101
};
102
103
#endif
104
105
geant4
tree
geant4-10.6-release
source
event
include
G4PrimaryTransformer.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:13
using
1.8.2 with
ECCE GitHub integration