BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtXsection.hh
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of models developed at BES collaboration
5// based on the EvtGen framework. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/BesCopyright
9// Copyright (A) 2006 Ping Rong-Gang @IHEP
10//
11// Module: EvtXsection.hh
12//
13// Description: To define cross section for the continuum exclusive process
14// Experimental cross section taken from PRD73,012005, PRD76,092006, also
15// see a review: Rev. Mod. Phys. 83,1545
16// Modification history:
17//
18// Ping R.-G. Nov., 2012 Module created
19//
20 /*******************--- mode definition: also see EvtXsection.cc
21 0: ppbar
22 1: nnbar
23 2: Lambda0 anti-Lambda0
24 3: Sigma0 anti-Sigma0
25 4: Lambda0 anti-Sigma0
26 5: Sigma0 anti-Lambda0
27 6: pi+ pi-
28 7: pi+ pi- pi0
29 8: K+K- pi0
30 9: KsK+pi-
31 10: KsK-pi+
32 11: K+K-eta
33 12: 2(pi+pi-)
34 13: pi+pi-2pi0
35 14: K+K-pi+pi-
36 15: K+K-2pi0
37 16: 2(K+K-)
38 17: 2(pi+pi-)pi0
39 18: 2(pi+pi-)eta
40 19: K+K-pi+pi-pi0
41 20: K+K-pi+pi-eta
42 21: 3(pi+pi-)
43 22: 2(pi+pi-pi0)
44 23: phi eta
45 24: phi pi0
46 25: K+K*-
47 26: K-K*+
48 27: K_SK*0-bar
49 28: K*0(892)K+pi-
50 29: K*0(892)K-pi+
51 30: K*+K-pi0
52 31: K*-K+pi0
53 32: K_2*(1430)0 K+pi-
54 33: K_2*(1430)0 K-pi+
55 34: K+K-rho
56 35: phi pi+pi-
57 36: phi f0(980)
58 37: eta pi+pi-
59 38: omega pi+ pi-
60 39: omega f0(980)
61 40: eta' pi+ pi-
62 41: f_1(1285)pi+pi-
63 42: omega K+K-
64 43: omega pi+pi-pi0
65 44: Sigma+ Sigma- (Sigma0 Sigma0-bar SU(3) extention )
66 45: K+K-
67 46: K_S K_L
68
69 70: D0D0-bar
70 71: D+D-
71 72: D+D*-
72 73: D-D*+
73 74: D*+D*-
74 75: D0D-pi+
75 76: D0D+pi-
76 77: D0D*-pi+
77 78: D0D*+pi-
78 79: Lambda_c+ Lambda_c-
79
80
81 90: J/psi pi+ pi-
82 91: psi(2S)pi+pi-
83 92: J/psi K+K-
84 93: D_s+ D_s-
85 94: D_s^{*+}D_s^-
86 95: D_s^{*-}D_s^+
87
88 *************************************/
89//------------------------------------------------------------------------
90//
91#ifndef EVTXSECTION_HH
92#define EVTXSECTION_HH
93
94#include <math.h>
95#include <string.h>
96#include <stdlib.h>
97#include <string>
98#include <vector>
99#include <ostream>
100#include <fstream>
101#include <iostream>
102#include <algorithm>
103#include "EvtGenBase/EvtId.hh"
105using namespace std;
106
108 public:
109 EvtXsection(std::vector<EvtId> evtdaugs){
110 xx.clear();yy.clear();er.clear();
111 _mode = getMode(evtdaugs);
112 ini_data(_mode);
113
114 }
115 EvtXsection(int mode){
116 xx.clear();yy.clear();er.clear();
117 _mode = mode;
118 if(mode>=0){
119 ini_data(_mode);
120 }else if(mode==-1){//calculate the correction factor with Breit-wigner
121 _unit="nb";
122 }else if(mode==-2){//users provide the cross section list
123 //std::cout<<"user diy"<<std::endl;
124 ini_data_diy();
125 }
126 //std::cout<<"The mode is : "<<_mode<<", "<<xx[0]<<", "<<yy[0]<<std::endl;
127 }
128
129 virtual ~EvtXsection();
130
131 int getMode(std::vector<EvtId> evtdaugs);
132 void ini_data0(int mode); // exper. cross section data table
133 void ini_data(int mode); // fitted results on the cross section of expe. xsection
134 void ini_data_diy();
135 double getXsection(double mx);
136 double getErr(double mx);
137 double Xsection_a(double mx);//for bin given by up and lower edge
138 double Xsection_b(double mx);//for bin given by a center value
139 double Xsection_c(double mx);//for xsection calculated with breit-wigner
140
141 double Err_a(double mx);//for bin given by up and lower edge
142 double Err_b(double mx);//for bin given by a center value
143
144 int getXBin(double mx,std::vector<double> vy);
145 int getXBin_a(double mx );//for bin given by up and lower edge
146 int getXBin_b(double mx );//for bin given by a center value
147 std::string getUnit(){return _unit;}
148
149 std::vector<double> getXX(){return xx;}
150 std::vector<double> getYY(){return yy;}
151 std::vector<double> getEr(){return er;}
152 double getXup(){return xx[nbins-1];}
153 double getXlw(){return xx[0];}
154 std::string getMsg(){return msg;}
155 void setBW(int pdg);
156 void setFile(std::string name){file = name;}
157 double getVP(double mx);
158 void ReadVP();
159 private:
160//e+e- --> ppbar mode, xsection taken from PRD73,012005
161 std::vector<double> xx,yy,er;
162 int nbins,_mode;
163 std::string _unit,msg;
164 // calculate cross section with Breit-Wigner
165 int pdgcode;
166 double bree;
167 // user provide xsection list
168 std::string file;
169 std::vector<double> vpx,vpr,vpi;
170};
171
172#endif
int getXBin(double mx, std::vector< double > vy)
void ini_data(int mode)
EvtXsection(std::vector< EvtId > evtdaugs)
Definition: EvtXsection.hh:109
void ini_data0(int mode)
Definition: EvtXsection.cc:103
double Xsection_b(double mx)
double Err_b(double mx)
virtual ~EvtXsection()
Definition: EvtXsection.cc:101
double getXlw()
Definition: EvtXsection.hh:153
int getXBin_a(double mx)
double getErr(double mx)
double Xsection_a(double mx)
std::string getMsg()
Definition: EvtXsection.hh:154
int getMode(std::vector< EvtId > evtdaugs)
std::vector< double > getEr()
Definition: EvtXsection.hh:151
void ini_data_diy()
double Err_a(double mx)
void setFile(std::string name)
Definition: EvtXsection.hh:156
double getXup()
Definition: EvtXsection.hh:152
std::string getUnit()
Definition: EvtXsection.hh:147
int getXBin_b(double mx)
double getXsection(double mx)
double getVP(double mx)
std::vector< double > getYY()
Definition: EvtXsection.hh:150
void setBW(int pdg)
void ReadVP()
double Xsection_c(double mx)
std::vector< double > getXX()
Definition: EvtXsection.hh:149
EvtXsection(int mode)
Definition: EvtXsection.hh:115