HepLib
Loading...
Searching...
No Matches
HEP.h
Go to the documentation of this file.
1
6#pragma once
7
8#include "BASIC.h"
9#include "IBP.h"
10
11namespace HepLib {
12
13 using namespace std;
14 using namespace GiNaC;
15 using namespace HepLib;
16
17 extern exmap SP_map;
18
19 extern int form_trace_mode;
20 extern const int form_trace_auto;
21 extern const int form_trace_all;
22 extern const int form_trace_each_all;
23 extern const int form_trace_each_each;
24
25 extern int form_expand_mode;
26 extern const int form_expand_none;
27 extern const int form_expand_tr;
28 extern const int form_expand_ci;
29 extern const int form_expand_li;
30 extern const int form_expand_all;
31
32 extern bool Apart_using_fermat;
33 extern bool form_using_su3;
34 extern bool form_using_dim4;
35 extern bool form_using_gamma5;
36
37 class Index;
38 class Vector;
39 class Pair;
40
44 class FormFormat : public print_dflt {
45 GINAC_DECLARE_PRINT_CONTEXT(FormFormat, print_dflt)
46 public:
47 FormFormat(ostream &os, unsigned opt=0);
48 static void power_print(const power & p, const FormFormat & c, unsigned level=0);
49
50 template<class T> const FormFormat & operator << (const T & v) const {
51 s << v;
52 return *this;
53 };
54 const FormFormat & operator << (const basic & v) const;
55 const FormFormat & operator << (const ex & v) const;
56 const FormFormat & operator << (const lst & v) const;
57 const FormFormat & operator<<(std::ostream& (*v)(std::ostream&)) const;
58
59 #ifndef DOXYGEN_SKIP
60 class _init {
61 public: _init();
62 };
63 private:
64 static _init FormFormat_init;
65 #endif
66 };
67
71 class FCFormat : public print_dflt {
72 GINAC_DECLARE_PRINT_CONTEXT(FCFormat, print_dflt)
73 public:
74 FCFormat(ostream &os, unsigned opt=0);
75 static void ncmul_print(const ncmul & p, const FCFormat & c, unsigned level=0);
76
77 template<class T> const FCFormat & operator << (const T & v) const {
78 s << v;
79 return *this;
80 };
81 const FCFormat & operator << (const basic & v) const;
82 const FCFormat & operator << (const ex & v) const;
83 const FCFormat & operator << (const lst & v) const;
84 const FCFormat & operator<<(std::ostream& (*v)(std::ostream&)) const;
85
86 const FCFormat & operator << (const matrix & v) const;
87 const FCFormat & operator << (const exvector & v) const;
88 const FCFormat & operator << (const exmap & v) const;
89 const FCFormat & operator << (const exset & v) const;
90
91 #ifndef DOXYGEN_SKIP
92 class _init {
93 public: _init();
94 };
95 private:
96 static _init FCFormat_init;
97 #endif
98 };
99 extern FCFormat fcout;
100
104 class Index : public basic {
105 //GINAC_DECLARE_REGISTERED_CLASS(Index, basic)
106 private:
107 static GiNaC::registered_class_info reg_info;
108 public:
109 static GiNaC::exmap Dimension;
110 static GiNaC::registered_class_info &get_class_info_static();
111 class visitor {
112 public:
113 virtual void visit(const Index &) = 0; // classname
114 virtual ~visitor();
115 };
116 template<class B, typename... Args> friend B & dynallocate(Args &&... args);
117 typedef basic inherited; // supername
118 Index(); // classname
119 Index * duplicate() const override; // classname
120 void accept(GiNaC::visitor & v) const override;
121 const GiNaC::registered_class_info &get_class_info() const override;
122 GiNaC::registered_class_info &get_class_info() override;
123 const char *class_name() const override;
124 protected:
125 int compare_same_type(const GiNaC::basic & other) const override;
126 // GINAC_DECLARE_REGISTERED_CLASS END
127
128 public:
129 enum Type {VD, CF, CA};
130 Index(const string &s, const Type type=Type::VD);
131 Pair operator() (const Index & i);
132 Pair operator() (const Vector & p);
135 void print(const print_context &c, unsigned level = 0) const;
136 void archive(archive_node & n) const override;
137 void read_archive(const archive_node& n) override;
138 static bool has(const ex &e);
139 static bool hasc(const ex &e);
140 static bool hasv(const ex &e);
141 static lst all(const ex &e);
142 ex derivative(const symbol & s) const override;
143 bool is_equal_same_type(const basic & other) const override;
144 };
145
149 class Vector : public basic {
150 //GINAC_DECLARE_REGISTERED_CLASS(Vector, basic)
151 private:
152 static GiNaC::registered_class_info reg_info;
153 public:
154 static GiNaC::registered_class_info &get_class_info_static();
155 class visitor {
156 public:
157 virtual void visit(const Vector &) = 0; // classname
158 virtual ~visitor();
159 };
160 template<class B, typename... Args> friend B & dynallocate(Args &&... args);
161 typedef basic inherited; // supername
162 Vector(); // classname
163 Vector * duplicate() const override; // classname
164 void accept(GiNaC::visitor & v) const override;
165 const GiNaC::registered_class_info &get_class_info() const override;
166 GiNaC::registered_class_info &get_class_info() override;
167 const char *class_name() const override;
168 protected:
169 int compare_same_type(const GiNaC::basic & other) const override;
170 // GINAC_DECLARE_REGISTERED_CLASS END
171
172 public:
173 Vector(const string &s);
174 Pair operator() (const Vector & p);
175 Pair operator() (const Index & mu);
177 void print(const print_context &c, unsigned level = 0) const;
178 void archive(archive_node & n) const override;
179 void read_archive(const archive_node& n) override;
180 static bool has(const ex &e);
181 static lst all(const ex &e);
182 ex derivative(const symbol & s) const override;
183 bool is_equal_same_type(const basic & other) const override;
184 };
185
189 class SUNT : public basic {
190 //GINAC_DECLARE_REGISTERED_CLASS(SUNT, basic)
191 private:
192 static GiNaC::registered_class_info reg_info;
193 public:
194 static GiNaC::registered_class_info &get_class_info_static();
195 class visitor {
196 public:
197 virtual void visit(const SUNT &) = 0; // classname
198 virtual ~visitor();
199 };
200 template<class B, typename... Args> friend B & dynallocate(Args &&... args);
201 typedef basic inherited; // supername
202 SUNT(); // classname
203 SUNT * duplicate() const override; // classname
204 void accept(GiNaC::visitor & v) const override;
205 const GiNaC::registered_class_info &get_class_info() const override;
206 GiNaC::registered_class_info &get_class_info() override;
207 const char *class_name() const override;
208 protected:
209 int compare_same_type(const GiNaC::basic & other) const override;
210 // GINAC_DECLARE_REGISTERED_CLASS END
211
212 public:
213 SUNT(ex a, ex i, ex j);
214 ex aij[3]; // Index
215 size_t nops() const override;
216 ex op(size_t i) const override;
217 ex& let_op(size_t i) override;
218 void form_print(const FormFormat &c, unsigned level = 0) const;
219 void fc_print(const FCFormat &c, unsigned level = 0) const;
220 void print(const print_dflt &c, unsigned level = 0) const;
221 void archive(archive_node & n) const override;
222 void read_archive(const archive_node& n) override;
223 static bool has(const ex &e);
224 static lst all(const ex &e);
225 ex derivative(const symbol & s) const override;
226 ex conjugate() const override;
227 bool is_equal_same_type(const basic & other) const override;
228 };
229
233 class SUNF : public basic {
234 //GINAC_DECLARE_REGISTERED_CLASS(SUNF, basic)
235 private:
236 static GiNaC::registered_class_info reg_info;
237 public:
238 static GiNaC::registered_class_info &get_class_info_static();
239 class visitor {
240 public:
241 virtual void visit(const SUNF &) = 0; // classname
242 virtual ~visitor();
243 };
244 template<class B, typename... Args> friend B & dynallocate(Args &&... args);
245 typedef basic inherited; // supername
246 SUNF(); // classname
247 SUNF * duplicate() const override; // classname
248 void accept(GiNaC::visitor & v) const override;
249 const GiNaC::registered_class_info &get_class_info() const override;
250 GiNaC::registered_class_info &get_class_info() override;
251 const char *class_name() const override;
252 protected:
253 int compare_same_type(const GiNaC::basic & other) const override;
254 // GINAC_DECLARE_REGISTERED_CLASS END
255
256 public:
257 SUNF(ex i, ex j, ex k);
258 ex ijk[3]; // Index
259 size_t nops() const override;
260 ex op(size_t i) const override;
261 ex& let_op(size_t i) override;
262 ex eval() const override;
263 void print(const print_dflt &c, unsigned level = 0) const;
264 void form_print(const FormFormat &c, unsigned level = 0) const;
265 void fc_print(const FCFormat &c, unsigned level = 0) const;
266 void archive(archive_node & n) const override;
267 void read_archive(const archive_node& n) override;
268 static bool has(const ex &e);
269 static lst all(const ex &e);
270 ex derivative(const symbol & s) const override;
271 bool is_equal_same_type(const basic & other) const override;
272 };
273
274
278 class SUNF4 : public basic {
279 //GINAC_DECLARE_REGISTERED_CLASS(SUNF4, basic)
280 private:
281 static GiNaC::registered_class_info reg_info;
282 public:
283 static GiNaC::registered_class_info &get_class_info_static();
284 class visitor {
285 public:
286 virtual void visit(const SUNF4 &) = 0; // classname
287 virtual ~visitor();
288 };
289 template<class B, typename... Args> friend B & dynallocate(Args &&... args);
290 typedef basic inherited; // supername
291 SUNF4(); // classname
292 SUNF4 * duplicate() const override; // classname
293 void accept(GiNaC::visitor & v) const override;
294 const GiNaC::registered_class_info &get_class_info() const override;
295 GiNaC::registered_class_info &get_class_info() override;
296 const char *class_name() const override;
297 protected:
298 int compare_same_type(const GiNaC::basic & other) const override;
299 // GINAC_DECLARE_REGISTERED_CLASS END
300
301 public:
302 SUNF4(ex i, ex j, ex k, ex l);
303 ex ijkl[4]; // Index
304 size_t nops() const override;
305 ex op(size_t i) const override;
306 ex& let_op(size_t i) override;
307 ex eval() const override;
308 void print(const print_dflt &c, unsigned level = 0) const;
309 void form_print(const FormFormat &c, unsigned level = 0) const;
310 void fc_print(const FCFormat &c, unsigned level = 0) const;
311 void archive(archive_node & n) const override;
312 void read_archive(const archive_node& n) override;
313 static bool has(const ex &e);
314 static lst all(const ex &e);
315 ex derivative(const symbol & s) const override;
316 bool is_equal_same_type(const basic & other) const override;
317 };
318
322 class Pair : public basic {
323 //GINAC_DECLARE_REGISTERED_CLASS(Pair, basic)
324 private:
325 static GiNaC::registered_class_info reg_info;
326 public:
327 static GiNaC::registered_class_info &get_class_info_static();
328 class visitor {
329 public:
330 virtual void visit(const Pair &) = 0; // classname
331 virtual ~visitor();
332 };
333 template<class B, typename... Args> friend B & dynallocate(Args &&... args);
334 typedef basic inherited; // supername
335 Pair(); // classname
336 Pair * duplicate() const override; // classname
337 void accept(GiNaC::visitor & v) const override;
338 const GiNaC::registered_class_info &get_class_info() const override;
339 GiNaC::registered_class_info &get_class_info() override;
340 const char *class_name() const override;
341 protected:
342 int compare_same_type(const GiNaC::basic & other) const override;
343 // GINAC_DECLARE_REGISTERED_CLASS END
344
345 public:
346 Pair(const Vector &p1, const Vector &p2);
347 Pair(const Index &i1, const Index &i2);
348 Pair(const Vector &p, const Index &i);
349 Pair(const Index &i, const Vector &p);
350 size_t nops() const override;
351 ex op(size_t i) const override;
352 ex& let_op(size_t i) override;
353 ex eval() const override;
354 void print(const print_dflt &c, unsigned level = 0) const;
355 void form_print(const FormFormat &c, unsigned level = 0) const;
356 void fc_print(const FCFormat &c, unsigned level = 0) const;
357 void archive(archive_node & n) const override;
358 void read_archive(const archive_node& n) override;
359 static bool has(const ex &e);
360 static lst all(const ex &e);
361 ex derivative(const symbol & s) const override;
362 bool is_equal_same_type(const basic & other) const override;
363 private:
364 ex lr[2];
365 };
366
367 ex SP(const ex &a, bool use_map=false);
368 ex SP(const ex &a, const ex &b, bool use_map=false);
369 ex sp(const ex & a, const ex & b);
370 ex sp(const ex & a);
371 ex& letSP(const ex &p1, const ex &p2);
372 ex& letSP(const ex &p);
373 void clearSP(const ex &p1, const ex &p2);
374 void clearSP(const ex &p);
375 void clearSP();
376 ex SP2sp(const ex & exin);
377 exmap sp_map();
378
386 class Eps : public basic {
387 //GINAC_DECLARE_REGISTERED_CLASS(Eps, basic)
388 private:
389 static GiNaC::registered_class_info reg_info;
390 public:
391 static GiNaC::registered_class_info &get_class_info_static();
392 class visitor {
393 public:
394 virtual void visit(const Eps &) = 0; // classname
395 virtual ~visitor();
396 };
397 template<class B, typename... Args> friend B & dynallocate(Args &&... args);
398 typedef basic inherited; // supername
399 Eps(); // classname
400 Eps * duplicate() const override; // classname
401 void accept(GiNaC::visitor & v) const override;
402 const GiNaC::registered_class_info &get_class_info() const override;
403 GiNaC::registered_class_info &get_class_info() override;
404 const char *class_name() const override;
405 protected:
406 int compare_same_type(const GiNaC::basic & other) const override;
407 // GINAC_DECLARE_REGISTERED_CLASS END
408
409 public:
410 exvector pis;
411 Eps(const Vector &p1, const Vector &p2, const Vector &p3, const Vector &p4);
412 Eps(const Vector &p1, const Vector &p2, const Vector &p3, const Index &i1);
413 Eps(const Vector &p1, const Vector &p2, const Index &i1, const Index &i2);
414 Eps(const Vector &p1, const Index &i1, const Index &i2, const Index &i3);
415 Eps(const Index &i1, const Index &i2, const Index &i3, const Index &i4);
416 Eps(vector<Vector> vs, vector<Index> is);
417 Eps(const exvector & pis0);
418 size_t nops() const override;
419 ex op(size_t i) const override;
420 ex & let_op(size_t i) override;
421 ex eval() const override;
422 void print(const print_dflt &c, unsigned level = 0) const;
423 void form_print(const FormFormat &c, unsigned level = 0) const;
424 void fc_print(const FCFormat &c, unsigned level = 0) const;
425 void archive(archive_node & n) const override;
426 void read_archive(const archive_node& n) override;
427 static bool has(const ex &e);
428 static lst all(const ex &e);
429 ex derivative(const symbol & s) const override;
430 bool is_equal_same_type(const basic & other) const override;
431 };
432 ex LC(ex pi1, ex pi2, ex pi3, ex pi4);
433
437 class DGamma : public basic {
438 //GINAC_DECLARE_REGISTERED_CLASS(DGamma, basic)
439 private:
440 static GiNaC::registered_class_info reg_info;
441 public:
442 static GiNaC::registered_class_info &get_class_info_static();
443 class visitor {
444 public:
445 virtual void visit(const DGamma &) = 0; // classname
446 virtual ~visitor();
447 };
448 template<class B, typename... Args> friend B & dynallocate(Args &&... args);
449 typedef basic inherited; // supername
450 DGamma(); // classname
451 DGamma * duplicate() const override; // classname
452 void accept(GiNaC::visitor & v) const override;
453 const GiNaC::registered_class_info &get_class_info() const override;
454 GiNaC::registered_class_info &get_class_info() override;
455 const char *class_name() const override;
456 protected:
457 int compare_same_type(const GiNaC::basic & other) const override;
458 // GINAC_DECLARE_REGISTERED_CLASS END
459
460 public:
461 ex pi;
462 unsigned rl = 0;
463 DGamma(const Vector &p, unsigned rl=0);
464 DGamma(const Index &i, unsigned rl=0);
465 DGamma(int int_1567, unsigned _rl=0);
466 DGamma(const DGamma &g, unsigned _rl);
467 void print(const print_dflt &c, unsigned level = 0) const;
468 void form_print(const FormFormat &c, unsigned level = 0) const;
469 void fc_print(const FCFormat &c, unsigned level = 0) const;
470 return_type_t return_type_tinfo() const override;
471 unsigned return_type() const override { return return_types::noncommutative; }
472 bool match_same_type(const basic & other) const override;
473 unsigned get_rl();
474 size_t nops() const override;
475 ex op(size_t i) const override;
476 ex& let_op(size_t i) override;
477 ex eval() const override;
478 void archive(archive_node & n) const override;
479 void read_archive(const archive_node& n) override;
480 static bool has(const ex &e);
481 static lst all(const ex &e);
482 static ex sigma(const ex & mu, const ex & nu);
483 static ex G5Eps(int i=0, int rl=0);
484 ex derivative(const symbol & s) const override;
485 ex conjugate() const override;
486 bool is_equal_same_type(const basic & other) const override;
487 };
488
492 class AsGamma : public basic {
493 //GINAC_DECLARE_REGISTERED_CLASS(AsGamma, basic)
494 private:
495 static GiNaC::registered_class_info reg_info;
496 public:
497 static GiNaC::registered_class_info &get_class_info_static();
498 class visitor {
499 public:
500 virtual void visit(const AsGamma &) = 0; // classname
501 virtual ~visitor();
502 };
503 template<class B, typename... Args> friend B & dynallocate(Args &&... args);
504 typedef basic inherited; // supername
505 AsGamma(); // classname
506 AsGamma * duplicate() const override; // classname
507 void accept(GiNaC::visitor & v) const override;
508 const GiNaC::registered_class_info &get_class_info() const override;
509 GiNaC::registered_class_info &get_class_info() override;
510 const char *class_name() const override;
511 protected:
512 int compare_same_type(const GiNaC::basic & other) const override;
513 // GINAC_DECLARE_REGISTERED_CLASS END
514
515 private:
516 AsGamma(const exvector & _pis, int _rl=0);
517
518 public:
519 exvector pis; // momentum and index lst
520 unsigned rl = 0;
521 AsGamma(const lst & _pis, int _rl=0);
522 static ex from(const lst & pis_lst, unsigned rl=0);
523 static ex from(const exvector & pis_vec, unsigned rl=0) { return from(vec2lst(pis_vec), rl); }
524 ex to() const;
525 AsGamma(const AsGamma &g, unsigned _rl);
526 void print(const print_dflt &c, unsigned level = 0) const;
527 void form_print(const FormFormat &c, unsigned level = 0) const;
528 void fc_print(const FCFormat &c, unsigned level = 0) const;
529 return_type_t return_type_tinfo() const override;
530 unsigned return_type() const override { return return_types::noncommutative; }
531 bool match_same_type(const basic & other) const override;
532 unsigned get_rl();
533 size_t nops() const override;
534 ex op(size_t i) const override;
535 ex& let_op(size_t i) override;
536 ex eval() const override;
537 void archive(archive_node & n) const override;
538 void read_archive(const archive_node& n) override;
539 static bool has(const ex &e);
540 static lst all(const ex &e);
541 ex derivative(const symbol & s) const override;
542 ex conjugate() const override;
543 bool is_equal_same_type(const basic & other) const override;
544
545 ex mul_right(const ex & pi) const;
546 ex mul_left(const ex & pi) const;
547 };
548
549 ex AsGamma_mul_right(const ex & expr, const ex & pi_in);
550 ex AsGamma_mul_left(const ex & expr, const ex & pi_in);
551 ex AsGamma_to(const ex & expr);
552
553 //-----------------------------------------------------------
554 // TR/GAS functions
555 //-----------------------------------------------------------
556 DECLARE_FUNCTION_3P(GMat)
557 DECLARE_FUNCTION_1P(TR)
558 DECLARE_FUNCTION_1P(TTR)
559 DECLARE_FUNCTION_1P(HF)
560
561 inline ex GAS(const Vector &p, unsigned rl=0) { return DGamma(p,rl); }
562 inline ex GAS(const Index &i, unsigned rl=0) { return DGamma(i,rl); }
563 ex GAS(const ex &expr, unsigned rl=0);
564
565 // Form, TIR, Apart
566 ex charge_conjugate(const ex &);
567 ex form(const ex &expr, int verb=0);
568 ex UnContract(const ex expr, const lst &loop_ps, const lst &ext_ps=lst{}); // Eps/DGamma always uncontract
569 ex Contract(const ex & expr);
570 ex TIR(const ex &expr_in, const lst &loop_ps, const lst &ext_ps);
571 ex ncmul_expand(const ex & expr);
572 ex GMatContract(const ex & expr_in);
573 ex GMatExpand(const ex & expr_in);
574 ex GMatShift(const ex & expr, const ex & g, bool to_right=true);
575 ex GMatShift(const ex & expr);
576 ex GMatSimplify(const ex & expr);
577 ex Apart(const matrix & mat);
578 ex Apart(const ex &expr_in, const lst &vars, exmap sgnmap={});
579 ex Apart(const ex &expr_in, const lst &loops, const lst & extmoms, exmap sgnmap={});
580 ex ApartIR2ex(const ex & expr_in);
581 ex ApartIR2F(const ex & expr_in);
582 ex F2ex(const ex & expr_in);
583 ex ApartIRC(const ex & expr_in);
584 void ApartIBP(exvector &io_vec, int IBPmethod, const lst & loops, const lst & exts,
585 const lst & cut_props=lst{}, std::function<lst(const IBP &, const ex &)> uf=LoopUF);
586 inline void ApartIBP(int IBPmethod, exvector &io_vec, const lst & loops, const lst & exts,
587 const lst & cut_props=lst{}, std::function<lst(const IBP &, const ex &)> uf=LoopUF) {
588 return ApartIBP(io_vec, IBPmethod, loops, exts, cut_props, uf);
589 }
590 exmap ApartRules(const exvector &airs, bool irc=true);
591
592 struct AIOption {
593 int pn_sector = 0; // treat each sector as a spearate problem when total denominators > pn_sector, set 0 to disable this feature
594 bool ap_rules = true; // minimize the total number of ibp problems
595 int IBPmethod = 1; // 0
596 lst Internal; // Internal for Apart/IBP
597 lst External; // External for Apart/IBP
598 lst DSP; // DSP for IBP
599 exmap smap; // Sign Map for Apart
600 lst Cut; // Cut Propagator. optional
601 lst CSP; // SP in Cut, to be cleared. optional
602 lst ISP; // SP for IBP. optional
603 bool CutFirst = true;
604 bool keep0F = false; // keep 0 exponent in F
605 int NIBP = 0;
606 ex apart1 = 0; // set Apart(1,{x,y,...}) to apart1
607 lst pat = { F(w1,w2), gs, nL, nH };
608 std::function<ex(const ex &, const ex &)> cv = nullptr;
609 string SaveDir = ""; // save temporary result, and restart from it
610 std::function<lst(const IBP &, const ex &)> UF = LoopUF;
611 void init_smap() { for(auto li : Internal) smap[SP(li)] = 1; }
612 };
613 void ApartIBP(exvector &io_vec, AIOption aip);
614
615 bool IsZero(const ex & e);
616
617 #ifndef DOXYGEN_SKIP
618
619 class ApartIR1_SERIAL { public: static unsigned serial; };
620 template<typename T1>
621 inline GiNaC::function ApartIR(const T1 & p1) {
622 return GiNaC::function(ApartIR1_SERIAL::serial, ex(p1));
623 }
624
625 class ApartIR2_SERIAL { public: static unsigned serial; };
626 template<typename T1, typename T2>
627 inline GiNaC::function ApartIR(const T1 & p1, const T2 & p2) {
628 return GiNaC::function(ApartIR2_SERIAL::serial, ex(p1), ex(p2));
629 }
630
631 #endif
632
633 ex ToCF(const ex & e);
634 ex ToCACF(const ex & e);
635 ex HomCACF(const ex & e);
636 ex DoColor(const ex & e, const ex & pref=1, int method=0);
637 ex A0(const ex m2, int n=1, const ex d=4-2*ep);
638
639
640}
641
int * a
Basic header file.
IBP header file.
virtual void visit(const AsGamma &)=0
class for AntiSymmetric Gamma object
Definition HEP.h:492
bool match_same_type(const basic &other) const override
Definition AsGamma.cpp:41
static lst all(const ex &e)
void archive(archive_node &n) const override
Definition AsGamma.cpp:154
AsGamma * duplicate() const override
Definition AsGamma.cpp:25
int compare_same_type(const GiNaC::basic &other) const override
Definition AsGamma.cpp:50
ex mul_right(const ex &pi) const
Definition AsGamma.cpp:222
ex conjugate() const override
Definition AsGamma.cpp:178
ex to() const
Definition AsGamma.cpp:206
basic inherited
Definition HEP.h:504
const char * class_name() const override
Definition AsGamma.cpp:29
ex eval() const override
Definition AsGamma.cpp:108
static ex from(const exvector &pis_vec, unsigned rl=0)
Definition HEP.h:523
ex op(size_t i) const override
Definition AsGamma.cpp:100
void read_archive(const archive_node &n) override
Definition AsGamma.cpp:162
ex derivative(const symbol &s) const override
Definition AsGamma.cpp:174
const GiNaC::registered_class_info & get_class_info() const override
Definition AsGamma.cpp:27
exvector pis
Definition HEP.h:519
void form_print(const FormFormat &c, unsigned level=0) const
Definition AsGamma.cpp:146
return_type_t return_type_tinfo() const override
Definition AsGamma.cpp:36
void accept(GiNaC::visitor &v) const override
Definition AsGamma.cpp:26
static ex from(const lst &pis_lst, unsigned rl=0)
Definition AsGamma.cpp:182
void fc_print(const FCFormat &c, unsigned level=0) const
Definition AsGamma.cpp:150
size_t nops() const override
Definition AsGamma.cpp:99
unsigned get_rl()
Definition AsGamma.cpp:46
static GiNaC::registered_class_info & get_class_info_static()
Definition AsGamma.cpp:23
unsigned rl
Definition HEP.h:520
friend B & dynallocate(Args &&... args)
ex mul_left(const ex &pi) const
Definition AsGamma.cpp:241
unsigned return_type() const override
Definition HEP.h:530
void print(const print_dflt &c, unsigned level=0) const
Definition AsGamma.cpp:135
bool is_equal_same_type(const basic &other) const override
Definition AsGamma.cpp:64
ex & let_op(size_t i) override
Definition AsGamma.cpp:103
static bool has(const ex &e)
virtual void visit(const DGamma &)=0
class for Dirac Gamma object
Definition HEP.h:437
ex eval() const override
Definition DGamma.cpp:106
unsigned return_type() const override
Definition HEP.h:471
static lst all(const ex &e)
bool match_same_type(const basic &other) const override
Definition DGamma.cpp:64
return_type_t return_type_tinfo() const override
Definition DGamma.cpp:59
basic inherited
Definition HEP.h:449
ex derivative(const symbol &s) const override
Definition DGamma.cpp:160
void archive(archive_node &n) const override
Definition DGamma.cpp:148
void form_print(const FormFormat &c, unsigned level=0) const
Definition DGamma.cpp:129
void accept(GiNaC::visitor &v) const override
Definition DGamma.cpp:49
ex conjugate() const override
Definition DGamma.cpp:164
static GiNaC::registered_class_info & get_class_info_static()
Definition DGamma.cpp:46
void read_archive(const archive_node &n) override
Definition DGamma.cpp:154
static ex sigma(const ex &mu, const ex &nu)
Definition DGamma.cpp:173
size_t nops() const override
Definition DGamma.cpp:92
ex op(size_t i) const override
Definition DGamma.cpp:93
int compare_same_type(const GiNaC::basic &other) const override
Definition DGamma.cpp:73
void print(const print_dflt &c, unsigned level=0) const
Definition DGamma.cpp:113
static ex G5Eps(int i=0, int rl=0)
Definition DGamma.cpp:177
static bool has(const ex &e)
void fc_print(const FCFormat &c, unsigned level=0) const
Definition DGamma.cpp:138
friend B & dynallocate(Args &&... args)
const GiNaC::registered_class_info & get_class_info() const override
Definition DGamma.cpp:50
bool is_equal_same_type(const basic &other) const override
Definition DGamma.cpp:80
DGamma * duplicate() const override
Definition DGamma.cpp:48
ex & let_op(size_t i) override
Definition DGamma.cpp:99
unsigned rl
Definition HEP.h:462
unsigned get_rl()
Definition DGamma.cpp:69
const char * class_name() const override
Definition DGamma.cpp:52
virtual void visit(const Eps &)=0
virtual ~visitor()
Definition Eps.cpp:15
class for Levi-Civita object https://onlinelibrary.wiley.com/doi/pdf/10.1002/9783527630097....
Definition HEP.h:386
const char * class_name() const override
Definition Eps.cpp:20
ex eval() const override
Definition Eps.cpp:69
int compare_same_type(const GiNaC::basic &other) const override
Definition Eps.cpp:44
static bool has(const ex &e)
void fc_print(const FCFormat &c, unsigned level=0) const
Definition Eps.cpp:121
bool is_equal_same_type(const basic &other) const override
Definition Eps.cpp:57
ex op(size_t i) const override
Definition Eps.cpp:141
void form_print(const FormFormat &c, unsigned level=0) const
Eps in FORM format https://onlinelibrary.wiley.com/doi/pdf/10.1002/9783527630097.app3 to make Tr(g5,...
Definition Eps.cpp:112
Eps * duplicate() const override
Definition Eps.cpp:16
ex derivative(const symbol &s) const override
Definition Eps.cpp:167
void accept(GiNaC::visitor &v) const override
Definition Eps.cpp:17
void print(const print_dflt &c, unsigned level=0) const
Definition Eps.cpp:96
ex & let_op(size_t i) override
Definition Eps.cpp:144
void archive(archive_node &n) const override
Definition Eps.cpp:149
static lst all(const ex &e)
size_t nops() const override
Definition Eps.cpp:140
static GiNaC::registered_class_info & get_class_info_static()
Definition Eps.cpp:14
friend B & dynallocate(Args &&... args)
basic inherited
Definition HEP.h:398
void read_archive(const archive_node &n) override
Definition Eps.cpp:156
exvector pis
Definition HEP.h:410
const GiNaC::registered_class_info & get_class_info() const override
Definition Eps.cpp:18
class for FCFormat Output
Definition HEP.h:71
static void ncmul_print(const ncmul &p, const FCFormat &c, unsigned level=0)
Definition Basic.cpp:163
const FCFormat & operator<<(const T &v) const
Definition HEP.h:77
class for FormFormat Output
Definition HEP.h:44
static void power_print(const power &p, const FormFormat &c, unsigned level=0)
Definition Basic.cpp:55
const FormFormat & operator<<(const T &v) const
Definition HEP.h:50
IBP base class for IBP reduction.
Definition IBP.h:24
virtual void visit(const Index &)=0
class for index object
Definition HEP.h:104
int compare_same_type(const GiNaC::basic &other) const override
Definition Basic.cpp:181
const char * class_name() const override
Definition Basic.cpp:177
static bool hasv(const ex &e)
Definition Basic.cpp:234
void archive(archive_node &n) const override
Definition Basic.cpp:208
bool is_equal_same_type(const basic &other) const override
Definition Basic.cpp:190
static GiNaC::registered_class_info & get_class_info_static()
Definition Basic.cpp:171
Symbol name
Definition HEP.h:133
Type type
Definition HEP.h:134
void print(const print_context &c, unsigned level=0) const
Definition Basic.cpp:196
void read_archive(const archive_node &n) override
Definition Basic.cpp:214
basic inherited
Definition HEP.h:117
static bool hasc(const ex &e)
Definition Basic.cpp:228
ex derivative(const symbol &s) const override
Definition Basic.cpp:224
const GiNaC::registered_class_info & get_class_info() const override
Definition Basic.cpp:175
Pair operator()(const Index &i)
Definition Basic.cpp:200
static GiNaC::exmap Dimension
Definition HEP.h:109
static lst all(const ex &e)
friend B & dynallocate(Args &&... args)
void accept(GiNaC::visitor &v) const override
Definition Basic.cpp:174
Index * duplicate() const override
Definition Basic.cpp:173
static bool has(const ex &e)
virtual ~visitor()
Definition Pair.cpp:16
virtual void visit(const Pair &)=0
class for Pair object
Definition HEP.h:322
void read_archive(const archive_node &n) override
Definition Pair.cpp:152
int compare_same_type(const GiNaC::basic &other) const override
Definition Pair.cpp:72
const GiNaC::registered_class_info & get_class_info() const override
Definition Pair.cpp:19
ex & let_op(size_t i) override
Definition Pair.cpp:129
static GiNaC::registered_class_info & get_class_info_static()
Definition Pair.cpp:15
ex eval() const override
Definition Pair.cpp:134
ex op(size_t i) const override
Definition Pair.cpp:126
void archive(archive_node &n) const override
Definition Pair.cpp:147
basic inherited
Definition HEP.h:334
size_t nops() const override
Definition Pair.cpp:125
static lst all(const ex &e)
void accept(GiNaC::visitor &v) const override
Definition Pair.cpp:18
ex derivative(const symbol &s) const override
Definition Pair.cpp:159
bool is_equal_same_type(const basic &other) const override
Definition Pair.cpp:81
void form_print(const FormFormat &c, unsigned level=0) const
FormFormat print function.
Definition Pair.cpp:102
void print(const print_dflt &c, unsigned level=0) const
default print function
Definition Pair.cpp:93
friend B & dynallocate(Args &&... args)
const char * class_name() const override
Definition Pair.cpp:21
void fc_print(const FCFormat &c, unsigned level=0) const
FCFormat print function.
Definition Pair.cpp:113
Pair * duplicate() const override
Definition Pair.cpp:17
static bool has(const ex &e)
virtual void visit(const SUNF4 &)=0
class for SUNF4 object
Definition HEP.h:278
void archive(archive_node &n) const override
save to archvie
Definition Basic.cpp:560
static GiNaC::registered_class_info & get_class_info_static()
Definition Basic.cpp:480
void form_print(const FormFormat &c, unsigned level=0) const
print the Form Format
Definition Basic.cpp:543
void accept(GiNaC::visitor &v) const override
Definition Basic.cpp:483
const GiNaC::registered_class_info & get_class_info() const override
Definition Basic.cpp:484
size_t nops() const override
Definition Basic.cpp:547
void fc_print(const FCFormat &c, unsigned level=0) const
Definition Basic.cpp:534
void print(const print_dflt &c, unsigned level=0) const
normal priint
Definition Basic.cpp:530
ex op(size_t i) const override
Definition Basic.cpp:548
ex & let_op(size_t i) override
Definition Basic.cpp:551
static lst all(const ex &e)
basic inherited
Definition HEP.h:290
SUNF4 * duplicate() const override
Definition Basic.cpp:482
ex ijkl[4]
Definition HEP.h:303
ex eval() const override
automatical evaluation of SUNF4
Definition Basic.cpp:513
ex derivative(const symbol &s) const override
set derivative of SUNF4 to 0
Definition Basic.cpp:590
static bool has(const ex &e)
bool is_equal_same_type(const basic &other) const override
Definition Basic.cpp:500
friend B & dynallocate(Args &&... args)
const char * class_name() const override
Definition Basic.cpp:486
void read_archive(const archive_node &n) override
read from archive
Definition Basic.cpp:572
int compare_same_type(const GiNaC::basic &other) const override
Definition Basic.cpp:490
virtual void visit(const SUNF &)=0
class for SUNF object
Definition HEP.h:233
void archive(archive_node &n) const override
Definition Basic.cpp:452
void print(const print_dflt &c, unsigned level=0) const
Definition Basic.cpp:431
static bool has(const ex &e)
const char * class_name() const override
Definition Basic.cpp:393
int compare_same_type(const GiNaC::basic &other) const override
Definition Basic.cpp:397
ex derivative(const symbol &s) const override
set derivative of SUNF to 0
Definition Basic.cpp:475
static lst all(const ex &e)
bool is_equal_same_type(const basic &other) const override
Definition Basic.cpp:407
void form_print(const FormFormat &c, unsigned level=0) const
Definition Basic.cpp:435
static GiNaC::registered_class_info & get_class_info_static()
Definition Basic.cpp:387
ex & let_op(size_t i) override
Definition Basic.cpp:447
SUNF * duplicate() const override
Definition Basic.cpp:389
ex eval() const override
Definition Basic.cpp:416
const GiNaC::registered_class_info & get_class_info() const override
Definition Basic.cpp:391
void read_archive(const archive_node &n) override
Definition Basic.cpp:459
size_t nops() const override
Definition Basic.cpp:443
void accept(GiNaC::visitor &v) const override
Definition Basic.cpp:390
basic inherited
Definition HEP.h:245
friend B & dynallocate(Args &&... args)
void fc_print(const FCFormat &c, unsigned level=0) const
Definition Basic.cpp:439
ex op(size_t i) const override
Definition Basic.cpp:444
ex ijk[3]
Definition HEP.h:258
virtual void visit(const SUNT &)=0
class for SUNT object
Definition HEP.h:189
static GiNaC::registered_class_info & get_class_info_static()
Definition Basic.cpp:299
bool is_equal_same_type(const basic &other) const override
Definition Basic.cpp:319
ex & let_op(size_t i) override
Definition Basic.cpp:351
void archive(archive_node &n) const override
Definition Basic.cpp:356
size_t nops() const override
Definition Basic.cpp:347
void form_print(const FormFormat &c, unsigned level=0) const
Definition Basic.cpp:328
ex op(size_t i) const override
Definition Basic.cpp:348
const GiNaC::registered_class_info & get_class_info() const override
Definition Basic.cpp:303
void fc_print(const FCFormat &c, unsigned level=0) const
Definition Basic.cpp:339
static bool has(const ex &e)
void print(const print_dflt &c, unsigned level=0) const
Definition Basic.cpp:343
static lst all(const ex &e)
int compare_same_type(const GiNaC::basic &other) const override
Definition Basic.cpp:309
void read_archive(const archive_node &n) override
Definition Basic.cpp:363
SUNT * duplicate() const override
Definition Basic.cpp:301
const char * class_name() const override
Definition Basic.cpp:305
void accept(GiNaC::visitor &v) const override
Definition Basic.cpp:302
friend B & dynallocate(Args &&... args)
ex derivative(const symbol &s) const override
Definition Basic.cpp:374
basic inherited
Definition HEP.h:201
ex aij[3]
Definition HEP.h:214
ex conjugate() const override
Definition Basic.cpp:378
class extended to GiNaC symbol class, represent a positive symbol
Definition BASIC.h:113
virtual void visit(const Vector &)=0
class for vector object
Definition HEP.h:149
Vector * duplicate() const override
Definition Basic.cpp:246
static lst all(const ex &e)
basic inherited
Definition HEP.h:161
bool is_equal_same_type(const basic &other) const override
Definition Basic.cpp:263
static bool has(const ex &e)
Pair operator()(const Vector &p)
Definition Basic.cpp:273
const char * class_name() const override
Definition Basic.cpp:250
ex derivative(const symbol &s) const override
Definition Basic.cpp:294
void print(const print_context &c, unsigned level=0) const
Definition Basic.cpp:269
static GiNaC::registered_class_info & get_class_info_static()
Definition Basic.cpp:244
int compare_same_type(const GiNaC::basic &other) const override
Definition Basic.cpp:254
friend B & dynallocate(Args &&... args)
void read_archive(const archive_node &n) override
Definition Basic.cpp:286
void accept(GiNaC::visitor &v) const override
Definition Basic.cpp:247
void archive(archive_node &n) const override
Definition Basic.cpp:281
const GiNaC::registered_class_info & get_class_info() const override
Definition Basic.cpp:248
Symbol name
Definition HEP.h:176
HepLib namespace.
Definition BASIC.cpp:17
ex SP2sp(const ex &exin)
convert SP(a,b) to sp(a,b)
Definition Pair.cpp:302
bool form_using_dim4
Definition Init.cpp:212
const int form_expand_tr
Definition Init.cpp:205
ex DoColor(const ex &expr, const ex &pref, int method)
Definition Basic.cpp:1132
ex sp(const ex &a, const ex &b)
translated the vector dot a.b to a*b, useful in SecDec
Definition Pair.cpp:237
exmap sp_map()
the SP_map with SP(a,b) replaced to sp(a,b)
Definition Pair.cpp:318
ex HomCACF(const ex &e)
Definition Basic.cpp:1090
const Symbol gs
ex AsGamma_mul_right(const ex &expr, const ex &pi_in)
Definition AsGamma.cpp:260
const int form_expand_none
Definition Init.cpp:204
ex AsGamma_mul_left(const ex &expr, const ex &pi_in)
Definition AsGamma.cpp:273
ex GMatShift(const ex &expr, const ex &g, bool to_right)
Definition Basic.cpp:861
exmap SP_map
Definition Init.cpp:182
ex ApartIR2F(const ex &expr_in)
convert ApartIR to F(ps, ns), ns is like FIRE convention
Definition Apart.cpp:61
ex ApartIRC(const ex &expr_in)
complete the ApartIR elements
Definition Apart.cpp:914
const Symbol ep
ex AsGamma_to(const ex &expr)
Definition AsGamma.cpp:286
void ApartIBP(exvector &air_vec, AIOption aio)
perform IBP reduction on the Aparted input
Definition ApartIBP.cpp:109
ex GMatSimplify(const ex &expr)
Definition Basic.cpp:912
int form_expand_mode
Definition Init.cpp:209
bool Apart_using_fermat
Definition Init.cpp:210
const int form_trace_all
Definition Init.cpp:199
ex GAS(const ex &expr, unsigned rl)
function similar to GAD/GSD in FeynClac
Definition DGamma.cpp:257
const int form_expand_ci
Definition Init.cpp:206
ex GMatExpand(const ex &expr_in)
Definition Basic.cpp:767
lst LoopUF(const IBP &ibp, const ex &idx)
UF function.
Definition IBP.cpp:318
ex ApartIR2ex(const ex &expr_in)
convert ApartIR to ex
Definition Apart.cpp:35
int form_trace_mode
Definition Init.cpp:202
bool form_using_su3
Definition Init.cpp:211
ex Contract(const ex &ei)
Definition Basic.cpp:732
ex F2ex(const ex &expr_in)
convert F(ps, ns) to normal ex, ns is like FIRE convention
Definition ApartIBP.cpp:87
const int form_trace_each_all
Definition Init.cpp:200
const Symbol vs
const Symbol d
void clearSP()
delete all assignment in SP_map
Definition Pair.cpp:293
const int form_expand_all
Definition Init.cpp:208
ex ToCACF(const ex &e)
Definition Basic.cpp:1063
const Symbol mu
ex & letSP(const ex &p1, const ex &p2)
return the reference of p1.p2
Definition Pair.cpp:252
FCFormat fcout
ex A0(const ex m2, int n, ex d)
scalar integral A0, devided by (2pi)^(4-2ep)
Definition ABCD.cpp:17
ex charge_conjugate(const ex &expr)
make the charge conjugate operaton, M -> C^{-1} . M^T . C w.r.t. a GMat object
Definition Form.cpp:637
bool form_using_gamma5
Definition Init.cpp:213
exmap ApartRules(const exvector &airs, bool irc)
Definition Apart.cpp:156
const int form_trace_each_each
Definition Init.cpp:201
ex ToCF(const ex &e)
Definition Basic.cpp:1028
lst vec2lst(const exvector &ev)
convert exvector to lst
Definition BASIC.cpp:902
const int form_trace_auto
Definition Init.cpp:198
bool IsZero(const ex &e)
ex Apart(const matrix &mat)
Apart on matrix.
Definition Apart.cpp:280
const Symbol nL
const Symbol nH
ex w1
Definition BASIC.h:499
ex ncmul_expand(const ex &expr)
Definition Basic.cpp:594
ex UnContract(const ex expr, const lst &loop_ps, const lst &ext_ps=lst{})
Definition TIR.cpp:43
const int form_expand_li
Definition Init.cpp:207
ex LC(ex pi1, ex pi2, ex pi3, ex pi4)
function similar to LCD in FeynCalc
Definition Eps.cpp:179
ex w2
Definition BASIC.h:499
ex form(const ex &iexpr, int verb)
evalulate expr in form program, see also the form_trace_mode and form_expand_mode
Definition Form.cpp:563
ex GMatContract(const ex &expr_in)
make contract on matrix, i.e., GMat(a,i1,i2)*GMat(b,i2,i3) -> GMat(a*b,i1,i3)
Definition Basic.cpp:622
ex TIR(const ex &expr_in, const lst &loop_ps, const lst &ext_ps)
Tensor Index Reduction, note that we only handle numerator.
Definition TIR.cpp:119
ex SP(const ex &a, bool use_map=false)
Definition Pair.cpp:166
std::function< lst(const IBP &, const ex &)> UF
Definition HEP.h:610
exmap smap
Definition HEP.h:599
bool CutFirst
Definition HEP.h:603
std::function< ex(const ex &, const ex &)> cv
Definition HEP.h:608
string SaveDir
Definition HEP.h:609
int IBPmethod
Definition HEP.h:595
bool ap_rules
Definition HEP.h:594
void init_smap()
Definition HEP.h:611
int pn_sector
Definition HEP.h:593
bool keep0F
Definition HEP.h:604