118 if (!aMaterialPropertiesTable)
122 aMaterialPropertiesTable->
GetProperty(
"WLSCOMPONENT");
127 G4int NumPhotons = 1;
131 G4double MeanNumberOfPhotons = aMaterialPropertiesTable->
132 GetConstProperty(
"WLSMEANNUMBERPHOTONS");
136 if (NumPhotons <= 0) {
160 WLSTime = aMaterialPropertiesTable->
161 GetConstProperty(
"WLSTIMECONSTANT");
169 G4int NumberOfPhotons = NumPhotons;
171 for (
G4int i = 0; i < NumPhotons; i++) {
177 for (
G4int j = 1; j <= 100; j++) {
182 sampledEnergy = WLSIntegral->
GetEnergy(CIIvalue);
185 G4cout <<
"sampledEnergy = " << sampledEnergy <<
G4endl;
189 if (sampledEnergy <= primaryEnergy)
break;
194 if (sampledEnergy > primaryEnergy) {
196 G4cout <<
" *** One less WLS photon will be returned ***" <<
G4endl;
199 if (NumberOfPhotons == 0) {
201 G4cout <<
" *** No WLS photon can be sampled for this primary ***"
212 G4double sint = std::sqrt((1.-cost)*(1.+cost));
237 sinp = std::sin(phi);
238 cosp = std::cos(phi);
240 photonPolarization = cosp * photonPolarization + sinp * perp;
242 photonPolarization = photonPolarization.
unit();
250 (photonPolarization.x(),
251 photonPolarization.y(),
252 photonPolarization.z());
266 new G4Track(aWLSPhoton,aSecondaryTime,aSecondaryPosition);
277 G4cout <<
"\n Exiting from G4OpWLS::DoIt -- NumberOfSecondaries = "
G4long G4Poisson(G4double mean)
G4int GetNumberOfSecondaries() const
G4double GetKineticEnergy() const
const G4DynamicParticle * GetDynamicParticle() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
static constexpr double twopi
G4GLOB_DLL std::ostream G4cout
virtual G4double GenerateTime(const G4double time_constant)=0
const G4ThreeVector & GetPosition() const
G4VWLSTimeGeneratorProfile * WLSTimeGeneratorProfile
void SetPolarization(G4double polX, G4double polY, G4double polZ)
void SetKineticEnergy(G4double aEnergy)
const G4TouchableHandle & GetTouchableHandle() const
G4double GetEnergy(G4double aValue)
G4Material * GetMaterial() const
G4bool ConstPropertyExists(const char *key) const
static G4OpticalPhoton * OpticalPhoton()
virtual void Initialize(const G4Track &)
G4MaterialPropertiesTable * GetMaterialPropertiesTable() const
void SetNumberOfSecondaries(G4int totSecondaries)
void SetParentID(const G4int aValue)
G4StepPoint * GetPostStepPoint() const
G4ParticleChange aParticleChange
void AddSecondary(G4Track *aSecondary)
G4double GetGlobalTime() const
Hep3Vector cross(const Hep3Vector &) const
void ProposeTrackStatus(G4TrackStatus status)
G4PhysicsTable * theIntegralTable
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
G4MaterialPropertyVector * GetProperty(const char *key)