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 10.5 ] [ 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 /processes/electromagnetic/xrays/include/G4Cerenkov.hh (Version 11.3.0) and /processes/electromagnetic/xrays/include/G4Cerenkov.hh (Version 10.6.p2)


  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 //
                                                   >>  27 //
                                                   >>  28 // 
 26 //////////////////////////////////////////////     29 ////////////////////////////////////////////////////////////////////////
 27 // Cerenkov Radiation Class Definition             30 // Cerenkov Radiation Class Definition
 28 //////////////////////////////////////////////     31 ////////////////////////////////////////////////////////////////////////
 29 //                                                 32 //
 30 // File:        G4Cerenkov.hh                      33 // File:        G4Cerenkov.hh
 31 // Description: Discrete Process - Generation      34 // Description: Discrete Process - Generation of Cerenkov Photons
 32 // Version:     2.0                                35 // Version:     2.0
 33 // Created:     1996-02-21                         36 // Created:     1996-02-21
 34 // Author:      Juliet Armstrong                   37 // Author:      Juliet Armstrong
 35 // Updated:     2007-09-30 change inheritance      38 // Updated:     2007-09-30 change inheritance to G4VDiscreteProcess
 36 //              2005-07-28 add G4ProcessType t     39 //              2005-07-28 add G4ProcessType to constructor
 37 //              1999-10-29 add method and clas     40 //              1999-10-29 add method and class descriptors
 38 //              1997-04-09 by Peter Gumplinger     41 //              1997-04-09 by Peter Gumplinger
 39 //              > G4MaterialPropertiesTable; n     42 //              > G4MaterialPropertiesTable; new physics/tracking scheme
                                                   >>  43 // mail:        gum@triumf.ca
 40 //                                                 44 //
 41 //////////////////////////////////////////////     45 ////////////////////////////////////////////////////////////////////////
 42                                                    46 
 43 #ifndef G4Cerenkov_h                               47 #ifndef G4Cerenkov_h
 44 #define G4Cerenkov_h 1                             48 #define G4Cerenkov_h 1
 45                                                    49 
                                                   >>  50 /////////////
                                                   >>  51 // Includes
                                                   >>  52 /////////////
                                                   >>  53 
                                                   >>  54 #include <CLHEP/Units/SystemOfUnits.h>
                                                   >>  55 
 46 #include "globals.hh"                              56 #include "globals.hh"
                                                   >>  57 #include "templates.hh"
                                                   >>  58 #include "Randomize.hh"
                                                   >>  59 #include "G4ThreeVector.hh"
                                                   >>  60 #include "G4ParticleMomentum.hh"
                                                   >>  61 #include "G4Step.hh"
                                                   >>  62 #include "G4VProcess.hh"
                                                   >>  63 #include "G4OpticalPhoton.hh"
 47 #include "G4DynamicParticle.hh"                    64 #include "G4DynamicParticle.hh"
 48 #include "G4ForceCondition.hh"                 <<  65 #include "G4Material.hh"
 49 #include "G4GPILSelection.hh"                  <<  66 #include "G4PhysicsTable.hh"
 50 #include "G4MaterialPropertyVector.hh"             67 #include "G4MaterialPropertyVector.hh"
 51 #include "G4VProcess.hh"                       <<  68 #include "G4MaterialPropertiesTable.hh"
                                                   >>  69 #include "G4PhysicsOrderedFreeVector.hh"
 52                                                    70 
 53 class G4Material;                              <<  71 // Class Description:
 54 class G4ParticleDefinition;                    <<  72 // Discrete Process -- Generation of Cerenkov Photons.
 55 class G4PhysicsTable;                          <<  73 // Class inherits publicly from G4VDiscreteProcess.
 56 class G4Step;                                  <<  74 // Class Description - End:
 57 class G4Track;                                 <<  75 
 58 class G4VParticleChange;                       <<  76 /////////////////////
                                                   >>  77 // Class Definition
                                                   >>  78 /////////////////////
 59                                                    79 
 60 class G4Cerenkov : public G4VProcess               80 class G4Cerenkov : public G4VProcess
 61 {                                                  81 {
 62  public:                                       <<  82 
 63   explicit G4Cerenkov(const G4String& processN <<  83 public:
 64                       G4ProcessType type       <<  84 
                                                   >>  85   ////////////////////////////////
                                                   >>  86   // Constructors and Destructor
                                                   >>  87   ////////////////////////////////
                                                   >>  88 
                                                   >>  89   explicit G4Cerenkov(const G4String& processName = "Cerenkov", 
                                                   >>  90              G4ProcessType type = fElectromagnetic);
 65   ~G4Cerenkov();                                   91   ~G4Cerenkov();
 66                                                    92 
 67   explicit G4Cerenkov(const G4Cerenkov& right) <<  93   explicit G4Cerenkov(const G4Cerenkov &right);
 68                                                    94 
 69   G4Cerenkov& operator=(const G4Cerenkov& righ <<  95 private:
                                                   >>  96 
                                                   >>  97   //////////////
                                                   >>  98   // Operators
                                                   >>  99   //////////////
                                                   >> 100 
                                                   >> 101   G4Cerenkov& operator=(const G4Cerenkov &right) = delete;
                                                   >> 102 
                                                   >> 103 public:
                                                   >> 104 
                                                   >> 105   ////////////
                                                   >> 106   // Methods
                                                   >> 107   ////////////
 70                                                   108 
 71   G4bool IsApplicable(const G4ParticleDefiniti    109   G4bool IsApplicable(const G4ParticleDefinition& aParticleType) override;
 72   // Returns true -> 'is applicable', for all     110   // Returns true -> 'is applicable', for all charged particles
 73   // except short-lived particles.                111   // except short-lived particles.
 74                                                   112 
 75   void BuildPhysicsTable(const G4ParticleDefin    113   void BuildPhysicsTable(const G4ParticleDefinition& aParticleType) override;
 76   // Build table at a right time                  114   // Build table at a right time
 77                                                   115 
 78   void PreparePhysicsTable(const G4ParticleDef << 116   G4double GetMeanFreePath(const G4Track& aTrack, 
 79   void Initialise();                           << 117                            G4double, G4ForceCondition* );
 80                                                << 
 81   G4double GetMeanFreePath(const G4Track& aTra << 
 82   // Returns the discrete step limit and sets     118   // Returns the discrete step limit and sets the 'StronglyForced'
 83   // condition for the DoIt to be invoked at e    119   // condition for the DoIt to be invoked at every step.
 84                                                   120 
 85   G4double PostStepGetPhysicalInteractionLengt << 121   G4double PostStepGetPhysicalInteractionLength(const G4Track& aTrack,
 86                                                << 122                                                 G4double ,
                                                   >> 123                                                 G4ForceCondition* ) override;
 87   // Returns the discrete step limit and sets     124   // Returns the discrete step limit and sets the 'StronglyForced'
 88   // condition for the DoIt to be invoked at e    125   // condition for the DoIt to be invoked at every step.
 89                                                   126 
 90   G4VParticleChange* PostStepDoIt(const G4Trac << 127   G4VParticleChange* PostStepDoIt(const G4Track& aTrack, 
 91                                   const G4Step << 128                                   const G4Step&  aStep) override;
 92   // This is the method implementing the Ceren    129   // This is the method implementing the Cerenkov process.
 93                                                   130 
 94   //  no operation in  AtRestDoIt and  AlongSt    131   //  no operation in  AtRestDoIt and  AlongStepDoIt
 95   virtual G4double AlongStepGetPhysicalInterac << 132   virtual G4double AlongStepGetPhysicalInteractionLength(const G4Track&,
 96     const G4Track&, G4double, G4double, G4doub << 133                                                          G4double  ,
 97   {                                            << 134                                                          G4double  ,
 98     return -1.0;                               << 135                                                          G4double& ,
 99   };                                           << 136                                                          G4GPILSelection*
100                                                << 137                                                 ) override { return -1.0; };
101   virtual G4double AtRestGetPhysicalInteractio << 138 
102     const G4Track&, G4ForceCondition*) overrid << 139   virtual G4double AtRestGetPhysicalInteractionLength(const G4Track& ,
103   {                                            << 140                                                       G4ForceCondition*
104     return -1.0;                               << 141                                                  ) override { return -1.0; };
105   };                                           << 
106                                                   142 
107   //  no operation in  AtRestDoIt and  AlongSt    143   //  no operation in  AtRestDoIt and  AlongStepDoIt
108   virtual G4VParticleChange* AtRestDoIt(const  << 144   virtual G4VParticleChange* AtRestDoIt(const G4Track& , const G4Step& ) 
109   {                                            << 145                              override {return nullptr;};
110     return nullptr;                            << 146 
111   };                                           << 147   virtual G4VParticleChange* AlongStepDoIt(const G4Track& , const G4Step&) 
112                                                << 148                              override {return nullptr;};
113   virtual G4VParticleChange* AlongStepDoIt(con << 
114                                            con << 
115   {                                            << 
116     return nullptr;                            << 
117   };                                           << 
118                                                   149 
119   void SetTrackSecondariesFirst(const G4bool s    150   void SetTrackSecondariesFirst(const G4bool state);
120   // If set, the primary particle tracking is  << 151   // If set, the primary particle tracking is interrupted and any 
121   // produced Cerenkov photons are tracked nex << 152   // produced Cerenkov photons are tracked next. When all have 
122   // been tracked, the tracking of the primary    153   // been tracked, the tracking of the primary resumes.
123                                                   154 
124   G4bool GetTrackSecondariesFirst() const;        155   G4bool GetTrackSecondariesFirst() const;
125   // Returns the boolean flag for tracking sec    156   // Returns the boolean flag for tracking secondaries first.
126                                                   157 
127   void SetMaxBetaChangePerStep(const G4double     158   void SetMaxBetaChangePerStep(const G4double d);
128   // Set the maximum allowed change in beta =  << 159   // Set the maximum allowed change in beta = v/c in % (perCent)
                                                   >> 160   // per step.
129                                                   161 
130   G4double GetMaxBetaChangePerStep() const;       162   G4double GetMaxBetaChangePerStep() const;
131   // Returns the maximum allowed change in bet    163   // Returns the maximum allowed change in beta = v/c in % (perCent)
132                                                   164 
133   void SetMaxNumPhotonsPerStep(const G4int Num    165   void SetMaxNumPhotonsPerStep(const G4int NumPhotons);
134   // Set the maximum number of Cerenkov photon << 166   // Set the maximum number of Cerenkov photons allowed to be 
135   // a tracking step. This is an average ONLY; << 167   // generated during a tracking step. This is an average ONLY; 
136   // around this average. If invoked, the maxi << 168   // the actual number will vary around this average. If invoked, 
137   // of the size set. If not called, the step  << 169   // the maximum photon stack will roughly be of the size set.
                                                   >> 170   // If not called, the step is not limited by the number of 
138   // photons generated.                           171   // photons generated.
139                                                   172 
140   G4int GetMaxNumPhotonsPerStep() const;          173   G4int GetMaxNumPhotonsPerStep() const;
141   // Returns the maximum number of Cerenkov ph    174   // Returns the maximum number of Cerenkov photons allowed to be
142   // generated during a tracking step.            175   // generated during a tracking step.
143                                                   176 
144   void SetStackPhotons(const G4bool);          << 177   void SetStackPhotons(const G4bool );
145   // Call by the user to set the flag for stac    178   // Call by the user to set the flag for stacking the scint. photons
146                                                   179 
147   G4bool GetStackPhotons() const;                 180   G4bool GetStackPhotons() const;
148   // Return the boolean for whether or not the    181   // Return the boolean for whether or not the scint. photons are stacked
149                                                   182 
150   G4int GetNumPhotons() const;                    183   G4int GetNumPhotons() const;
151   // Returns the current number of scint. phot    184   // Returns the current number of scint. photons (after PostStepDoIt)
152                                                   185 
153   G4PhysicsTable* GetPhysicsTable() const;        186   G4PhysicsTable* GetPhysicsTable() const;
154   // Returns the address of the physics table.    187   // Returns the address of the physics table.
155                                                   188 
156   void DumpPhysicsTable() const;                  189   void DumpPhysicsTable() const;
157   // Prints the physics table.                    190   // Prints the physics table.
158                                                   191 
159   G4double GetAverageNumberOfPhotons(const G4d << 192 private:
160                                      const G4M << 193 
                                                   >> 194   void BuildThePhysicsTable();
                                                   >> 195 
                                                   >> 196   /////////////////////
                                                   >> 197   // Helper Functions
                                                   >> 198   /////////////////////
                                                   >> 199 
                                                   >> 200   G4double GetAverageNumberOfPhotons(const G4double charge,
                                                   >> 201                                      const G4double beta,
                                                   >> 202                                      const G4Material *aMaterial,
161                                      G4Materia    203                                      G4MaterialPropertyVector* Rindex) const;
162                                                   204 
163   void DumpInfo() const override {ProcessDescr << 205   ///////////////////////
164   void ProcessDescription(std::ostream& out) c << 206   // Class Data Members
                                                   >> 207   ///////////////////////
165                                                   208 
166   void SetVerboseLevel(G4int);                 << 209 protected:
167   // sets verbosity                            << 
168                                                   210 
169  protected:                                    << 
170   G4PhysicsTable* thePhysicsTable;                211   G4PhysicsTable* thePhysicsTable;
                                                   >> 212   //  A Physics Table can be either a cross-sections table or
                                                   >> 213   //  an energy table (or can be used for other specific
                                                   >> 214   //  purposes).
171                                                   215 
172  private:                                      << 216 private:
173   G4double fMaxBetaChange;                     << 
174                                                << 
175   G4int fMaxPhotons;                           << 
176   G4int fNumPhotons;                           << 
177                                                   217 
178   G4bool fStackingFlag;                        << 
179   G4bool fTrackSecondariesFirst;                  218   G4bool fTrackSecondariesFirst;
                                                   >> 219   G4double fMaxBetaChange;
                                                   >> 220   G4int  fMaxPhotons;
180                                                   221 
181   G4int secID = -1;  // creator modelID        << 222   G4bool fStackingFlag;
182                                                   223 
                                                   >> 224   G4int fNumPhotons;
183 };                                                225 };
184                                                   226 
185 inline G4bool G4Cerenkov::GetTrackSecondariesF << 227   ////////////////////
                                                   >> 228   // Inline methods
                                                   >> 229   ////////////////////
                                                   >> 230 
                                                   >> 231 inline
                                                   >> 232 G4bool G4Cerenkov::GetTrackSecondariesFirst() const
186 {                                                 233 {
187   return fTrackSecondariesFirst;                  234   return fTrackSecondariesFirst;
188 }                                                 235 }
189                                                   236 
190 inline G4double G4Cerenkov::GetMaxBetaChangePe << 237 inline
                                                   >> 238 G4double G4Cerenkov::GetMaxBetaChangePerStep() const
191 {                                                 239 {
192   return fMaxBetaChange;                          240   return fMaxBetaChange;
193 }                                                 241 }
194                                                   242 
195 inline G4int G4Cerenkov::GetMaxNumPhotonsPerSt << 243 inline
                                                   >> 244 G4int G4Cerenkov::GetMaxNumPhotonsPerStep() const
                                                   >> 245 {
                                                   >> 246   return fMaxPhotons;
                                                   >> 247 }
                                                   >> 248 
                                                   >> 249 inline
                                                   >> 250 void G4Cerenkov::SetStackPhotons(const G4bool stackingFlag)
                                                   >> 251 {
                                                   >> 252         fStackingFlag = stackingFlag;
                                                   >> 253 }
196                                                   254 
197 inline G4bool G4Cerenkov::GetStackPhotons() co << 255 inline
                                                   >> 256 G4bool G4Cerenkov::GetStackPhotons() const
                                                   >> 257 {
                                                   >> 258         return fStackingFlag;
                                                   >> 259 }
198                                                   260 
199 inline G4int G4Cerenkov::GetNumPhotons() const << 261 inline
                                                   >> 262 G4int G4Cerenkov::GetNumPhotons() const
                                                   >> 263 {
                                                   >> 264         return fNumPhotons;
                                                   >> 265 }
200                                                   266 
201 inline G4PhysicsTable* G4Cerenkov::GetPhysicsT << 267 inline
                                                   >> 268 G4PhysicsTable* G4Cerenkov::GetPhysicsTable() const
202 {                                                 269 {
203   return thePhysicsTable;                         270   return thePhysicsTable;
204 }                                                 271 }
205                                                   272 
206 #endif /* G4Cerenkov_h */                         273 #endif /* G4Cerenkov_h */
207                                                   274