103 std::vector<G4Track*> proposedSecondaries;
109 G4cout <<
"\n** G4OpWLS: Photon absorbed! **" <<
G4endl;
118 if (!aMaterialPropertiesTable)
127 G4int NumPhotons = 1;
131 G4double MeanNumberOfPhotons = aMaterialPropertiesTable->
136 if (NumPhotons <= 0) {
158 WLSTime = aMaterialPropertiesTable->
167 G4int NumberOfPhotons = NumPhotons;
169 for (
G4int i = 0; i < NumPhotons; i++) {
175 for (
G4int j = 1; j <= 100; j++) {
180 sampledEnergy = WLSIntegral->
GetEnergy(CIIvalue);
187 if (sampledEnergy <= primaryEnergy)
break;
192 if (sampledEnergy > primaryEnergy) {
194 G4cout <<
" *** G4OpWLS: One less WLS photon will be returned ***"
198 if (NumberOfPhotons == 0) {
201 " *** G4OpWLS: No WLS photon can be sampled for this primary ***"
210 G4cout <<
"G4OpWLS: Created photon with energy: " << sampledEnergy
217 G4double sint = std::sqrt((1.-cost)*(1.+cost));
242 sinp = std::sin(phi);
243 cosp = std::cos(phi);
245 photonPolarization = cosp * photonPolarization + sinp *
perp;
247 photonPolarization = photonPolarization.
unit();
255 (photonPolarization.
x(),
256 photonPolarization.
y(),
257 photonPolarization.
z());
271 new G4Track(aWLSPhoton,aSecondaryTime,aSecondaryPosition);
278 proposedSecondaries.push_back(aSecondaryTrack);
282 for (
auto sec : proposedSecondaries) {
286 G4cout <<
"\n Exiting from G4OpWLS::DoIt -- NumberOfSecondaries = "
314 for (
G4int i=0 ; i < numOfMaterials; i++)
322 G4Material* aMaterial = (*theMaterialTable)[i];
327 if (aMaterialPropertiesTable) {
337 G4double currentIN = (*theWLSVector)[0];
339 if (currentIN >= 0.0) {
347 aPhysicsOrderedFreeVector->
348 InsertValues(currentPM , currentCII);
363 currentPM = theWLSVector->
Energy(j);
364 currentIN = (*theWLSVector)[j];
366 currentCII = 0.5 * (prevIN + currentIN);
368 currentCII = prevCII +
369 (currentPM - prevPM) * currentCII;
371 aPhysicsOrderedFreeVector->
372 InsertValues(currentPM, currentCII);
375 prevCII = currentCII;
408 if ( aMaterialPropertyTable ) {
409 AttenuationLengthVector = aMaterialPropertyTable->
411 if ( AttenuationLengthVector ){
412 AttenuationLength = AttenuationLengthVector->
413 Value(thePhotonEnergy);
423 return AttenuationLength;
434 else if (name ==
"exponential")
444 "generator does not exist");