Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4MoleculeGun Class Reference

#include <G4MoleculeGun.hh>

Inheritance diagram for G4MoleculeGun:
Collaboration diagram for G4MoleculeGun:

Public Types

typedef std::map< G4String, intNameNumber
 

Public Member Functions

 G4MoleculeGun ()
 
virtual ~G4MoleculeGun ()
 
virtual void DefineTracks ()
 
void AddMolecule (const G4String &moleculeName, const G4ThreeVector &position, double time=0)
 
void AddNMolecules (size_t n, const G4String &moleculeName, const G4ThreeVector &position, double time=0)
 
void AddMoleculesRandomPositionInBox (size_t n, const G4String &moleculeName, const G4ThreeVector &boxCenter, const G4ThreeVector &boxExtension, double time=0)
 
void AddMoleculeInCMRepresentation (size_t n, const G4String &moleculeName, double time=0)
 
const std::vector
< G4shared_ptr
< G4MoleculeShoot > > & 
GetMoleculeShoot ()
 
void GetNameAndNumber (NameNumber &)
 
void AddMoleculeShoot (G4shared_ptr< G4MoleculeShoot >)
 
- Public Member Functions inherited from G4ITGun
 G4ITGun ()
 
virtual ~G4ITGun ()
 

Protected Member Functions

void BuildAndPushTrack (const G4String &name, const G4ThreeVector &position, double time=0)
 
- Protected Member Functions inherited from G4ITGun
void PushTrack (G4Track *)
 

Protected Attributes

G4MoleculeGunMessengerfpMessenger
 
std::vector< G4shared_ptr
< G4MoleculeShoot > > 
fShoots
 

Friends

class G4MoleculeShoot
 
template<class T >
class TG4MoleculeShoot
 

Detailed Description

Definition at line 126 of file G4MoleculeGun.hh.

Member Typedef Documentation

Definition at line 193 of file G4MoleculeGun.hh.

Constructor & Destructor Documentation

G4MoleculeGun::G4MoleculeGun ( )

Definition at line 93 of file G4MoleculeGun.cc.

94 {
96 }
G4MoleculeGunMessenger * fpMessenger
G4MoleculeGun::~G4MoleculeGun ( )
virtual

Definition at line 100 of file G4MoleculeGun.cc.

101 {
102  if (fpMessenger) delete fpMessenger;
103 }
G4MoleculeGunMessenger * fpMessenger

Member Function Documentation

void G4MoleculeGun::AddMolecule ( const G4String moleculeName,
const G4ThreeVector position,
double  time = 0 
)

Definition at line 117 of file G4MoleculeGun.cc.

120 {
121  G4shared_ptr<G4MoleculeShoot> shoot(new TG4MoleculeShoot<G4Track>());
122  shoot->fMoleculeName = name;
123  shoot->fPosition = position;
124  shoot->fTime = time;
125  fShoots.push_back(shoot);
126 }
const XML_Char * name
Definition: expat.h:151
ThreeVector shoot(const G4int Ap, const G4int Af)
#define position
Definition: xmlparse.cc:622
std::vector< G4shared_ptr< G4MoleculeShoot > > fShoots

Here is the call graph for this function:

void G4MoleculeGun::AddMoleculeInCMRepresentation ( size_t  n,
const G4String moleculeName,
double  time = 0 
)

Definition at line 221 of file G4MoleculeGun.cc.

224 {
225  G4shared_ptr<G4MoleculeShoot> shoot(new TG4MoleculeShoot<G4ContinuousMedium>());
226  shoot->fNumber = n;
227  shoot->fMoleculeName = moleculeName;
228  shoot->fTime = time;
229  fShoots.push_back(shoot);
230 }
ThreeVector shoot(const G4int Ap, const G4int Af)
const G4int n
std::vector< G4shared_ptr< G4MoleculeShoot > > fShoots

Here is the call graph for this function:

void G4MoleculeGun::AddMoleculeShoot ( G4shared_ptr< G4MoleculeShoot shoot)

Definition at line 216 of file G4MoleculeGun.cc.

217 {
218  fShoots.push_back(shoot);
219 }
ThreeVector shoot(const G4int Ap, const G4int Af)
std::vector< G4shared_ptr< G4MoleculeShoot > > fShoots

Here is the caller graph for this function:

void G4MoleculeGun::AddMoleculesRandomPositionInBox ( size_t  n,
const G4String moleculeName,
const G4ThreeVector boxCenter,
const G4ThreeVector boxExtension,
double  time = 0 
)

Definition at line 146 of file G4MoleculeGun.cc.

151 {
152  G4shared_ptr<G4MoleculeShoot> shoot(new TG4MoleculeShoot<G4Track>());
153  shoot->fNumber = n;
154  shoot->fMoleculeName = moleculeName;
155  shoot->fPosition = boxCenter;
156  shoot->fBoxSize = new G4ThreeVector(boxSize);
157  shoot->fTime = time;
158  fShoots.push_back(shoot);
159 }
ThreeVector shoot(const G4int Ap, const G4int Af)
CLHEP::Hep3Vector G4ThreeVector
const G4int n
std::vector< G4shared_ptr< G4MoleculeShoot > > fShoots

Here is the call graph for this function:

void G4MoleculeGun::AddNMolecules ( size_t  n,
const G4String moleculeName,
const G4ThreeVector position,
double  time = 0 
)

Definition at line 130 of file G4MoleculeGun.cc.

134 {
135  G4shared_ptr<G4MoleculeShoot> shoot(new TG4MoleculeShoot<G4Track>());
136  shoot->fNumber = n;
137  shoot->fMoleculeName = moleculeName;
138  shoot->fPosition = position;
139  shoot->fTime = time;
140  fShoots.push_back(shoot);
141 }
ThreeVector shoot(const G4int Ap, const G4int Af)
#define position
Definition: xmlparse.cc:622
const G4int n
std::vector< G4shared_ptr< G4MoleculeShoot > > fShoots

Here is the call graph for this function:

void G4MoleculeGun::BuildAndPushTrack ( const G4String name,
const G4ThreeVector position,
double  time = 0 
)
protected

Definition at line 163 of file G4MoleculeGun.cc.

166 {
169  assert(conf != 0);
170  G4Molecule* molecule = new G4Molecule(conf);
171 
172  PushTrack(molecule->BuildTrack(time, position));
173 }
static G4MoleculeTable * Instance()
G4Track * BuildTrack(G4double globalTime, const G4ThreeVector &Position)
Definition: G4Molecule.cc:391
void PushTrack(G4Track *)
Definition: G4ITGun.cc:45
G4MolecularConfiguration * GetConfiguration(const G4String &, bool mustExist=true)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4MoleculeGun::DefineTracks ( )
virtual

Reimplemented from G4ITGun.

Definition at line 107 of file G4MoleculeGun.cc.

108 {
109  for (size_t i = 0; i < fShoots.size(); i++)
110  {
111  fShoots[i]->Shoot(this);
112  }
113 }
std::vector< G4shared_ptr< G4MoleculeShoot > > fShoots
const std::vector<G4shared_ptr<G4MoleculeShoot> >& G4MoleculeGun::GetMoleculeShoot ( )
inline

Definition at line 189 of file G4MoleculeGun.hh.

189  {
190  return fShoots;
191  }
std::vector< G4shared_ptr< G4MoleculeShoot > > fShoots
void G4MoleculeGun::GetNameAndNumber ( G4MoleculeGun::NameNumber output)

Definition at line 177 of file G4MoleculeGun.cc.

178 {
179  for(size_t i = 0 ; i < fShoots.size() ; ++i)
180  {
181  output[fShoots[i]->fMoleculeName]+=fShoots[i]->fNumber;
182  }
183 }
std::vector< G4shared_ptr< G4MoleculeShoot > > fShoots

Friends And Related Function Documentation

friend class G4MoleculeShoot
friend

Definition at line 206 of file G4MoleculeGun.hh.

template<class T >
friend class TG4MoleculeShoot
friend

Definition at line 207 of file G4MoleculeGun.hh.

Member Data Documentation

G4MoleculeGunMessenger* G4MoleculeGun::fpMessenger
protected

Definition at line 203 of file G4MoleculeGun.hh.

std::vector<G4shared_ptr<G4MoleculeShoot> > G4MoleculeGun::fShoots
protected

Definition at line 205 of file G4MoleculeGun.hh.


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