Message: Counting optical photons and using them to fill final histogram Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Counting optical photons and using them to fill final histogram 

Forum: Event and Track Management
Date: Jan 22, 23:47
From: Bogdan Sikach <Bogdan Sikach>

Hi, Geant'ers

I have the following setup: 1) Calorimeter (crystal) which generates optical photons through scintillation 2) Photocathode which detects optical photons flying from calorimeter

A sensitive detector corresponds to each of the above entities.

What I need is to calculate light collection efficiency: the number of the detected photons related to the total number of photons generated in crystal. Then use obtained value to fill histogram.

How do I get it now.


I have
 `CrystalHit` class for hits in crystal and
 `CrystalSD` class for sensitive detector description

--------------CODE START--------------------

class CrystalHit : public G4VHit
    private :
        G4double            fEnergyDeposition;
        G4bool              fIsNewBornOpticalPhoton;


--------------CODE END--------------------

where `fIsNewBornOpticalPhoton` member is the flag that particle is optical photon and it is new photon. In `ProcessHits` method of `CrystalSD` I check each track and classify it:

--------------CODE START--------------------

G4bool CrystalSD::ProcessHits( G4Step* step, G4TouchableHistory* tHist )
    G4double energyDeposition = step->GetTotalEnergyDeposit();
    G4Track* track = step->GetTrack();
    CrystalHit* hit = new CrystalHit(); 
        hit->SetEnergyDeposition( energyDeposition );
    //Check if particle is optical photon
    if( track->GetParticleDefinition()->GetParticleName() == "opticalphoton" )
        //Check that it is first step of a photon
        //(to exclude reflection hit for example) 
        if( step->GetTrack()->GetCurrentStepNumber() == 1 )
            hit->SetIsNewBornOpticalPhoton( true );

    fHitCollection->insert( hit );

    return true;

--------------CODE END--------------------

Then in `EventAction` class I just get hit collection and count hits with `true` values.

The question is: is it proper way to count scintillation photons in crystal? It seems I can do it using `StackingAction` class in `ClassifyNewTrack` method but in such case I do not know how to extract this info at stage of filling of a histogram (e.g. in `EventAction::EndOfEventAction` method). In other words suppose my `StackingAction` class has member data `fPhotonCounter`. Is it possible to access object of this class in `EventAction::EndOfEventAction` method? Assuming this line in `main()`:

--------------CODE START--------------------

runManager->SetUserAction( new StackingAction() );

--------------CODE END--------------------

Thanks in advance

 Add Message Add Message
to: "Counting optical photons and using them to fill final histogram"

 Subscribe Subscribe

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

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]