113 for (
G4int i=0 ; i < numOfMaterials; i++) {
118 G4Material* aMaterial = (*theMaterialTable)[i];
123 if (aMaterialPropertiesTable) {
125 aMaterialPropertiesTable->
GetProperty(
"WLSCOMPONENT");
128 G4double currentIN = (*theWLSVector)[0];
129 if (currentIN >= 0.0) {
132 aPhysicsOrderedFreeVector->
133 InsertValues(currentPM , currentCII);
142 currentPM = theWLSVector->
Energy(j);
143 currentIN = (*theWLSVector)[j];
144 currentCII = 0.5 * (prevIN + currentIN);
145 currentCII = prevCII + (currentPM - prevPM) * currentCII;
146 aPhysicsOrderedFreeVector->
147 InsertValues(currentPM, currentCII);
149 prevCII = currentCII;
168 #ifdef use_sampledEnergy
173 for (
size_t j=0 ; j<theMaterialTable->size() ; j++) {
174 G4Material* fMaterial = (*theMaterialTable)[j];
175 if (fMaterial->
GetName() ==
"PMMA" ) {
179 aMaterialPropertiesTable->
GetProperty(
"WLSCOMPONENT");
189 sampledEnergy = WLSIntegral->
GetEnergy(CIIvalue);
222 G4cout <<
"-> warning from WLSPrimaryGeneratorAction::SetOptPhotonPolar()"
223 <<
": the ParticleGun is not an opticalphoton" <<
G4endl;
233 if (modul2 > 0.) e_perpend = (1./std::sqrt(modul2))*product;
236 G4ThreeVector polar = std::cos(angle)*e_paralle + std::sin(angle)*e_perpend;