**Dear Geant4 users,**

**I have a problem which concerns optical wavelength shifting simulation in fiber. I cannot understand how it is rigth to set an absorption length for fiber. I want to set this length to 217 cm for example (let’s assume it does’t depend on wave of comming photons). So when I did the following (below), that works fine, but the absorption length is not right.**

## Code

G4double PhotonEnergy_PS_ABS[nEntries_PS_1] = {3.539*eV, 3.477*eV, 3.340*eV, 3.321*eV, 3.291*eV, 3.214*eV, 3.162*eV, 3.129*eV, 3.091*eV, 3.086*eV, 3.049*eV, 3.008*eV, 2.982*eV, 2.958*eV, 2.928*eV, 2.905*eV, 2.895*eV, 2.890*eV, 2.858*eV, 2.813*eV, 2.774*eV, 2.765*eV, 2.752*eV, 2.748*eV, 2.739*eV, 2.735*eV, 2.731*eV, 2.723*eV, 2.719*eV, 2.698*eV, 2.674*eV, 2.626*eV, 2.610*eV, 2.583*eV, 2.556*eV, 2.530*eV, 2.505*eV, 2.480*eV, 2.455*eV, 2.431*eV, 2.407*eV, 2.384*eV };

G4double RIndexFiber_PS[nEntries_PS_1] = {1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59, 1.59};

G4double AbsFiber_PS[nEntries_PS_1] = {0.28*cm, 0.28*cm, 0.26*cm, 0.25*cm, 0.24*cm, 0.21*cm, 0.19*cm, 0.16*cm, 0.13*cm, 0.13*cm, 0.14*cm, 0.11*cm, 0.08*cm, 0.05*cm, 0.02*cm, 0.05*cm, 0.08*cm, 0.10*cm, 0.13*cm, 0.10*cm, 0.08*cm, 0.07*cm, 0.08*cm, 0.11*cm, 0.13*cm, 0.16*cm, 0.19*cm, 0.21*cm, 0.24*cm, 0.27*cm, 0.30*cm, 2.69*cm, 3.49*cm, 3.99*cm, 5.00*cm, 8.6*cm, 11.6*cm, 23.1*cm, 55*cm, 93*cm, 317*cm, 494*cm};

G4double PhotonEnergy_PS_EM[nEntries_PS] = {2.69*eV, 2.67*eV, 2.66*eV, 2.64*eV, 2.63*eV, 2.61*eV, 2.58*eV, 2.56*eV, 2.55*eV, 2.53*eV, 2.50*eV, 2.48*eV, 2.46*eV, 2.45*eV, 2.44*eV, 2.43*eV, 2.41*eV, 2.37*eV, 2.33*eV, 2.25*eV, 2.24*eV, 2.19*eV, 2.15*eV, 2.08*eV };

G4double EmissionFiber_PS[nEntries_PS] = {0, 0.02, 0.09, 0.20, 0.29, 0.40, 0.59, 0.70, 0.80, 0.89, 1.00, 0.96, 0.88, 0.79, 0.69, 0.59, 0.50, 0.40, 0.31, 0.22, 0.19, 0.10, 0.06, 0};

**But when I change AbsFiber_PS to:**

## Changed AbsFiber_PS

G4double AbsFiber_PS[nEntries_PS_1] = {217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm, 217*cm};

**there is no wavelength shigting at all. Don’t understand why? So, could someone please tell how to set absorption length in fiber to 217 cm for example in right way?**

**Thank you in advance!**