source: trunk/source/track/include/G4ParticleChangeForTransport.icc@ 1261

Last change on this file since 1261 was 1058, checked in by garnier, 17 years ago

file release beta

File size: 4.9 KB
Line 
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// $Id: G4ParticleChangeForTransport.icc,v 1.13 2006/06/29 21:14:33 gunter Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30//
31inline
32 void G4ParticleChangeForTransport::SetTouchableHandle(const G4TouchableHandle&
33fTouchable)
34{
35 theTouchableHandle = fTouchable;
36}
37
38inline
39 const G4TouchableHandle& G4ParticleChangeForTransport::GetTouchableHandle() const
40{
41 return theTouchableHandle;
42}
43
44
45inline
46 void G4ParticleChangeForTransport::SetMaterialInTouchable(G4Material* fMaterial)
47{
48 theMaterialChange = fMaterial;
49}
50
51inline
52 G4Material* G4ParticleChangeForTransport::GetMaterialInTouchable() const
53{
54 return theMaterialChange;
55}
56
57inline
58 void G4ParticleChangeForTransport::SetMaterialCutsCoupleInTouchable(const G4MaterialCutsCouple* fMaterialCutsCouple)
59{
60 theMaterialCutsCoupleChange = fMaterialCutsCouple;
61}
62
63inline
64 const G4MaterialCutsCouple* G4ParticleChangeForTransport::GetMaterialCutsCoupleInTouchable() const
65{
66 return theMaterialCutsCoupleChange;
67}
68
69inline
70 void G4ParticleChangeForTransport::SetSensitiveDetectorInTouchable(G4VSensitiveDetector* fSensitiveDetector)
71{
72 theSensitiveDetectorChange = fSensitiveDetector;
73}
74
75inline
76 G4VSensitiveDetector* G4ParticleChangeForTransport::GetSensitiveDetectorInTouchable() const
77{
78 return theSensitiveDetectorChange;
79}
80
81inline
82G4bool G4ParticleChangeForTransport::GetMomentumChanged() const
83{
84 return isMomentumChanged;
85}
86
87inline
88void G4ParticleChangeForTransport::SetMomentumChanged(G4bool b)
89{
90 isMomentumChanged= b;
91}
92
93//----------------------------------------------------------------
94// functions for Initialization
95//
96
97inline void G4ParticleChangeForTransport::Initialize(const G4Track& track)
98{
99 // use base class's method at first
100 InitializeStatusChange(track);
101// InitializeLocalEnergyDeposit(track);
102 InitializeSteppingControl(track);
103// InitializeTrueStepLength(track);
104// InitializeSecondaries(track);
105
106 // set Energy/Momentum etc. equal to those of the parent particle
107 const G4DynamicParticle* pParticle = track.GetDynamicParticle();
108// theEnergyChange = pParticle->GetKineticEnergy();
109// theMomentumChange = pParticle->GetMomentumDirection();
110 thePolarizationChange = pParticle->GetPolarization();
111// theProperTimeChange = pParticle->GetProperTime();
112
113 // set Position/Time etc. equal to those of the parent track
114// thePositionChange = track.GetPosition();
115// theTimeChange = track.GetGlobalTime();
116
117 // set touchable equal to the next touchable of the parent track
118 // not set as for now
119 //theTouchableChange = track.GetNextTouchable();
120
121// So almost nothing is initialized here.
122// theMomentumChange, theProperTimeChange, thePositionChange and theTimeChange
123// are set by G4Transportation::AlongStepDoIt;
124// the others are not needed.
125// Take care when implementing the PostStep related things!
126// (P. Urban)
127}
128
129// Prototype implementation of smooth representation of curved trajectories.
130
131inline void
132G4ParticleChangeForTransport::
133SetPointerToVectorOfAuxiliaryPoints( std::vector<G4ThreeVector>*
134 theNewVectorPointer )
135{
136 fpVectorOfAuxiliaryPointsPointer = theNewVectorPointer;
137}
138
139inline std::vector<G4ThreeVector>*
140G4ParticleChangeForTransport::GetPointerToVectorOfAuxiliaryPoints() const
141{
142 return fpVectorOfAuxiliaryPointsPointer;
143}
144
145
146
147
148
149
Note: See TracBrowser for help on using the repository browser.