Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:09:56

0001 #ifndef ATOOLS_Phys_NLO_Types_H
0002 #define ATOOLS_Phys_NLO_Types_H
0003 
0004 #include <string>
0005 #include <iostream>
0006 
0007 namespace ATOOLS {
0008 
0009   struct nlo_type {
0010     enum code {
0011       lo   = 0,
0012       born = 1,
0013       loop = 2,
0014       vsub = 4,
0015       real = 8,
0016       rsub = 16
0017     };
0018   };// end of struct nlo_type
0019 
0020   inline nlo_type::code operator~(const nlo_type::code c1)
0021   { return (nlo_type::code)(~(int)c1); }
0022   inline nlo_type::code operator|(const nlo_type::code c1,
0023                                   const nlo_type::code c2)
0024   { return (nlo_type::code)((int)c1|(int)c2); }
0025   inline const nlo_type::code &operator|=(nlo_type::code &c1,
0026                                           const nlo_type::code c2)
0027   { return c1=(nlo_type::code)((int)c1|(int)c2); }
0028   inline nlo_type::code operator&(const nlo_type::code c1,
0029                                   const nlo_type::code c2)
0030   { return (nlo_type::code)((int)c1&(int)c2); }
0031   inline const nlo_type::code &operator&=(nlo_type::code &c1,
0032                                           const nlo_type::code c2)
0033   { return c1=(nlo_type::code)((int)c1&(int)c2); }
0034 
0035   std::ostream &operator<<(std::ostream &str,const nlo_type::code &c);
0036   std::istream &operator>>(std::istream &str,nlo_type::code &c);
0037 
0038   struct asscontrib {
0039     enum type {
0040       none = 0,
0041       EW   = 1,
0042       LO1  = 2,
0043       LO2  = 4,
0044       LO3  = 8
0045     };
0046   };
0047 
0048   inline asscontrib::type operator|(const asscontrib::type at1,
0049                                  const asscontrib::type at2)
0050   { return (asscontrib::type)((int)at1|(int)at2); }
0051   inline const asscontrib::type &operator|=(asscontrib::type &at1,
0052                                          const asscontrib::type at2)
0053   { return at1=(asscontrib::type)((int)at1|(int)at2); }
0054   inline asscontrib::type operator&(const asscontrib::type at1,
0055                                  const asscontrib::type at2)
0056   { return (asscontrib::type)((int)at1&(int)at2); }
0057   inline const asscontrib::type &operator&=(asscontrib::type &at1,
0058                                          const asscontrib::type at2)
0059   { return at1=(asscontrib::type)((int)at1&(int)at2); }
0060   inline asscontrib::type operator^(const asscontrib::type at1,
0061                                  const asscontrib::type at2)
0062   { return (asscontrib::type)((int)at1^(int)at2); }
0063   inline const asscontrib::type &operator^=(asscontrib::type &at1,
0064                                          const asscontrib::type at2)
0065   { return at1=(asscontrib::type)((int)at1^(int)at2); }
0066 
0067   std::ostream & operator<<(std::ostream & s,const asscontrib::type & at);
0068   std::istream & operator>>(std::istream & s,asscontrib::type &at);
0069 
0070   struct nlo_mode {
0071     enum code {
0072       none       = 0,
0073       fixedorder = 1,
0074       powheg     = 2,
0075       mcatnlo    = 3,
0076       yfs        = 4,
0077       unknown    = 99
0078     };
0079   };// end of struct nlo_type
0080 
0081   std::ostream &operator<<(std::ostream &str,const nlo_mode::code &c);
0082   std::istream &operator>>(std::istream &str,nlo_mode::code &c);
0083 
0084   struct vtype {
0085     enum type {
0086       none          = 0,
0087       devidedByBorn = 1,
0088       includesI     = 2,
0089       needsCoupling = 4
0090     };
0091   };// end of struct nlo_type
0092 
0093   inline vtype::type operator|(const vtype::type vt1,
0094                                const vtype::type vt2)
0095   { return (vtype::type)((int)vt1|(int)vt2); }
0096   inline const vtype::type &operator|=(vtype::type &vt1,
0097                                        const vtype::type vt2)
0098   { return vt1=(vtype::type)((int)vt1|(int)vt2); }
0099   inline vtype::type operator&(const vtype::type vt1,
0100                                const vtype::type vt2)
0101   { return (vtype::type)((int)vt1&(int)vt2); }
0102   inline const vtype::type &operator&=(vtype::type &vt1,
0103                                        const vtype::type vt2)
0104   { return vt1=(vtype::type)((int)vt1&(int)vt2); }
0105 
0106   std::ostream &operator<<(std::ostream &str,const vtype::type &vt);
0107   std::istream &operator>>(std::istream &str,vtype::type &vt);
0108 
0109   struct cs_itype {
0110     enum type {
0111       none = 0,
0112       I    = 1,
0113       K    = 2,
0114       P    = 4
0115     };
0116   };// end of struct cs_itype
0117 
0118   inline cs_itype::type operator|(const cs_itype::type csit1,
0119                                   const cs_itype::type csit2)
0120   { return (cs_itype::type)((int)csit1|(int)csit2); }
0121   inline const cs_itype::type &operator|=(cs_itype::type &csit1,
0122                                           const cs_itype::type csit2)
0123   { return csit1=(cs_itype::type)((int)csit1|(int)csit2); }
0124   inline cs_itype::type operator&(const cs_itype::type csit1,
0125                                   const cs_itype::type csit2)
0126   { return (cs_itype::type)((int)csit1&(int)csit2); }
0127   inline const cs_itype::type &operator&=(cs_itype::type &csit1,
0128                                           const cs_itype::type csit2)
0129   { return csit1=(cs_itype::type)((int)csit1&(int)csit2); }
0130 
0131   std::ostream &operator<<(std::ostream &str,const cs_itype::type &csit);
0132   std::istream &operator>>(std::istream &str,cs_itype::type &csit);
0133 
0134   struct cs_kcontrib {
0135     enum type {
0136       none = 0,
0137       Kb   = 1,
0138       KFS  = 2,
0139       t    = 4,
0140       Kt   = 8
0141     };
0142   };// end of struct cs_kcontrib
0143 
0144   inline cs_kcontrib::type operator|(const cs_kcontrib::type csit1,
0145                                      const cs_kcontrib::type csit2)
0146   { return (cs_kcontrib::type)((int)csit1|(int)csit2); }
0147   inline const cs_kcontrib::type &operator|=(cs_kcontrib::type &csit1,
0148                                              const cs_kcontrib::type csit2)
0149   { return csit1=(cs_kcontrib::type)((int)csit1|(int)csit2); }
0150   inline cs_kcontrib::type operator&(const cs_kcontrib::type csit1,
0151                                      const cs_kcontrib::type csit2)
0152   { return (cs_kcontrib::type)((int)csit1&(int)csit2); }
0153   inline const cs_kcontrib::type &operator&=(cs_kcontrib::type &csit1,
0154                                              const cs_kcontrib::type csit2)
0155   { return csit1=(cs_kcontrib::type)((int)csit1&(int)csit2); }
0156 
0157   std::ostream &operator<<(std::ostream &str,const cs_kcontrib::type &csit);
0158   std::istream &operator>>(std::istream &str,cs_kcontrib::type &csit);
0159 
0160   struct sbt {
0161     enum subtype {
0162       none = 0,
0163       qcd  = 1,
0164       qed  = 2
0165     };
0166   };// end of struct sbt
0167 
0168   inline sbt::subtype operator|(const sbt::subtype s1,const sbt::subtype s2)
0169   { return (sbt::subtype)((int)s1|(int)s2); }
0170   inline const sbt::subtype &operator|=(sbt::subtype &s1,const sbt::subtype s2)
0171   { return s1=(sbt::subtype)((int)s1|(int)s2); }
0172   inline sbt::subtype operator&(const sbt::subtype s1,const sbt::subtype s2)
0173   { return (sbt::subtype)((int)s1&(int)s2); }
0174   inline const sbt::subtype &operator&=(sbt::subtype &s1,const sbt::subtype s2)
0175   { return s1=(sbt::subtype)((int)s1&(int)s2); }
0176   inline sbt::subtype operator^(const sbt::subtype s1,const sbt::subtype s2)
0177   { return (sbt::subtype)((int)s1^(int)s2); }
0178   inline const sbt::subtype &operator^=(sbt::subtype &s1,const sbt::subtype s2)
0179   { return s1=(sbt::subtype)((int)s1^(int)s2); }
0180   std::ostream &operator<<(std::ostream &ostr,const sbt::subtype &st);
0181   std::istream &operator>>(std::istream &str,sbt::subtype &st);
0182 
0183   struct subscheme {
0184     enum code {
0185       CS        = 0,
0186       Dire      = 1,
0187       CSS       = 2
0188     };
0189   };// end of struct subtraction_variant
0190 
0191   std::ostream &operator<<(std::ostream &ostr,const subscheme::code &ss);
0192   std::istream &operator>>(std::istream &str,subscheme::code &ss);
0193 
0194   struct dpt {
0195     enum dipoletype {
0196       none = 0,
0197       f_f  = 1,
0198       f_i  = 2,
0199       i_f  = 3,
0200       i_i  = 4,
0201       f_fm = 5,
0202       f_im = 6,
0203       i_fm = 7
0204     };
0205   };// end of struct dpt
0206 
0207   std::ostream &operator<<(std::ostream &ostr,const dpt::dipoletype &dt);
0208 
0209   struct spt {
0210     enum splittingtype {
0211       // g - gluon, q - quark, s - squark, G - gluino, V - massive vector
0212       none  = 0,
0213       q2qg  = 1,
0214       q2gq  = 2,
0215       g2qq  = 3,
0216       g2gg  = 4,
0217       s2sg  = 5,
0218       s2gs  = 6,
0219       G2Gg  = 7,
0220       G2gG  = 8,
0221       V2Vg  = 9,
0222       V2gV  = 10
0223     };
0224   };// end of struct spt
0225 
0226   std::ostream &operator<<(std::ostream &ostr,const spt::splittingtype &st);
0227 
0228   struct ist {
0229     enum itype {
0230       // g - gluon, q - quark
0231       none  = 0,
0232       q     = 1,
0233       g     = 2,
0234       Q     = 3,
0235       V     = 4,
0236       sQ    = 5,
0237       sG    = 6
0238     };
0239   };// end of struct ist
0240 
0241   std::ostream &operator<<(std::ostream &ostr,const ist::itype &it);
0242 
0243 }
0244 
0245 #endif