Message: Spectrum of Optical photons generated in scintillator Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Spectrum of Optical photons generated in scintillator 

Forum: Processes Involving Optical Photons
Date: 12 Dec, 2014
From: Amit Kumar <Amit Kumar>

Hello every one

I want to see energy spectrum of optical photons generated by gamma ray in a scintillator. For that I have introduced following lines in ClassifyNewTrack() of StackingAction

if(aTrack->GetDynamicParticle()->GetParticleDefinition()->GetParticleName()
      == "opticalphoton")
{ if(aTrack->GetParentID()> 0)
 {
    G4double E = (aTrack->GetVertexKineticEnergy())/MeV;
	OpRun->E_prim(E);

FILE *beam;
beam = fopen("beam_Energy.txt","a");
fprintf(beam,"%e\n",E);
fclose(beam);
   }
}

OpRun is pointing RunAction where I am plotting Energy spectrum but I am not getting any spectrum in histogramme and all energy values printed in beam_Energy.txt is zero.

But when I used

G4double E = (aTrack->GetKineticEnergy())/MeV;

then I am getting some spectrum non zero energy values in the text file.

I want to know whether it is the actual spectrum to what I am looking for. Because I don't know whether GetKineticenergy is giving energy at the starting point or end point of a optical photon track or it is at some different point.

If it is not the spectrum that I want to get then what should do in the code?

Any comment or suggestion will be appreciated

Thanks

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Feedback: Re: Spectrum of Optical photons generated in scintillator   (Gumplinger Peter - 12 Dec, 2014)
(_ None: Re: Spectrum of Optical photons generated in scintillator   (Amit Kumar - 15 Dec, 2014)
 Add Message Add Message
to: "Spectrum of Optical photons generated in scintillator"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews