CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtCyclic3 Namespace Reference

Enumerations

enum  Index { A =0 , B =1 , C =2 }
 
enum  Pair {
  BC =0 , CB =BC , CA =1 , AC =CA ,
  AB =2 , BA =AB
}
 
enum  Perm {
  ABC =0 , BCA =1 , CAB =2 , CBA =3 ,
  BAC =4 , ACB =5
}
 

Functions

Index permute (Index i, Perm p)
 
Perm permutation (Index i1, Index i2, Index i3)
 
Perm permute (Perm i, Perm p)
 
Pair permute (Pair i, Perm p)
 
Pair i2pair (int i)
 
Index prev (Index i)
 
Index next (Index i)
 
Index other (Index i, Index j)
 
Pair other (Index i)
 
Pair combine (Index i, Index j)
 
Pair prev (Pair i)
 
Pair next (Pair i)
 
Pair other (Pair i, Pair j)
 
Index first (Pair i)
 
Index second (Pair i)
 
Index other (Pair i)
 
Index common (Pair i, Pair j)
 
Index strToIndex (const char *str)
 
Pair strToPair (const char *str)
 
char * c_str (Index i)
 
char * c_str (Pair i)
 
char * c_str (Perm i)
 
char * append (const char *str, EvtCyclic3::Index i)
 
char * append (const char *str, EvtCyclic3::Pair i)
 

Enumeration Type Documentation

◆ Index

Enumerator

Definition at line 20 of file EvtCyclic3.hh.

20{A=0,B=1,C=2};
***************************************************************************************Pseudo Class RRes *****************************************************************************************Parameters and physical constants **Maarten sept ************************************************************************DOUBLE PRECISION xsmu **************************************************************************PARTICLE DATA all others are from PDG *Only resonances with known widths into electron pairs are sept ************************************************************************C Declarations C
Definition: RRes.h:29

◆ Pair

Enumerator
BC 
CB 
CA 
AC 
AB 
BA 

Definition at line 21 of file EvtCyclic3.hh.

◆ Perm

Enumerator
ABC 
BCA 
CAB 
CBA 
BAC 
ACB 

Definition at line 22 of file EvtCyclic3.hh.

Function Documentation

◆ append() [1/2]

char * EvtCyclic3::append ( const char *  str,
EvtCyclic3::Index  i 
)

Definition at line 284 of file EvtCyclic3.cc.

285{
286 // str + null + 1 character
287 char* s = new char[strlen(str)+2];
288 strcpy(s,str);
289 strcat(s,c_str(i));
290
291 return s;
292}
XmlRpcServer s
Definition: HelloServer.cpp:11
char * c_str(Index i)
Definition: EvtCyclic3.cc:252

◆ append() [2/2]

char * EvtCyclic3::append ( const char *  str,
EvtCyclic3::Pair  i 
)

Definition at line 294 of file EvtCyclic3.cc.

295{
296 // str + null + 2 characters
297 char* s = new char[strlen(str)+3];
298 strcpy(s,str);
299 strcat(s,c_str(i));
300
301 return s;
302}

◆ c_str() [1/3]

char * EvtCyclic3::c_str ( Index  i)

Definition at line 252 of file EvtCyclic3.cc.

253{
254 switch(i) {
255 case A: return "A";
256 case B: return "B";
257 case C: return "C";
258 }
259 assert(0); return 0; // sngh
260}

Referenced by append(), and EvtPto3PAmpFactory::processAmp().

◆ c_str() [2/3]

char * EvtCyclic3::c_str ( Pair  i)

Definition at line 263 of file EvtCyclic3.cc.

264{
265 switch(i) {
266 case BC: return "BC";
267 case CA: return "CA";
268 case AB: return "AB";
269 }
270 assert(0); return 0; // sngh
271}

◆ c_str() [3/3]

char * EvtCyclic3::c_str ( Perm  i)

Definition at line 273 of file EvtCyclic3.cc.

274{
275 if(p == ABC) return "ABC";
276 if(p == BCA) return "BCA";
277 if(p == CAB) return "CAB";
278 if(p == CBA) return "CBA";
279 if(p == BAC) return "BAC";
280 if(p == ACB) return "ACB";
281 return "???";
282}

◆ combine()

Pair EvtCyclic3::combine ( Index  i,
Index  j 
)

Definition at line 158 of file EvtCyclic3.cc.

159{
160 return other(other(i,j));
161}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

Referenced by other(), permute(), and EvtDalitzPoint::pp().

◆ common()

Index EvtCyclic3::common ( Pair  i,
Pair  j 
)

Definition at line 228 of file EvtCyclic3.cc.

229{
230 return other(other(i,j));
231}

Referenced by EvtDalitzPlot::qMax(), and EvtDalitzPlot::qMin().

◆ first()

Index EvtCyclic3::first ( Pair  i)

Definition at line 195 of file EvtCyclic3.cc.

196{
197 switch(i) {
198 case BC: return B;
199 case CA: return C;
200 case AB: return A;
201 }
202 assert(0); return A; // should never get here
203}

Referenced by EvtPto3PAmp::amplitude(), EvtDalitzPlot::e(), EvtDalitzPlot::jacobian(), EvtPto3PAmp::numerator(), permute(), EvtDalitzPlot::q(), EvtDalitzPlot::qAbsMin(), and EvtDalitzPlot::vD().

◆ i2pair()

Pair EvtCyclic3::i2pair ( int  i)

Definition at line 83 of file EvtCyclic3.cc.

84{
85 assert(0<=i && i<=2);
86 switch(i) {
87 case 0: return BC;
88 case 1: return CA;
89 case 2: return AB;
90 }
91 assert(0); return AB; // should never get here
92}

◆ next() [1/2]

Index EvtCyclic3::next ( Index  i)

Definition at line 107 of file EvtCyclic3.cc.

108{
109 switch(i) {
110 case A: return B;
111 case B: return C;
112 case C: return A;
113 }
114 assert(0); return A; // should never get here
115}

Referenced by EvtDalitzResPdf::compute_integral(), EvtDalitzPoint::qhel(), EvtDalitzPlot::qHelAbsMax(), EvtDalitzPlot::qHelAbsMin(), EvtDalitzPoint::qres(), and EvtDalitzResPdf::randomPoint().

◆ next() [2/2]

Pair EvtCyclic3::next ( Pair  i)

Definition at line 176 of file EvtCyclic3.cc.

177{
178 Pair ret = BC;
179 if(i == BC) ret = CA;
180 else
181 if(i == CA) ret = AB;
182
183 return ret;
184}

◆ other() [1/4]

Pair EvtCyclic3::other ( Index  i)

Definition at line 147 of file EvtCyclic3.cc.

148{
149 switch(i) {
150 case A: return BC;
151 case B: return CA;
152 case C: return AB;
153 }
154 assert(0); return AB; // should never get here
155}

◆ other() [2/4]

Index EvtCyclic3::other ( Index  i,
Index  j 
)

Definition at line 118 of file EvtCyclic3.cc.

119{
120 assert(i != j);
121 switch(i) {
122 case A:
123 switch(j) {
124 case B: return C;
125 case C: return B;
126 default: assert(0);
127 }
128 case B:
129 switch(j) {
130 case C: return A;
131 case A: return C;
132 default: assert(0);
133 }
134 case C:
135 switch(j) {
136 case A: return B;
137 case B: return A;
138 default: assert(0);
139 }
140 }
141 assert(0); return A; // should never get here
142}

Referenced by EvtPto3PAmp::amplitude(), combine(), common(), EvtDalitzPlot::e(), EvtDalitzReso::evaluate(), EvtDalitzPlot::jacobian(), EvtPto3PAmp::numerator(), EvtDalitzPlot::operator==(), other(), EvtDalitzPlot::qAbsMax(), EvtDalitzPlot::qMax(), EvtDalitzPlot::qMin(), and EvtDalitzPlot::vB().

◆ other() [3/4]

Index EvtCyclic3::other ( Pair  i)

Definition at line 217 of file EvtCyclic3.cc.

218{
219 switch(i) {
220 case BC: return A;
221 case CA: return B;
222 case AB: return C;
223 }
224 assert(0); return A; // should never get here
225}

◆ other() [4/4]

Pair EvtCyclic3::other ( Pair  i,
Pair  j 
)

Definition at line 186 of file EvtCyclic3.cc.

187{
188 return combine(other(i),other(j));
189}
Pair combine(Index i, Index j)
Definition: EvtCyclic3.cc:158

◆ permutation()

Perm EvtCyclic3::permutation ( Index  i1,
Index  i2,
Index  i3 
)

Definition at line 56 of file EvtCyclic3.cc.

57{
58 assert(i1 != i2 && i2 != i3 && i3 != i1);
59 if(i1 == A) return (i2 == B) ? ABC : ACB;
60 if(i1 == B) return (i2 == C) ? BCA : BAC;
61 if(i1 == C) return (i2 == A) ? CAB : CBA;
62 return ABC;
63}

Referenced by permute().

◆ permute() [1/3]

Index EvtCyclic3::permute ( Index  i,
Perm  p 
)

Definition at line 20 of file EvtCyclic3.cc.

21{
22 if(p == ABC) return i;
23 else if(p == BCA) {
24 if(i == A) return C;
25 else if(i == B) return A;
26 else if(i == C) return B;
27 }
28 else if(p == BCA) {
29 if(i == A) return C;
30 else if(i == B) return A;
31 else if(i == C) return B;
32 }
33 else if(p == CAB) {
34 if(i == A) return B;
35 else if(i == B) return C;
36 else if(i == C) return A;
37 }
38 else if(p == CBA) {
39 if(i == A) return C;
40 else if(i == B) return B;
41 else if(i == C) return A;
42 }
43 else if(p == BAC) {
44 if(i == A) return B;
45 else if(i == B) return A;
46 else if(i == C) return C;
47 }
48 else if(p == ACB) {
49 if(i == A) return A;
50 else if(i == B) return C;
51 else if(i == C) return B;
52 }
53 return A;
54}

Referenced by permute().

◆ permute() [2/3]

Pair EvtCyclic3::permute ( Pair  i,
Perm  p 
)

Definition at line 75 of file EvtCyclic3.cc.

76{
77 Index i1 = permute(first(i),p);
78 Index i2 = permute(second(i),p);
79 return combine(i1,i2);
80}
Index permute(Index i, Perm p)
Definition: EvtCyclic3.cc:20
Index second(Pair i)
Definition: EvtCyclic3.cc:206
Index first(Pair i)
Definition: EvtCyclic3.cc:195

◆ permute() [3/3]

Perm EvtCyclic3::permute ( Perm  i,
Perm  p 
)

Definition at line 66 of file EvtCyclic3.cc.

67{
68 Index i1 = permute(permute(A,i),p);
69 Index i2 = permute(permute(B,i),p);
70 Index i3 = permute(permute(C,i),p);
71
72 return permutation(i1,i2,i3);
73}
Perm permutation(Index i1, Index i2, Index i3)
Definition: EvtCyclic3.cc:56

◆ prev() [1/2]

Index EvtCyclic3::prev ( Index  i)

Definition at line 96 of file EvtCyclic3.cc.

97{
98 switch(i) {
99 case A: return C;
100 case B: return A;
101 case C: return B;
102 }
103 assert(0); return A; // should never get here
104}

Referenced by EvtDalitzPoint::qhel(), EvtDalitzPlot::qHelAbsMax(), EvtDalitzPlot::qHelAbsMin(), and EvtDalitzPoint::qres().

◆ prev() [2/2]

Pair EvtCyclic3::prev ( Pair  i)

Definition at line 166 of file EvtCyclic3.cc.

167{
168 Pair ret = CA;
169 if(i == BC) ret = AB;
170 else
171 if(i == CA) ret = BC;
172
173 return ret;
174}

◆ second()

Index EvtCyclic3::second ( Pair  i)

Definition at line 206 of file EvtCyclic3.cc.

207{
208 switch(i) {
209 case BC: return C;
210 case CA: return A;
211 case AB: return B;
212 }
213 assert(0); return A; // should never get here
214}

Referenced by EvtPto3PAmp::amplitude(), EvtDalitzPlot::e(), EvtPto3PAmp::numerator(), permute(), EvtDalitzPlot::q(), EvtDalitzPlot::qAbsMin(), and EvtDalitzPlot::vD().

◆ strToIndex()

Index EvtCyclic3::strToIndex ( const char *  str)

Definition at line 234 of file EvtCyclic3.cc.

235{
236 if(strcmp(str,"A")) return A;
237 else if(strcmp(str,"B")) return B;
238 else if(strcmp(str,"C")) return C;
239 else assert(0);
240}

◆ strToPair()

Pair EvtCyclic3::strToPair ( const char *  str)

Definition at line 243 of file EvtCyclic3.cc.

244{
245 if(!strcmp(str,"AB") || !strcmp(str,"BA")) return AB;
246 else if(!strcmp(str,"BC") || !strcmp(str,"CB")) return BC;
247 else if(!strcmp(str,"CA") || !strcmp(str,"AC")) return CA;
248 else assert(0);
249}

Referenced by EvtPto3PAmpFactory::processAmp().