Main Page
Namespaces
Classes
Package Documentation
GeneratorInterface
Hydjet2Interface
src
ParticlePDG.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 PARTICLE_PDG
14
#include "
GeneratorInterface/Hydjet2Interface/interface/ParticlePDG.h
"
15
#endif
16
17
#include <iostream>
18
19
using namespace
std
;
20
21
ParticlePDG::ParticlePDG
() {
22
fPDG =
kNonsensePDG
;
23
fMass = -1.0;
24
fWidth = 0.0;
25
fNDecayChannels = 0;
26
for
(
int
i
= 0;
i
<
kMaxDecayChannels
;
i
++)
27
fDecayChannels[
i
] =
new
DecayChannel
();
28
}
29
30
ParticlePDG::ParticlePDG
(
char
*
name
,
int
pdg
,
double
mass
,
double
width
) {
31
for
(
int
i
= 0;
i
< 9;
i
++)
32
if
(*(name +
i
) !=
'\0'
)
33
fName
[
i
] = *(name +
i
);
34
else
35
break
;
36
fPDG =
pdg
;
37
fMass =
mass
;
38
fWidth =
width
;
39
fNDecayChannels = 0;
40
for
(
int
i
= 0;
i
<
kMaxDecayChannels
;
i
++)
41
fDecayChannels[
i
] =
new
DecayChannel
();
42
}
43
44
ParticlePDG::~ParticlePDG
() {
45
for
(
int
i
= 0;
i
<
kMaxDecayChannels
;
i
++)
46
delete
fDecayChannels[
i
];
47
}
48
49
double
ParticlePDG::GetFullBranching
() {
50
double
fullBranching = 0.0;
51
for
(
int
i
= 0;
i
< fNDecayChannels;
i
++)
52
fullBranching += fDecayChannels[
i
]->GetBranching();
53
return
fullBranching;
54
}
55
56
void
ParticlePDG::AddChannel
(
DecayChannel
&channel) {
57
if
(channel.
GetMotherPDG
() != fPDG) {
58
edm::LogError
(
"ParticlePDG"
) <<
" AddChannel() : You try to add a channel which has a different mother PDG"
;
59
return
;
60
}
61
fDecayChannels[fNDecayChannels]->SetMotherPDG(channel.
GetMotherPDG
());
62
fDecayChannels[fNDecayChannels]->SetBranching(channel.
GetBranching
());
63
fDecayChannels[fNDecayChannels]->SetDaughters(channel.
GetDaughters
(), channel.
GetNDaughters
());
64
fNDecayChannels++;
65
}
mps_fire.i
i
Definition:
mps_fire.py:341
ParticlePDG::~ParticlePDG
~ParticlePDG()
Definition:
ParticlePDG.cc:44
DecayChannel::GetNDaughters
int GetNDaughters()
Definition:
DecayChannel.h:41
ParticlePDG::ParticlePDG
ParticlePDG()
Definition:
ParticlePDG.cc:21
dileptonTrigSettings_cff.pdg
pdg
Definition:
dileptonTrigSettings_cff.py:6
ParticlePDG.h
DecayChannel::GetBranching
double GetBranching()
Definition:
DecayChannel.h:40
pdg
Definition:
pdg_functions.h:28
std
Definition:
JetResolutionObject.h:76
DecayChannel::GetDaughters
int * GetDaughters()
Definition:
DecayChannel.h:42
ParticlePDG::AddChannel
void AddChannel(DecayChannel &channel)
Definition:
ParticlePDG.cc:56
edm::LogError
Definition:
MessageLogger.h:183
kMaxDecayChannels
const int kMaxDecayChannels
Definition:
ParticlePDG.h:22
EgHLTOffHistBins_cfi.mass
mass
Definition:
EgHLTOffHistBins_cfi.py:34
DecayChannel::GetMotherPDG
int GetMotherPDG()
Definition:
DecayChannel.h:39
DecayChannel
Definition:
DecayChannel.h:22
ApeEstimator_cff.width
width
Definition:
ApeEstimator_cff.py:24
MainPageGenerator.fName
fName
Definition:
MainPageGenerator.py:301
ParticlePDG::GetFullBranching
double GetFullBranching()
Definition:
ParticlePDG.cc:49
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
kNonsensePDG
const int kNonsensePDG
Definition:
DecayChannel.h:20
Generated for CMSSW Reference Manual by
1.8.11