Message: Re: Angle distribution from direction cosines Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Angle distribution from direction cosines 

Forum: Particles
Re: Question Angle distribution from direction cosines (valentina)
Re: None Re: Angle distribution from direction cosines (Marc Verderi)
Date: 04 Feb, 2008
From: michel maire <michel maire>

 Like Marc, I am surprised by '-' 

 To complete his answer, let me write the full code to compute spherical angles
 respective to the World volume frame.

 G4ThreeVector direction = track->GetMomentumDirection();  //normalized vector
 G4double theta = std::acos(direction.z());
 G4double phi = std::atan2(direction.y(), direction.x());  // phi in [-pi, +pi[
 if (phi < 0.) phi = phi + twopi;                          // phi in [o, twopi[

 (doc: on linux, do : man atan2)

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

1 None: Re: Angle distribution from direction cosines   (Vladimir IVANTCHENKO - 05 Feb, 2008)
 Add Message Add Message
to: "Re: Angle distribution from direction cosines"

 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 ]