Geant4-11
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions
TG4MoleculeShoot< TYPE > Class Template Reference

#include <G4MoleculeGun.hh>

Inheritance diagram for TG4MoleculeShoot< TYPE >:
G4MoleculeShoot

Public Member Functions

template<typename TYPE >
G4shared_ptr< G4MoleculeShootChangeType ()
 
void Shoot (G4MoleculeGun *)
 
void Shoot (G4MoleculeGun *gun)
 
 TG4MoleculeShoot ()
 
virtual ~TG4MoleculeShoot ()
 

Static Public Member Functions

static void RandomPosInBox (const G4ThreeVector &boxSize, G4ThreeVector &output)
 

Data Fields

G4ThreeVectorfBoxSize
 
G4String fMoleculeName
 
G4int fNumber
 
G4ThreeVector fPosition
 
G4double fTime
 

Protected Member Functions

void ShootAtFixedPosition (G4MoleculeGun *)
 
void ShootAtFixedPosition (G4MoleculeGun *gun)
 
void ShootAtRandomPosition (G4MoleculeGun *)
 
void ShootAtRandomPosition (G4MoleculeGun *gun)
 

Detailed Description

template<typename TYPE>
class TG4MoleculeShoot< TYPE >

Definition at line 99 of file G4MoleculeGun.hh.

Constructor & Destructor Documentation

◆ TG4MoleculeShoot()

template<typename TYPE >
TG4MoleculeShoot< TYPE >::TG4MoleculeShoot ( )
inline

Definition at line 102 of file G4MoleculeGun.hh.

◆ ~TG4MoleculeShoot()

template<typename TYPE >
virtual TG4MoleculeShoot< TYPE >::~TG4MoleculeShoot ( )
inlinevirtual

Definition at line 103 of file G4MoleculeGun.hh.

103{;}

Member Function Documentation

◆ ChangeType()

template<typename TYPE >
G4shared_ptr< G4MoleculeShoot > G4MoleculeShoot::ChangeType
inherited

Definition at line 112 of file G4MoleculeGun.hh.

113{
114 G4shared_ptr<G4MoleculeShoot> output(new TG4MoleculeShoot<TYPE>);
115 output->fMoleculeName = fMoleculeName;
116 output->fPosition = fPosition;
117 output->fTime = fTime;
118 output->fNumber = fNumber;
119 output->fBoxSize = fBoxSize;
120 return output;
121}
G4ThreeVector * fBoxSize
G4ThreeVector fPosition
G4String fMoleculeName

References G4MoleculeShoot::fBoxSize, G4MoleculeShoot::fMoleculeName, G4MoleculeShoot::fNumber, G4MoleculeShoot::fPosition, and G4MoleculeShoot::fTime.

◆ RandomPosInBox()

void G4MoleculeShoot::RandomPosInBox ( const G4ThreeVector boxSize,
G4ThreeVector output 
)
staticinherited

Definition at line 187 of file G4MoleculeGun.cc.

189{
190 output[0] = boxSize.x() * G4UniformRand() - boxSize.x()/2;
191 output[1] = boxSize.y() * G4UniformRand() - boxSize.y()/2;
192 output[2] = boxSize.z() * G4UniformRand() - boxSize.z()/2;
193}
#define G4UniformRand()
Definition: Randomize.hh:52
double z() const
double x() const
double y() const

References G4UniformRand, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

◆ Shoot() [1/2]

template<typename TYPE >
void TG4MoleculeShoot< TYPE >::Shoot ( G4MoleculeGun )
inlinevirtual

Implements G4MoleculeShoot.

Definition at line 104 of file G4MoleculeGun.hh.

104{}

◆ Shoot() [2/2]

void TG4MoleculeShoot< G4Track >::Shoot ( G4MoleculeGun gun)
virtual

Implements G4MoleculeShoot.

Definition at line 74 of file G4MoleculeGun.cc.

75{
77 else ShootAtFixedPosition(gun);
78}
void ShootAtRandomPosition(G4MoleculeGun *)
void ShootAtFixedPosition(G4MoleculeGun *)

◆ ShootAtFixedPosition() [1/2]

template<typename TYPE >
void TG4MoleculeShoot< TYPE >::ShootAtFixedPosition ( G4MoleculeGun )
inlineprotected

Definition at line 108 of file G4MoleculeGun.hh.

108{}

◆ ShootAtFixedPosition() [2/2]

void TG4MoleculeShoot< G4Track >::ShootAtFixedPosition ( G4MoleculeGun gun)
protected

Definition at line 63 of file G4MoleculeGun.cc.

64{
65 for(int i = 0; i < fNumber; ++i)
66 {
68 }
69}
void BuildAndPushTrack(const G4String &name, const G4ThreeVector &position, double time=0)

References G4MoleculeGun::BuildAndPushTrack().

◆ ShootAtRandomPosition() [1/2]

template<typename TYPE >
void TG4MoleculeShoot< TYPE >::ShootAtRandomPosition ( G4MoleculeGun )
inlineprotected

Definition at line 107 of file G4MoleculeGun.hh.

107{}

◆ ShootAtRandomPosition() [2/2]

void TG4MoleculeShoot< G4Track >::ShootAtRandomPosition ( G4MoleculeGun gun)
protected

Definition at line 47 of file G4MoleculeGun.cc.

48{
49 G4ThreeVector positionInLocalCoordinate;
50
51 for(int i = 0; i < fNumber; ++i)
52 {
53 RandomPosInBox(*fBoxSize, positionInLocalCoordinate);
55 fPosition + positionInLocalCoordinate,
56 fTime);
57 }
58}
static void RandomPosInBox(const G4ThreeVector &boxSize, G4ThreeVector &output)

References G4MoleculeGun::BuildAndPushTrack().

Field Documentation

◆ fBoxSize

G4ThreeVector* G4MoleculeShoot::fBoxSize
inherited

◆ fMoleculeName

G4String G4MoleculeShoot::fMoleculeName
inherited

◆ fNumber

G4int G4MoleculeShoot::fNumber
inherited

◆ fPosition

G4ThreeVector G4MoleculeShoot::fPosition
inherited

Definition at line 81 of file G4MoleculeGun.hh.

Referenced by G4MoleculeShoot::ChangeType().

◆ fTime

G4double G4MoleculeShoot::fTime
inherited

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