58 #ifndef FDsimG4OpBoundaryProcess_h
59 #define FDsimG4OpBoundaryProcess_h 1
66 #include "templates.hh"
67 #include "geomdefs.hh"
68 #include "Randomize.hh"
70 #include "G4VDiscreteProcess.hh"
71 #include "G4DynamicParticle.hh"
72 #include "G4Material.hh"
73 #include "G4LogicalBorderSurface.hh"
74 #include "G4LogicalSkinSurface.hh"
75 #include "G4OpticalSurface.hh"
76 #include "G4OpticalPhoton.hh"
77 #include "G4TransportationManager.hh"
89 namespace TelescopeSimulatorLX {
121 G4ProcessType type = fOptical);
131 G4bool
IsApplicable(
const G4ParticleDefinition& aParticleType);
136 G4ForceCondition* condition);
143 const G4Step& aStep);
146 G4OpticalSurfaceModel
GetModel()
const;
157 G4double incidentangle,
159 G4double ImaginaryRindex);
170 void SetModel(G4OpticalSurfaceModel model);
176 void G4Swap(G4double*
a, G4double*
b)
const;
178 void G4Swap(G4Material* a, G4Material* b)
const;
180 void G4VectorSwap(G4ThreeVector* vec1, G4ThreeVector* vec2)
const;
191 const G4ThreeVector& Normal)
const;
261 G4Material* temp =
a;
269 G4ThreeVector* vec2)
const
286 return (G4UniformRand() < prob);
299 vect.setX(G4UniformRand() - 0.5);
300 vect.setY(G4UniformRand() - 0.5);
301 vect.setZ(G4UniformRand() - 0.5);
305 }
while (len2 < 0.01 || len2 > 0.25);
322 ndotv = normal * vect;
340 G4ThreeVector vec1 = normal.orthogonal();
342 G4ThreeVector vec2 = vec1.cross(normal);
344 G4double phi = twopi*G4UniformRand();
345 G4double cosphi = std::cos(phi);
346 G4double sinphi = std::sin(phi);
348 return cosphi * vec1 + sinphi * vec2;
355 return ( &aParticleType == G4OpticalPhoton::OpticalPhoton() );
379 G4double rand = G4UniformRand();
380 if ( rand >= 0.0 && rand <
prob_ss ) {
409 aParticleChange.ProposeLocalEnergyDeposit(0.0);
416 aParticleChange.ProposeTrackStatus(fStopAndKill);
G4ThreeVector theFacetNormal
G4ThreeVector G4LambertianRand(const G4ThreeVector &normal)
G4bool IsApplicable(const G4ParticleDefinition &aParticleType)
G4ThreeVector G4IsotropicRand() const
void G4VectorSwap(G4ThreeVector *vec1, G4ThreeVector *vec2) const
G4double GetReflectivity(G4double E1_perp, G4double E1_parl, G4double incidentangle, G4double RealRindex, G4double ImaginaryRindex)
~FDsimG4OpBoundaryProcess()
G4OpticalSurfaceModel theModel
G4ThreeVector GetFacetNormal(const G4ThreeVector &Momentum, const G4ThreeVector &Normal) const
G4double GetMeanFreePath(const G4Track &, G4double, G4ForceCondition *condition)
G4double GetIncidentAngle()
G4double GetReflectivityThinFilm(G4double incidentangle, G4double n1, G4complex n2, G4double n3, G4double thickness)
G4OpticalSurfaceModel GetModel() const
FDsimG4OpBoundaryProcessStatus
G4OpticalSurfaceFinish theFinish
FDsimG4OpBoundaryProcessStatus theStatus
G4ThreeVector G4PlaneVectorRand(const G4ThreeVector &normal) const
FDsimG4OpBoundaryProcessStatus GetStatus() const
FDsimG4OpBoundaryProcess(const G4String &processName="OpBoundary", G4ProcessType type=fOptical)
void G4Swap(G4double *a, G4double *b) const
G4OpticalSurface * OpticalSurface
G4ThreeVector NewMomentum
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep)
G4bool G4BooleanRand(const G4double prob) const
G4double thePhotonMomentum
void SetModel(G4OpticalSurfaceModel model)
G4ThreeVector NewPolarization
G4ThreeVector OldPolarization
G4ThreeVector OldMomentum
G4ThreeVector theGlobalNormal
void DielectricDielectric()