G4TankSimulatorOG/G4TankFastCerenkov.h
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * DISCLAIMER *
4 // * *
5 // * The following disclaimer summarizes all the specific disclaimers *
6 // * of contributors to this software. The specific disclaimers,which *
7 // * govern, are listed with their locations in: *
8 // * http://cern.ch/geant4/license *
9 // * *
10 // * Neither the authors of this software system, nor their employing *
11 // * institutes,nor the agencies providing financial support for this *
12 // * work make any representation or warranty, express or implied, *
13 // * regarding this software system or assume any liability for its *
14 // * use. *
15 // * *
16 // * This code implementation is the intellectual property of the *
17 // * GEANT4 collaboration. *
18 // * By copying, distributing or modifying the Program (or any work *
19 // * based on the Program) you indicate your acceptance of this *
20 // * statement, and all its terms. *
21 // ********************************************************************
22 
23 #ifndef _G4TankSimulatorOG_G4TankFastCerenkov_h_
24 #define _G4TankSimulatorOG_G4TankFastCerenkov_h_
25 
26 #include <sdet/PMT.h>
27 using sdet::PMT;
28 #include <utl/Point.h>
29 using utl::Point;
30 #include <sevt/Station.h>
31 
32 #include <globals.hh>
33 #include <templates.hh>
34 #include <Randomize.hh>
35 #include <G4ThreeVector.hh>
36 #include <G4ParticleMomentum.hh>
37 #include <G4Step.hh>
38 #include <G4VContinuousProcess.hh>
39 #include <G4OpticalPhoton.hh>
40 #include <G4DynamicParticle.hh>
41 #include <G4Material.hh>
42 #include <G4PhysicsTable.hh>
43 #include <G4MaterialPropertiesTable.hh>
44 #include <G4PhysicsOrderedFreeVector.hh>
45 #include <G4ios.hh>
46 #include <G4Poisson.hh>
47 
48 //#include <G4FastTankSimulatorPS/G4FastTankConstruction.h>
49 
50 #define IN_TANK 0
51 #define DOWN_IN_TANK 1
52 #define IN_DOME_1 11
53 #define IN_DOME_2 12
54 #define IN_DOME_3 13
55 #define IN_INTERFACE_1 21
56 #define IN_INTERFACE_2 22
57 #define IN_INTERFACE_3 23
58 #define INWARD 31
59 #define OUTWARD 32
60 #define TARGET_PMT1 0
61 #define TARGET_PMT2 1
62 #define TARGET_PMT3 2
63 #define TARGET_WALL 3
64 #define TARGET_FLOOR 4
65 #define BOUNCED 10
66 
67 
68 namespace G4TankSimulatorOG {
69 
70  class G4TankSimulator;
71 
72  class G4TankFastCerenkov : public G4VContinuousProcess {
73 
74  public:
75 
76  G4TankFastCerenkov(const G4String& processName = "Cerenkov");
78 
79  static void GetDataFromConstruction();
80  G4bool IsApplicable(const G4ParticleDefinition &);
81  void SetTrackSecondariesFirst(const G4bool);
82  void SetMaxNumPhotonsPerStep(const G4int);
83  G4PhysicsTable* GetPhysicsTable() const;
84  void DumpPhysicsTable() const;
85  G4VParticleChange* AlongStepDoIt(const G4Track &, const G4Step &);
86  G4double GetContinuousStepLimit(const G4Track &, G4double, G4double,
87  G4double &);
88 
89  private:
90 
91  void BuildThePhysicsTable();
92  G4double GetAverageNumberOfPhotons(const G4DynamicParticle *,
93  const G4Material *,
94  const G4MaterialPropertyVector *) const;
95  void TrackPhotonInTank();
96  void PropagateInTank(G4int);
97 
98  template<int pmtId>
99  G4bool TransitionToDome(G4int);
100  template<int pmtId>
101  G4bool PropagateInDome(G4int &);
102  template<int pmtId>
103  G4bool TransitionToInterface(G4int &);
104  template<int pmtId>
105  G4bool PropagateInInterface(G4int &);
106 
107  G4double GetSphereIntersect(const G4ThreeVector &, const G4double) const;
108  G4double GetEllipsoidIntersect(const G4ThreeVector &,
109  const G4double, const G4double) const;
110  void DoRayleighScatter();
111  G4bool ScatterOffRoof();
112  G4bool ScatterOffWall();
113  G4bool ScatterOffFloor();
114  void BackScatter();
115  void DiffuseScatterHorizontal(const G4ThreeVector &);
116  void DiffuseScatterVertical(const G4ThreeVector &);
117  void SpikeScatter(const G4ThreeVector &);
118  void LobeScatterHorizontal(const G4ThreeVector &);
119  void LobeScatterVertical(const G4ThreeVector &);
120 
122  G4int fMaxPhotons;
125 
127 
133 
134  static double fSigmaAlpha;
135 
137 
140 
144 
145 
146  // PMT positions (the zeroth position is dummy)
147  static G4ThreeVector fPMTPos[4];
148  // The height of the roof, referred to each PMT
149  static G4double fRoofPos[4];
150 
151  G4double fSampledRI;
152  G4double fRayleighConst;
153 
155 
156  protected:
157 
158  G4PhysicsTable* fThePhysicsTable;
159 
160  };
161 
162 }
163 
164 #endif
G4double GetAverageNumberOfPhotons(const G4DynamicParticle *, const G4Material *, const G4MaterialPropertyVector *) const
Point object.
Definition: Point.h:32
Detector description interface for PMT-related data.
Definition: SDetector/PMT.h:26
G4TankFastCerenkov(const G4String &processName="Cerenkov")
Class to hold collection (x,y) points and provide interpolation between them.
G4double GetSphereIntersect(const G4ThreeVector &, const G4double) const
G4double GetContinuousStepLimit(const G4Track &, G4double, G4double, G4double &)
G4VParticleChange * AlongStepDoIt(const G4Track &, const G4Step &)
class that handles Geant4 SD simulation
G4double GetEllipsoidIntersect(const G4ThreeVector &, const G4double, const G4double) const

, generated on Tue Sep 26 2023.