44 :verboseLevel(0),trackID(0),
45 unknown(0),unknownParticleDefined(false),
46 opticalphoton(0),opticalphotonDefined(false),
75 for(
size_t ii=0; ii<
TV.size();ii++)
82 nextVertex = nextVertex->
GetNext();
97 primaryVertex->
Print();
99 G4cout <<
"G4PrimaryTransformer::PrimaryVertex ("
100 << X0 /
mm <<
"(mm),"
101 << Y0 /
mm <<
"(mm),"
102 << Z0 /
mm <<
"(mm),"
108 while( primaryParticle != 0 )
111 primaryParticle = primaryParticle->
GetNext();
120 if(!IsGoodForTrack(partDef))
127 <<
") --- Ignored" <<
G4endl;
133 GenerateSingleTrack(daughter,x0,y0,z0,t0,wv);
134 daughter = daughter->
GetNext();
146 <<
") --- Transfered with momentum " << primaryParticle->
GetMomentum()
154 if(opticalphotonDefined && partDef==opticalphoton && primaryParticle->
GetPolarization().mag2()==0.)
159 "Polarization of the optical photon is null. Random polarization is assumed.");
160 G4cerr <<
"This warning message is issued up to 10 times." <<
G4endl;
171 if (modul2 > 0.) e_perpend = (1./std::sqrt(modul2))*product;
174 G4ThreeVector polar = std::cos(angle)*e_paralle + std::sin(angle)*e_perpend;
204 SetDecayProducts( primaryParticle, DP );
213 if(!CheckDynamicParticle(DP))
229 TV.push_back( track );
238 if(!daughter)
return;
248 if(!IsGoodForTrack(partDef))
254 <<
") --- Ignored" <<
G4endl;
257 SetDecayProducts(daughter,motherDP);
265 <<
") --- Attached with momentum " << daughter->
GetMomentum()
283 SetDecayProducts(daughter,DP);
285 if(!CheckDynamicParticle(DP))
291 daughter = daughter->
GetNext();
299 {
G4cerr <<
"unknownParticleDefined cannot be set true because G4UnknownParticle is not defined in the physics list."
309 if(decayProducts && decayProducts->
entries()>0)
return true;
311 <<
"G4PrimaryTransformer: a shortlived primary particle is found" <<
G4endl
312 <<
" without any valid decay table nor pre-assigned decay mode." <<
G4endl;
314 "This primary particle will be ignored.");
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4ThreeVector GetMomentum() const
void SetPreAssignedDecayProperTime(G4double)
CLHEP::Hep3Vector G4ThreeVector
G4int PushProducts(G4DynamicParticle *aParticle)
G4double GetKineticEnergy() const
G4ThreeVector GetPolarization() const
const G4DecayProducts * GetPreAssignedDecayProducts() const
G4int GetPDGEncoding() const
G4ParticleDefinition * GetDefinition() const
const G4ThreeVector & GetMomentumDirection() const
const G4String & GetParticleName() const
G4ParticleDefinition * GetG4code() const
G4int GetAtomicNumber() const
void SetWeight(G4double aValue)
static double normal(HepRandomEngine *eptr)
G4double GetWeight() const
G4DecayTable * GetDecayTable() const
G4PrimaryParticle * GetPrimary(G4int i=0) const
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetMomentumDirection() const
G4PrimaryParticle * GetDaughter() const
void SetTrackID(G4int id)
void SetPrimaryParticle(G4PrimaryParticle *p)
G4PrimaryVertex * GetPrimaryVertex(G4int i=0) const
void SetPolarization(G4double polX, G4double polY, G4double polZ)
G4PrimaryVertex * GetNext() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double GetProperTime() const
G4double GetWeight() const
G4bool IsShortLived() const
void AddElectron(G4int orbit, G4int number=1)
static const double nanosecond
static G4ParticleTable * GetParticleTable()
G4PrimaryParticle * GetNext() const
std::vector< G4Track * > G4TrackVector
void SetParentID(const G4int aValue)
G4double GetCharge() const
static const double eplus
void SetPreAssignedDecayProducts(G4DecayProducts *aDecayProducts)
void SetCharge(G4double charge)
void SetMass(G4double mass)
void SetTrackID(const G4int aValue)
G4GLOB_DLL std::ostream G4cerr