Message: Number of Photons in different parts of the detector Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Number of Photons in different parts of the detector 

Forum: Processes Involving Optical Photons
Date: Feb 07, 12:45
From: Kanishka <Kanishka>

Dear All,

       For ARAPUCA (light trapping device), I have a world volume filled with liquid Argon then inside it I have defined a big ARAPUCA and inside it there is a small ARAPUCA. If we go inside the x-y plane there is a wavelength shifter and then a dichoric filter and then at the center there is a dielectric bar and on top and bottom of it we have 4 SiPMs (total 8 SiPMs). I want to count the number of photons coming out of the dielectric bar and then stop & kill them. Then count the number of photons from just the liquid argon. The code I wrote looks like this:
=====================================
 if((PreVolName == "Bar_Name") && (PostVolName == "SIPM_Name")){

     countPhotons++;
     G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
     analysisManager->FillH1(1,countPhotons);
     track->SetTrackStatus(fStopAndKill);

  }
 G4cout <<" No. of photons1 = " << countPhotons << "  " << "Energy: " << kinEnergy/eV << " eV" << G4endl;  

     if((PreVolName == "World_Name") && (PostVolName == "SIPM_Name")){
     countPhotons++;
     G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
     analysisManager->FillH1(2,countPhotons);
  }

 G4cout <<" No. of photons2 = " << countPhotons << "  " << "Energy: " << kinEnergy/eV << " eV" << G4endl;  
=====================================

I am getting the numbers that looks like this:
===========================================
 No. of photons1 = 35788128  Energy: 6.88 eV
 No. of photons2 = 35788128  Energy: 6.88 eV
 No. of photons1 = 35787856  Energy: 3.4309 eV
 No. of photons2 = 35787856  Energy: 3.4309 eV
============================================
"No. of photons1" and "No. of photons2" should be different. Also everytime I run the code it shows different set of numbers. I am running the code for 10000 events. Is there any problem in the code ? Pls help.

Thank you.

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

1 None: Re: Number of Photons in different parts of the detector   (Daren Sawkey - Feb 12, 13:16)
 Add Message Add Message
to: "Number of Photons in different parts of the detector"

 Subscribe Subscribe

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