51 for(
int i = 0; i < fNumber; ++i)
53 RandomPosInBox(*fBoxSize, positionInLocalCoordinate);
55 fPosition + positionInLocalCoordinate,
65 for(
int i = 0; i < fNumber; ++i)
76 if(fBoxSize) ShootAtRandomPosition(gun);
77 else ShootAtFixedPosition(gun);
109 for (
size_t i = 0; i <
fShoots.size(); i++)
122 shoot->fMoleculeName =
name;
137 shoot->fMoleculeName = moleculeName;
154 shoot->fMoleculeName = moleculeName;
155 shoot->fPosition = boxCenter;
179 for(
size_t i = 0 ; i <
fShoots.size() ; ++i)
181 output[
fShoots[i]->fMoleculeName]+=fShoots[i]->fNumber;
227 shoot->fMoleculeName = moleculeName;
The pointer G4MolecularConfiguration will be shared by all the molecules having the same molecule def...
ThreeVector shoot(const G4int Ap, const G4int Af)
virtual ~G4MoleculeShoot()
void AddMoleculeInCMRepresentation(size_t n, const G4String &moleculeName, double time=0)
void AddMoleculeShoot(G4shared_ptr< G4MoleculeShoot >)
void AddMoleculesRandomPositionInBox(size_t n, const G4String &moleculeName, const G4ThreeVector &boxCenter, const G4ThreeVector &boxExtension, double time=0)
#define G4enable_shared_from_this
CLHEP::Hep3Vector G4ThreeVector
G4MoleculeGunMessenger * fpMessenger
virtual void DefineTracks()
void BuildAndPushTrack(const G4String &name, const G4ThreeVector &position, double time=0)
void ShootAtRandomPosition(G4MoleculeGun *)
const char * name(G4int ptype)
void AddMolecule(const G4String &moleculeName, const G4ThreeVector &position, double time=0)
static G4MoleculeTable * Instance()
static void RandomPosInBox(const G4ThreeVector &boxSize, G4ThreeVector &output)
void Shoot(G4MoleculeGun *)
void AddNMolecules(size_t n, const G4String &moleculeName, const G4ThreeVector &position, double time=0)
G4Track * BuildTrack(G4double globalTime, const G4ThreeVector &Position)
Class Description The dynamic molecule holds all the data that change for a molecule It has a pointer...
std::map< G4String, int > NameNumber
void ShootAtFixedPosition(G4MoleculeGun *)
void PushTrack(G4Track *)
std::vector< G4shared_ptr< G4MoleculeShoot > > fShoots
void GetNameAndNumber(NameNumber &)
G4MolecularConfiguration * GetConfiguration(const G4String &, bool mustExist=true)