78 BuildThePhysicsTable();
118 if (!aMaterialPropertiesTable)
122 aMaterialPropertiesTable->
GetProperty(
"WLSCOMPONENT");
127 G4int NumPhotons = 1;
131 G4double MeanNumberOfPhotons = aMaterialPropertiesTable->
132 GetConstProperty(
"WLSMEANNUMBERPHOTONS");
136 if (NumPhotons <= 0) {
158 WLSTime = aMaterialPropertiesTable->
159 GetConstProperty(
"WLSTIMECONSTANT");
167 for (
G4int i = 0; i < NumPhotons; i++) {
176 G4cout <<
"sampledEnergy = " << sampledEnergy <<
G4endl;
183 G4double sint = std::sqrt((1.-cost)*(1.+cost));
208 sinp = std::sin(phi);
209 cosp = std::cos(phi);
211 photonPolarization = cosp * photonPolarization + sinp * perp;
213 photonPolarization = photonPolarization.
unit();
221 (photonPolarization.
x(),
222 photonPolarization.
y(),
223 photonPolarization.
z());
237 new G4Track(aWLSPhoton,aSecondaryTime,aSecondaryPosition);
248 G4cout <<
"\n Exiting from G4OpWLS::DoIt -- NumberOfSecondaries = "
259 void G4OpWLS::BuildThePhysicsTable()
273 for (
G4int i=0 ; i < numOfMaterials; i++)
281 G4Material* aMaterial = (*theMaterialTable)[i];
286 if (aMaterialPropertiesTable) {
289 aMaterialPropertiesTable->
GetProperty(
"WLSCOMPONENT");
296 G4double currentIN = (*theWLSVector)[0];
298 if (currentIN >= 0.0) {
306 aPhysicsOrderedFreeVector->
307 InsertValues(currentPM , currentCII);
322 currentPM = theWLSVector->
Energy(j);
323 currentIN = (*theWLSVector)[j];
325 currentCII = 0.5 * (prevIN + currentIN);
327 currentCII = prevCII +
328 (currentPM - prevPM) * currentCII;
330 aPhysicsOrderedFreeVector->
331 InsertValues(currentPM, currentCII);
334 prevCII = currentCII;
367 if ( aMaterialPropertyTable ) {
368 AttenuationLengthVector = aMaterialPropertyTable->
369 GetProperty(
"WLSABSLENGTH");
370 if ( AttenuationLengthVector ){
371 AttenuationLength = AttenuationLengthVector->
372 Value(thePhotonEnergy);
382 return AttenuationLength;
393 else if (name ==
"exponential")
403 "generator does not exist");