funcoes={ch1[s_]->1/sw2/cw2*s*(s-mz^2)/((s-mz^2)^2+gz^2*mz^2),\
	 ch2[s_]->1/sw2^2/cw2^2*s^2/((s-mz^2)^2+gz^2*mz^2)}

dsig[t_,s_]:=alf^2/(4 s) ( Qf^2 (1 + Cos[t]^2) 
-2 Qf ch1[s] ( gve*gvf*(1 + Cos[t]^2) + 2 gae*gaf*Cos[t])
+ch2[s] (gvf^2*(gve^2+gae^2)*(1+Cos[t]^2) 
        +gaf^2*(gve^2+gae^2)*(1+Cos[t]^2)
        +8gae*gve*gaf*gvf*Cos[t]))

dsigx[x_,s_]:=dsig[t,s] /. Cos[t]->x

sigtotal[s_]:=Integrate[2 Pi dsigx[x,s],{x,-1,1}] 

sigf[s_]:=Integrate[2 Pi dsigx[x,s],{x,0,1}] 

sigb[s_]:=Integrate[2 Pi dsigx[x,s],{x,-1,0}] 

afb=Simplify[(sigf[s]-sigb[s])/sigtotal[s]] 

afb1=afb /. funcoes

afb2=afb1 /. s->rs^2

const1={sw2->0.23,mz->91.2,gz->2.5,gae->-1/4}
const2={cw2->1-sw2,gve->-1/4+sw2} /. const1
c3muao={gvf->1/4*Qf/Abs[Qf]-Qf*sw2,gaf->1/4*Qf/Abs[Qf]} /. Flatten[{Qf->-1,const1}]
c3up={gvf->1/4*Qf/Abs[Qf]-Qf*sw2,gaf->1/4*Qf/Abs[Qf]} /. Flatten[{Qf->2/3,const1}]
c3down={gvf->1/4*Qf/Abs[Qf]-Qf*sw2,gaf->1/4*Qf/Abs[Qf]} /. Flatten[{Qf->-1/3,const1}]

cmuao=Flatten[{const1,const2,c3muao,Qf->-1}] ;
cup=Flatten[{const1,const2,c3up,Qf->2/3}] ;
cdown=Flatten[{const1,const2,c3down,Qf->-1/3}] ;


afbmuao=afb2 /. cmuao ;
afbup=afb2   /.cup ;
afbdown=afb2 /.cdown ;


(*  Graficos *)

Print["Grafico da AFB para o muao"]
Plot[afbmuao,{rs,70,110}]
afbmuaoMz=afbmuao /.rs->91.2
Print["AFB muao @ Mz=",afbmuaoMz] 

Print["Grafico da AFB para o quark up"]
Plot[afbup,{rs,70,110}]
afbupMz=afbup /.rs->91.2
Print["AFB up @ Mz=",afbupMz] 


Print["Grafico da AFB para o quark down"]
Plot[afbdown,{rs,70,110}]
afbdownMz=afbdown /.rs->91.2
Print["AFB down @ Mz=",afbdownMz] 




