sospin is hosted by Hepforge, IPPP Durham

SO(4) example

  1. $\left\langle{\Psi_{1a}^{\ast}}|\,B\,| \Psi_{1b} \right\rangle{}$

  2. #include <sospin/son.h>
    using namespace sospin;

    int main(int argc, char *argv[]){

    setDim(4);

    Braket left = bra(0,M(a),identity);
    left +=bra(0,Mb(a)*e_(l,m)/2,b(m)*b(l));
    Braket right = ket(0,M(b),identity);
    right +=ket(0,Mb(b)*e_(i,j)/2,bt(i)*bt(j));

    Braket res = left * Bop() * right;
    res.evaluate(false);

    Field(M, 0, 0, ASYM_WITH_FLAVOR);
    Field(Mb, 0, 0, ASYM_WITH_FLAVOR);
    newId("a"); newId("b");

    unsetFormIndexSum();

    CallForm(res,false, true, "j");

    res.setON();
    std::cout << "Result:\n" << res << std::endl;
    res.setOFF();

    CleanGlobalDecl();
    exit(0);
    }


    • Output result:

    • Local R1 = + M(a) * Mb(b);
      Local R2 = - Mb(a) * M(b);

  3. $\sum^4_{\mu=1}\left\langle{\Psi_{1a}^{\ast}}|\,B\,\Gamma_{\mu}|{\Psi_{2b}}\right\rangle \left\langle{\Psi_{1c}^{\ast}}|\,B\,\Gamma_{\mu}|{\Psi_{2d}}\right\rangle$

  4. #include <sospin/son.h>
    using namespace sospin;

    int main(int argc, char *argv[]){

    setDim(4);

    Braket L1, R1, L2, R2;
    Braket in1E, in1O, in2E, in2O, res;

    L1 = bra(0,M(a),identity);
    L1+= bra(0,Mb(a)*e_(i,j)/2,b(j)*b(i));
    R1 = ket(0,N10(b,k),bt(k));

    L2 = bra(0,M(c),identity);
    L2+= bra(0,Mb(c)*e_(l,m)/2,b(m)*b(l));
    R2 = ket(0,N10(d,o),bt(o));

    Field(M, 0, 0, ASYM_WITH_FLAVOR);

    Field(Mb, 0, 0, ASYM_WITH_FLAVOR);
    Field(N, 1, 0, ASYM_WITH_FLAVOR);

    newId("a"); newId("b");
    newId("c"); newId("d");
    in1E = L1 * Bop("i") * G(true, "j") * R1;
    in2E = L2 * Bop("k") * G(true, "j") * R2;
    in1O = L1 * Bop("i") * G(false,"j") * R1;
    in2O = L2 * Bop("k") * G(false,"j") * R2;

    in1E.evaluate();
    in2E.evaluate();
    in1O.evaluate();
    in2O.evaluate();

    res = in1E * in2E + in1O * in2O ;

    unsetFormIndexSum();
    CallForm(res,false, true, "i");

    res.setON();
    std::cout << "Output result:\n" << res << std::endl;

    CleanGlobalDecl();

    exit(0);
    }


    • Output result:

    • Local R1 = +2*M(a)*N10(b,i)*Mb(c)*N10(d,j)*e_(i,j);
      Local R2 = -2*Mb(a)*N10(b,i)*M(c)*N10(d,j)*e_(i,j);