43 :verboseLevel(0),trackID(0),
44 unknown(nullptr),unknownParticleDefined(
false),
45 opticalphoton(nullptr),opticalphotonDefined(
false),
74 for(
auto tr :
TV)
delete tr;
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()
284 SetDecayProducts(daughter,DP);
286 if(!CheckDynamicParticle(DP))
292 daughter = daughter->
GetNext();
300 {
G4cerr <<
"unknownParticleDefined cannot be set true because G4UnknownParticle is not defined in the physics list."
310 if(decayProducts && decayProducts->
entries()>0)
return true;
312 <<
"G4PrimaryTransformer: a shortlived primary particle is found" <<
G4endl
313 <<
" without any valid decay table nor pre-assigned decay mode." <<
G4endl;
315 "This primary particle will be ignored.");