BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
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 "
EvtSecondary.hh
"
22
#include "
EvtPDL.hh
"
23
#include "
EvtParticle.hh
"
24
#include "
EvtPatches.hh
"
25
#include "
EvtReport.hh
"
26
#include <iostream>
27
using
std::endl;
28
using
std::ostream;
29
30
void
EvtSecondary::init
() { _npart = 0; }
31
32
int
EvtSecondary::getNPart
() {
return
_npart; }
33
34
void
EvtSecondary::createSecondary
(
int
stdhepindex,
EvtParticle
* prnt ) {
35
36
_stdhepindex[_npart] = stdhepindex;
37
if
( prnt->
getNDaug
() == 0 )
38
{
39
_id1[_npart] = 0;
40
_id2[_npart] = 0;
41
_id3[_npart] = 0;
42
_npart++;
43
return
;
44
}
45
if
( prnt->
getNDaug
() == 1 )
46
{
47
_id1[_npart] =
EvtPDL::getStdHep
( prnt->
getDaug
( 0 )->
getId
() );
48
_id2[_npart] = 0;
49
_id3[_npart] = 0;
50
_npart++;
51
return
;
52
}
53
if
( prnt->
getNDaug
() == 2 )
54
{
55
_id1[_npart] =
EvtPDL::getStdHep
( prnt->
getDaug
( 0 )->
getId
() );
56
_id2[_npart] =
EvtPDL::getStdHep
( prnt->
getDaug
( 1 )->
getId
() );
57
_id3[_npart] = 0;
58
_npart++;
59
return
;
60
}
61
if
( prnt->
getNDaug
() == 3 )
62
{
63
_id1[_npart] =
EvtPDL::getStdHep
( prnt->
getDaug
( 0 )->
getId
() );
64
_id2[_npart] =
EvtPDL::getStdHep
( prnt->
getDaug
( 1 )->
getId
() );
65
_id3[_npart] =
EvtPDL::getStdHep
( prnt->
getDaug
( 2 )->
getId
() );
66
_npart++;
67
return
;
68
}
69
70
report
(
ERROR
,
"EvtGen"
) <<
"More than 3 decay products in a secondary particle!"
<< endl;
71
}
72
73
ostream&
operator<<
( ostream&
s
,
const
EvtSecondary
& secondary ) {
74
75
s
<< endl;
76
s
<<
"Secondary decays:"
<< endl;
77
78
int
i;
79
for
( i = 0; i < secondary._npart; i++ )
80
{
81
82
report
(
INFO
,
"EvtGen"
) << i <<
" "
<< secondary._stdhepindex[i] <<
" "
83
<< secondary._id1[i] <<
" "
<< secondary._id2[i] <<
" "
84
<< secondary._id3[i] << endl;
85
}
86
87
s
<< endl;
88
89
return
s
;
90
}
EvtPDL.hh
EvtParticle.hh
EvtPatches.hh
report
ostream & report(Severity severity, const char *facility)
Definition
EvtReport.cc:34
EvtReport.hh
ERROR
@ ERROR
Definition
EvtReport.hh:49
INFO
@ INFO
Definition
EvtReport.hh:52
operator<<
ostream & operator<<(ostream &s, const EvtSecondary &secondary)
Definition
EvtSecondary.cc:73
EvtSecondary.hh
s
XmlRpcServer s
Definition
HelloServer.cpp:11
EvtPDL::getStdHep
static int getStdHep(EvtId id)
Definition
EvtPDL.hh:61
EvtParticle
Definition
EvtParticle.hh:42
EvtParticle::getId
EvtId getId() const
Definition
EvtParticle.cc:100
EvtParticle::getNDaug
int getNDaug() const
Definition
EvtParticle.cc:112
EvtParticle::getDaug
EvtParticle * getDaug(int i)
Definition
EvtParticle.cc:80
EvtSecondary
Definition
EvtSecondary.hh:29
EvtSecondary::createSecondary
void createSecondary(int stdhepindex, EvtParticle *prnt)
Definition
EvtSecondary.cc:34
EvtSecondary::getNPart
int getNPart()
Definition
EvtSecondary.cc:32
EvtSecondary::init
void init()
Definition
EvtSecondary.cc:30
8.0.0
BOSS_Gen
BesEvtGen
src
EvtGen
EvtGenBase
EvtSecondary.cc
Generated by
1.16.1