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[ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /track/include/G4ParticleChangeForGamma.hh (Version 11.3.0) and /track/include/G4ParticleChangeForGamma.hh (Version 10.6)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // G4ParticleChangeForGamma                    << 
 27 //                                                 26 //
 28 // Class description:                          << 
 29 //                                                 27 //
 30 // Concrete class for ParticleChange for gamma <<  28 //
 31                                                <<  29 // ------------------------------------------------------------
 32 // Author: Hisaya Kurashige, 23 March 1998     <<  30 //  GEANT 4 class header file
 33 // Revision: Vladimir Ivantchenko, 15 April 20 <<  31 //
 34 //                                 24 August 2 <<  32 //
 35 // ------------------------------------------- <<  33 // ------------------------------------------------------------
 36 #ifndef G4ParticleChangeForGamma_hh            <<  34 // 15 April 2005 V.Ivanchenko for gamma EM processes
 37 #define G4ParticleChangeForGamma_hh 1          <<  35 //
                                                   >>  36 // Modified:
                                                   >>  37 // 30.05.05 : add   UpdateStepForAtRest (V.Ivanchenko)
                                                   >>  38 // 04.12.05 : apply UpdateStepForPostStep in any case (mma) 
                                                   >>  39 // 26.08.06 : Add->Set polarization; 
                                                   >>  40 //            add const method to access track; 
                                                   >>  41 //            add weight modification (V.Ivanchenko) 
                                                   >>  42 //
                                                   >>  43 // ------------------------------------------------------------
                                                   >>  44 //
                                                   >>  45 //  Class Description
                                                   >>  46 //  This class is a concrete class for ParticleChange for gamma processes
                                                   >>  47 //
                                                   >>  48 #ifndef G4ParticleChangeForGamma_h
                                                   >>  49 #define G4ParticleChangeForGamma_h 1
 38                                                    50 
 39 #include "globals.hh"                              51 #include "globals.hh"
 40 #include "G4ios.hh"                                52 #include "G4ios.hh"
 41 #include "G4VParticleChange.hh"                    53 #include "G4VParticleChange.hh"
 42                                                    54 
 43 class G4DynamicParticle;                           55 class G4DynamicParticle;
 44                                                    56 
 45 class G4ParticleChangeForGamma final : public  <<  57 class G4ParticleChangeForGamma: public G4VParticleChange
 46 {                                                  58 {
 47 public:                                            59 public:
 48                                                <<  60   // default constructor
 49   G4ParticleChangeForGamma();                      61   G4ParticleChangeForGamma();
 50                                                    62 
 51   ~G4ParticleChangeForGamma() override = defau <<  63   // destructor
 52                                                <<  64   virtual ~G4ParticleChangeForGamma();
 53   G4ParticleChangeForGamma(const G4ParticleCha << 
 54   G4ParticleChangeForGamma& operator=(const G4 << 
 55                                                    65 
                                                   >>  66   // with description
                                                   >>  67   // ----------------------------------------------------
 56   // --- the following methods are for updatin     68   // --- the following methods are for updating G4Step -----
 57                                                    69 
 58   G4Step* UpdateStepForAtRest(G4Step* pStep) f <<  70   G4Step* UpdateStepForAtRest(G4Step* pStep);
 59   G4Step* UpdateStepForPostStep(G4Step* Step)  <<  71   G4Step* UpdateStepForPostStep(G4Step* Step);
 60       // A physics process gives the final sta <<  72   // A physics process gives the final state of the particle
 61       // based on information of G4Track       <<  73   // based on information of G4Track
 62                                                    74 
 63   inline void InitializeForPostStep(const G4Tr     75   inline void InitializeForPostStep(const G4Track&);
 64       // Initialize all properties by using G4 <<  76   //Initialize all propoerties by using G4Track information
 65                                                    77 
 66   void AddSecondary(G4DynamicParticle* aPartic     78   void AddSecondary(G4DynamicParticle* aParticle);
 67       // Add next secondary                    <<  79   // Add next secondary
 68                                                    80 
 69   inline G4double GetProposedKineticEnergy() c     81   inline G4double GetProposedKineticEnergy() const;
 70   inline void SetProposedKineticEnergy(G4doubl     82   inline void SetProposedKineticEnergy(G4double proposedKinEnergy);
 71       // Get/Set the final kinetic energy of t <<  83   // Get/Set the final kinetic energy of the current particle.
 72                                                    84 
 73   inline const G4ThreeVector& GetProposedMomen     85   inline const G4ThreeVector& GetProposedMomentumDirection() const;
                                                   >>  86   inline void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz);
 74   inline void ProposeMomentumDirection(const G     87   inline void ProposeMomentumDirection(const G4ThreeVector& Pfinal);
 75       // Get/Set the final momentum direction  <<  88   // Get/Propose the MomentumDirection vector: it is the final momentum direction.
 76                                                    89 
 77   inline const G4ThreeVector& GetProposedPolar     90   inline const G4ThreeVector& GetProposedPolarization() const;
 78   inline void ProposePolarization(const G4Thre     91   inline void ProposePolarization(const G4ThreeVector& dir);
 79   inline void ProposePolarization(G4double Px,     92   inline void ProposePolarization(G4double Px, G4double Py, G4double Pz);
 80                                                    93 
 81   void DumpInfo() const override;              <<  94   inline const G4Track* GetCurrentTrack() const;
                                                   >>  95 
                                                   >>  96   virtual void DumpInfo() const;
                                                   >>  97 
                                                   >>  98   // for Debug
                                                   >>  99   virtual G4bool CheckIt(const G4Track&);
                                                   >> 100 
                                                   >> 101 protected:
                                                   >> 102   // hide copy constructor and assignment operaor as protected
                                                   >> 103   G4ParticleChangeForGamma(const G4ParticleChangeForGamma &right);
                                                   >> 104   G4ParticleChangeForGamma & operator=(const G4ParticleChangeForGamma &right);
 82                                                   105 
 83 private:                                          106 private:
 84                                                   107 
 85   G4double proposedKinEnergy = 0.0;            << 108   const G4Track* currentTrack;
 86       // The final kinetic energy of the curre << 109   // The pointer to G4Track
                                                   >> 110 
                                                   >> 111   G4double proposedKinEnergy;
                                                   >> 112   //  The final kinetic energy of the current particle.
 87                                                   113 
 88   G4ThreeVector proposedMomentumDirection;        114   G4ThreeVector proposedMomentumDirection;
 89       // The final momentum direction of the c << 115   //  The final momentum direction of the current particle.
 90                                                   116 
 91   G4ThreeVector proposedPolarization;             117   G4ThreeVector proposedPolarization;
 92       // The final polarization of the current << 118   //  The final polarization of the current particle.
 93 };                                                119 };
 94                                                   120 
 95 // ----------------------                      << 121 // ------------------------------------------------------------
 96 // Inline methods                              << 
 97 // ----------------------                      << 
 98                                                   122 
 99 inline                                         << 123 inline G4double G4ParticleChangeForGamma::GetProposedKineticEnergy() const
100 G4double G4ParticleChangeForGamma::GetProposed << 
101 {                                                 124 {
102   return proposedKinEnergy;                       125   return proposedKinEnergy;
103 }                                                 126 }
104                                                   127 
105 inline                                         << 128 inline void G4ParticleChangeForGamma::SetProposedKineticEnergy(G4double energy)
106 void G4ParticleChangeForGamma::SetProposedKine << 
107 {                                                 129 {
108   proposedKinEnergy = energy;                     130   proposedKinEnergy = energy;
109 }                                                 131 }
110                                                   132 
111 inline                                            133 inline
112 const G4ThreeVector& G4ParticleChangeForGamma: << 134  const G4ThreeVector& G4ParticleChangeForGamma::GetProposedMomentumDirection() const
113 GetProposedMomentumDirection() const           << 
114 {                                                 135 {
115   return proposedMomentumDirection;               136   return proposedMomentumDirection;
116 }                                                 137 }
117                                                   138 
118 inline                                            139 inline
119 void G4ParticleChangeForGamma::                << 140  void G4ParticleChangeForGamma::ProposeMomentumDirection(const G4ThreeVector& dir)
120 ProposeMomentumDirection(const G4ThreeVector&  << 
121 {                                                 141 {
122   proposedMomentumDirection = dir;                142   proposedMomentumDirection = dir;
123 }                                                 143 }
124                                                   144 
125 inline                                            145 inline
126 const G4ThreeVector& G4ParticleChangeForGamma: << 146  void G4ParticleChangeForGamma::ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
                                                   >> 147 {
                                                   >> 148   proposedMomentumDirection.setX(Px);
                                                   >> 149   proposedMomentumDirection.setY(Py);
                                                   >> 150   proposedMomentumDirection.setZ(Pz);
                                                   >> 151 }
                                                   >> 152 
                                                   >> 153 inline const G4Track* G4ParticleChangeForGamma::GetCurrentTrack() const
                                                   >> 154 {
                                                   >> 155   return currentTrack;
                                                   >> 156 }
                                                   >> 157 
                                                   >> 158 inline
                                                   >> 159  const G4ThreeVector& G4ParticleChangeForGamma::GetProposedPolarization() const
127 {                                                 160 {
128   return proposedPolarization;                    161   return proposedPolarization;
129 }                                                 162 }
130                                                   163 
131 inline                                            164 inline
132 void G4ParticleChangeForGamma::ProposePolariza << 165  void G4ParticleChangeForGamma::ProposePolarization(const G4ThreeVector& dir)
133 {                                                 166 {
134   proposedPolarization = dir;                     167   proposedPolarization = dir;
135 }                                                 168 }
136                                                   169 
137 inline                                            170 inline
138 void G4ParticleChangeForGamma::ProposePolariza << 171  void G4ParticleChangeForGamma::ProposePolarization(G4double Px, G4double Py, G4double Pz)
139                                                << 
140                                                << 
141 {                                                 172 {
142   proposedPolarization.setX(Px);                  173   proposedPolarization.setX(Px);
143   proposedPolarization.setY(Py);                  174   proposedPolarization.setY(Py);
144   proposedPolarization.setZ(Pz);                  175   proposedPolarization.setZ(Pz);
145 }                                                 176 }
146                                                   177 
147 inline                                         << 178 inline void G4ParticleChangeForGamma::InitializeForPostStep(const G4Track& track)
148 void G4ParticleChangeForGamma::InitializeForPo << 
149 {                                                 179 {
150   InitializeSecondaries();                     << 180   theStatusChange = track.GetTrackStatus();
151   InitializeLocalEnergyDeposit();              << 181   theLocalEnergyDeposit = 0.0;
152   InitializeParentWeight(track);               << 182   theNonIonizingEnergyDeposit = 0.0;
153   InitializeStatusChange(track);               << 183   InitializeSecondaries(track);
154   proposedKinEnergy         = track.GetKinetic << 184   theParentWeight = track.GetWeight();
                                                   >> 185   isParentWeightProposed = false;
                                                   >> 186   proposedKinEnergy = track.GetKineticEnergy();
155   proposedMomentumDirection = track.GetMomentu    187   proposedMomentumDirection = track.GetMomentumDirection();
156   proposedPolarization      = track.GetPolariz << 188   proposedPolarization = track.GetPolarization();
                                                   >> 189   currentTrack = &track;
157 }                                                 190 }
158                                                   191 
159 #endif                                            192 #endif
                                                   >> 193 
160                                                   194