Geant4  10.01.p02
G4OpWLS.hh
Go to the documentation of this file.
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: G4OpWLS.hh 85354 2014-10-28 09:58:12Z gcosmo $
28 //
30 // Optical Photon WaveLength Shifting (WLS) Class Definition
32 //
33 // File: G4OpWLS.hh
34 // Description: Discrete Process -- Wavelength Shifting of Optical Photons
35 // Version: 1.0
36 // Created: 2003-05-13
37 // Author: John Paul Archambault
38 // (Adaptation of G4Scintillation and G4OpAbsorption)
39 // Updated: 2005-07-28 add G4ProcessType to constructor
40 // 2006-05-07 - add G4VWLSTimeGeneratorProfile
41 // mail: gum@triumf.ca
42 // jparcham@phys.ualberta.ca
43 //
45 
46 #ifndef G4OpWLS_h
47 #define G4OpWLS_h 1
48 
50 // Includes
52 
53 #include "globals.hh"
54 #include "templates.hh"
55 #include "Randomize.hh"
56 #include "G4Poisson.hh"
57 #include "G4ThreeVector.hh"
58 #include "G4ParticleMomentum.hh"
59 #include "G4Step.hh"
60 #include "G4VDiscreteProcess.hh"
61 #include "G4DynamicParticle.hh"
62 #include "G4Material.hh"
63 #include "G4OpticalPhoton.hh"
64 #include "G4PhysicsTable.hh"
68 
69 // Class Description:
70 // Discrete Process -- Bulk absorption of Optical Photons.
71 // Class inherits publicly from G4VDiscreteProcess
72 // Class Description - End:
73 
75 // Class Definition
77 
79 
80 class G4OpWLS : public G4VDiscreteProcess
81 {
82 
83 public:
84 
86  // Constructors and Destructor
88 
89  G4OpWLS(const G4String& processName = "OpWLS",
90  G4ProcessType type = fOptical);
91  ~G4OpWLS();
92 
93 private:
94 
95  G4OpWLS(const G4OpWLS &right);
96 
98  // Operators
100 
101  G4OpWLS& operator=(const G4OpWLS &right);
102 
103 public:
104 
106  // Methods
108 
109  G4bool IsApplicable(const G4ParticleDefinition& aParticleType);
110  // Returns true -> 'is applicable' only for an optical photon.
111 
112  void BuildPhysicsTable(const G4ParticleDefinition& aParticleType);
113  // Build the WLS integral table at the right time
114 
115  G4double GetMeanFreePath(const G4Track& aTrack,
116  G4double ,
117  G4ForceCondition* );
118  // Returns the absorption length for bulk absorption of optical
119  // photons in media with a specified attenuation length.
120 
121  G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
122  const G4Step& aStep);
123  // This is the method implementing bulk absorption of optical
124  // photons.
125 
127  // Returns the address of the WLS integral table.
128 
129  void DumpPhysicsTable() const;
130  // Prints the WLS integral table.
131 
132  void UseTimeProfile(const G4String name);
133  // Selects the time profile generator
134 
135 protected:
136 
139 
140 };
141 
143 // Inline methods
145 
146 inline
148 {
149  return ( &aParticleType == G4OpticalPhoton::OpticalPhoton() );
150 }
151 
152 inline
154 {
155  return theIntegralTable;
156 }
157 
158 inline
160 {
161  G4int PhysicsTableSize = theIntegralTable->entries();
163 
164  for (G4int i = 0 ; i < PhysicsTableSize ; i++ )
165  {
167  v->DumpValues();
168  }
169 }
170 
171 #endif /* G4OpWLS_h */
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep)
Definition: G4OpWLS.cc:102
G4String name
Definition: TRTMaterials.hh:40
int G4int
Definition: G4Types.hh:78
void UseTimeProfile(const G4String name)
Definition: G4OpWLS.cc:417
G4bool IsApplicable(const G4ParticleDefinition &aParticleType)
Definition: G4OpWLS.hh:147
void DumpPhysicsTable() const
Definition: G4OpWLS.hh:159
void BuildPhysicsTable(const G4ParticleDefinition &aParticleType)
Definition: G4OpWLS.cc:287
G4VWLSTimeGeneratorProfile * WLSTimeGeneratorProfile
Definition: G4OpWLS.hh:137
bool G4bool
Definition: G4Types.hh:79
~G4OpWLS()
Definition: G4OpWLS.cc:85
Definition: G4Step.hh:76
static G4OpticalPhoton * OpticalPhoton()
G4OpWLS & operator=(const G4OpWLS &right)
G4OpWLS(const G4String &processName="OpWLS", G4ProcessType type=fOptical)
Definition: G4OpWLS.cc:68
G4PhysicsTable * GetIntegralTable() const
Definition: G4OpWLS.hh:153
double G4double
Definition: G4Types.hh:76
G4ForceCondition
G4PhysicsTable * theIntegralTable
Definition: G4OpWLS.hh:138
size_t entries() const
G4double GetMeanFreePath(const G4Track &aTrack, G4double, G4ForceCondition *)
Definition: G4OpWLS.cc:383
G4ProcessType