Setup the error skip list as a part of the initialization. errskip_list – Name of the error skip file. Print out the contents of the error skip list.
235{
236 if( err.num_row() != 6 ){
237 std::cerr << "%ERROR at Ext_track::Set. Dimension of error matrix: "
238 << err.num_row() << " should be 6" << std::endl;
239 exit( 0 );
240 }
241
242 m_vect[0] = xv3.x();
243 m_vect[1] = xv3.y();
244 m_vect[2] = xv3.z();
245
246
247
248
249
250
251 if(!CheckVertexInsideWorld(xv3)) return 0;
252
253 float p( pv3.mag() );
254 m_vect[3] = pv3.x()/p;
255 m_vect[4] = pv3.y()/p;
256 m_vect[5] = pv3.z()/p;
257 m_vect[6] = p;
258
259
260 if(particleName!="e+"&&particleName!="e-"&&
261 particleName!="mu+"&&particleName!="mu-"&&
262 particleName!="pi+"&&particleName!="pi-"&&
263 particleName!="kaon+"&&particleName!="kaon-"&&
264 particleName!="proton"&&particleName!="anti_proton"&&
265 particleName!="gamma")
266 {
267 std::cerr <<"Unknown or unconstructed Particle."<< std::endl;
268 return 0;
269 }
270
271
273 double Q;
274
275 G4ParticleDefinition* particleDefinition=G4ParticleTable::GetParticleTable()->FindParticle(particleName);
276 Q = particleDefinition->GetPDGCharge();
277 mass = particleDefinition->GetPDGMass();
278
279
280 Hep3Vector xv( m_vect[0], m_vect[1], m_vect[2] );
281 Hep3Vector pv(m_vect[3]*m_vect[6], m_vect[4]*m_vect[6], m_vect[5]*m_vect[6]);
282
284
288
289 double betaInMDC = p/sqrt(
mass*
mass+p*p);
291
292
293
294
296
297
298
299
300
301
302
303
304
305
306
307
308 G4DynamicParticle* DP = new G4DynamicParticle(particleDefinition,pv);
309
310 delete extTrack;
311 extTrack = new G4Track(DP,0.0,xv3);
312
313
314
315 Hep3Vector center(0,0,0);
316 G4Navigator* navigator= G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking();
317 navigator->LocateGlobalPointAndSetup(center,0,false);
318
319 return 1;
320}
void SetBetaInMDC(double aBeta)
void SetInitialPath(double aPath)
void SetInitialTof(double aTof)
void SetXpErrPointer(Ext_xp_err *xpErr)
void set_err(const HepSymMatrix &err, const Hep3Vector &xv, const Hep3Vector &pv, const double &q, const double &mass)