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