BOSS
7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtSecondary.cc
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
//
3
// Environment:
4
// This software is part of the EvtGen package developed jointly
5
// for the BaBar and CLEO collaborations. If you use all or part
6
// of it, please give an appropriate acknowledgement.
7
//
8
// Copyright Information: See EvtGen/COPYRIGHT
9
// Copyright (C) 1998 Caltech, UCSB
10
//
11
// Module: EvtSecondary.cc
12
//
13
// Description: Class to store the decays of the secondary particles.
14
//
15
// Modification history:
16
//
17
// RYD March 12, 1998 Module created
18
//
19
//------------------------------------------------------------------------
20
//
21
#include "EvtGenBase/EvtPatches.hh"
22
#include "EvtGenBase/EvtPatches.hh"
23
#include <iostream>
24
#include "EvtGenBase/EvtParticle.hh"
25
#include "EvtGenBase/EvtPDL.hh"
26
#include "EvtGenBase/EvtSecondary.hh"
27
#include "EvtGenBase/EvtReport.hh"
28
using
std::endl;
29
using
std::ostream;
30
31
32
void
EvtSecondary::init
(){
33
_npart=0;
34
}
35
36
int
EvtSecondary::getNPart
(){
37
return
_npart;
38
}
39
40
void
EvtSecondary::createSecondary
(
int
stdhepindex,
EvtParticle
* prnt){
41
42
_stdhepindex[_npart]=stdhepindex;
43
if
(prnt->
getNDaug
()==0){
44
_id1[_npart]=0;
45
_id2[_npart]=0;
46
_id3[_npart]=0;
47
_npart++;
48
return
;
49
}
50
if
(prnt->
getNDaug
()==1){
51
_id1[_npart]=
EvtPDL::getStdHep
(prnt->
getDaug
(0)->
getId
());
52
_id2[_npart]=0;
53
_id3[_npart]=0;
54
_npart++;
55
return
;
56
}
57
if
(prnt->
getNDaug
()==2){
58
_id1[_npart]=
EvtPDL::getStdHep
(prnt->
getDaug
(0)->
getId
());
59
_id2[_npart]=
EvtPDL::getStdHep
(prnt->
getDaug
(1)->
getId
());
60
_id3[_npart]=0;
61
_npart++;
62
return
;
63
}
64
if
(prnt->
getNDaug
()==3){
65
_id1[_npart]=
EvtPDL::getStdHep
(prnt->
getDaug
(0)->
getId
());
66
_id2[_npart]=
EvtPDL::getStdHep
(prnt->
getDaug
(1)->
getId
());
67
_id3[_npart]=
EvtPDL::getStdHep
(prnt->
getDaug
(2)->
getId
());
68
_npart++;
69
return
;
70
}
71
72
report
(
ERROR
,
"EvtGen"
) <<
73
"More than 3 decay products in a secondary particle!"
<<endl;
74
75
76
}
77
78
79
ostream&
operator<<
(ostream&
s
,
const
EvtSecondary
& secondary){
80
81
s
<<endl;
82
s
<<
"Secondary decays:"
<<endl;
83
84
int
i;
85
for
(i=0;i<secondary._npart;i++){
86
87
report
(
INFO
,
"EvtGen"
) <<i<<
" "
88
<<secondary._stdhepindex[i]<<
" "
89
<<secondary._id1[i]<<
" "
90
<<secondary._id2[i]<<
" "
91
<<secondary._id3[i]<<endl;
92
93
}
94
95
s
<<endl;
96
97
return
s
;
98
99
}
100
s
XmlRpcServer s
Definition:
HelloServer.cpp:11
report
ostream & report(Severity severity, const char *facility)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtReport.cc:36
ERROR
@ ERROR
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtReport.hh:49
INFO
@ INFO
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtReport.hh:52
operator<<
ostream & operator<<(ostream &s, const EvtSecondary &secondary)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtSecondary.cc:79
EvtPDL::getStdHep
static int getStdHep(EvtId id)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtPDL.hh:56
EvtParticle
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.hh:42
EvtParticle::getId
EvtId getId() const
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.cc:113
EvtParticle::getNDaug
int getNDaug() const
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.cc:125
EvtParticle::getDaug
EvtParticle * getDaug(int i)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtParticle.cc:85
EvtSecondary
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtSecondary.hh:30
EvtSecondary::createSecondary
void createSecondary(int stdhepindex, EvtParticle *prnt)
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtSecondary.cc:40
EvtSecondary::getNPart
int getNPart()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtSecondary.cc:36
EvtSecondary::init
void init()
Definition:
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtSecondary.cc:32
source
Generator
BesEvtGen
bak-BesEvtGen-00-04-08
src
EvtGen
EvtGenBase
EvtSecondary.cc
Generated by
1.9.6