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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 5.2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                    <<   3 // * DISCLAIMER                                                       *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th <<   5 // * The following disclaimer summarizes all the specific disclaimers *
  6 // * the Geant4 Collaboration.  It is provided <<   6 // * of contributors to this software. The specific disclaimers,which *
  7 // * conditions of the Geant4 Software License <<   7 // * govern, are listed with their locations in:                      *
  8 // * LICENSE and available at  http://cern.ch/ <<   8 // *   http://cern.ch/geant4/license                                  *
  9 // * include a list of copyright holders.      << 
 10 // *                                                9 // *                                                                  *
 11 // * Neither the authors of this software syst     10 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     11 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     12 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     13 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  <<  14 // * use.                                                             *
 16 // * for the full disclaimer and the limitatio << 
 17 // *                                               15 // *                                                                  *
 18 // * This  code  implementation is the result  <<  16 // * This  code  implementation is the  intellectual property  of the *
 19 // * technical work of the GEANT4 collaboratio <<  17 // * GEANT4 collaboration.                                            *
 20 // * By using,  copying,  modifying or  distri <<  18 // * By copying,  distributing  or modifying the Program (or any work *
 21 // * any work based  on the software)  you  ag <<  19 // * based  on  the Program)  you indicate  your  acceptance of  this *
 22 // * use  in  resulting  scientific  publicati <<  20 // * statement, and all its terms.                                    *
 23 // * acceptance of all terms of the Geant4 Sof << 
 24 // *******************************************     21 // ********************************************************************
 25 //                                                 22 //
                                                   >>  23 //
                                                   >>  24 // $Id: G4Cerenkov.hh,v 1.5 2001/07/11 10:03:41 gunter Exp $
                                                   >>  25 // GEANT4 tag $Name: geant4-05-02 $
                                                   >>  26 //
                                                   >>  27 // 
 26 //////////////////////////////////////////////     28 ////////////////////////////////////////////////////////////////////////
 27 // Cerenkov Radiation Class Definition         <<  29 // Cerenkov Radiation Class Definition 
 28 //////////////////////////////////////////////     30 ////////////////////////////////////////////////////////////////////////
 29 //                                                 31 //
 30 // File:        G4Cerenkov.hh                  <<  32 // File:        G4Cerenkov.hh  
 31 // Description: Discrete Process - Generation  <<  33 // Description: Continuous Process -- Generation of Cerenkov Photons
 32 // Version:     2.0                                34 // Version:     2.0
 33 // Created:     1996-02-21                         35 // Created:     1996-02-21
 34 // Author:      Juliet Armstrong                   36 // Author:      Juliet Armstrong
 35 // Updated:     2007-09-30 change inheritance  <<  37 // Updated:     1999-10-29 add method and class descriptors
 36 //              2005-07-28 add G4ProcessType t << 
 37 //              1999-10-29 add method and clas << 
 38 //              1997-04-09 by Peter Gumplinger     38 //              1997-04-09 by Peter Gumplinger
 39 //              > G4MaterialPropertiesTable; n     39 //              > G4MaterialPropertiesTable; new physics/tracking scheme
                                                   >>  40 // mail:        gum@triumf.ca
 40 //                                                 41 //
 41 //////////////////////////////////////////////     42 ////////////////////////////////////////////////////////////////////////
 42                                                    43 
 43 #ifndef G4Cerenkov_h                               44 #ifndef G4Cerenkov_h
 44 #define G4Cerenkov_h 1                             45 #define G4Cerenkov_h 1
 45                                                    46 
                                                   >>  47 /////////////
                                                   >>  48 // Includes
                                                   >>  49 /////////////
                                                   >>  50 
 46 #include "globals.hh"                              51 #include "globals.hh"
                                                   >>  52 #include "templates.hh"
                                                   >>  53 #include "Randomize.hh"
                                                   >>  54 #include "G4ThreeVector.hh"
                                                   >>  55 #include "G4ParticleMomentum.hh"
                                                   >>  56 #include "G4Step.hh"
                                                   >>  57 #include "G4VContinuousProcess.hh"
                                                   >>  58 #include "G4OpticalPhoton.hh"
 47 #include "G4DynamicParticle.hh"                    59 #include "G4DynamicParticle.hh"
 48 #include "G4ForceCondition.hh"                 <<  60 #include "G4Material.hh" 
 49 #include "G4GPILSelection.hh"                  <<  61 #include "G4PhysicsTable.hh"
 50 #include "G4MaterialPropertyVector.hh"         <<  62 #include "G4MaterialPropertiesTable.hh"
 51 #include "G4VProcess.hh"                       <<  63 #include "G4PhysicsOrderedFreeVector.hh"
 52                                                <<  64 
 53 class G4Material;                              <<  65 // Class Description:
 54 class G4ParticleDefinition;                    <<  66 // Continuous Process -- Generation of Cerenkov Photons.
 55 class G4PhysicsTable;                          <<  67 // Class inherits publicly from G4VContinuousProcess.
 56 class G4Step;                                  <<  68 // Class Description - End:
 57 class G4Track;                                 <<  69 
 58 class G4VParticleChange;                       <<  70 /////////////////////
                                                   >>  71 // Class Definition
                                                   >>  72 /////////////////////
 59                                                    73 
 60 class G4Cerenkov : public G4VProcess           <<  74 class G4Cerenkov : public G4VContinuousProcess  
 61 {                                                  75 {
 62  public:                                       << 
 63   explicit G4Cerenkov(const G4String& processN << 
 64                       G4ProcessType type       << 
 65   ~G4Cerenkov();                               << 
 66                                                << 
 67   explicit G4Cerenkov(const G4Cerenkov& right) << 
 68                                                << 
 69   G4Cerenkov& operator=(const G4Cerenkov& righ << 
 70                                                << 
 71   G4bool IsApplicable(const G4ParticleDefiniti << 
 72   // Returns true -> 'is applicable', for all  << 
 73   // except short-lived particles.             << 
 74                                                << 
 75   void BuildPhysicsTable(const G4ParticleDefin << 
 76   // Build table at a right time               << 
 77                                                << 
 78   void PreparePhysicsTable(const G4ParticleDef << 
 79   void Initialise();                           << 
 80                                                << 
 81   G4double GetMeanFreePath(const G4Track& aTra << 
 82   // Returns the discrete step limit and sets  << 
 83   // condition for the DoIt to be invoked at e << 
 84                                                << 
 85   G4double PostStepGetPhysicalInteractionLengt << 
 86                                                << 
 87   // Returns the discrete step limit and sets  << 
 88   // condition for the DoIt to be invoked at e << 
 89                                                << 
 90   G4VParticleChange* PostStepDoIt(const G4Trac << 
 91                                   const G4Step << 
 92   // This is the method implementing the Ceren << 
 93                                                << 
 94   //  no operation in  AtRestDoIt and  AlongSt << 
 95   virtual G4double AlongStepGetPhysicalInterac << 
 96     const G4Track&, G4double, G4double, G4doub << 
 97   {                                            << 
 98     return -1.0;                               << 
 99   };                                           << 
100                                                << 
101   virtual G4double AtRestGetPhysicalInteractio << 
102     const G4Track&, G4ForceCondition*) overrid << 
103   {                                            << 
104     return -1.0;                               << 
105   };                                           << 
106                                                << 
107   //  no operation in  AtRestDoIt and  AlongSt << 
108   virtual G4VParticleChange* AtRestDoIt(const  << 
109   {                                            << 
110     return nullptr;                            << 
111   };                                           << 
112                                                << 
113   virtual G4VParticleChange* AlongStepDoIt(con << 
114                                            con << 
115   {                                            << 
116     return nullptr;                            << 
117   };                                           << 
118                                                << 
119   void SetTrackSecondariesFirst(const G4bool s << 
120   // If set, the primary particle tracking is  << 
121   // produced Cerenkov photons are tracked nex << 
122   // been tracked, the tracking of the primary << 
123                                                << 
124   G4bool GetTrackSecondariesFirst() const;     << 
125   // Returns the boolean flag for tracking sec << 
126                                                << 
127   void SetMaxBetaChangePerStep(const G4double  << 
128   // Set the maximum allowed change in beta =  << 
129                                                << 
130   G4double GetMaxBetaChangePerStep() const;    << 
131   // Returns the maximum allowed change in bet << 
132                                                << 
133   void SetMaxNumPhotonsPerStep(const G4int Num << 
134   // Set the maximum number of Cerenkov photon << 
135   // a tracking step. This is an average ONLY; << 
136   // around this average. If invoked, the maxi << 
137   // of the size set. If not called, the step  << 
138   // photons generated.                        << 
139                                                << 
140   G4int GetMaxNumPhotonsPerStep() const;       << 
141   // Returns the maximum number of Cerenkov ph << 
142   // generated during a tracking step.         << 
143                                                << 
144   void SetStackPhotons(const G4bool);          << 
145   // Call by the user to set the flag for stac << 
146                                                << 
147   G4bool GetStackPhotons() const;              << 
148   // Return the boolean for whether or not the << 
149                                                << 
150   G4int GetNumPhotons() const;                 << 
151   // Returns the current number of scint. phot << 
152                                                << 
153   G4PhysicsTable* GetPhysicsTable() const;     << 
154   // Returns the address of the physics table. << 
155                                                << 
156   void DumpPhysicsTable() const;               << 
157   // Prints the physics table.                 << 
158                                                << 
159   G4double GetAverageNumberOfPhotons(const G4d << 
160                                      const G4M << 
161                                      G4Materia << 
162                                                << 
163   void DumpInfo() const override {ProcessDescr << 
164   void ProcessDescription(std::ostream& out) c << 
165                                                << 
166   void SetVerboseLevel(G4int);                 << 
167   // sets verbosity                            << 
168                                                << 
169  protected:                                    << 
170   G4PhysicsTable* thePhysicsTable;             << 
171                                                << 
172  private:                                      << 
173   G4double fMaxBetaChange;                     << 
174                                                << 
175   G4int fMaxPhotons;                           << 
176   G4int fNumPhotons;                           << 
177                                                    76 
178   G4bool fStackingFlag;                        <<  77 private:
179   G4bool fTrackSecondariesFirst;               <<  78 
                                                   >>  79         //////////////
                                                   >>  80         // Operators
                                                   >>  81         //////////////
                                                   >>  82 
                                                   >>  83   // G4Cerenkov& operator=(const G4Cerenkov &right);
                                                   >>  84 
                                                   >>  85 public: // Without description
                                                   >>  86 
                                                   >>  87   ////////////////////////////////
                                                   >>  88   // Constructors and Destructor
                                                   >>  89   ////////////////////////////////
                                                   >>  90 
                                                   >>  91   G4Cerenkov(const G4String& processName = "Cerenkov");
                                                   >>  92 
                                                   >>  93   // G4Cerenkov(const G4Cerenkov &right);
                                                   >>  94 
                                                   >>  95   ~G4Cerenkov();  
                                                   >>  96 
                                                   >>  97         ////////////
                                                   >>  98         // Methods
                                                   >>  99         ////////////
                                                   >> 100 
                                                   >> 101 public: // With description
                                                   >> 102 
                                                   >> 103         G4bool IsApplicable(const G4ParticleDefinition& aParticleType);
                                                   >> 104         // Returns true -> 'is applicable', for all charged particles.
                                                   >> 105 
                                                   >> 106   G4double GetContinuousStepLimit(const G4Track& aTrack,
                                                   >> 107           G4double  ,
                                                   >> 108           G4double  ,
                                                   >> 109                                         G4double& );
                                                   >> 110         // Returns the continuous step limit defined by the Cerenkov
                                                   >> 111         // process.
                                                   >> 112 
                                                   >> 113   G4VParticleChange* AlongStepDoIt(const G4Track& aTrack, 
                                                   >> 114           const G4Step&  aStep);
                                                   >> 115         // This is the method implementing the Cerenkov process.
180                                                   116 
181   G4int secID = -1;  // creator modelID        << 117   void SetTrackSecondariesFirst(const G4bool state);
                                                   >> 118         // If set, the primary particle tracking is interrupted and any 
                                                   >> 119         // produced Cerenkov photons are tracked next. When all have 
                                                   >> 120         // been tracked, the tracking of the primary resumes. 
                                                   >> 121   
                                                   >> 122   void SetMaxNumPhotonsPerStep(const G4int NumPhotons);
                                                   >> 123         // Set the maximum number of Cerenkov photons allowed to be 
                                                   >> 124         // generated during a tracking step. This is an average ONLY; 
                                                   >> 125         // the actual number will vary around this average. If invoked, 
                                                   >> 126         // the maximum photon stack will roughly be of the size set.
                                                   >> 127         // If not called, the step is not limited by the number of 
                                                   >> 128         // photons generated.
182                                                   129 
                                                   >> 130         G4PhysicsTable* GetPhysicsTable() const;
                                                   >> 131         // Returns the address of the physics table.
                                                   >> 132 
                                                   >> 133         void DumpPhysicsTable() const;
                                                   >> 134         // Prints the physics table.
                                                   >> 135 
                                                   >> 136 private:
                                                   >> 137 
                                                   >> 138         void BuildThePhysicsTable();
                                                   >> 139 
                                                   >> 140   /////////////////////
                                                   >> 141   // Helper Functions
                                                   >> 142   /////////////////////
                                                   >> 143 
                                                   >> 144   G4double GetAverageNumberOfPhotons(const G4DynamicParticle *aParticle,
                                                   >> 145             const G4Material *aMaterial,
                                                   >> 146         const G4MaterialPropertyVector* Rindex) const;
                                                   >> 147 
                                                   >> 148         ///////////////////////
                                                   >> 149         // Class Data Members
                                                   >> 150         ///////////////////////
                                                   >> 151 
                                                   >> 152 protected:
                                                   >> 153 
                                                   >> 154         G4PhysicsTable* thePhysicsTable;
                                                   >> 155         //  A Physics Table can be either a cross-sections table or
                                                   >> 156         //  an energy table (or can be used for other specific
                                                   >> 157         //  purposes).
                                                   >> 158 
                                                   >> 159 private:
                                                   >> 160 
                                                   >> 161   G4bool fTrackSecondariesFirst;
                                                   >> 162   G4int  fMaxPhotons;
183 };                                                163 };
184                                                   164 
185 inline G4bool G4Cerenkov::GetTrackSecondariesF << 165 ////////////////////
                                                   >> 166 // Inline methods
                                                   >> 167 ////////////////////
                                                   >> 168 
                                                   >> 169 inline 
                                                   >> 170 G4bool G4Cerenkov::IsApplicable(const G4ParticleDefinition& aParticleType)
186 {                                                 171 {
187   return fTrackSecondariesFirst;               << 172    return (aParticleType.GetPDGCharge() != 0);
188 }                                                 173 }
189                                                   174 
190 inline G4double G4Cerenkov::GetMaxBetaChangePe << 175 inline 
191 {                                              << 176 void G4Cerenkov::SetTrackSecondariesFirst(const G4bool state) 
192   return fMaxBetaChange;                       << 177 { 
                                                   >> 178   fTrackSecondariesFirst = state;
193 }                                                 179 }
194                                                   180 
195 inline G4int G4Cerenkov::GetMaxNumPhotonsPerSt << 181 inline
                                                   >> 182 void G4Cerenkov::SetMaxNumPhotonsPerStep(const G4int NumPhotons) 
                                                   >> 183 { 
                                                   >> 184   fMaxPhotons = NumPhotons;
                                                   >> 185 }
196                                                   186 
197 inline G4bool G4Cerenkov::GetStackPhotons() co << 187 inline
                                                   >> 188 void G4Cerenkov::DumpPhysicsTable() const
                                                   >> 189 {
                                                   >> 190         G4int PhysicsTableSize = thePhysicsTable->entries();
                                                   >> 191         G4PhysicsOrderedFreeVector *v;
198                                                   192 
199 inline G4int G4Cerenkov::GetNumPhotons() const << 193         for (G4int i = 0 ; i < PhysicsTableSize ; i++ )
                                                   >> 194         {
                                                   >> 195           v = (G4PhysicsOrderedFreeVector*)(*thePhysicsTable)[i];
                                                   >> 196           v->DumpValues();
                                                   >> 197         }
                                                   >> 198 }
200                                                   199 
201 inline G4PhysicsTable* G4Cerenkov::GetPhysicsT    200 inline G4PhysicsTable* G4Cerenkov::GetPhysicsTable() const
202 {                                                 201 {
203   return thePhysicsTable;                         202   return thePhysicsTable;
204 }                                                 203 }
205                                                   204 
206 #endif /* G4Cerenkov_h */                         205 #endif /* G4Cerenkov_h */
207                                                   206