Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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
46/** Similar to G4ParticleChange, but deal with two tracks
47 * rather than one.
48 */
49
51{
52public:
53 /** Default constructor */
55 /** Default destructor */
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
75
76 //_____________________________________________________
77 // Not to be used in reaction processes
81
84
85 const G4Track* GetTrackA();
86 const G4Track* GetTrackB();
87
88protected:
89 /** Copy constructor
90 * \param other Object to copy from
91 */
93 /** Assignment operator
94 * \param other Object to assign from
95 * \return A reference to this
96 */
98 // equal/unequal operator
101 // "equal" means that the objects have the same pointer.
102protected:
103 std::map<const G4Track*, G4VParticleChange*> fParticleChange;
108};
109
111{
112 return (*fSecondaries)[anIndex];
113}
114
116{
118}
119
121{
122 fKillParents = kill;
123}
124
126{
127 return fKillParents ;
128}
129
131{
132 return fSecondaries;
133}
134
135#endif // G4ITReactionChange_H
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
G4bool operator!=(const G4ITReactionChange &right) const
const G4Track * GetTrackB()
std::map< const G4Track *, G4VParticleChange * > fParticleChange
G4TrackFastVector * GetfSecondary()
G4bool WereParentsKilled() const
G4VParticleChange * GetParticleChange(const G4Track *)
void AddSecondary(G4Track *aSecondary)
G4int GetNumberOfSecondaries() const
G4ITReactionChange & operator=(const G4ITReactionChange &other)
G4TrackFastVector * fSecondaries
void Initialize(const G4Track &, const G4Track &, G4VParticleChange *particleChangeA=0, G4VParticleChange *particleChangeB=0)
const G4Track * GetTrackA()
G4bool operator==(const G4ITReactionChange &right) const
void UpdateStepInfo(G4Step *, G4Step *)
G4Track * GetSecondary(G4int) const
Definition: G4Step.hh:78