Message: Question regarding LXe example Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Question regarding LXe example 

Forum: Processes Involving Optical Photons
Date: 05 Apr, 2012
From: Athreya Shankar <Athreya Shankar>

Hello all,

I have a couple of questions regarding LXe example.

1. In EventAction.cc of LXe example, there is a code snippet as follows:

if(PHC){
    G4ThreeVector reconPos(0.,0.,0.);
    G4int pmts=PHC->entries();
    //Gather info from all PMTs
    for(G4int i=0;i<pmts;i++){
      eventInformation->IncHitCount((*PHC)[i]->GetPhotonCount());
      reconPos+=(*PHC)[i]->GetPMTPos()*(*PHC)[i]->GetPhotonCount();
      if((*PHC)[i]->GetPhotonCount()>=pmtThreshold){
	eventInformation->IncPMTSAboveThreshold();
      }
      else{//wasnt above the threshold, turn it back off
	(*PHC)[i]->SetDrawit(false);
      }
    }

Here, isn't the comment given "Gather info from all PMTs" wrong? Because, the for loop only goes over the total number of hits, which is not equal to the total number of PMTs? Shouldn't it be "Gather info from all the hits"?

2. In the same code as above, I do not understand why, in order to get the total number of photons detected by the PMT(s), we should call IncHitCount ? Doesn't PHC->entries() directly give the number of hits, and therefore, the number of photons detected?

Thanks in advance, Athreya

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

1 Feedback: Re: Question regarding LXe example   (Gumplinger Peter - 05 Apr, 2012)
(_ Question: Re: Question regarding LXe example   (Athreya Shankar - 07 Apr, 2012)
 Add Message Add Message
to: "Question regarding LXe example"

 Subscribe Subscribe

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