Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F19244724
EvtAmpIndex.cpp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
EvtAmpIndex.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) 2002 Caltech
//
// Module: EvtAmp.cc
//
// Description: Class to manipulate the amplitudes in the decays.
//
// Modification history:
//
// RYD Nov 22, 2002 Module created
//
//------------------------------------------------------------------------
//
#include
"EvtGenBase/EvtPatches.hh"
#include
"EvtGenBase/EvtAmpIndex.hh"
#include
<vector>
using
std
::
vector
;
EvtAmpIndex
::
EvtAmpIndex
(
std
::
vector
<
int
>
ind
)
:
_ind
(
ind
),
_size
(
ind
.
size
()),
_state
(
ind
.
size
()),
_nstate
(
ind
.
size
())
{
int
i
;
for
(
i
=
0
;
i
<
_size
;
i
++
)
{
_state
[
i
]
=
0
;
if
(
i
==
0
){
_nstate
[
i
]
=
1
;
}
else
{
_nstate
[
i
]
=
_nstate
[
i
-
1
]
*
_ind
[
i
];
}
}
}
void
EvtAmpIndex
::
reset
(){
int
i
;
for
(
i
=
0
;
i
<
_size
;
i
++
)
{
_state
[
i
]
=
0
;
}
}
bool
EvtAmpIndex
::
next
(){
int
i
;
for
(
i
=
0
;
i
<
_size
;
i
++
)
{
_state
[
i
]
++
;
if
(
_state
[
i
]
<
_ind
[
i
]){
return
true
;
}
else
{
_state
[
i
]
=
0
;
}
}
return
false
;
}
int
EvtAmpIndex
::
index
(){
int
i
;
int
ind
=
0
;
for
(
i
=
0
;
i
<
_size
;
i
++
)
{
ind
+=
_state
[
i
]
*
_nstate
[
i
];
}
return
ind
;
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Tue, Sep 30, 4:44 AM (1 d, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6531881
Default Alt Text
EvtAmpIndex.cpp (1 KB)
Attached To
Mode
rEVTGEN evtgen
Attached
Detach File
Event Timeline
Log In to Comment