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;
static G4MoleculeTable * Instance()
CLHEP::Hep3Vector G4ThreeVector
std::map< G4String, int > NameNumber
std::vector< G4shared_ptr< G4MoleculeShoot > > fShoots
virtual ~G4MoleculeShoot()
void ShootAtRandomPosition(G4MoleculeGun *)
void BuildAndPushTrack(const G4String &name, const G4ThreeVector &position, double time=0)
virtual void DefineTracks()
void AddMoleculeShoot(G4shared_ptr< G4MoleculeShoot >)
void AddMoleculeInCMRepresentation(size_t n, const G4String &moleculeName, double time=0)
G4MoleculeGunMessenger * fpMessenger
void AddMoleculesRandomPositionInBox(size_t n, const G4String &moleculeName, const G4ThreeVector &boxCenter, const G4ThreeVector &boxExtension, double time=0)
#define G4enable_shared_from_this
void PushTrack(G4Track *)
static void RandomPosInBox(const G4ThreeVector &boxSize, G4ThreeVector &output)
ThreeVector shoot(const G4int Ap, const G4int Af)
void AddNMolecules(size_t n, const G4String &moleculeName, const G4ThreeVector &position, double time=0)
void AddMolecule(const G4String &moleculeName, const G4ThreeVector &position, double time=0)
G4MolecularConfiguration * GetConfiguration(const G4String &, bool mustExist=true)
G4Track * BuildTrack(G4double globalTime, const G4ThreeVector &Position)
void Shoot(G4MoleculeGun *)
void GetNameAndNumber(NameNumber &)
void ShootAtFixedPosition(G4MoleculeGun *)