Main Page
Namespaces
Classes
Package Documentation
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"
)<<
"From explicit constructor: Number of daughters bigger than the maximum allowed one ("
<<
kMaxDaughters
<<
") !!"
;
43
}
44
fDaughtersPDG[
fNDaughters
++] = *(daughters+
i
);
45
}
46
}
47
48
void
DecayChannel::SetDaughters
(
int
*
daughters
,
int
n
) {
49
for
(
int
i
=0;
i
<
n
;
i
++) {
50
if
(
i
>=
kMaxDaughters
) {
51
edm::LogError
(
"DecayChannel"
)<<
"From SetDaughters(): Number of daughters bigger than the maximum allowed one ("
<<
kMaxDaughters
<<
") !!"
;
52
}
53
fDaughtersPDG[
fNDaughters
++] = *(daughters+
i
);
54
}
55
}
56
57
void
DecayChannel::AddDaughter
(
int
pdg) {
58
if
(
fNDaughters
>=
kMaxDaughters
) {
59
edm::LogError
(
"DecayChannel"
)<<
"From AddDaughter(): Number of daughters is already >= than the maximum allowed one ("
<<
kMaxDaughters
<<
") !!"
;
60
}
61
fDaughtersPDG[
fNDaughters
++] = pdg;
62
}
63
64
int
DecayChannel::GetDaughterPDG
(
int
i
) {
65
if
((i >=
fNDaughters
) || (i<0)) {
66
edm::LogError
(
"DecayChannel"
)<<
"From GetDaughterPDG(): Daughter index required is too big or less than zero!! There are only "
<<
fNDaughters
<<
" secondaries in this channel !!"
;
67
return
kNonsensePDG
;
68
}
69
return
fDaughtersPDG[
i
];
70
}
71
mps_fire.i
i
Definition:
mps_fire.py:269
popcon2dropbox.copy
def copy(args, dbName)
Definition:
popcon2dropbox.py:121
DecayChannel::fDaughtersPDG
int fDaughtersPDG[kMaxDaughters]
Definition:
DecayChannel.h:27
DecayChannel::DecayChannel
DecayChannel()
Definition:
DecayChannel.cc:20
BPhysicsValidation_cfi.daughters
daughters
Definition:
BPhysicsValidation_cfi.py:11
DecayChannel.h
std
Definition:
JetResolutionObject.h:76
edm::LogError
Definition:
MessageLogger.h:166
DecayChannel::fMotherPDG
int fMotherPDG
Definition:
DecayChannel.h:24
Particle::fNDaughters
int fNDaughters
Definition:
Particle.h:35
DecayChannel::GetDaughterPDG
int GetDaughterPDG(int i)
Definition:
DecayChannel.cc:64
DecayChannel::SetDaughters
void SetDaughters(int *values, int n)
Definition:
DecayChannel.cc:48
DecayChannel::fNDaughters
int fNDaughters
Definition:
DecayChannel.h:26
DecayChannel
Definition:
DecayChannel.h:22
kMaxDaughters
const int kMaxDaughters
Definition:
DecayChannel.h:19
DecayChannel::AddDaughter
void AddDaughter(int pdg)
Definition:
DecayChannel.cc:57
gen::n
int n
Definition:
Cascade2Hadronizer.cc:79
DecayChannel::fBranchingRatio
double fBranchingRatio
Definition:
DecayChannel.h:25
kNonsensePDG
const int kNonsensePDG
Definition:
DecayChannel.h:20
Generated for CMSSW Reference Manual by
1.8.11