GeneratorInterface
Hydjet2Interface
src
DecayChannel.cc
Go to the documentation of this file.
1
/*
2
Copyright : The FASTMC and SPHMC Collaboration
3
Author : Ionut Cristian Arsene
4
Affiliation : Oslo University, Norway & Institute for Space Sciences, Bucharest, Romania
5
e-mail : i.c.arsene@fys.uio.no
6
Date : 2007/05/30
7
8
This class is using the particle and decay lists provided by the
9
THERMINATOR (Computer Physics Communications 174 669 (2006)) and
10
SHARE (Computer Physics Communications 167 229 (2005)) collaborations.
11
*/
12
13
#ifndef DECAY_CHANNEL
14
#include "
GeneratorInterface/Hydjet2Interface/interface/DecayChannel.h
"
15
#endif
16
#include <iostream>
17
18
using namespace
std
;
19
20
DecayChannel::DecayChannel
() {
21
fMotherPDG =
kNonsensePDG
;
22
fBranchingRatio = 0.0;
23
fNDaughters
= 0;
24
for
(
int
i
= 0;
i
<
kMaxDaughters
;
i
++)
25
fDaughtersPDG[
i
] =
kNonsensePDG
;
26
}
27
28
DecayChannel::DecayChannel
(
const
DecayChannel
&
copy
) {
29
fMotherPDG =
copy
.fMotherPDG;
30
fBranchingRatio =
copy
.fBranchingRatio;
31
fNDaughters
=
copy
.fNDaughters;
32
for
(
int
i
= 0;
i
<
fNDaughters
;
i
++)
33
fDaughtersPDG[
i
] =
copy
.fDaughtersPDG[
i
];
34
}
35
36
DecayChannel::DecayChannel
(
int
mother,
double
branching,
int
nDaughters,
int
*
daughters
) {
37
fMotherPDG = mother;
38
fBranchingRatio = branching;
39
fNDaughters
= 0;
40
for
(
int
i
= 0;
i
< nDaughters;
i
++) {
41
if
(
i
>=
kMaxDaughters
) {
42
edm::LogError
(
"DecayChannel"
)
43
<<
"From explicit constructor: Number of daughters bigger than the maximum allowed one ("
<<
kMaxDaughters
44
<<
") !!"
;
45
}
46
fDaughtersPDG[
fNDaughters
++] = *(
daughters
+
i
);
47
}
48
}
49
50
void
DecayChannel::SetDaughters
(
int
*
daughters
,
int
n
) {
51
for
(
int
i
= 0;
i
<
n
;
i
++) {
52
if
(
i
>=
kMaxDaughters
) {
53
edm::LogError
(
"DecayChannel"
) <<
"From SetDaughters(): Number of daughters bigger than the maximum allowed one ("
54
<<
kMaxDaughters
<<
") !!"
;
55
}
56
fDaughtersPDG[
fNDaughters
++] = *(
daughters
+
i
);
57
}
58
}
59
60
void
DecayChannel::AddDaughter
(
int
pdg
) {
61
if
(
fNDaughters
>=
kMaxDaughters
) {
62
edm::LogError
(
"DecayChannel"
)
63
<<
"From AddDaughter(): Number of daughters is already >= than the maximum allowed one ("
<<
kMaxDaughters
64
<<
") !!"
;
65
}
66
fDaughtersPDG[
fNDaughters
++] =
pdg
;
67
}
68
69
int
DecayChannel::GetDaughterPDG
(
int
i
) {
70
if
((
i
>=
fNDaughters
) || (
i
< 0)) {
71
edm::LogError
(
"DecayChannel"
)
72
<<
"From GetDaughterPDG(): Daughter index required is too big or less than zero!! There are only "
73
<<
fNDaughters
<<
" secondaries in this channel !!"
;
74
return
kNonsensePDG
;
75
}
76
return
fDaughtersPDG[
i
];
77
}
mps_fire.i
i
Definition:
mps_fire.py:428
dqmiodumpmetadata.n
n
Definition:
dqmiodumpmetadata.py:28
filterCSVwithJSON.copy
copy
Definition:
filterCSVwithJSON.py:36
DecayChannel::GetDaughterPDG
int GetDaughterPDG(int i)
Definition:
DecayChannel.cc:69
dileptonTrigSettings_cff.pdg
pdg
Definition:
dileptonTrigSettings_cff.py:6
DecayChannel::SetDaughters
void SetDaughters(int *values, int n)
Definition:
DecayChannel.cc:50
kMaxDaughters
const int kMaxDaughters
Definition:
DecayChannel.h:19
BPhysicsValidation_cfi.daughters
daughters
Definition:
BPhysicsValidation_cfi.py:11
DecayChannel
Definition:
DecayChannel.h:22
DecayChannel::AddDaughter
void AddDaughter(int pdg)
Definition:
DecayChannel.cc:60
DecayChannel.h
edm::LogError
Log< level::Error, false > LogError
Definition:
MessageLogger.h:123
DecayChannel::DecayChannel
DecayChannel()
Definition:
DecayChannel.cc:20
kNonsensePDG
const int kNonsensePDG
Definition:
DecayChannel.h:20
std
Definition:
JetResolutionObject.h:76
Particle::fNDaughters
int fNDaughters
Definition:
Particle.h:35
pdg
Definition:
pdg_functions.h:28
Generated for CMSSW Reference Manual by
1.8.16