54 G4bool WLSPrimaryGeneratorAction::first =
false;
100 for (
G4int i=0 ; i < numOfMaterials; i++) {
105 G4Material* aMaterial = (*theMaterialTable)[i];
110 if (aMaterialPropertiesTable) {
112 aMaterialPropertiesTable->
GetProperty(
"WLSCOMPONENT");
115 G4double currentIN = (*theWLSVector)[0];
116 if (currentIN >= 0.0) {
119 aPhysicsOrderedFreeVector->
120 InsertValues(currentPM , currentCII);
129 currentPM = theWLSVector->
Energy(j);
130 currentIN = (*theWLSVector)[j];
131 currentCII = 0.5 * (prevIN + currentIN);
132 currentCII = prevCII + (currentPM - prevPM) * currentCII;
133 aPhysicsOrderedFreeVector->
134 InsertValues(currentPM, currentCII);
136 prevCII = currentCII;
154 #ifdef use_sampledEnergy
159 for (
size_t j=0 ; j<theMaterialTable->size() ; j++) {
160 G4Material* fMaterial = (*theMaterialTable)[j];
161 if (fMaterial->
GetName() ==
"PMMA" ) {
165 aMaterialPropertiesTable->
GetProperty(
"WLSCOMPONENT");
175 sampledEnergy = WLSIntegral->
GetEnergy(CIIvalue);
191 void WLSPrimaryGeneratorAction::SetOptPhotonPolar()
194 SetOptPhotonPolar(angle);
201 G4cout <<
"-> warning from WLSPrimaryGeneratorAction::SetOptPhotonPolar()"
202 <<
": the particleGun is not an opticalphoton" <<
G4endl;
212 if (modul2 > 0.) e_perpend = (1./std::sqrt(modul2))*product;
215 G4ThreeVector polar = std::cos(angle)*e_paralle + std::sin(angle)*e_perpend;
220 void WLSPrimaryGeneratorAction::SetOptPhotonTime()