Problem 657

Summary: Scintillation and cerenkov energy ranges & improve the run time.
Product: Geant4 Reporter: diego.garcia.gamez
Component: processes/electromagneticAssignee: gum
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: P2    
Version: 6.0   
Hardware: PC   
OS: Linux   

Description diego.garcia.gamez 2004-08-04 12:47:43 CEST
Hello!, I want to define the properties of a material refered to cerenkov and
scintillation proceses.I have read a similar question in the user forum but I
don't have clear somethings. In my case, the range of energy for cerenkov
photons is different of the scintillation one, which is monocromatic, but the
scintillation energy is contained in the cerenkov energy range.What I put in my
code is:
//For Cerenkov effect:
  const G4int nEntries = 50;

  G4double PPCKOV[nEntries] =    //PhotonEnergy cerenkov
    {2.07*eV,.....,10.8*eV};
  G4double RINDEX[nEntries] =    //RefractiveIndex
    {1.23,...,1.67};
  G4double ABSCOV[nEntries] =   //Absorption
    {30*m,..., 30*m};
  G4double lenthScatt[nEntries] =
    {16249*cm,...,8.03*cm};

  //For Scintillation effect:

  const G4int num = 3;

  G4double PPSCIN[num] = {9.68*eV,9.69*eV,9.70*eV  };//Phot Energy scintillation
  G4double LAr_SCINT[num] = { 0.1, 1.0, 0.1 };

  G4MaterialPropertiesTable* myMPT1 = new G4MaterialPropertiesTable();
//Cerenkov:
  myMPT1->AddProperty("RINDEX"    ,PPCKOV,RINDEX,    nEntries);
  myMPT1->AddProperty("ABSLENGTH" ,PPCKOV,ABSCOV,    nEntries);
  myMPT1->AddProperty("RAYLEIGH"  ,PPCKOV,lenthScatt,nEntries);
//Scintillation:

  myMPT1->AddProperty("FASTCOMPONENT", PPSCIN, LAr_SCINT, num);
  myMPT1->AddProperty("SLOWCOMPONENT", PPSCIN, LAr_SCINT, num);

  myMPT1->AddConstProperty("SCINTILLATIONYIELD",1000./MeV);
  myMPT1->AddConstProperty("RESOLUTIONSCALE",1.0);
  myMPT1->AddConstProperty("FASTTIMECONSTANT", 6.*ns);
  myMPT1->AddConstProperty("SLOWTIMECONSTANT",1000.*ns);
  myMPT1->AddConstProperty("YIELDRATIO",0.23);

  lAr->SetMaterialPropertiesTable(myMPT1);

I don't need to specify the RINDEX,ABSLENGTH and RAYLEIGH for the scintillation
photons because they are contained in the cerenkov ones, because of the energy
of the scintillation photons are contained in the energy range for the cerenkov
photons, Is this correct??, or I need to specify these values for scintillation
photons too(in this particular case)??.
But this spend a lot of time running,could it be, apart of the fact that there
are a large quantity of photons to be tracked, because of the energy range for
cerenkov photons is relatively large??, how can I improve this running time??.

Thank you very much!
Comment 1 gum 2004-08-16 14:25:59 CEST
This is not a bug-report as such .....

To your questions:

I don't need to specify the RINDEX,ABSLENGTH and RAYLEIGH for the scintillation
photons because they are contained in the cerenkov ones, because of the energy
of the scintillation photons are contained in the energy range for the cerenkov
photons, Is this correct??

Yes, once an optical photon is generated, no matter what process generated it,
it'll be tracked if the material constants needed to propagate it have been
specified for it's frequency (momentum). Since your scintillation spectrum is a
subset of the range of index of refraction you have specified all is well.

or I need to specify these values for scintillation
photons too(in this particular case)??.

In fact, I don't know what would happen if you specified, for example, the
"ABSLENGTH" twice in the G4MaterialPropertiesTable attached to your lAr
material. The code looks for the named property in the table and returns a
G4PropertyVector when it finds the named property. My guess is it'll always
return the first occurrence. Remember, the optical properties required for
tracking the optical photons cannot depend on how these photons were generated.
They are 'attached' to the material.

But this spend a lot of time running,could it be, apart of the fact that there
are a large quantity of photons to be tracked, because of the energy range for
cerenkov photons is relatively large??, how can I improve this running time??.

My guess is that most of your photons are coming from the scintillation process.
So, you must decide what is the statistical relevance you require from your
simulation. If you don't need to simulate 1000 photons/MeV but 100/MeV are
enough to get a feel for the light detection efficiency as a function of some
detector parameter, then reduce this yield keeping in mind when you quote
numbers that you only simulated 10% of the actual yield.

You probably have a photon detector with a wavelength dependent quantum
efficiency. Instead of sampling that efficiency when a photon strikes the
detector, you can sample it instead in your 'user stacking action' since there
is not much use tracking photons through many reflection when in the end, they
are discarded.

It may be that the look up of a long G4MaterialPropertiesVector, i.e. many
entries you require for the Cerenkov, is a bit slower than if there were only
three. Hou much faster, you could test that by just specifying the scintillation
range....

(If you want to retain the correct Cerenkov/Scintillation photon ratio when you
have reduced the scintillation yield, you should also discard x% of the Cerenkov
photons in your 'user stacking action'.)

There is not much you can do speeding up the tracking in G4 itself. The
navigator needs to calculate boundary intersections, determine the surface
normal, complete the logic in G4OpBoundaryProcess when that surface is a
complicated one etc.; and you may have many bounces until the photon is either
absorbed or detected in an arbitrarily complicated geometry.
Comment 2 diego.garcia.gamez 2004-08-19 09:23:59 CEST
Thank's a lot!