BOSS 8.0.0
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
20mode==0: ppbar
21mode==1: nnbar
22mode==2: Lambda0 anti-Lambda0
23mode==3: Sigma0 anti-Sigma0
24mode==4: Lambda0 anti-Sigma0
25mode==5: Sigma0 anti-Lambda0
26mode==6: pi+ pi-
27mode==7: pi+ pi- pi0
28mode==8: K+K- pi0
29mode==9: KsK+pi-
30mode==10: KsK-pi+
31mode==11: K+K-eta
32mode==12: 2(pi+pi-)
33mode==13: pi+pi-2pi0
34mode==14: K+K-pi+pi-
35mode==15: K+K-2pi0
36mode==16: 2(K+K-)
37mode==17: 2(pi+pi-)pi0
38mode==18: 2(pi+pi-)eta
39mode==19: K+K-pi+pi-pi0
40mode==20: K+K-pi+pi-eta
41mode==21: 3(pi+pi-)
42mode==22: 2(pi+pi-pi0)
43mode==23: phi eta
44mode==24: phi pi0
45mode==25: K+K*-
46mode==26: K-K*+
47mode==27: K_SK*0-bar
48mode==28: K*0(892)K+pi-
49mode==29: K*0(892)K-pi+
50mode==30: K*+K-pi0
51mode==31: K*-K+pi0
52mode==32: K_2*(1430)0 K+pi-
53mode==33: K_2*(1430)0 K-pi+
54mode==34: K+K-rho
55mode==35: phi pi+pi-
56mode==36: phi f0(980)
57mode==37: eta pi+pi-
58mode==38: omega pi+ pi-
59mode==39: omega f0(980)
60mode==40: eta' pi+ pi-
61mode==41: f_1(1285)pi+pi-
62mode==42: omega K+K-
63mode==43: omega pi+pi-pi0
64mode==44: Sigma+ Sigma- (Sigma0 Sigma0-bar SU(3) extention )
65mode==45: K+K-
66mode==46: K_S K_L
67mode==47: omega eta
68mode==48: phi eta'
69mode==49: phi K+K-
70mode==50: ppbar pi0
71mode==51: ppbar eta
72mode==52: omega pi0
73
74mode==70: D0 anti-D0
75mode==71: D+D-
76mode==72: D+D*-
77mode==73: D-D*+
78mode==74: D*+D*-
79mode==68: D0 anti-D*0
80mode==69: anti-D0 D*0
81mode==67: D*0 anti-D*0
82
83mode==59: D0 anti-D0 pi0
84mode==63: D+D-pi0
85mode==75: D0D-pi+
86mode==76: anti-D0 D+pi-
87
88mode==77: D0D*-pi+
89mode==78: anti-D0 D*+pi-
90mode==65: D-D*0pi+
91mode==66: D+ anti-D*0pi-
92mode==60: anti-D0 D*0pi0
93mode==61: D0 anti-D*0pi0
94mode==62: D+D*-pi0
95mode==64: D-D*+pi0
96
97mode==90: pi+pi- J/psi
98mode==92: pi0pi0 J/psi
99mode==91: pi+pi- psi(2S)
100mode==79: pi0pi0 psi(2S)
101mode==80: eta J/psi
102mode==81: pi+pi- h_c
103mode==82: pi0pi0 h_c
104mode==83: K+K- J/psi
105mode==84: KsKs J/psi
106
107mode==93: D_s+ D_s-
108mode==94: D_s^{*+}D_s^-
109mode==95: D_s^{*-}D_s^+
110mode==85: D_s^{*+}D_s^{*-}
111
112mode==96: Lambda_c+ anti-Lamba_c-
113//---
114*************************************/
115//
116#ifndef EVTXSECTION_HH
117#define EVTXSECTION_HH
118
120#include "../EvtGenBase/EvtId.hh"
121#include <algorithm>
122#include <fstream>
123#include <iostream>
124#include <math.h>
125#include <ostream>
126#include <stdlib.h>
127#include <string.h>
128#include <string>
129#include <vector>
130using namespace std;
131
133public:
134 EvtXsection( std::vector<EvtId> evtdaugs ) {
135 xx.clear();
136 yy.clear();
137 er.clear();
138 _mode = getMode( evtdaugs );
139 ini_data( _mode );
140 }
141 EvtXsection( int mode ) {
142 xx.clear();
143 yy.clear();
144 er.clear();
145 _mode = mode;
146 if ( mode >= 0 ) { ini_data( _mode ); }
147 else if ( mode == -1 )
148 { // calculate the correction factor with Breit-wigner
149 _unit = "nb";
150 }
151 else if ( mode == -2 )
152 { // users provide the cross section list
153 // std::cout<<"user diy"<<std::endl;
154 ini_data_diy();
155 }
156 else if ( mode == -100 )
157 { // multi-exclusive modes
158 _unit = "nb";
159 }
160 // std::cout<<"The mode is : "<<_mode<<", "<<xx[0]<<", "<<yy[0]<<std::endl;
161 }
162
163 virtual ~EvtXsection();
164
165 int getMode( std::vector<EvtId> evtdaugs );
166 void ini_data0( int mode ); // exper. cross section data table
167 void ini_data( int mode ); // fitted results on the cross section of expe. xsection
168 void ini_data_diy();
169 void ini_data_multimode();
170 double getXsection( double mx );
171 double getErr( double mx );
172 double Xsection_a( double mx ); // for bin given by up and lower edge
173 double Xsection_b( double mx ); // for bin given by a center value
174 double Xsection_c( double mx ); // for xsection calculated with breit-wigner
175
176 double Err_a( double mx ); // for bin given by up and lower edge
177 double Err_b( double mx ); // for bin given by a center value
178
179 int getXBin( double mx, std::vector<double> vy );
180 int getXBin_a( double mx ); // for bin given by up and lower edge
181 int getXBin_b( double mx ); // for bin given by a center value
182 std::string getUnit() { return _unit; }
183
184 std::vector<double> getXX() { return xx; }
185 std::vector<double> getYY() { return yy; }
186 std::vector<double> getEr() { return er; }
187 double getXup() { return xx[nbins - 1]; }
188 double getXlw() { return xx[0]; }
189 std::string getMsg() { return msg; }
190 void setBW( int pdg );
191 void setFile( std::string name ) { file = name; }
192 double getVP( double mx );
193 void ReadVP();
194 void setModes( std::vector<int> vmd );
195
196private:
197 // e+e- --> ppbar mode, xsection taken from PRD73,012005
198 std::vector<double> xx, yy, er;
199 int nbins, _mode;
200 std::string _unit, msg;
201 // calculate cross section with Breit-Wigner
202 int pdgcode;
203 double bree;
204 // user provide xsection list
205 std::string file;
206 std::vector<double> vpx, vpr, vpi;
207 std::vector<int> _vmd;
208};
209
210#endif
int getXBin(double mx, std::vector< double > vy)
void ini_data(int mode)
EvtXsection(std::vector< EvtId > evtdaugs)
void ini_data0(int mode)
double Xsection_b(double mx)
double Err_b(double mx)
virtual ~EvtXsection()
double getXlw()
int getXBin_a(double mx)
double getErr(double mx)
double Xsection_a(double mx)
std::string getMsg()
void setModes(std::vector< int > vmd)
int getMode(std::vector< EvtId > evtdaugs)
std::vector< double > getEr()
void ini_data_diy()
double Err_a(double mx)
void ini_data_multimode()
void setFile(std::string name)
double getXup()
std::string getUnit()
int getXBin_b(double mx)
double getXsection(double mx)
double getVP(double mx)
std::vector< double > getYY()
void setBW(int pdg)
void ReadVP()
double Xsection_c(double mx)
std::vector< double > getXX()
EvtXsection(int mode)