Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F19251808
EvtSecondary.cpp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
EvtSecondary.cpp
View Options
//--------------------------------------------------------------------------
//
// Environment:
// This software is part of the EvtGen package developed jointly
// for the BaBar and CLEO collaborations. If you use all or part
// of it, please give an appropriate acknowledgement.
//
// Copyright Information: See EvtGen/COPYRIGHT
// Copyright (C) 1998 Caltech, UCSB
//
// Module: EvtSecondary.cc
//
// Description: Class to store the decays of the secondary particles.
//
// Modification history:
//
// RYD March 12, 1998 Module created
//
//------------------------------------------------------------------------
//
#include
"EvtGenBase/EvtPatches.hh"
#include
"EvtGenBase/EvtPatches.hh"
#include
<iostream>
#include
"EvtGenBase/EvtParticle.hh"
#include
"EvtGenBase/EvtPDL.hh"
#include
"EvtGenBase/EvtSecondary.hh"
#include
"EvtGenBase/EvtReport.hh"
using
std
::
endl
;
using
std
::
ostream
;
void
EvtSecondary
::
init
(){
_npart
=
0
;
}
int
EvtSecondary
::
getNPart
(){
return
_npart
;
}
void
EvtSecondary
::
createSecondary
(
int
stdhepindex
,
EvtParticle
*
prnt
){
_stdhepindex
[
_npart
]
=
stdhepindex
;
if
(
prnt
->
getNDaug
()
==
0
){
_id1
[
_npart
]
=
0
;
_id2
[
_npart
]
=
0
;
_id3
[
_npart
]
=
0
;
_npart
++
;
return
;
}
if
(
prnt
->
getNDaug
()
==
1
){
_id1
[
_npart
]
=
EvtPDL
::
getStdHep
(
prnt
->
getDaug
(
0
)
->
getId
());
_id2
[
_npart
]
=
0
;
_id3
[
_npart
]
=
0
;
_npart
++
;
return
;
}
if
(
prnt
->
getNDaug
()
==
2
){
_id1
[
_npart
]
=
EvtPDL
::
getStdHep
(
prnt
->
getDaug
(
0
)
->
getId
());
_id2
[
_npart
]
=
EvtPDL
::
getStdHep
(
prnt
->
getDaug
(
1
)
->
getId
());
_id3
[
_npart
]
=
0
;
_npart
++
;
return
;
}
if
(
prnt
->
getNDaug
()
==
3
){
_id1
[
_npart
]
=
EvtPDL
::
getStdHep
(
prnt
->
getDaug
(
0
)
->
getId
());
_id2
[
_npart
]
=
EvtPDL
::
getStdHep
(
prnt
->
getDaug
(
1
)
->
getId
());
_id3
[
_npart
]
=
EvtPDL
::
getStdHep
(
prnt
->
getDaug
(
2
)
->
getId
());
_npart
++
;
return
;
}
EvtGenReport
(
EVTGEN_ERROR
,
"EvtGen"
)
<<
"More than 3 decay products in a secondary particle!"
<<
endl
;
}
ostream
&
operator
<<
(
ostream
&
s
,
const
EvtSecondary
&
secondary
){
s
<<
endl
;
s
<<
"Secondary decays:"
<<
endl
;
int
i
;
for
(
i
=
0
;
i
<
secondary
.
_npart
;
i
++
){
EvtGenReport
(
EVTGEN_INFO
,
"EvtGen"
)
<<
i
<<
" "
<<
secondary
.
_stdhepindex
[
i
]
<<
" "
<<
secondary
.
_id1
[
i
]
<<
" "
<<
secondary
.
_id2
[
i
]
<<
" "
<<
secondary
.
_id3
[
i
]
<<
endl
;
}
s
<<
endl
;
return
s
;
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Tue, Sep 30, 6:11 AM (20 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6542581
Default Alt Text
EvtSecondary.cpp (2 KB)
Attached To
Mode
rEVTGEN evtgen
Attached
Detach File
Event Timeline
Log In to Comment