| [826] | 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: G4Step.hh,v 1.19 2008/01/12 12:00:25 kurasige Exp $
|
|---|
| [850] | 28 | // GEANT4 tag $Name: HEAD $
|
|---|
| [826] | 29 | //
|
|---|
| 30 | //
|
|---|
| 31 | //---------------------------------------------------------------
|
|---|
| 32 | //
|
|---|
| 33 | // G4Step.hh
|
|---|
| 34 | //
|
|---|
| 35 | // Class Description:
|
|---|
| 36 | // This class represents the Step of a particle tracked.
|
|---|
| 37 | // It includes information of
|
|---|
| 38 | // 1) List of Step points which compose the Step,
|
|---|
| 39 | // 2) static information of particle which generated the
|
|---|
| 40 | // Step,
|
|---|
| 41 | // 3) trackID and parent particle ID of the Step,
|
|---|
| 42 | // 4) termination condition of the Step,
|
|---|
| 43 | //
|
|---|
| 44 | // Contact:
|
|---|
| 45 | // Questions and comments to this code should be sent to
|
|---|
| 46 | // Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
|
|---|
| 47 | // Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
|
|---|
| 48 | //
|
|---|
| 49 | // ---------------------------------------------------------------
|
|---|
| 50 | // Modified for the new G4ParticleChange 12 Mar. 1998 H.Kurahige
|
|---|
| 51 | // Correct treatment of touchable in G4Step::UpdateTrack
|
|---|
| 52 | // 12 May. 1998 H.Kurashige
|
|---|
| 53 | // ---------------------------------------------------------------
|
|---|
| 54 | // Separate implementation of inline functions inti G4Step.icc
|
|---|
| 55 | // Add updating mass/charge 6 Oct. 1999 H.Kurashige
|
|---|
| 56 | // add nonIonizingEnergyLoss 26 Mar. 2007 H.Kurashige
|
|---|
| 57 | //
|
|---|
| 58 | // Repository test - Dennis Wright
|
|---|
| 59 | //
|
|---|
| 60 | #ifndef G4Step_h
|
|---|
| 61 | #define G4Step_h 1
|
|---|
| 62 |
|
|---|
| 63 | #include <stdlib.h> // Include from 'system'
|
|---|
| 64 | #include <cmath> // Include from 'system'
|
|---|
| 65 | #include "G4ios.hh" // Include from 'system'
|
|---|
| 66 | #include <iomanip> // Include from 'system'
|
|---|
| 67 | #include "globals.hh" // Include from 'global'
|
|---|
| 68 | #include "G4ThreeVector.hh" // Include from 'global'
|
|---|
| 69 | #include "G4VPhysicalVolume.hh" // Include from 'geometry'
|
|---|
| 70 | #include "G4StepPoint.hh" // Include from 'track'
|
|---|
| 71 | #include "G4StepStatus.hh" // Include from 'track'
|
|---|
| 72 | class G4Polyline; // Forward declaration.
|
|---|
| 73 | class G4Track; // Forward declaration.
|
|---|
| 74 | #include "G4TrackVector.hh" // Include from 'tracking'
|
|---|
| 75 |
|
|---|
| 76 | ////////////
|
|---|
| 77 | class G4Step
|
|---|
| 78 | ////////////
|
|---|
| 79 | {
|
|---|
| 80 |
|
|---|
| 81 | //--------
|
|---|
| 82 | public:
|
|---|
| 83 |
|
|---|
| 84 | // Constructor/Destrcutor
|
|---|
| 85 | G4Step();
|
|---|
| 86 | ~G4Step();
|
|---|
| 87 |
|
|---|
| 88 | //--------
|
|---|
| 89 | public: // WIth description
|
|---|
| 90 |
|
|---|
| 91 | // Get/Set functions
|
|---|
| 92 | // currnet track
|
|---|
| 93 | G4Track* GetTrack() const;
|
|---|
| 94 | void SetTrack(G4Track* value);
|
|---|
| 95 |
|
|---|
| 96 | // step points
|
|---|
| 97 | G4StepPoint* GetPreStepPoint() const;
|
|---|
| 98 | void SetPreStepPoint(G4StepPoint* value);
|
|---|
| 99 |
|
|---|
| 100 | G4StepPoint* GetPostStepPoint() const;
|
|---|
| 101 | void SetPostStepPoint(G4StepPoint* value);
|
|---|
| 102 |
|
|---|
| 103 | // step length
|
|---|
| 104 | G4double GetStepLength() const;
|
|---|
| 105 | void SetStepLength(G4double value);
|
|---|
| 106 | // Before the end of the AlongStepDoIt loop,StepLength keeps
|
|---|
| 107 | // the initial value which is determined by the shortest geometrical Step
|
|---|
| 108 | // proposed by a physics process. After finishing the AlongStepDoIt,
|
|---|
| 109 | // it will be set equal to 'StepLength' in G4Step.
|
|---|
| 110 |
|
|---|
| 111 | // total energy deposit
|
|---|
| 112 | G4double GetTotalEnergyDeposit() const;
|
|---|
| 113 | void SetTotalEnergyDeposit(G4double value);
|
|---|
| 114 |
|
|---|
| 115 | // total non-ionizing energy deposit
|
|---|
| 116 | G4double GetNonIonizingEnergyDeposit() const;
|
|---|
| 117 | void SetNonIonizingEnergyDeposit(G4double value);
|
|---|
| 118 |
|
|---|
| 119 | // cotrole flag for stepping
|
|---|
| 120 | G4SteppingControl GetControlFlag() const;
|
|---|
| 121 | void SetControlFlag(G4SteppingControl StepControlFlag);
|
|---|
| 122 |
|
|---|
| 123 | // difference of position, time, momentum and energy
|
|---|
| 124 | G4ThreeVector GetDeltaPosition() const;
|
|---|
| 125 | G4double GetDeltaTime() const;
|
|---|
| 126 |
|
|---|
| 127 | G4ThreeVector GetDeltaMomentum() const;
|
|---|
| 128 | G4double GetDeltaEnergy() const;
|
|---|
| 129 |
|
|---|
| 130 | // manipulation of total energy deposit
|
|---|
| 131 | void AddTotalEnergyDeposit(G4double value);
|
|---|
| 132 | void ResetTotalEnergyDeposit();
|
|---|
| 133 |
|
|---|
| 134 | // manipulation of non-ionizng energy deposit
|
|---|
| 135 | void AddNonIonizingEnergyDeposit(G4double value);
|
|---|
| 136 | void ResetNonIonizingEnergyDeposit();
|
|---|
| 137 |
|
|---|
| 138 |
|
|---|
| 139 | // Get/Set/Clear flag for initial/last step
|
|---|
| 140 | G4bool IsFirstStepInVolume() const;
|
|---|
| 141 | G4bool IsLastStepInVolume() const;
|
|---|
| 142 |
|
|---|
| 143 | void SetFirstStepFlag();
|
|---|
| 144 | void ClearFirstStepFlag();
|
|---|
| 145 | void SetLastStepFlag();
|
|---|
| 146 | void ClearLastStepFlag();
|
|---|
| 147 |
|
|---|
| 148 | // Other member functions
|
|---|
| 149 | void InitializeStep( G4Track* aValue );
|
|---|
| 150 | // initiaize contents of G4Step
|
|---|
| 151 |
|
|---|
| 152 | void UpdateTrack( );
|
|---|
| 153 | // update track by using G4Step information
|
|---|
| 154 |
|
|---|
| 155 | void CopyPostToPreStepPoint( );
|
|---|
| 156 | // copy PostStepPoint to PreStepPoint
|
|---|
| 157 |
|
|---|
| 158 | G4Polyline* CreatePolyline () const;
|
|---|
| 159 | // for visualization
|
|---|
| 160 |
|
|---|
| 161 | //-----------
|
|---|
| 162 | protected:
|
|---|
| 163 | //-----------
|
|---|
| 164 |
|
|---|
| 165 | // Member data
|
|---|
| 166 | G4double fTotalEnergyDeposit;
|
|---|
| 167 | // Accummulated total energy desposit in the current Step
|
|---|
| 168 |
|
|---|
| 169 | G4double fNonIonizingEnergyDeposit;
|
|---|
| 170 | // Accummulated non-ionizing energy desposit in the current Step
|
|---|
| 171 |
|
|---|
| 172 | //---------
|
|---|
| 173 | private:
|
|---|
| 174 | //---------
|
|---|
| 175 |
|
|---|
| 176 | // Member data
|
|---|
| 177 | G4StepPoint* fpPreStepPoint;
|
|---|
| 178 | G4StepPoint* fpPostStepPoint;
|
|---|
| 179 | G4double fStepLength;
|
|---|
| 180 | // Step length which may be updated at each invocation of
|
|---|
| 181 | // AlongStepDoIt and PostStepDoIt
|
|---|
| 182 | G4Track* fpTrack;
|
|---|
| 183 | //
|
|---|
| 184 | G4SteppingControl fpSteppingControlFlag;
|
|---|
| 185 | // A flag to control SteppingManager behavier from process
|
|---|
| 186 |
|
|---|
| 187 | // flag for initial/last step
|
|---|
| 188 | G4bool fFirstStepInVolume;
|
|---|
| 189 | G4bool fLastStepInVolume;
|
|---|
| 190 |
|
|---|
| 191 | // Secondary buckets
|
|---|
| 192 | public:
|
|---|
| 193 | G4TrackVector* GetSecondary() const;
|
|---|
| 194 | G4TrackVector* GetfSecondary();
|
|---|
| 195 | G4TrackVector* NewSecondaryVector();
|
|---|
| 196 | void DeleteSecondaryVector();
|
|---|
| 197 | void SetSecondary( G4TrackVector* value);
|
|---|
| 198 | private:
|
|---|
| 199 | G4TrackVector* fSecondary;
|
|---|
| 200 |
|
|---|
| 201 | // Prototyping implementation of smooth representation of curved
|
|---|
| 202 | // trajectories. (jacek 30/10/2002)
|
|---|
| 203 | public:
|
|---|
| 204 | // Auxiliary points are ThreeVectors for now; change to
|
|---|
| 205 | // G4VAuxiliaryPoints or some such (jacek 30/10/2002)
|
|---|
| 206 | void SetPointerToVectorOfAuxiliaryPoints( std::vector<G4ThreeVector>* theNewVectorPointer ) {
|
|---|
| 207 | fpVectorOfAuxiliaryPointsPointer = theNewVectorPointer;
|
|---|
| 208 | }
|
|---|
| 209 | std::vector<G4ThreeVector>* GetPointerToVectorOfAuxiliaryPoints() const {
|
|---|
| 210 | return fpVectorOfAuxiliaryPointsPointer;
|
|---|
| 211 | }
|
|---|
| 212 | private:
|
|---|
| 213 | // Explicity including the word "Pointer" in the name as I keep
|
|---|
| 214 | // forgetting the * (jacek 30/10/2002)
|
|---|
| 215 | std::vector<G4ThreeVector>* fpVectorOfAuxiliaryPointsPointer;
|
|---|
| 216 |
|
|---|
| 217 | };
|
|---|
| 218 |
|
|---|
| 219 | #include "G4Step.icc"
|
|---|
| 220 |
|
|---|
| 221 |
|
|---|
| 222 | #endif
|
|---|