73 for(
auto tr :
TV)
delete tr;
79 while(nextVertex !=
nullptr)
82 nextVertex = nextVertex->
GetNext();
98 primaryVertex->
Print();
102 G4cout <<
"G4PrimaryTransformer::PrimaryVertex ("
103 << X0 / mm <<
"(mm),"
104 << Y0 / mm <<
"(mm),"
105 << Z0 / mm <<
"(mm),"
106 << T0 / nanosecond <<
"(nsec))" <<
G4endl;
111 while( primaryParticle !=
nullptr )
114 primaryParticle = primaryParticle->
GetNext();
130 <<
") --- Ignored" <<
G4endl;
134 while(daughter !=
nullptr)
137 daughter = daughter->
GetNext();
147 <<
") --- Transferred with momentum "
161 G4Exception(
"G4PrimaryTransformer::GenerateSingleTrack",
163 "Polarization of the optical photon is null.\
164 Random polarization is assumed.");
165 G4cerr <<
"This warning message is issued up to 10 times." <<
G4endl;
176 if (modul2 > 0.) e_perpend = (1./std::sqrt(modul2))*product;
180 + std::sin(angle)*e_perpend;
197 if(pmas>=0.) { DP->
SetMass(pmas); }
258 TV.push_back( track );
266 if(daughter ==
nullptr)
return;
269 if(decayProducts ==
nullptr)
274 while(daughter !=
nullptr)
283 <<
") --- Ignored" <<
G4endl;
294 <<
") --- Attached with momentum " << daughter->
GetMomentum()
337 daughter = daughter->
GetNext();
346 G4cerr <<
"unknownParticleDefined cannot be set true because" <<
G4endl
347 <<
"G4UnknownParticle is not defined in the physics list." <<
G4endl
348 <<
"Command ignored." <<
G4endl;
358 if(decayProducts !=
nullptr && decayProducts->
entries()>0)
return true;
360 <<
"G4PrimaryTransformer: a shortlived primary particle is found"
362 <<
" without any valid decay table nor pre-assigned decay mode."
365 "This primary particle will be ignored.");
373 if(partDef ==
nullptr)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::Hep3Vector G4ThreeVector
std::vector< G4Track * > G4TrackVector
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
Hep3Vector cross(const Hep3Vector &) const
G4int PushProducts(G4DynamicParticle *aParticle)
void SetPreAssignedDecayProducts(G4DecayProducts *aDecayProducts)
void SetPolarization(const G4ThreeVector &)
void SetCharge(G4double charge)
const G4ThreeVector & GetMomentumDirection() const
void SetMass(G4double mass)
const G4DecayProducts * GetPreAssignedDecayProducts() const
G4ParticleDefinition * GetDefinition() const
void SetPrimaryParticle(G4PrimaryParticle *p)
void SetPreAssignedDecayProperTime(G4double)
void AddElectron(G4int orbit, G4int number=1)
G4PrimaryVertex * GetPrimaryVertex(G4int i=0) const
G4int GetAtomicNumber() const
G4bool IsShortLived() const
G4int GetPDGEncoding() const
G4DecayTable * GetDecayTable() const
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
G4double GetWeight() const
G4double GetCharge() const
G4double GetKineticEnergy() const
G4double GetProperTime() const
const G4ThreeVector & GetMomentumDirection() const
void SetTrackID(G4int id)
G4ThreeVector GetPolarization() const
G4PrimaryParticle * GetNext() const
G4ThreeVector GetMomentum() const
G4PrimaryParticle * GetDaughter() const
G4PrimaryVertex * GetNext() const
G4double GetWeight() const
G4PrimaryParticle * GetPrimary(G4int i=0) const
void SetWeight(G4double aValue)
void SetTrackID(const G4int aValue)
void SetParentID(const G4int aValue)