/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/physics/include/RAT/OpRayleigh.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/physics/include/RAT/OpRayleigh.hh Source File
Ratpac-two
OpRayleigh.hh
1 /*
2  * Copyright (c) 2020 by the Snoplus collaboration
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that the above copyright notice and this paragraph are
7  * duplicated in all such forms and that any documentation,
8  * advertising materials, and other materials related to such
9  * distribution and use acknowledge that the software was developed
10  * by the Snoplus collaboration. The name of the
11  * Snoplus collaboration may not be used to endorse or promote products derived
12  * from this software without specific prior written permission.
13  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16  */
18 //
19 // Simulates optical Rayleigh scattering. This class simulates
20 // Rayleigh scattering. It should be used in preference to the Geant4
21 // G4OpRayleigh class as it will calculate mean free paths for all
22 // materials not just water.
23 //
24 // Author: P G Jones <p.g.jones@qmul.ac.uk>
25 //
26 // REVISION HISTORY:
27 // 2014-01-08 : P G Jones - New file.
28 // 12-05-2015 : I Coulter - Remove use of the "SNOMAN style" RS_SCALE_FACTOR
29 // This already exists in SNOMANOpRayleigh, isn't
30 // used in general use and causes confusion.
31 //
33 #ifndef __RAT_OpRayleigh_hh__
34 #define __RAT_OpRayleigh_hh__
35 
36 #include <G4OpticalPhoton.hh>
37 #include <G4VDiscreteProcess.hh>
38 
39 class G4PhysicsTable;
40 class G4MaterialPropertiesTable;
41 
42 namespace RAT {
43 
44 class OpRayleigh : public G4VDiscreteProcess {
45  public:
46  // Construct the class
47  //
48  // processName: optional, defaults to OpRayleigh
49  // type: optional, defaults to fOptical
50  OpRayleigh(const G4String &processName = "OpRayleigh", G4ProcessType type = fOptical);
51 
52  // Deletes the physics table
53  ~OpRayleigh();
54 
55  // Returns true if this code is applicable to the particle type
56  //
57  // particleType: definition of the particle type
58  // returns true if the particle type is an optical photon
59  G4bool IsApplicable(const G4ParticleDefinition &particleType) {
60  return (&particleType == G4OpticalPhoton::OpticalPhoton());
61  }
62 
63  // Returns the mean free path for the track in mm.
64  //
65  // previousStepSize and condition are unused
66  G4double GetMeanFreePath(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition);
67 
68  // Invoke scattering to the track
69  //
70  // returns a particle change description
71  G4VParticleChange *PostStepDoIt(const G4Track &track, const G4Step &step);
72 
73  private:
74  // Builds the physics table, i.e. a table of mean free paths
75  void BuildThePhysicsTable();
76 
77  G4PhysicsTable *fPhysicsTable; // The physics table used
78 };
79 
80 } // namespace RAT
81 
82 #endif
Definition: OpRayleigh.hh:44
Definition: CCCrossSecMessenger.hh:29