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
processes
electromagnetic
dna
management
include
G4ITReactionChange.hh
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
// $Id: G4ITReactionChange.hh 64057 2012-10-30 15:04:49Z gcosmo $
27
//
28
// Author: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
29
//
30
// WARNING : This class is released as a prototype.
31
// It might strongly evolve or even disapear in the next releases.
32
//
33
// History:
34
// -----------
35
// 10 Oct 2011 M.Karamitros created
36
//
37
// -------------------------------------------------------------------
38
39
#ifndef G4ITReactionChange_H
40
#define G4ITReactionChange_H
41
42
#include "
globals.hh
"
43
#include "
G4ParticleChange.hh
"
44
#include "
G4TrackFastVector.hh
"
45
50
class
G4ITReactionChange
51
{
52
public
:
54
G4ITReactionChange
();
56
virtual
~G4ITReactionChange
();
57
58
//_____________________________________________________
59
// To be used by reaction processes
60
void
Initialize
(
const
G4Track
&,
61
const
G4Track
&,
62
G4VParticleChange
* particleChangeA = 0,
63
G4VParticleChange
* particleChangeB = 0
64
) ;
65
void
AddSecondary
(
G4Track
* aSecondary);
66
inline
void
KillParents
(
G4bool
);
67
68
// If both parents are not killed therefore
69
// we can used the particle change
70
// you will have to give the pointers
71
// of your particleChange while intializing
72
// but it might tell you that energy is not
73
// conserved for instance
74
G4VParticleChange
*
GetParticleChange
(
const
G4Track
*);
75
76
//_____________________________________________________
77
// Not to be used in reaction processes
78
void
UpdateStepInfo
(
G4Step
*,
G4Step
*);
79
G4Track
*
GetSecondary
(
G4int
)
const
;
80
G4TrackFastVector
*
GetfSecondary
() ;
81
82
G4int
GetNumberOfSecondaries
()
const
;
83
G4bool
WereParentsKilled
()
const
;
84
85
const
G4Track
*
GetTrackA
();
86
const
G4Track
*
GetTrackB
();
87
88
protected
:
92
G4ITReactionChange
(
const
G4ITReactionChange
& other);
97
G4ITReactionChange
&
operator=
(
const
G4ITReactionChange
& other);
98
// equal/unequal operator
99
G4bool
operator==
(
const
G4ITReactionChange
&
right
)
const
;
100
G4bool
operator!=
(
const
G4ITReactionChange
&right)
const
;
101
// "equal" means that the objects have the same pointer.
102
protected
:
103
std::map<const G4Track*, G4VParticleChange*>
fParticleChange
;
104
G4TrackFastVector
*
fSecondaries
;
105
G4int
fNumberOfSecondaries
;
106
G4bool
fKillParents
;
107
G4bool
fParticleChangeIsSet
;
108
};
109
110
inline
G4Track
*
G4ITReactionChange::GetSecondary
(
G4int
anIndex)
const
111
{
112
return
(*
fSecondaries
)[anIndex];
113
}
114
115
inline
G4int
G4ITReactionChange::GetNumberOfSecondaries
()
const
116
{
117
return
fNumberOfSecondaries
;
118
}
119
120
inline
void
G4ITReactionChange::KillParents
(
G4bool
kill)
121
{
122
fKillParents
= kill;
123
}
124
125
inline
G4bool
G4ITReactionChange::WereParentsKilled
()
const
126
{
127
return
fKillParents
;
128
}
129
130
inline
G4TrackFastVector
*
G4ITReactionChange::GetfSecondary
()
131
{
132
return
fSecondaries
;
133
}
134
135
#endif // G4ITReactionChange_H
Generated on Sat May 25 2013 14:33:30 for Geant4 by
1.8.4