eic-smear
1.0.3
A collection of ROOT classes for Monte Carlo events and a fast-smearing code simulating detector effects for the Electron-Ion Collider task force
Main Page
Related Pages
Classes
Files
File List
File Members
Pythia6ParticleBuilder.cxx
Go to the documentation of this file.
1
10
#include <iostream>
11
12
#include <TLorentzVector.h>
13
#include <TMCParticle.h>
14
#include <TVector3.h>
15
16
#include "
eicsmear/erhic/ParticleMC.h
"
17
#include "
eicsmear/erhic/Pythia6ParticleBuilder.h
"
18
19
namespace
erhic {
20
21
std::auto_ptr<ParticleMC>
22
Pythia6ParticleBuilder::Create
(
const
TMCParticle& mc)
const
{
23
std::auto_ptr<ParticleMC> particle(
new
ParticleMC
);
24
TLorentzVector p(mc.GetPx(),
25
mc.GetPy(),
26
mc.GetPz(),
27
mc.GetEnergy());
28
TVector3 v(mc.GetVx(),
29
mc.GetVy(),
30
mc.GetVz());
31
particle->SetStatus(mc.GetKS());
32
particle->SetId(mc.GetKF());
33
particle->SetParentIndex(mc.GetParent());
34
particle->SetChild1Index(mc.GetFirstChild());
35
particle->SetChildNIndex(mc.GetLastChild());
36
std::cout <<
"ChildN index "
<< mc.GetLastChild() <<
" "
<<
37
particle->GetChildNIndex() << std::endl;
38
particle->Set4Vector(p);
39
particle->SetVertex(v);
40
return
particle;
41
}
42
43
}
// namespace erhic
Pythia6ParticleBuilder.h
erhic::ParticleMC
Definition:
ParticleMC.h:28
ParticleMC.h
erhic::Pythia6ParticleBuilder::Create
std::auto_ptr< ParticleMC > Create(const TMCParticle &) const
Definition:
Pythia6ParticleBuilder.cxx:22
eic-smear
src
erhic
Pythia6ParticleBuilder.cxx
Generated on Thu Jul 24 2014 15:18:39 for eic-smear by
1.8.7