BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtConExc.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 For cross section, see Ref. Rev.Mod. Phys.83,1545
115 *************************************/
116//------------------------------------------------------------------------
117//
118#ifndef EVTCONEXC_HH
119#define EVTCONEXC_HH
120
121//#include <string.h>
122#include "EvtGenBase/EvtId.hh"
125//------ including root
126#include "TH1.h"
127#include "TH2.h"
128#include "TH3.h"
129#include "TFile.h"
130#include "TROOT.h"
131#include "TTree.h"
132#include "TGraphErrors.h"
133#include "TDirectory.h"
134
135class EvtParticle;
137
139
140public:
141
143 } //constructor
144 //---
145 virtual ~EvtConExc();
146
147 void getName(std::string& name);
148
150
151 void initProbMax();
152
153 void init();
154 void init_Br_ee();
155
156 void decay(EvtParticle *p);
157 void init_mode(int mode);
158 double gamHXSection(EvtParticle* p, double El, double Eh, int nmc=100000);
159 double gamHXSection(double s, double El, double Eh, int nmc=100000);
160 double gamHXSection(double El, double Eh);
161 double gamHXSection(double El, double Eh,int mode);
162 double gamHXSection_er(double El,double Eh);
163
164 void findMaxXS(EvtParticle *p);
165 double difgamXs(EvtParticle* p); //differential cross section for gamma + hadrons
166 double difgamXs(double mhds,double sintheta);
167 double Mhad_sampling(double *x,double *y);
168 double ISR_ang_integrate(double x,double theta);
169 double ISR_ang_sampling(double x);
171 void SetP4(EvtParticle *part, double mhdr,double xeng, double theta); //set the gamma and gamma* momentum according sampled results
172 void SetP4Rvalue(EvtParticle *part, double mhdr,double xeng, double theta); //set the gamma and gamma* momentum according sampled results
173 bool gam_sampling(EvtParticle *p);
174 bool xs_sampling(double xs);
175 bool xs_sampling(double xs,double xs1);
176 bool baryon_sampling(EvtVector4R pcm, EvtVector4R pi);//baryon angular distri. 1+cos^2\theta
177 bool meson_sampling(EvtVector4R pcm, EvtVector4R pi); //meson angular distri. sin^2\theta
178 bool VP_sampling(EvtVector4R pcm, EvtVector4R pi); //VP ang. dist. 1+cos^2theta
179 bool angularSampling(EvtParticle* part);
180 bool photonSampling(EvtParticle* part);
181 double baryonAng(double mx);
182 double Rad1(double s, double x);
183 double Rad2(double s, double x);
184 double Rad2difXs(EvtParticle *p);
185 double Rad2difXs(double s, double x);
186 double Rad2difXs(double s, double x, EvtXsection* myxsection);
187 double Rad1difXs(EvtParticle *p);
188 double Ros_xs(double mx, double bree,EvtId pid);
190 static double _cms; //energy of CMS of ee beam
191 static double XS_max;// maxium of cross section in experiment
192 static double SetMthr;
193
194 static int getMode;
195 double Li2(double x);
196 double SoftPhoton_xs(double s,double b);
197 double lgr(double *x,double *y,int n,double t);
198 bool islgr(double *x,double *y,int n,double t);
199 double LLr(double *x,double *y,int n,double t);
200 int selectMode(std::vector<int> vmod, double mhds);
201 void findMaxXS(double mhds );
202 bool gam_sampling(double mhds,double sintheta);
203 void resetResMass();
204 void getResMass();
205 bool checkdecay(EvtParticle* p);
206 double sumExc(double mx);
207 void showResMass();
208 int getNdaugs(){return _ndaugs;}
209 EvtId* getDaugId(){return daugs;}
210 int getSelectedMode(){return _selectedMode;}
212 double narrowRXS(double mxL,double mxH);
213 double selectMass();
214 double addNarrowRXS(double mhi, double binwidth);
215 void ReadVP();
216 double getVP(double cms);
217 void mk_VXS(double Esig,double Egamcut,double EgamH,int midx); //make a set of observed cross section for exclusive processes,including narrow resonance
218 int get_mode_index(int mode);
219 double getObsXsection(double mhds,int mode);
220 double Egam2Mhds(double Egam);
221 std::vector<EvtId> get_mode(int mode);
222 void writeDecayTabel();
223 void checkEvtRatio();
224 int getModeIndex(int m);
225 std::string commandName();
226 void command(std::string cmd);
227 std::vector<std::string> split(std::string str,std::string pattern);
228 void InitPars();
229 double energySpread(double mu,double sigma);
230 void calAF(double myecms);
231 void OutStaISR();
232 double trapezoid(double s, double a, double b, int n);//integration with trapezoid method
233 double trapezoid(double s, double El,double Eh,int n, EvtXsection* myxs);
234 static double mlow,mup;
235private:
236
237 int _mode,_ndaugs,radflag,testflag;
238 EvtId daugs[10],gamId;//daugs[0]~dagus[_ndaugs-1] are hadrons, daugs[_ndaugs] is ISR gamma
239 static double _xs0,_xs1; //cross section for 0 and 1-photon processes
240 static double _er0,_er1; //cross section for 0 and 1-photon processes
241 static int _nevt;
242 std::vector<double> ISRXS,ISRM;
243 std::vector<bool> ISRFLAG;
244 EvtParticle* gamH;
245 double maxXS;//maximum of diffrential cross section respective to cos\theta and mhds for ee->gamma hadrons
246 double differ,differ2,Rad2Xs;
247 std::string _unit;
248 std::vector<double> BR_ee;
249 std::vector<EvtId > ResId,ISRID;
250
251 double Egamcut;
252 //-- for deguggint to make root file
253 TFile *myfile;
254 Double_t pgam[4],phds[4],ph1[4],ph2[4],mhds,sumxs;
255 Double_t mass1,mass2,costheta,selectmode;
256 Double_t cosp,cosk;
257 Int_t imode;
258 TTree *xs;
259 bool mydbg; //handler w/o debugging
260 TGraphErrors *mygr;
261 TH1F* myth,*Xobs,*Xsum;
262 // for calulate the correction factor
263 int pdgcode;
264 std::string file;
265 EvtId son[10],pid;
266 int nson;
267 double vph; //for vaccuam polarization calculation
268 static double AF[600],AA[600],MH[600];
269 double RadXS[600],EgamH;
270 std::vector<double> myFisr;
271
272 double mjsi,mpsip,mpsipp,mphi,momega,mrho0,mrho3s,momega2s;
273 double wjsi,wpsip,wpsipp,wphi,womega,wrho0,wrho3s,womega2s;
274 double _mhdL;
275 double cmsspread;
276 int _selectedMode;
277 std::vector<int> _modeFlag;
278 bool VISR;
279 std::vector<int > vmode, vmd;
280 static std::vector<std::vector <double> > VXS;
281 std::vector<double> vpx,vpr,vpi;
282 double Mthr;
283 EvtParticle *theparent;
284
285 static int nconexcdecays;
286 static EvtDecayBasePtr* conexcdecays;
287 static int ntable;
288
289 static int ncommand;
290 static int lcommand;
291 static std::string* commands;
292 void store(EvtDecayBase* jsdecay);
293 //-- parameter list in user's decay card by ConExcPar
294 double threshold, beamEnergySpread;
295};
296
297#endif
const Int_t n
EvtDecayBase * EvtDecayBasePtr
Definition: EvtConExc.hh:136
XmlRpcServer s
Definition: HelloServer.cpp:11
bool checkdecay(EvtParticle *p)
Definition: EvtConExc.cc:3165
double Li2(double x)
Definition: EvtConExc.cc:2812
int getNdaugs()
Definition: EvtConExc.hh:208
void findMaxXS(EvtParticle *p)
Definition: EvtConExc.cc:2431
static int getMode
Definition: EvtConExc.hh:194
static int conexcmode
Definition: EvtConExc.hh:211
double addNarrowRXS(double mhi, double binwidth)
Definition: EvtConExc.cc:3326
void init()
Definition: EvtConExc.cc:254
int getSelectedMode()
Definition: EvtConExc.hh:210
double narrowRXS(double mxL, double mxH)
Definition: EvtConExc.cc:3292
bool VP_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition: EvtConExc.cc:2557
void command(std::string cmd)
Definition: EvtConExc.cc:3595
void init_Br_ee()
Definition: EvtConExc.cc:2686
double gamHXSection_er(double El, double Eh)
Definition: EvtConExc.cc:2413
bool islgr(double *x, double *y, int n, double t)
Definition: EvtConExc.cc:2834
void showResMass()
Definition: EvtConExc.cc:3154
double lgr(double *x, double *y, int n, double t)
Definition: EvtConExc.cc:2819
void ReadVP()
Definition: EvtConExc.cc:3381
double baryonAng(double mx)
Definition: EvtConExc.cc:3251
void InitPars()
Definition: EvtConExc.cc:3651
double Ros_xs(double mx, double bree, EvtId pid)
Definition: EvtConExc.cc:2718
void OutStaISR()
Definition: EvtConExc.cc:3738
double Rad1(double s, double x)
Definition: EvtConExc.cc:2568
static EvtXsection * staxsection
Definition: EvtConExc.hh:189
static EvtXsection * myxsection
Definition: EvtConExc.hh:189
void SetP4Rvalue(EvtParticle *part, double mhdr, double xeng, double theta)
Definition: EvtConExc.cc:2959
int getModeIndex(int m)
Definition: EvtConExc.cc:3581
bool meson_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition: EvtConExc.cc:2546
static int multimode
Definition: EvtConExc.hh:211
bool photonSampling(EvtParticle *part)
Definition: EvtConExc.cc:3261
double ISR_ang_integrate(double x, double theta)
Definition: EvtConExc.cc:2893
static double SetMthr
Definition: EvtConExc.hh:192
bool xs_sampling(double xs)
Definition: EvtConExc.cc:2517
int selectMode(std::vector< int > vmod, double mhds)
Definition: EvtConExc.cc:3003
double gamHXSection(EvtParticle *p, double El, double Eh, int nmc=100000)
Definition: EvtConExc.cc:2286
double Rad1difXs(EvtParticle *p)
Definition: EvtConExc.cc:2658
double sumExc(double mx)
Definition: EvtConExc.cc:3179
void init_mode(int mode)
Definition: EvtConExc.cc:741
bool baryon_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition: EvtConExc.cc:2529
int get_mode_index(int mode)
Definition: EvtConExc.cc:3440
double LLr(double *x, double *y, int n, double t)
Definition: EvtConExc.cc:2849
double Rad2difXs(EvtParticle *p)
Definition: EvtConExc.cc:2604
double SoftPhoton_xs(double s, double b)
Definition: EvtConExc.cc:2787
bool angularSampling(EvtParticle *part)
Definition: EvtConExc.cc:3215
EvtId * getDaugId()
Definition: EvtConExc.hh:209
double difgamXs(EvtParticle *p)
Definition: EvtConExc.cc:2476
double ISR_ang_sampling(double x)
Definition: EvtConExc.cc:2911
void checkEvtRatio()
Definition: EvtConExc.cc:3553
void initProbMax()
Definition: EvtConExc.cc:1757
double Mhad_sampling(double *x, double *y)
Definition: EvtConExc.cc:2865
static double _cms
Definition: EvtConExc.hh:190
void writeDecayTabel()
Definition: EvtConExc.cc:3468
double energySpread(double mu, double sigma)
Definition: EvtConExc.cc:3669
std::vector< EvtId > get_mode(int mode)
Definition: EvtConExc.cc:1246
static double mlow
Definition: EvtConExc.hh:234
void resetResMass()
Definition: EvtConExc.cc:3083
double getObsXsection(double mhds, int mode)
Definition: EvtConExc.cc:3449
void mk_VXS(double Esig, double Egamcut, double EgamH, int midx)
Definition: EvtConExc.cc:3401
void calAF(double myecms)
Definition: EvtConExc.cc:3687
bool hadron_angle_sampling(EvtVector4R ppi, EvtVector4R pcm)
Definition: EvtConExc.cc:2258
virtual ~EvtConExc()
Definition: EvtConExc.cc:205
void getResMass()
Definition: EvtConExc.cc:3118
bool gam_sampling(EvtParticle *p)
Definition: EvtConExc.cc:2503
double Rad2(double s, double x)
Definition: EvtConExc.cc:2580
double selectMass()
Definition: EvtConExc.cc:3335
double getVP(double cms)
Definition: EvtConExc.cc:3360
double trapezoid(double s, double a, double b, int n)
Definition: EvtConExc.cc:3752
void getName(std::string &name)
Definition: EvtConExc.cc:241
void decay(EvtParticle *p)
Definition: EvtConExc.cc:1763
std::vector< std::string > split(std::string str, std::string pattern)
Definition: EvtConExc.cc:3630
std::string commandName()
Definition: EvtConExc.cc:3589
static double XS_max
Definition: EvtConExc.hh:191
double Egam2Mhds(double Egam)
Definition: EvtConExc.cc:3462
static double mup
Definition: EvtConExc.hh:234
EvtDecayBase * clone()
Definition: EvtConExc.cc:247
void SetP4(EvtParticle *part, double mhdr, double xeng, double theta)
Definition: EvtConExc.cc:2935
Definition: EvtId.hh:27
int t()
Definition: t.c:1