44 :verboseLevel(0),trackID(0),
45 unknown(nullptr),unknownParticleDefined(false),
46 opticalphoton(nullptr),opticalphotonDefined(false),
75 for(
auto tr :
TV)
delete tr;
83 nextVertex = nextVertex->
GetNext();
98 primaryVertex->
Print();
100 G4cout <<
"G4PrimaryTransformer::PrimaryVertex (" 101 << X0 /
mm <<
"(mm)," 102 << Y0 /
mm <<
"(mm)," 103 << Z0 /
mm <<
"(mm)," 109 while( primaryParticle != 0 )
112 primaryParticle = primaryParticle->
GetNext();
128 <<
") --- Ignored" <<
G4endl;
135 daughter = daughter->
GetNext();
147 <<
") --- Transfered with momentum " << primaryParticle->
GetMomentum()
160 "Polarization of the optical photon is null. Random polarization is assumed.");
161 G4cerr <<
"This warning message is issued up to 10 times." <<
G4endl;
172 if (modul2 > 0.) e_perpend = (1./std::sqrt(modul2))*product;
175 G4ThreeVector polar = std::cos(angle)*e_paralle + std::sin(angle)*e_perpend;
226 track->SetParentID(0);
228 track->SetWeight(wv*(primaryParticle->
GetWeight()));
230 TV.push_back( track );
239 if(!daughter)
return;
255 <<
") --- Ignored" <<
G4endl;
266 <<
") --- Attached with momentum " << daughter->
GetMomentum()
293 daughter = daughter->
GetNext();
301 {
G4cerr <<
"unknownParticleDefined cannot be set true because G4UnknownParticle is not defined in the physics list." 311 if(decayProducts && decayProducts->
entries()>0)
return true;
313 <<
"G4PrimaryTransformer: a shortlived primary particle is found" <<
G4endl 314 <<
" without any valid decay table nor pre-assigned decay mode." <<
G4endl;
316 "This primary particle will be ignored.");
G4ParticleDefinition * GetG4code() const
G4bool IsShortLived() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void SetPreAssignedDecayProperTime(G4double)
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector GetPolarization() const
G4int PushProducts(G4DynamicParticle *aParticle)
G4double GetWeight() const
G4PrimaryParticle * GetPrimary(G4int i=0) const
static G4double angle[DIM]
G4double GetKineticEnergy() const
const G4DecayProducts * GetPreAssignedDecayProducts() const
G4double GetWeight() const
static double normal(HepRandomEngine *eptr)
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4PrimaryParticle * GetNext() const
Hep3Vector cross(const Hep3Vector &) const
G4int GetPDGEncoding() const
G4PrimaryParticle * GetDaughter() const
void SetTrackID(G4int id)
G4DecayTable * GetDecayTable() const
const G4ThreeVector & GetMomentumDirection() const
void SetPrimaryParticle(G4PrimaryParticle *p)
void SetPolarization(G4double polX, G4double polY, G4double polZ)
G4double GetCharge() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4int GetAtomicNumber() const
void AddElectron(G4int orbit, G4int number=1)
G4PrimaryVertex * GetPrimaryVertex(G4int i=0) const
static const double nanosecond
static G4ParticleTable * GetParticleTable()
const G4ThreeVector & GetMomentumDirection() const
G4double GetProperTime() const
G4ThreeVector GetMomentum() const
G4ParticleDefinition * GetDefinition() const
static const double eplus
void SetPreAssignedDecayProducts(G4DecayProducts *aDecayProducts)
void SetCharge(G4double charge)
G4PrimaryVertex * GetNext() const
void SetMass(G4double mass)
G4GLOB_DLL std::ostream G4cerr