Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
XPhononStackingAction Class Reference

#include <XPhononStackingAction.hh>

Inheritance diagram for XPhononStackingAction:
G4UserStackingAction

Public Member Functions

 XPhononStackingAction ()
 
virtual ~XPhononStackingAction ()
 
virtual G4ClassificationOfNewTrack ClassifyNewTrack (const G4Track *aTrack)
 
- Public Member Functions inherited from G4UserStackingAction
 G4UserStackingAction ()
 
virtual ~G4UserStackingAction ()
 
void SetStackManager (G4StackManager *value)
 
virtual void NewStage ()
 
virtual void PrepareNewEvent ()
 

Additional Inherited Members

- Protected Attributes inherited from G4UserStackingAction
G4StackManagerstackManager
 

Detailed Description

Definition at line 39 of file XPhononStackingAction.hh.

Constructor & Destructor Documentation

XPhononStackingAction::XPhononStackingAction ( )

Definition at line 50 of file XPhononStackingAction.cc.

50 {;}
XPhononStackingAction::~XPhononStackingAction ( )
virtual

Definition at line 54 of file XPhononStackingAction.cc.

54 {;}

Member Function Documentation

G4ClassificationOfNewTrack XPhononStackingAction::ClassifyNewTrack ( const G4Track aTrack)
virtual

Reimplemented from G4UserStackingAction.

Definition at line 59 of file XPhononStackingAction.cc.

References fUrgent, G4RandomDirection(), G4PhononPolarization::Get(), G4Track::GetDefinition(), G4LatticeManager::GetLatticeManager(), G4Track::GetParentID(), G4PhononTrackMap::GetPhononTrackMap(), G4Track::GetVolume(), G4LatticeManager::MapKtoV(), G4LatticeManager::MapKtoVDir(), G4PhononTrackMap::SetK(), G4Track::SetMomentumDirection(), G4Track::SetVelocity(), and G4Track::UseGivenVelocity().

59  {
60  G4ClassificationOfNewTrack classification = fUrgent;
61 
62  if (aTrack->GetParentID() == 0) {
63  //Obtain LatticeManager for phonon dynamics
65 
67 
68  //Compute random wave-vector (override whatever ParticleGun did)
70 
71  //Store wave-vector as track information
73  theKmap->SetK(aTrack, Ran);
74 
75  //Compute direction of propagation from wave vector
76  G4ThreeVector momentumDir = LM->MapKtoVDir(aTrack->GetVolume(), pol, Ran);
77 
78  //Compute true velocity of propagation
79  G4double velocity = LM->MapKtoV(aTrack->GetVolume(), pol, Ran);
80 
81  //cast to non-const pointer so we can set the velocity
82  G4Track* theTrack = const_cast<G4Track*>(aTrack);
83 
84  theTrack->SetMomentumDirection(momentumDir);
85  theTrack->SetVelocity(velocity);
86  theTrack->UseGivenVelocity(true);
87  }
88 
89  return classification;
90 }
G4ParticleDefinition * GetDefinition() const
G4int GetParentID() const
static G4LatticeManager * GetLatticeManager()
void SetVelocity(G4double val)
G4ThreeVector MapKtoVDir(G4VPhysicalVolume *, G4int, const G4ThreeVector &) const
G4ThreeVector G4RandomDirection()
G4double MapKtoV(G4VPhysicalVolume *, G4int, const G4ThreeVector &) const
int G4int
Definition: G4Types.hh:78
void SetK(const G4Track *track, const G4ThreeVector &K)
G4int Get(const G4ParticleDefinition *aPD)
G4bool UseGivenVelocity() const
static G4PhononTrackMap * GetPhononTrackMap()
G4VPhysicalVolume * GetVolume() const
double G4double
Definition: G4Types.hh:76
void SetMomentumDirection(const G4ThreeVector &aValue)

The documentation for this class was generated from the following files: