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.
236{
237 if( err.num_row() != 6 ){
238 std::cerr << "%ERROR at Ext_track::Set. Dimension of error matrix: "
239 << err.num_row() << " should be 6" << std::endl;
240 exit( 0 );
241 }
242
243 m_vect[0] = xv3.x();
244 m_vect[1] = xv3.y();
245 m_vect[2] = xv3.z();
246
247
248
249
250
251
252 if(!CheckVertexInsideWorld(xv3)) return 0;
253
254 float p( pv3.mag() );
255 m_vect[3] = pv3.x()/p;
256 m_vect[4] = pv3.y()/p;
257 m_vect[5] = pv3.z()/p;
258 m_vect[6] = p;
259
260
261 if(particleName!="e+"&&particleName!="e-"&&
262 particleName!="mu+"&&particleName!="mu-"&&
263 particleName!="pi+"&&particleName!="pi-"&&
264 particleName!="kaon+"&&particleName!="kaon-"&&
265 particleName!="proton"&&particleName!="anti_proton"&&
266 particleName!="gamma")
267 {
268 std::cerr <<"Unknown or unconstructed Particle."<< std::endl;
269 return 0;
270 }
271
272
274 double Q;
275
276 G4ParticleDefinition* particleDefinition=G4ParticleTable::GetParticleTable()->FindParticle(particleName);
277 Q = particleDefinition->GetPDGCharge();
278 mass = particleDefinition->GetPDGMass();
279
280
281 Hep3Vector xv( m_vect[0], m_vect[1], m_vect[2] );
282 Hep3Vector pv(m_vect[3]*m_vect[6], m_vect[4]*m_vect[6], m_vect[5]*m_vect[6]);
283
285
289
290 double betaInMDC = p/sqrt(
mass*
mass+p*p);
292
293
294
295
297
298
299
300
301
302
303
304
305
306
307
308
309 G4DynamicParticle* DP = new G4DynamicParticle(particleDefinition,pv);
310
311 delete extTrack;
312 extTrack = new G4Track(DP,0.0,xv3);
313
314
315
316 Hep3Vector center(0,0,0);
317 G4Navigator* navigator= G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking();
318 navigator->LocateGlobalPointAndSetup(center,0,false);
319
320 return 1;
321}
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)