4 Replies - 1257 Views - Last Post: 24 November 2011 - 08:07 AM Rate Topic: -----

#1 radomir  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 24-November 11

error: expected primary-expression before . token

Posted 24 November 2011 - 03:38 AM

Hi all
For a week I have been trying to fix some code errors I need for my PhD simulations. I use a program called LoopTools which calls fortran functions from C++ source code. I am working on Ubuntu 64 bits.
I installed libstreams-dev f2c for77 from synaptic with no results, also taken out "using namespace std".
Any suggestions will be appreciated

The error I get when trying to compile is the following while running make:

/home/radomir/LoopTools-2.6/x86_64-Linux/bin/fcc -I/home/radomir/LoopTools-2.6/x86_64-Linux/include -c z1mass.cc
+ c++ -I/home/radomir/LoopTools-2.6/x86_64-Linux/include z1mass.cc -c
z1mass.cc: In the function ‘double z1mass()’:
z1mass.cc:11:1: error: expected primary-exp<b></b>ression before ‘.’ token
z1mass.cc:11:2: error: expected unqualified-id before ‘.’ token
z1mass.cc:11:3: error: expected unqualified-id before ‘/’ token
z1mass.cc:11:4: error: expected primary-exp<b></b>ression before ‘.’ token
z1mass.cc:11:5: error: expected unqualified-id before ‘.’ token
z1mass.cc:11:6: error: expected unqualified-id before ‘/’ token
z1mass.cc:11:7: error: ‘includes’ was not declared in this scope
z1mass.cc:11:16: error: ‘declarations’ was not declared in this scope
z1mass.cc:11:31: error: expected ‘;’ before ‘Line’
make: *** [z1mass.o] Error 1



The double z1mass() is the fortran function c++ is calling and giving me these errors.

Here is the makefile


LT = /home/radomir/LoopTools-2.6/x86_64-Linux
CXXFLAGS = -I$(LT)/include
LIBS = $(LT)/lib64/libooptools.a -lstdc++
#CXXFLAGS = -I/usr/local/LoopTools/include
#CXXFLAGS = -I/home/radomir/LoopTools-2.7/x86_64-Linux/include
#LIBS = -L/usr/local/lib -looptools -lg2c
#LIBS = -L/home/radomir/LoopTools-2.7/x86_64-Linux/lib64 -looptools -lg2c
OBJS = z1mass.o z2mass.o w1mass.o w2mass.o w1w1.o electronDeltaR.o \
muonDeltaR.o neutrino1.o neutrino2.o vertexENuW.o vertexMuNuW.o \
electron.o vertexEEga.o gaz1.o gaz2.o photon.o box.o
OBJS1 = z1mass.o
SRC = $(patsubst %.o,%.cc,$(OBJS))

FORMPATH = ../../includes:../../procedures
export FORMPATH

lrnum: $(OBJS) main.o loop.o
# g++ -o lrnum $(OBJS) main.o loop.o $(LIBS)
$(LT)/bin/fcc -o lrnum $(OBJS) main.o loop.o $(LIBS)
%.o: %.cc vars.h
# g++ $(CXXFLAGS) -c $(@:.o=.cc)
$(LT)/bin/fcc $(CXXFLAGS) -c $(@:.o=.cc)

%.cc: %.res cxxreform.h
@echo "#include <math.h>" > $@
@echo "#include <cstdlib>" >> $@
@echo "#include <cstdio>" >> $@
@echo "#include <string>" >> $@
@echo "#include <fstream>" >> $@
@echo "#include <iostream>" >> $@
@echo "#include \"vars.h\"" >> $@
@echo "double $(@:.cc=)()" >> $@
@echo "{" >> $@
@echo " double exp;" >> $@
@echo "#-" > temp.frm
@echo "#: continuationlines 10000" >> temp.frm
@echo "#include declarations.h" >> temp.frm
@echo "Off Statistics;" >> temp.frm
@echo "load $(@:.cc=.res);" >> temp.frm
@echo "l exp=$(@:.cc=);" >> temp.frm
@echo "#include cxxreform.h" >> temp.frm
@./form3.0 temp.frm | sed -ne '/=/,$$ p' >> $@
@echo " return exp;" >> $@
@echo "}" >> $@
# @-rm -f temp.frm

z1mass: z1mass.res cxxreform.h
@echo "#include <math.h>" > cc.cc
@echo "#include <cstdlib>" >> cc.cc
@echo "#include <cstdio>" >> cc.cc
@echo "#include <string>" >> cc.cc
@echo "#include <fstream>" >> cc.cc
@echo "#include <iostream>" >> cc.cc
@echo "#include \"vars.h\"" >> cc.cc
@echo "double z1mass()" >> cc.cc
@echo "{" >> cc.cc
@echo " double exp;" >> cc.cc
@echo "#-" > temp.frm
@echo "#: continuationlines 10000" >> temp.frm
@echo "#include declarations.h" >> temp.frm
@echo "Off Statistics;" >> temp.frm
@echo "load z1mass.res;" >> temp.frm
@echo "l exp=z1mass;" >> temp.frm
@echo "#include cxxreform.h" >> temp.frm
@./form3.0 temp.frm | sed -ne '/=/,$$ p' >> cc.cc
@echo " return exp;" >> cc.cc
@echo "}" >> cc.cc
# @-rm -f temp.frm

z1massN: cc.cc vars.h
# g++ $(CXXFLAGS) -c $(@:.o=.cc)
$(LT)/bin/fcc $(CXXFLAGS) cc.cc main.cc loop.cc $(LIBS)

clean:
-rm -f *~ $(SRC) *.o xformxx* lrnum

[\code]

and the main.cc

[code]

#include <cmath>
#include <string>
#include <fstream>
#include <iostream>
#include <strstream>
#include "vars.h"
#include "clooptools.h"
//using namespace std;

double XPoCo, Xpw1, XpA, Xpz1, Xpw2, Xpz2, LL, RR, LR, RL;
double ka1, vr, sw, cw, s, c, sgn, cgn, g, gp, mw1, mz1, mz2, mw2, mw2s, mz2s, mz1s, mw1s, e;
double sq2tw, sm, cm, deltaZL, deltaZR, vergl, vergr;
double mh00, mh01, mh02, mh03, ma01, ma02, mh1, mh2, mhh1, mhh2;
double mLep1, mLep2, mLep3, mNu1, mNu2, mNu3, mNu4, mNu5, mNu6;
double mDo1, mDo2, mDo3, mUp1, mUp2, mUp3;
double mDo1s,mDo2s,mDo3s,mUp1s,mUp2s,mUp3s,mLep1s,mLep2s,mLep3s;
double mNu1s,mNu2s,mNu3s, mNu4s, mNu5s, mNu6s;
double mh00s, mh01s, mh02s, mh03s,ma01s, ma02s;
double mh1s, mh2s,mhh1s, mhh2s;
double sq2 = sqrt(2.);
double alpha = 1./137.;
double gnuZ1L, gnuZ2L, gupZ1L, gupZ2L, gupZ1R, gupZ2R, gupA ;
double gdownZ1L, gdownZ2L, gdownZ1R, gdownZ2R, gdownA;
// elementy stale
void
init_parameters()
{

mLep1 = 5.e-4;
mLep2 = 0.1;
mLep3 = 1.77;
mNu1 = 0.;
mNu2 = 0.;
mNu3 = 0.;

mDo1 = 2.e-3;
mDo2 = 0.1;
mDo3 = 4.;
mUp1 = 2.e-3;
mUp2 = 1.2;
mUp3 = 175.;

mLep1s = mLep1*mLep1;
mLep2s = mLep2*mLep2;
mLep3s = mLep3*mLep3;
mNu1s = 0.;
mNu2s = 0.;
mNu3s = 0.;
mDo1s = mDo1*mDo1;
mDo2s = mDo2*mDo2;
mDo3s = mDo3*mDo3;
mUp1s = mUp1*mUp1;
mUp2s = mUp2*mUp2;
mUp3s = mUp3*mUp3;

mw1 = 80.451;
mz1 = 91.1875;
mw1s = mw1*mw1;
mz1s = mz1*mz1;
e = sqrt(4.*M_PI*alpha);
Xpw1 = 0.;
Xpz1 = 0.;
XpA = 0.;
Xpw2 = 0.;
Xpz2 = 0.;
XPoCo = 1.;
}

void
set_parameters(double V)
{
vr = V;

// the mixing angles

double e2 = e*e;
double vr2 = vr*vr;

sw = sqrt((-mz1s*(-2.*mw1s+mz1s+e2*vr2)
+sqrt(+4.*e2*mz1s*(4.*mw1s-2.*mz1s)*(-mw1s+mz1s)*vr2
+mz1s*mz1s*(-2.*mw1s+mz1s+e2*vr2)*(-2.*mw1s+mz1s+e2*vr2)))
/(4.*mw1s-2.*mz1s)/2.)/mz1;

cw = sqrt(1.-sw*sw);

// the coupling constants

sq2tw = sqrt(cw*cw-sw*sw);
g = e/sw;
gp = e/sq2tw;

// light mass scale

ka1=2.*mw1/g;

// heavy boson masses

mw2 = g/2.*sqrt(ka1*ka1+2*vr*vr);
mz2 = sqrt((g*g*ka1*ka1+2.*vr*vr*(g*g+gp*gp))
+sqrt((g*g*ka1*ka1+2.*vr*vr*(g*g+gp*gp))
*(g*g*ka1*ka1+2.*vr*vr*(g*g+gp*gp))
-4.*g*g*(g*g+2.*gp*gp)*ka1*ka1*vr*vr))/2.;

mw2s = mw2*mw2;
mz2s = mz2*mz2;

// remaining mixing angles

sm =sw/cw;
cm = sq2tw/cw;

double mixphi = -g*g*ka1*ka1*sqrt(cw*cw-sw*sw)/(2.*cw*cw*(mz2s-mz1s));
double phi = asin(mixphi)/2.;
s = sin(phi);
c = cos(phi);

cgn = -gp*c*vr*cw/(sw*mz2);
sgn = gp*s*vr*cw/(sw*mz1);

gnuZ1L = (c-s*sw*sw/sq2tw)/(2.*sw*cw);
gnuZ2L = (s+c*sw*sw/sq2tw)/(2.*sw*cw);


gupZ1L = (c*(1.-4./3.*sw*sw)+s/3.*sw*sw/sq2tw)/(2.*sw*cw);
gupZ2L = (s*(1-4./3.*sw*sw)-c/3.*sw*sw/sq2tw)/(2.*sw*cw);
gupA = 2./3.;
gupZ1R = (-c*4./3.*sw*sw+s*2./sq2tw*(2./3.*sw*sw-cw*cw/2.))/(2.*sw*cw);
gupZ2R = (-s*4./3.*sw*sw-c*2./sq2tw*(2./3.*sw*sw-cw*cw/2))/(2.*sw*cw);

gdownZ1L = (c*(-1.+2./3.*sw*sw)+s/3.*sw*sw/sq2tw)/(2.*sw*cw);
gdownZ2L = (s*(-1+2./3.*sw*sw)-c/3.*sw*sw/sq2tw)/(2.*sw*cw);
gdownA = -1./3.;
gdownZ1R = (c*2./3.*sw*sw+s*2./sq2tw*(-1./3.*sw*sw+cw*cw/2.))/(2.*sw*cw);
gdownZ2R = (s*2./3.*sw*sw-c*2./sq2tw*(-1./3.*sw*sw+cw*cw/2.))/(2.*sw*cw);


}
void
set_heavy_masses(double mNu, double mH00, double mH01, double mH02)
{
// heavy neutrinos

mNu4 = mNu;
mNu5 = mNu;
mNu6 = mNu;

mNu4s = mNu4*mNu4;
mNu5s = mNu5*mNu5;
mNu6s = mNu6*mNu6;

// heavy scalars

mh00 = mH00;
mh01 = mH01;
mh02 = mH02;

mh00s=mh00*mh00;
mh01s=mh01*mh01;
mh02s=mh02*mh02;


}

double
delta_sw2()
{
//uwaga!! dzielone przez -1 - bo wxmass = - deltamass!!!!!!!!!!
double heavy_scale = mz1s+mz2s-mw1s-mw2s;

double delta =
+2.*cw*cw*(z2mass()+z1mass()-w2mass()-w1mass())
+(+((mw1s+mw2s)*(z2mass()+z1mass())+(mz2s+mz1s)*(w1mass()+w2mass()))
-((2.*mz1s+mz2s)*z1mass()+(2.*mz2s+mz1s)*z2mass()))/heavy_scale/2.;

delta /= -heavy_scale;

return delta;
}

double
delta_charge()
{
deltaZL = .5;
deltaZR = .5;
vergl = .5;
vergr = .5;

double delta =
-(+photon()/2.+(electron()-vertexEEga())
+gaz1()/(4.*sw*cw)/mz1s*(c*(-1.+4.*sw*sw)+s*(1.-4.*sw*sw)/sq2tw)
+gaz2()/(4.*sw*cw)/mz2s*(s*(-1.+4.*sw*sw)-c*(1.-4.*sw*sw)/sq2tw));

return delta;
}

double delta_s()
{

double delta = (2.*sq2tw/(cw*cw)/(mz1s-mz2s)*(-w1mass())

-2.*mw1s*sq2tw/(cw*cw)/(mz1s-mz2s)/(mz1s-mz2s)*(-z1mass())

+2.*mw1s*sq2tw/(cw*cw)/(mz1s-mz2s)/(mz1s-mz2s)*(-z2mass())

-2.*mw1s*sw*sw/(cw*cw*cw*cw)/(mz1s-mz2s)/sq2tw*delta_sw2())*c/2./(c*c-s*s);

return delta;
}


double verNuNuZ1()
{
deltaZL = 1.;
deltaZR = 0.;
vergl = 1.;
vergr = 0.;
double exp = vertexNuNuZ1()
+(z1mass()-z1z1())/2./mz1s*gnuZ1L

+neutrino1()*gnuZ1L

+z1z2mz1()/(mz1s-mz2s)*gnuZ2L

+delta_charge()*gnuZ1L

+delta_sw2()*(-c*sq2tw*sq2tw*sq2tw*sq2tw*sq2tw+s*sw*sw*(-1+2*sw*sw*sw*sw))/(4.*sw*sw*sw*cw*cw*cw*sq2tw*sq2tw*sq2tw)

-delta_s()*(s/c+sw*sw/sq2tw)/2./sw/cw;



return exp;
}
//////////////////////////////////////////////////
// UpL
//////////////////////////////////////////////////
double verUpUpZ1L()
{
deltaZL = 1.;
deltaZR = 0.;
vergl = 1.;
vergr = 0.;



double exp = vertexUpUpZ1()/3.

+(z1mass()-z1z1())/2./mz1s*gupZ1L

+Up()/3.*gupZ1L

+delta_charge()*gupZ1L

+delta_sw2()*(c*sq2tw*sq2tw*sq2tw*(2.*sw*sw-3.)+s*(-2.*sw*sw*sw*sw*sw*sw+sw*sw))/(12.*sq2tw*sq2tw*sq2tw*cw*cw*cw*sw*sw*sw)

+delta_s()*(c*sw*sw+s*sq2tw*(-3.+4.*sw*sw))/(6.*c*cw*sw*sq2tw)

+gaz1mz1()/mz1s*gupA //bo w przypadku elektronu "-" oznaczal jego ladunek

+z1z2mz1()*gupZ2L/(mz1s-mz2s);

return exp;
}

double upL()
{
LL=1.;
RR=0.;
LR=0.;
RL=0.;

double delta = verUpUpZ1L()*gnuZ1L

+verNuNuZ1()*gupZ1L

+(z1z2()+(z1z2mz1()*mz2s-z1z2mz2()*mz1s)/(mz1s-mz2s))/(-mz2s)*gnuZ1L*gupZ2L

+(z1z2()+(z1z2mz1()*mz2s-z1z2mz2()*mz1s)/(mz1s-mz2s))/(-mz2s)*gnuZ2L*gupZ1L

+(pochgaz1()+(-gaz1mz1()+gaz1())/mz1s)*gnuZ1L*gupA

+boxUpUpNuNu();
delta += vertexNuNuga()*gupA*(-mz1s);
return delta;
}
//////////////////////////////////////////////////
// UpR
//////////////////////////////////////////////////
double verUpUpZ1R()
{
deltaZL = 0.;
deltaZR = 1.;
vergl = 0.;
vergr = 1.;



double exp = vertexUpUpZ1()/3.

+(z1mass()-z1z1())/2./mz1s*gupZ1R

+Up()/3.*gupZ1R

+delta_charge()*gupZ1R

+delta_sw2()*(4.*c*sq2tw*sw*sw*(-1.+2.*sw*sw)+s*(3.-11.*sw*sw+18.*sw*sw*sw*sw-14.*sw*sw*sw*sw*sw*sw))/(12.*sq2tw*sq2tw*sq2tw*cw*cw*cw*sw*sw*sw)

+delta_s()*(4.*s*sq2tw*sw*sw+c*(-3.+7.*sw*sw))/(6.*c*cw*sq2tw*sw)

+gaz1mz1()/mz1s*gupA //bo w przypadku elektronu "-" oznaczal jego ladunek

+z1z2mz1()*gupZ2R/(mz1s-mz2s);

return exp;
}

double upR()
{
LL=0.;
RR=0.;
LR=1.;
RL=0.;

double delta = verUpUpZ1R()*gnuZ1L

+verNuNuZ1()*gupZ1R

+(z1z2()+(z1z2mz1()*mz2s-z1z2mz2()*mz1s)/(mz1s-mz2s))/(-mz2s)*gnuZ1L*gupZ2R

+(z1z2()+(z1z2mz1()*mz2s-z1z2mz2()*mz1s)/(mz1s-mz2s))/(-mz2s)*gnuZ2L*gupZ1R

+(pochgaz1()+(-gaz1mz1()+gaz1())/mz1s)*gnuZ1L*gupA

+boxUpUpNuNu();
delta += vertexNuNuga()*gupA*(-mz1s);
return delta;
}
//////////////////////////////////////////////////
// DownL
//////////////////////////////////////////////////
double verDoDoZ1L()
{
deltaZL = 1.;
deltaZR = 0.;
vergl = 1.;
vergr = 0.;



double exp = vertexDoDoZ1()/3.

+(z1mass()-z1z1())/2./mz1s*gdownZ1L

+Do()/3.*gdownZ1L

+delta_charge()*gdownZ1L

+delta_sw2()*(c*sq2tw*sq2tw*sq2tw*(3.-4.*sw*sw)+s*(sw*sw-2.*sw*sw*sw*sw*sw*sw))/(12.*sq2tw*sq2tw*sq2tw*cw*cw*cw*sw*sw*sw)

+delta_s()*(s*sq2tw*(3.-2.*sw*sw)+c*sw*sw)/(6.*c*cw*sq2tw*sw)

+gaz1mz1()/mz1s*gdownA //bo w przypadku elektronu "-" oznaczal jego ladunek

+z1z2mz1()*gdownZ2L/(mz1s-mz2s);

return exp;
}

double downL()
{
LL=1.;
RR=0.;
LR=0.;
RL=0.;

double delta = verDoDoZ1L()*gnuZ1L

+verNuNuZ1()*gdownZ1L

+(z1z2()+(z1z2mz1()*mz2s-z1z2mz2()*mz1s)/(mz1s-mz2s))/(-mz2s)*gnuZ1L*gdownZ2L

+(z1z2()+(z1z2mz1()*mz2s-z1z2mz2()*mz1s)/(mz1s-mz2s))/(-mz2s)*gnuZ2L*gdownZ1L

+(pochgaz1()+(-gaz1mz1()+gaz1())/mz1s)*gnuZ1L*gdownA

+boxDoDoNuNu();
delta += vertexNuNuga()*gdownA*(-mz1s);
return delta;
}
//////////////////////////////////////////////////
// DownR
//////////////////////////////////////////////////
double verDoDoZ1R()
{
deltaZL = 0.;
deltaZR = 1.;
vergl = 0.;
vergr = 1.;



double exp = vertexDoDoZ1()/3.

+(z1mass()-z1z1())/2./mz1s*gdownZ1R

+Do()/3.*gdownZ1R

+delta_charge()*gdownZ1R

+delta_sw2()*(2.*c*sw*sw*sq2tw*sq2tw*sq2tw+s*(-3.+13.*sw*sw-18.*sw*sw*sw*sw+10.*sw*sw*sw*sw*sw*sw))/(12.*sq2tw*sq2tw*sq2tw*cw*cw*cw*sw*sw*sw)

+delta_s()*(c*(3.-5.*sw*sw)-2.*s*sq2tw*sw*sw)/(6.*c*cw*sq2tw*sw)

+gaz1mz1()/mz1s*gdownA //bo w przypadku elektronu "-" oznaczal jego ladunek

+z1z2mz1()*gdownZ2R/(mz1s-mz2s);

return exp;
}

double downR()
{
LL=0.;
RR=0.;
LR=1.;
RL=0.;

double delta =verDoDoZ1R()*gnuZ1L

+verNuNuZ1()*gdownZ1R

+(z1z2()+(z1z2mz1()*mz2s-z1z2mz2()*mz1s)/(mz1s-mz2s))/(-mz2s)*gnuZ1L*gdownZ2R

+(z1z2()+(z1z2mz1()*mz2s-z1z2mz2()*mz1s)/(mz1s-mz2s))/(-mz2s)*gnuZ2L*gdownZ1R

+(pochgaz1()+(-gaz1mz1()+gaz1())/mz1s)*gnuZ1L*gdownA

+boxDoDoNuNu();
delta += vertexNuNuga()*gdownA*(-mz1s);
return delta;
}

/******************************************************************************
* *
* main *
* *
******************************************************************************/

int main()
{


init_parameters();
ltini();

int option;

cout << "Opcje:\n\n\t"
<< "Delta e: 1\n\t"
<< "Boxy: 2\n\t"
<< "Wierzcholek Nu Nu Gamma: 3\n\t"
<< "Example: 4\n\t"
<< "Pelne epsilony: 5\n\t"
<< "Wykresy: 6\n\n";
//!!!
cin >> option;
//option=4;

if (option > 6)
{
cerr << "no such option" << endl;
// exit(1);
}

if (option < 6)
{
double mu;

cout << "Wprowadz skale renormalizacji: " << endl;

cin >> mu;
// mu = 1.;

setmudim(mu);

// for (double V = 300; V <= 500000; V += 10000)
for (double V = 200; V <= 5000; V += 500)
{
set_parameters(V);
// set_heavy_masses(2000, 115, vr/sq2, vr*sq2);
set_heavy_masses(sq2*V, 115, 5000, 5000);
// set_heavy_masses(sq2*V, 115, V, V);

switch (option)
{
case 1:
cout << vr << "\t" << delta_charge() << endl;
break;

case 2:
{
double boxupL, boxupR, boxdownL, boxdownR;
{
LL=1.;
LR=0.;
RL=0.;
RR=0.;
boxupL = boxUpUpNuNu()*alpha/(4.*M_PI);
boxdownL = boxDoDoNuNu()*alpha/(4.*M_PI);
}
{
LL=0.;
LR=1.;
RL=0.;
RR=0.;
boxupR = boxUpUpNuNu()*alpha/(4.*M_PI);
boxdownR = boxDoDoNuNu()*alpha/(4.*M_PI);
}
cout << vr
<< " boxupL=" << boxupL
<< " boxupR=" << boxupR
<< " boxdownL=" << boxdownL
<< " boxdownR=" << boxdownR
<<endl;
break;
}
case 3:
{
deltaZL = 1.;
deltaZR = 0.;
vergl = 1.;
vergr = 0.;
cout << vr << "\t" << vertexNuNuga()*alpha/(4.*M_PI)<<endl;
}
break;

case 4:
{
set_parameters(V);
set_heavy_masses(2000,5000,5000,5000);
cout << vr

<< " " <<
(gnuZ1L*gdownZ1L+downL()*alpha/(4.*M_PI)+(0.0593168+0.0347473*sqrt(1-mw1s/mz1s)*mz1/mw1)*gnuZ1L*gdownZ1L)*2.*mw1s/mz1s*(1-mw1s/mz1s)-1*(-1./2.+1./3.*(1-mw1s/mz1s))
<<endl;
}
break;


case 5:
cout << vr

// << " upL="
<< " "
<< (gnuZ1L*gupZ1L+upL()*alpha/(4.*M_PI)+(0.0593168+0.0347473*sqrt(1-mw1s/mz1s)*mz1/mw1)*gnuZ1L*gupZ1L)*2.*mw1s/mz1s*(1-mw1s/mz1s)-1*(1./2-2./3.*(1-mw1s/mz1s))
// << " upR="
<< " "
<< (gnuZ1L*gupZ1R+upR()*alpha/(4.*M_PI)+(0.0593168+0.0347473*sqrt(1-mw1s/mz1s)*mz1/mw1)*gnuZ1L*gupZ1R)*2.*mw1s/mz1s*(1-mw1s/mz1s)-1*(-2./3.*(1-mw1s/mz1s))
// << " downL="
<< " "
<< (gnuZ1L*gdownZ1L+downL()*alpha/(4.*M_PI)+(0.0593168+0.0347473*sqrt(1-mw1s/mz1s)*mz1/mw1)*gnuZ1L*gdownZ1L)*2.*mw1s/mz1s*(1-mw1s/mz1s)-1*(-1./2.+1./3.*(1-mw1s/mz1s))
// << " downR="
<< " "
<< (gnuZ1L*gdownZ1R+downR()*alpha/(4.*M_PI)+(0.0593168+0.0347473*sqrt(1-mw1s/mz1s)*mz1/mw1)*gnuZ1L*gdownZ1R)*2.*mw1s/mz1s*(1-mw1s/mz1s)-1*(1./3.*(1-mw1s/mz1s))
<< endl;
break;
}
}

return 0;
}

const int n_nu_masses = 3;
double nu_mass[] = {100, 500, 2000};

// dla pelnych obserwabli
//////////////////////////////////////////////////
// UpL
//////////////////////////////////////////////////
ofstream epsupL("wykresy_dane/epsupLnew.dat");

for (double V = 200; V < 5000; V += 20)
{
set_parameters(V);
epsupL << vr;

for (int i = 0; i < n_nu_masses; ++i)
{
set_heavy_masses( nu_mass[i], 115, vr/sq2, vr*sq2);

epsupL << '\t' << upL();
}

epsupL << '\n';
}

epsupL.close();
//////////////////////////////////////////////////
// UpR
//////////////////////////////////////////////////
ofstream epsupR("wykresy_dane/epsupRnew.dat");

for (double V = 200; V < 5000; V += 20)
{
set_parameters(V);
epsupR << vr;

for (int i = 0; i < n_nu_masses; ++i)
{
set_heavy_masses( nu_mass[i], 115, vr/sq2, vr*sq2);

epsupR << '\t' << upR();
}

epsupR << '\n';
}

epsupR.close();

//////////////////////////////////////////////////
// DownL
//////////////////////////////////////////////////
ofstream epsdownL("wykresy_dane/epsdownLnew.dat");

for (double V = 200; V < 5000; V += 20)
{
set_parameters(V);
epsdownL << vr;

for (int i = 0; i < n_nu_masses; ++i)
{
set_heavy_masses( nu_mass[i], 115, vr/sq2, vr*sq2);

epsdownL << '\t' << downL();
}

epsdownL << '\n';
}

epsdownL.close();
//////////////////////////////////////////////////
// DownR
//////////////////////////////////////////////////
ofstream epsdownR("wykresy_dane/epsdornRnew.dat");

for (double V = 200; V < 5000; V += 20)
{
set_parameters(V);
epsdownR << vr;

for (int i = 0; i < n_nu_masses; ++i)
{
set_heavy_masses( nu_mass[i], 115, vr/sq2, vr*sq2);

epsdownR << '\t' << downR();
}

epsdownR << '\n';
}

epsdownR.close();

ltexi();
return 0;
}



This post has been edited by stayscrisp: 24 November 2011 - 06:18 AM
Reason for edit:: Code tags!!


Is This A Good Question/Topic? 1
  • +

Replies To: error: expected primary-expression before . token

#2 Karel-Lodewijk  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 449
  • View blog
  • Posts: 849
  • Joined: 17-March 11

Re: error: expected primary-expression before . token

Posted 24 November 2011 - 03:50 AM

The error is clearly in z1mass.cc, which I assume is auto generated. This generated file however should exist somewhere, try to open it in a text editor, look at the lines it complains about and try to figure out what went wrong during the auto generation process.

This post has been edited by Karel-Lodewijk: 24 November 2011 - 03:50 AM

Was This Post Helpful? 0
  • +
  • -

#3 radomir  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 24-November 11

Re: error: expected primary-expression before . token

Posted 24 November 2011 - 03:53 AM

View PostKarel-Lodewijk, on 24 November 2011 - 03:50 AM, said:

The error is clearly in z1mass.cc, which I assume is auto generated. This generated file however should exist somewhere, try to open it in a text editor, look at the lines it complains about and try to figure out what went wrong during the auto generation process.


Hi
Thanks for your answer
I already did these days, but the file doesn't exist. And yes, I think it is autogenerated.
Regards
Was This Post Helpful? 0
  • +
  • -

#4 Karel-Lodewijk  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 449
  • View blog
  • Posts: 849
  • Joined: 17-March 11

Re: error: expected primary-expression before . token

Posted 24 November 2011 - 04:13 AM

Looking through your makefile I see where it would have been generated but I don't see why it would be deleted other than by running make clean. It should be right there in the directory from which you run make I think.

If not, these lines in the make file generate it:

@echo "#include <math.h>" > $@
@echo "#include <cstdlib>" >> $@
@echo "#include <cstdio>" >> $@
@echo "#include <string>" >> $@
@echo "#include <fstream>" >> $@
@echo "#include <iostream>" >> $@
@echo "#include \"vars.h\"" >> $@
@echo "double $(@:.cc=)()" >> $@
@echo "{" >> $@
@echo " double exp;" >> $@
@echo "#-" > temp.frm
@echo "#: continuationlines 10000" >> temp.frm
@echo "#include declarations.h" >> temp.frm
@echo "Off Statistics;" >> temp.frm
@echo "load $(@:.cc=.res);" >> temp.frm
@echo "l exp=$(@:.cc=);" >> temp.frm
@echo "#include cxxreform.h" >> temp.frm
@./form3.0 temp.frm | sed -ne '/=/,$$ p' >> $@
@echo " return exp;" >> $@
@echo "}" >> $@



replace $@ with z1mass.cc, remove the @ at the beginning of every line and run it on the command line in the same directory as z1mass.res and form3.0. Don't worry about your code in main.cc at the moment. The make doesn't even get there yet.

This post has been edited by Karel-Lodewijk: 24 November 2011 - 04:23 AM

Was This Post Helpful? 0
  • +
  • -

#5 radomir  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 24-November 11

Re: error: expected primary-expression before . token

Posted 24 November 2011 - 08:07 AM

Same error.
The interesting thing is that this code works on other machines, so perhaps is related with the version of my gcc or some libraries not installed. But I don't know which can be missing.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1