54 #ifndef _G4XTankSimulatorAG_G4XTankOpBoundaryProcess_h
55 #define _G4XTankSimulatorAG_G4XTankOpBoundaryProcess_h
62 #include "templates.hh"
63 #include "geomdefs.hh"
64 #include "Randomize.hh"
66 #include "G4VDiscreteProcess.hh"
67 #include "G4DynamicParticle.hh"
68 #include "G4Material.hh"
69 #include "G4LogicalBorderSurface.hh"
70 #include "G4LogicalSkinSurface.hh"
71 #include "G4OpticalSurface.hh"
72 #include "G4OpticalPhoton.hh"
73 #include "G4TransportationManager.hh"
80 namespace G4XTankSimulatorAG {
120 G4ProcessType type = fOptical);
129 G4bool
IsApplicable(
const G4ParticleDefinition& aParticleType);
134 G4ForceCondition* condition);
141 const G4Step& aStep);
144 G4OpticalSurfaceModel
GetModel()
const;
150 void SetModel(G4OpticalSurfaceModel model);
155 void G4Swap(G4double*
a, G4double*
b)
const;
157 void G4Swap(G4Material* a, G4Material* b)
const;
159 void G4VectorSwap(G4ThreeVector* vec1, G4ThreeVector* vec2)
const;
170 const G4ThreeVector& Normal)
const;
242 G4Material* temp =
a;
250 G4ThreeVector* vec2)
const
267 return (G4UniformRand() < prob);
280 vect.setX(G4UniformRand() - 0.5);
281 vect.setY(G4UniformRand() - 0.5);
282 vect.setZ(G4UniformRand() - 0.5);
286 }
while (len2 < 0.01 || len2 > 0.25);
303 ndotv = normal * vect;
321 G4ThreeVector vec1 = normal.orthogonal();
323 G4ThreeVector vec2 = vec1.cross(normal);
325 G4double phi = twopi*G4UniformRand();
326 G4double cosphi = std::cos(phi);
327 G4double sinphi = std::sin(phi);
329 return cosphi * vec1 + sinphi * vec2;
336 return ( &aParticleType == G4OpticalPhoton::OpticalPhoton() );
360 G4double rand = G4UniformRand();
361 if ( rand >= 0.0 && rand <
prob_ss ) {
390 aParticleChange.ProposeLocalEnergyDeposit(0.0);
397 aParticleChange.ProposeTrackStatus(fStopAndKill);
G4double GetMeanFreePath(const G4Track &, G4double, G4ForceCondition *condition)
void G4Swap(G4double *a, G4double *b) const
G4OpticalSurfaceModel GetModel() const
G4ThreeVector G4LambertianRand(const G4ThreeVector &normal)
G4bool IsApplicable(const G4ParticleDefinition &aParticleType)
G4XTankOpBoundaryProcessStatus theStatus
G4ThreeVector OldMomentum
G4XTankOpBoundaryProcessStatus
G4ThreeVector G4IsotropicRand() const
G4bool G4BooleanRand(const G4double prob) const
G4ThreeVector NewPolarization
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep)
G4double thePhotonMomentum
~G4XTankOpBoundaryProcess()
G4OpticalSurfaceFinish theFinish
void G4VectorSwap(G4ThreeVector *vec1, G4ThreeVector *vec2) const
G4ThreeVector G4PlaneVectorRand(const G4ThreeVector &normal) const
G4ThreeVector OldPolarization
void SetModel(G4OpticalSurfaceModel model)
G4XTankOpBoundaryProcess(const G4String &processName="OpBoundary", G4ProcessType type=fOptical)
G4ThreeVector GetFacetNormal(const G4ThreeVector &Momentum, const G4ThreeVector &Normal) const
G4OpticalSurface * OpticalSurface
G4XTankOpBoundaryProcessStatus GetStatus() const
G4OpticalSurfaceModel theModel
G4ThreeVector theFacetNormal
G4ThreeVector NewMomentum
void DielectricDielectric()
G4ThreeVector theGlobalNormal