51 for(
G4int i = 0; i < fNumber; ++i)
53 RandomPosInBox(*fBoxSize, positionInLocalCoordinate);
55 fPosition + positionInLocalCoordinate,
65 for(
G4int i = 0; i < fNumber; ++i)
76 if(fBoxSize !=
nullptr) ShootAtRandomPosition(gun);
77 else ShootAtFixedPosition(gun);
109 for (
const auto & fShoot :
fShoots)
122 shoot->fMoleculeName = name;
136 shoot->fNumber = (
G4int)n;
137 shoot->fMoleculeName = moleculeName;
153 shoot->fNumber = (
G4int)n;
154 shoot->fMoleculeName = moleculeName;
155 shoot->fPosition = boxCenter;
179 for(
const auto & fShoot :
fShoots)
181 output[fShoot->fMoleculeName]+=fShoot->fNumber;
225 shoot->fNumber = (
G4int)n;
226 shoot->fMoleculeName = moleculeName;
CLHEP::Hep3Vector G4ThreeVector
void PushTrack(G4Track *)
void AddMoleculeInCMRepresentation(std::size_t n, const G4String &moleculeName, G4double time=0)
std::map< G4String, G4int > NameNumber
void AddMoleculeShoot(G4shared_ptr< G4MoleculeShoot >)
G4MoleculeGunMessenger * fpMessenger
void DefineTracks() override
void AddMoleculesRandomPositionInBox(std::size_t n, const G4String &moleculeName, const G4ThreeVector &boxCenter, const G4ThreeVector &boxExtension, G4double time=0)
std::vector< G4shared_ptr< G4MoleculeShoot > > fShoots
void AddMolecule(const G4String &moleculeName, const G4ThreeVector &position, G4double time=0)
void BuildAndPushTrack(const G4String &name, const G4ThreeVector &position, G4double time=0)
void GetNameAndNumber(NameNumber &)
~G4MoleculeGun() override
void AddNMolecules(std::size_t n, const G4String &moleculeName, const G4ThreeVector &position, G4double time=0)
static void RandomPosInBox(const G4ThreeVector &boxSize, G4ThreeVector &output)
virtual ~G4MoleculeShoot()
G4MolecularConfiguration * GetConfiguration(const G4String &, bool mustExist=true)
static G4MoleculeTable * Instance()
void ShootAtRandomPosition(G4MoleculeGun *)
void ShootAtFixedPosition(G4MoleculeGun *)
void Shoot(G4MoleculeGun *) override