Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
FastSimulation
ParticleDecay
src
Pythia6Decays.cc
Go to the documentation of this file.
1
// HepMC Headers
2
#include "HepMC/PythiaWrapper6_4.h"
3
4
// Pythia6 framework integration service Headers
5
#include "
GeneratorInterface/Pythia6Interface/interface/Pythia6Service.h
"
6
7
// FAMOS Headers
8
#include "
FastSimulation/ParticlePropagator/interface/ParticlePropagator.h
"
9
#include "
FastSimulation/ParticleDecay/interface/Pythia6Decays.h
"
10
#include "
FastSimulation/ParticleDecay/interface/Pythia6jets.h
"
11
12
#define PYTHIA6PYDECY pythia6pydecy_
13
14
extern
"C"
{
15
void
PYTHIA6PYDECY
(
int
*ip);
16
}
17
18
Pythia6Decays::Pythia6Decays
()
19
{
20
// Create a new Pythia6jets
21
pyjets
=
new
Pythia6jets
();
22
// Create a new Pythia6Service helper
23
pyservice
=
new
gen::Pythia6Service
();
24
// The PYTHIA decay tables will be initialized later
25
}
26
27
Pythia6Decays::~Pythia6Decays
() {
28
delete
pyjets
;
29
delete
pyservice
;
30
}
31
32
const
DaughterParticleList
&
33
Pythia6Decays::particleDaughters
(
ParticlePropagator
& particle)
34
{
35
gen::Pythia6Service::InstanceWrapper
guard(
pyservice
);
// grab Py6 context
36
37
// Pythia6jets pyjets;
38
int
ip;
39
40
pyjets
->
k
(1,1) = 1;
41
pyjets
->
k
(1,2) = particle.
pid
();
42
pyjets
->
p
(1,1) = particle.Px();
43
pyjets
->
p
(1,2) = particle.Py();
44
pyjets
->
p
(1,3) = particle.Pz();
45
pyjets
->
p
(1,4) =
std::max
(particle.
mass
(),particle.e());
46
pyjets
->
p
(1,5) = particle.
mass
();
47
pyjets
->
v
(1,1) = particle.
X
();
48
pyjets
->
v
(1,2) = particle.
Y
();
49
pyjets
->
v
(1,3) = particle.
Z
();
50
pyjets
->
v
(1,4) = particle.
T
();
51
pyjets
->
n
() = 1;
52
53
ip = 1;
54
PYTHIA6PYDECY
(&ip);
55
56
// Fill the list of daughters
57
theList
.clear();
58
if
(
pyjets
->
n
()==1 )
return
theList
;
59
60
theList
.resize(
pyjets
->
n
()-1,
RawParticle
());
61
62
for
(
int
i
=2;
i
<=
pyjets
->
n
();++
i
) {
63
64
theList
[
i
-2].SetXYZT(
pyjets
->
p
(
i
,1),
pyjets
->
p
(
i
,2),
65
pyjets
->
p
(
i
,3),
pyjets
->
p
(
i
,4));
66
theList
[
i
-2].setVertex(
pyjets
->
v
(
i
,1),
pyjets
->
v
(
i
,2),
67
pyjets
->
v
(
i
,3),
pyjets
->
v
(
i
,4));
68
theList
[
i
-2].setID(
pyjets
->
k
(
i
,2));
69
theList
[
i
-2].setMass(
pyjets
->
p
(
i
,5));
70
71
}
72
73
return
theList
;
74
75
}
i
int i
Definition:
DBlmapReader.cc:9
Pythia6jets
Definition:
Pythia6jets.h:7
Pythia6Service.h
Pythia6jets::n
int & n(void)
Definition:
Pythia6jets.cc:37
RawParticle::pid
int pid() const
get the HEP particle ID number
Definition:
RawParticle.h:264
RawParticle::mass
double mass() const
get the MEASURED mass
Definition:
RawParticle.h:282
Pythia6jets::v
double & v(int i, int j)
Definition:
Pythia6jets.cc:73
ParticlePropagator
Definition:
ParticlePropagator.h:27
Pythia6Decays::~Pythia6Decays
~Pythia6Decays()
Definition:
Pythia6Decays.cc:27
ParticlePropagator.h
max
const T & max(const T &a, const T &b)
Definition:
MaterialBudgetTrackerHistos.cc:4
Pythia6Decays::particleDaughters
const DaughterParticleList & particleDaughters(ParticlePropagator &particle)
Definition:
Pythia6Decays.cc:33
DaughterParticleList
std::vector< RawParticle > DaughterParticleList
Definition:
Pythia6Decays.h:8
RawParticle::Y
double Y() const
y of vertex
Definition:
RawParticle.h:274
RawParticle::Z
double Z() const
z of vertex
Definition:
RawParticle.h:275
RawParticle
Definition:
RawParticle.h:31
Pythia6Decays::theList
DaughterParticleList theList
Definition:
Pythia6Decays.h:28
Pythia6jets::k
int & k(int i, int j)
Definition:
Pythia6jets.cc:49
Pythia6Decays::pyservice
gen::Pythia6Service * pyservice
Definition:
Pythia6Decays.h:26
RawParticle::X
double X() const
x of vertex
Definition:
RawParticle.h:273
Pythia6Decays::pyjets
Pythia6jets * pyjets
Definition:
Pythia6Decays.h:27
Pythia6Decays.h
Pythia6jets.h
gen::Pythia6Service
Definition:
Pythia6Service.h:26
RawParticle::T
double T() const
vertex time
Definition:
RawParticle.h:276
Pythia6Decays::Pythia6Decays
Pythia6Decays()
Definition:
Pythia6Decays.cc:18
PYTHIA6PYDECY
#define PYTHIA6PYDECY
Definition:
Pythia6Decays.cc:12
Pythia6jets::p
double & p(int i, int j)
Definition:
Pythia6jets.cc:61
gen::FortranInstance::InstanceWrapper
Definition:
FortranInstance.h:35
Generated for CMSSW Reference Manual by
1.8.5