Message: Re: How can I read out the position information about scintillation process? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: How can I read out the position information about scintillation process? 

Forum: Processes Involving Optical Photons
Date: 10 Sep, 2005
From: Gumplinger Peter <Gumplinger Peter>


Although the G4ScintillationProcess inherits from G4VRestDiscreteProcess (for reasons I don't quite remember now - it should maybe more properly inherit from G4VRestContinuousProcess), the scintillation photons are emitted uniformly along the step. The code documents:

// This routine is called for each tracking step of a charged particle

// in a scintillator. A Poisson/Gauss-distributed number of photons is

// generated according to the scintillation yield formula, distributed

// evenly along the track segment and uniformly into 4pi.

What this means is that there is no such thing as the 'position of the scintillation process'. The origins are on a line between PreStepPoint and PostStepPoint.

You can get the origin of each and every scintillation photon with code such as the one exhibited in:


        G4int tN2ndariesTot = fN2ndariesAtRestDoIt +
                              fN2ndariesAlongStepDoIt +

        for(size_t lp1=(*fSecondary).size()-tN2ndariesTot;
                        lp1<(*fSecondary).size(); lp1++){
          G4cout << "    : "
                 << std::setw(6)
                 << G4BestUnit((*fSecondary)[lp1]->GetPosition().x(),"Length")
                 << std::setw(6)
                 << G4BestUnit((*fSecondary)[lp1]->GetPosition().y(),"Length")
                 << std::setw(6)
                 << G4BestUnit((*fSecondary)[lp1]->GetPosition().z(),"Length")
                 << std::setw(6)
                 << G4BestUnit((*fSecondary)[lp1]->GetKineticEnergy(),"Energy")
                 << std::setw(10)
                 << (*fSecondary)[lp1]->GetDefinition()->GetParticleName();
          G4cout << G4endl;

As you can see, this assumes that the secondaries of a step are stored in the fSecondary vector such that the optical photons come last. I don't know if this should be expected in all cases. Of course, you can ask for the ParticleName first and then, if 'opticalphoton' print its origin position.

Hope this helps, Peter

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

 Add Message Add Message
to: "Re: How can I read out the position information about scintillation process?"

 Subscribe Subscribe

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