Message: Duplicate results Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Duplicate results 

Forum: Run Management
Date: 22 Oct, 2014
From: <Frank>

I have a problem concerning duplication of optical photons hits on a pmt sensitive detector. I get all results twice when a photon hits the pmt. As an example, I look at the x-position of hit. In my, I call ProcessHits_constStep from like this :

 bool ISREFL=false;

 case Detection:
		G4SDManager* SDman = G4SDManager::GetSDMpointer();
		G4String sdName="/pet/pmt";
		PMTSD* pmtSD = (PMTSD*)SDman->FindSensitiveDetector(sdName);
		if(pmtSD) pmtSD->ProcessHits_constStep(theStep,NULL);
		G4cout<<"Detection:  "<< thePostPoint->GetPosition().x() << G4endl;
	    break; etc...

The G4cout "Detection : ..." then appears once. However, in ProcessHits_constStep :

G4bool PMTSD::ProcessHits_constStep(const G4Step* aStep,G4TouchableHistory*)
  G4StepPoint* thePostPoint = aStep->GetPostStepPoint();

  if(CreateTree::Instance()->Hits()) {
    G4cout << "Detection:  " << thePostPoint->GetPosition().x() << G4endl;

The G4cout "Detection: ..." appears twice and I don't understand why. And when I place the G4cout before the if(CreateTree ...), I still get duplicate results. Any ideas?

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

1 None: Re: Duplicate results   (Makoto Asai - 22 Oct, 2014)
(_ Ok: Re: Duplicate results   (Frank - 23 Oct, 2014)
 Add Message Add Message
to: "Duplicate results"

 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 ]