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