Message: Re: How can I record the impact point in a calorimeter? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: How can I record the impact point in a calorimeter? 

Forum: Event and Track Management
Re: Question How can I record the impact point in a calorimeter? (stefania stucci)
Re: Feedback Re: How can I record the impact point in a calorimeter? (Gumplinger Peter)
Re: Question Re: How can I record the impact point in a calorimeter? (stefania stucci)
Date: 19 Jul, 2010
From: stefania stucci <stefania stucci>

Yeah it is! Thanks! But how can I record the point in the SteppingAction to make a distribution? In the examples I've seen, there's only a print of the coordinates. No histograms, no output file.

Sorry for the stupid question!

Here there's the code doesn't working:

 if( thePostPoint->GetStepStatus()==fGeomBoundary ){
      if( thePostPV ){
	if( thePostPV->GetName()=="scisxupPhysical"&&thePrePV->GetName()=="worldPhysical" ) {

	  ofstream outip;
	  outip.open("test.dat", ios::out);	  

	  G4double ipX=0;
	  G4double ipY=0;
	  G4double ipZ=0;  

	  ipX = theTrack->GetPosition().x(); 
	  ipY = theTrack->GetPosition().y();
	  ipZ = theTrack->GetPosition().z();

	  outip<<ipX<<"   "<<ipY<<"  "<<ipZ;

	}
      }
  }

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

1 Feedback: Re: How can I record the impact point in a calorimeter?   (Gumplinger Peter - 19 Jul, 2010)
(_ Ok: Re: How can I record the impact point in a calorimeter?   (stefania stucci - 19 Jul, 2010)
 Add Message Add Message
to: "Re: How can I record the impact point in a calorimeter?"

 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 ]