source: trunk/source/processes/optical/include/G4OpWLS.hh @ 1199

Last change on this file since 1199 was 1196, checked in by garnier, 15 years ago

update CVS release candidate geant4.9.3.01

File size: 5.1 KB
Line 
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,v 1.4 2006/06/29 21:08:42 gunter Exp $
28// GEANT4 tag $Name: geant4-09-03-cand-01 $
29//
30////////////////////////////////////////////////////////////////////////
31// Optical Photon WaveLength Shifting (WLS) Class Definition
32////////////////////////////////////////////////////////////////////////
33//
34// File:        G4OpWLS.hh
35// Description: Discrete Process -- Wavelength Shifting of Optical Photons
36// Version:     1.0
37// Created:     2003-05-13
38// Author:      John Paul Archambault
39//              (Adaptation of G4Scintillation and G4OpAbsorption)
40// Updated:     2005-07-28 add G4ProcessType to constructor
41//              2006-05-07 - add G4VWLSTimeGeneratorProfile
42// mail:        gum@triumf.ca
43//              jparcham@phys.ualberta.ca
44//
45////////////////////////////////////////////////////////////////////////
46
47#ifndef G4OpWLS_h
48#define G4OpWLS_h 1
49
50/////////////
51// Includes
52/////////////
53
54#include "globals.hh"
55#include "templates.hh"
56#include "Randomize.hh"
57#include "G4Poisson.hh"
58#include "G4ThreeVector.hh"
59#include "G4ParticleMomentum.hh"
60#include "G4Step.hh"
61#include "G4VDiscreteProcess.hh"
62#include "G4DynamicParticle.hh"
63#include "G4Material.hh"
64#include "G4OpticalPhoton.hh"
65#include "G4PhysicsTable.hh"
66#include "G4MaterialPropertiesTable.hh"
67#include "G4PhysicsOrderedFreeVector.hh"
68#include "G4VWLSTimeGeneratorProfile.hh"
69
70// Class Description:
71// Discrete Process -- Bulk absorption of Optical Photons.
72// Class inherits publicly from G4VDiscreteProcess
73// Class Description - End:
74
75/////////////////////
76// Class Definition
77/////////////////////
78
79class G4VWLSTimeGeneratorProfile;
80
81class G4OpWLS : public G4VDiscreteProcess
82{
83
84public: // Without description
85
86  ////////////////////////////////
87  // Constructors and Destructor
88  ////////////////////////////////
89
90  G4OpWLS(const G4String& processName = "OpWLS",
91                   G4ProcessType type = fOptical);
92
93  ~G4OpWLS();
94
95  ////////////
96  // Methods
97  ////////////
98
99public: // With description
100
101  G4bool IsApplicable(const G4ParticleDefinition& aParticleType);
102  // Returns true -> 'is applicable' only for an optical photon.
103
104  G4double GetMeanFreePath(const G4Track& aTrack,
105                           G4double ,
106                           G4ForceCondition* );
107  // Returns the absorption length for bulk absorption of optical
108  // photons in media with a specified attenuation length.
109
110  G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
111                                  const G4Step&  aStep);
112  // This is the method implementing bulk absorption of optical
113  // photons.
114
115  G4PhysicsTable* GetIntegralTable() const;
116  // Returns the address of the WLS integral table.
117
118  void DumpPhysicsTable() const;
119  // Prints the WLS integral table.
120
121  void UseTimeProfile(const G4String name);
122  // Selects the time profile generator
123
124private:
125
126  void BuildThePhysicsTable();
127  // Is the WLS integral table;
128
129protected:
130
131  G4VWLSTimeGeneratorProfile* WLSTimeGeneratorProfile;
132  G4PhysicsTable* theIntegralTable;
133
134};
135
136////////////////////
137// Inline methods
138////////////////////
139
140inline
141G4bool G4OpWLS::IsApplicable(const G4ParticleDefinition& aParticleType)
142{
143   return ( &aParticleType == G4OpticalPhoton::OpticalPhoton() );
144}
145
146inline
147G4PhysicsTable* G4OpWLS::GetIntegralTable() const
148{
149  return theIntegralTable;
150}
151
152inline
153void G4OpWLS::DumpPhysicsTable() const
154{
155  G4int PhysicsTableSize = theIntegralTable->entries();
156  G4PhysicsOrderedFreeVector *v;
157 
158  for (G4int i = 0 ; i < PhysicsTableSize ; i++ )
159    {
160      v = (G4PhysicsOrderedFreeVector*)(*theIntegralTable)[i];
161      v->DumpValues();
162    }
163}
164
165#endif /* G4OpWLS_h */
166
Note: See TracBrowser for help on using the repository browser.