EvtGen
2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Toggle main menu visibility
Loading...
Searching...
No Matches
EvtGenBase
EvtCyclic3.hh
Go to the documentation of this file.
1
2
/***********************************************************************
3
* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4
* *
5
* This file is part of EvtGen. *
6
* *
7
* EvtGen is free software: you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation, either version 3 of the License, or *
10
* (at your option) any later version. *
11
* *
12
* EvtGen is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
16
* *
17
* You should have received a copy of the GNU General Public License *
18
* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19
***********************************************************************/
20
21
#ifndef EVT_CYCLIC3_HH
22
#define EVT_CYCLIC3_HH
23
24
#include <iosfwd>
25
26
// Cyclic permutations of three indices A,B,C and their parings
27
28
namespace
EvtCyclic3
{
29
30
enum
Index
31
{
32
A
= 0,
33
B
= 1,
34
C
= 2
35
};
36
enum
Pair
37
{
38
BC
= 0,
39
CB
=
BC
,
40
CA
= 1,
41
AC
=
CA
,
42
AB
= 2,
43
BA
=
AB
44
};
45
enum
Perm
46
{
47
ABC
= 0,
48
BCA
= 1,
49
CAB
= 2,
50
CBA
= 3,
51
BAC
= 4,
52
ACB
= 5
53
};
54
55
// Permutations (multiplication is not transitive)
56
57
Index
permute
(
Index
i,
Perm
p );
58
Perm
permutation
(
Index
i1,
Index
i2,
Index
i3 );
59
Perm
permute
(
Perm
i,
Perm
p );
60
Pair
permute
(
Pair
i,
Perm
p );
61
62
Pair
i2pair
(
int
i );
63
64
// Index-to-index
65
66
Index
prev
(
Index
i );
67
Index
next
(
Index
i );
68
Index
other
(
Index
i,
Index
j );
69
70
// Index-to-pair
71
72
Pair
other
(
Index
i );
73
Pair
combine
(
Index
i,
Index
j );
74
75
// Pair-to-pair conversions
76
77
Pair
prev
(
Pair
i );
78
Pair
next
(
Pair
i );
79
Pair
other
(
Pair
i,
Pair
j );
80
81
// Pair-to-index conversions
82
83
Index
first
(
Pair
i );
84
Index
second
(
Pair
i );
85
Index
other
(
Pair
i );
86
Index
common
(
Pair
i,
Pair
j );
87
88
// String to Index, Pair
89
90
Index
strToIndex
(
const
char
* str );
91
Pair
strToPair
(
const
char
* str );
92
93
// To string conversions
94
95
const
char
*
c_str
(
Index
i );
96
const
char
*
c_str
(
Pair
i );
97
const
char
*
c_str
(
Perm
i );
98
99
// Useful name strings
100
101
char
*
append
(
const
char
* str,
EvtCyclic3::Index
i );
102
char
*
append
(
const
char
* str,
EvtCyclic3::Pair
i );
103
104
}
// namespace EvtCyclic3
105
106
//where should these go?
107
//ostream& operator<<(ostream&, EvtCyclic3::Index);
108
//ostream& operator<<(ostream&, EvtCyclic3::Pair);
109
110
#endif
Pair
Pair
Definition
EvtCyclic3.hh:37
Index
Index
Definition
EvtCyclic3.hh:31
EvtCyclic3
Definition
EvtCyclic3.hh:28
EvtCyclic3::permute
Index permute(Index i, Perm p)
Definition
EvtCyclic3.cpp:30
EvtCyclic3::next
Index next(Index i)
Definition
EvtCyclic3.cpp:141
EvtCyclic3::Pair
Pair
Definition
EvtCyclic3.hh:37
EvtCyclic3::CB
@ CB
Definition
EvtCyclic3.hh:39
EvtCyclic3::BA
@ BA
Definition
EvtCyclic3.hh:43
EvtCyclic3::AB
@ AB
Definition
EvtCyclic3.hh:42
EvtCyclic3::BC
@ BC
Definition
EvtCyclic3.hh:38
EvtCyclic3::CA
@ CA
Definition
EvtCyclic3.hh:40
EvtCyclic3::AC
@ AC
Definition
EvtCyclic3.hh:41
EvtCyclic3::Perm
Perm
Definition
EvtCyclic3.hh:46
EvtCyclic3::CBA
@ CBA
Definition
EvtCyclic3.hh:50
EvtCyclic3::BCA
@ BCA
Definition
EvtCyclic3.hh:48
EvtCyclic3::CAB
@ CAB
Definition
EvtCyclic3.hh:49
EvtCyclic3::ACB
@ ACB
Definition
EvtCyclic3.hh:52
EvtCyclic3::BAC
@ BAC
Definition
EvtCyclic3.hh:51
EvtCyclic3::ABC
@ ABC
Definition
EvtCyclic3.hh:47
EvtCyclic3::strToIndex
Index strToIndex(const char *str)
Definition
EvtCyclic3.cpp:296
EvtCyclic3::permutation
Perm permutation(Index i1, Index i2, Index i3)
Definition
EvtCyclic3.cpp:81
EvtCyclic3::append
char * append(const char *str, EvtCyclic3::Index i)
Definition
EvtCyclic3.cpp:368
EvtCyclic3::common
Index common(Pair i, Pair j)
Definition
EvtCyclic3.cpp:291
EvtCyclic3::strToPair
Pair strToPair(const char *str)
Definition
EvtCyclic3.cpp:309
EvtCyclic3::combine
Pair combine(Index i, Index j)
Definition
EvtCyclic3.cpp:207
EvtCyclic3::second
Index second(Pair i)
Definition
EvtCyclic3.cpp:263
EvtCyclic3::i2pair
Pair i2pair(int i)
Definition
EvtCyclic3.cpp:112
EvtCyclic3::prev
Index prev(Index i)
Definition
EvtCyclic3.cpp:127
EvtCyclic3::c_str
const char * c_str(Index i)
Definition
EvtCyclic3.cpp:322
EvtCyclic3::Index
Index
Definition
EvtCyclic3.hh:31
EvtCyclic3::A
@ A
Definition
EvtCyclic3.hh:32
EvtCyclic3::C
@ C
Definition
EvtCyclic3.hh:34
EvtCyclic3::B
@ B
Definition
EvtCyclic3.hh:33
EvtCyclic3::other
Index other(Index i, Index j)
Definition
EvtCyclic3.cpp:155
EvtCyclic3::first
Index first(Pair i)
Definition
EvtCyclic3.cpp:249
Generated by
1.17.0