100#include "EvtGenModels/EvtFitXsection.dat"
104 xx.clear();yy.clear();er.clear();
11899 xx.clear();yy.clear();er.clear();
11900 ifstream file(
"xs_user.txt");
11902 cout <<
"EvtXsection.cc: The input file not found. The default file name should be xs_user.txt!"<<std::endl;
11905 double xm,xs,xs_er;
11906 while(!
file.eof()){
11907 file>>xm>>xs>>xs_er;
11911 er.push_back(xs_er);
11923 xx.clear();yy.clear();er.clear();
11924 if(_vmd.size()==0){std::cout<<
"EvtXsection::ini_data_multimode: No mode indexes are available"<<std::endl; abort();}
11927 for(
int i=0;i<_vmd.size();i++){
11934 std::cout<<
"The low and up end of multimodes: "<<xL<<
" ~"<<xU<<std::endl;
11940 std::vector<double>uxx,uyy,uer;
11941 uxx.clear();uyy.clear();uer.clear();
11942 for(
double xxm=xL;xxm<xU;xxm+=stp){
11946 for(
int i=0;i<_vmd.size();i++){
11948 std::string myunit=
getUnit();
11949 if(myunit==
"pb"){ mypb=0.001;}
else{mypb=1;}
11951 xs_er+= mypb*
getErr(xxm);
11956 uer.push_back(xs_er);
11959 xx.clear();yy.clear();er.clear();
11960 for(
int i=0;i<uxx.size();i++){
11961 xx.push_back(uxx[i]);yy.push_back(uyy[i]);er.push_back(uer[i]);
11969 msg=
"multi-exclusive mode";
11987 int pp[2]={-2212,2212};
11988 int nn[2]={-2112,2112};
11989 int pipi[2]={-211,211};
11990 int pi3[3]={-211,111,211};
11991 int kkpi0[3]={-321,111,321};
11992 int kskpi[3]={-211,310,321};
11994 std::vector<int> vson;vson.clear();
11995 for(
int i=0;i<evtdaugs.size();i++){vson.push_back(
EvtPDL::getStdHep(evtdaugs[i]) );}
11996 sort(vson.begin(),vson.end(),
mysort);
11998 if(vson.size() ==2 ){
11999 if(vson[0]==pp[0] && vson[1]==pp[1] ) {
return 0;}
12000 if(vson[0]==nn[0] && vson[1]==nn[1] ) {
return 1;}
12001 if(vson[0]==pipi[0] && vson[1]==pipi[1] ) {
return 2;}
12002 }
else if(vson.size()==3){
12022 if (mx <= xx[0])
return 0.;
12023 if (mx > xx[nbins])
return 0.;
12031 if (mx <= xx[0])
return 0.;
12032 if (mx > xx[nbins-1])
return 0.;
12034 double ylow = yy[thebin];
12035 double yup = yy[thebin+1];
12037 double xlow = xx[thebin];
12038 double xup = xx[thebin+1];
12040 double yi=ylow + (yup-ylow)/(
xup-
xlow)*(mx-
xlow);
12046 if(_mode == -1)
return 0.;
12047 if (mx <= xx[0])
return er[0];
12048 if (mx > xx[nbins])
return 0.;
12056 if (mx <= xx[0])
return er[0];
12057 if (mx > xx[nbins-1])
return 0.;
12059 double ylow = er[thebin];
12060 double yup = er[thebin+1];
12062 double xlow = xx[thebin];
12063 double xup = xx[thebin+1];
12065 double yi=ylow + (yup-ylow)/(
xup-
xlow)*(mx-
xlow);
12073 if(mx <= xx[0])
return 0;
12074 if(mx > xx[nbins])
return nbins;
12075 for(
int i=0;i<
nbins;i++){
12076 if(mx <= xx[i+1] && mx > xx[i])
return i;
12081 if(mx <= xx[0])
return 0;
12082 if(mx > xx[nbins-1])
return nbins;
12083 for(
int i=0;i<nbins-1;i++){
12084 if(mx <= xx[i+1] && mx > xx[i])
return i;
12089 double nbins = vy.size();
12090 if(vy[0]<mx || mx<vy[
nbins-1]) {std::cout<<
"Outside vacuum pol. value"<<std::endl;abort();}
12091 for(
int i=0;i<
nbins-1;i++){
12092 if(mx <= vy[i+1] && mx > vy[i])
return i;
12097 double pi=3.1415926;
12103 double width2 = width*width;
12104 double br = (
s - mass2)*(
s - mass2) + mass2 * width2;
12106 double sigma = 12*
pi*bree*width2/br;
12107 double nbar = 4E05;
12108 double thexs = sigma*nbar;
12124 double xstp=(maxM-minM)/100.;
12125 xx.clear();yy.clear();er.clear();
12126 for(
int i=0;i<100;i++){
12129 EvtComplex bw=1./(m*m-meanM*meanM+im*m*width);
12130 double amps =
abs2(bw);
12131 xx.push_back(m); yy.push_back(amps); er.push_back(0.);
12138 for(
int i=0;i<vmd.size();i++){
12139 _vmd.push_back(vmd[i]);
double abs2(const EvtComplex &c)
DOUBLE_PRECISION xlow[20]
static double getWidth(EvtId i)
static int getStdHep(EvtId id)
static double getMeanMass(EvtId i)
static EvtId evtIdFromStdHep(int stdhep)
static double getMinMass(EvtId i)
static double getMaxMass(EvtId i)
int getXBin(double mx, std::vector< double > vy)
double Xsection_b(double mx)
double Xsection_a(double mx)
void setModes(std::vector< int > vmd)
int getMode(std::vector< EvtId > evtdaugs)
void ini_data_multimode()
double getXsection(double mx)
double Xsection_c(double mx)
bool operator()(int i, int j)