BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtConExc.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: EvtConExc.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 /*******************--- mode definition: also see EvtXsection.cc
17 0: ppbar
18 1: nnbar
19 2: Lambda0 anti-Lambda0
20 3: Sigma0 anti-Sigma0
21 4: Lambda0 anti-Sigma0
22 5: Sigma0 anti-Lambda0
23 6: pi+ pi-
24 7: pi+ pi- pi0
25 8: K+K- pi0
26 9: KsK+pi-
27 10: KsK-pi+
28 11: K+K-eta
29 12: 2(pi+pi-)
30 13: pi+pi-2pi0
31 14: K+K-pi+pi-
32 15: K+K-2pi0
33 16: 2(K+K-)
34 17: 2(pi+pi-)pi0
35 18: 2(pi+pi-)eta
36 19: K+K-pi+pi-pi0
37 20: K+K-pi+pi-eta
38 21: 3(pi+pi-)
39 22: 2(pi+pi-pi0)
40 23: phi eta
41 24: phi pi0
42 25: K+K*-
43 26: K-K*+
44 27: K_SK*0-bar
45 28: K*0(892)K+pi-
46 29: K*0(892)K-pi+
47 30: K*+K-pi0
48 31: K*-K+pi0
49 32: K_2*(1430)0 K+pi-
50 33: K_2*(1430)0 K-pi+
51 34: K+K-rho
52 35: phi pi+pi-
53 36: phi f0(980)
54 37: eta pi+pi-
55 38: omega pi+ pi-
56 39: omega f0(980)
57 40: eta' pi+ pi-
58 41: f_1(1285)pi+pi-
59 42: omega K+K-
60 43: omega pi+pi-pi0
61 *************************************/
62// Modification history:
63//
64// Ping R.-G. Nov., 2012 Module created
65//
66//------------------------------------------------------------------------
67//
68#ifndef EVTCONEXC_HH
69#define EVTCONEXC_HH
70
71//#include <string.h>
72#include "EvtGenBase/EvtId.hh"
75//------ including root
76#include "TH1.h"
77#include "TH2.h"
78#include "TH3.h"
79#include "TFile.h"
80#include "TROOT.h"
81#include "TTree.h"
82#include "TGraphErrors.h"
83#include "TDirectory.h"
84
85class EvtParticle;
87
89
90public:
91
93 } //constructor
94 //---
95 virtual ~EvtConExc();
96
97 void getName(std::string& name);
98
100
101 void initProbMax();
102
103 void init();
104 void init_Br_ee();
105
106 void decay(EvtParticle *p);
107 void init_mode(int mode);
108 double gamHXSection(EvtParticle* p, double El, double Eh, int nmc=100000);
109 double gamHXSection(double s, double El, double Eh, int nmc=100000);
110 double gamHXSection(double El, double Eh);
111 double gamHXSection(double El, double Eh,int mode);
112 double gamHXSection_er(double El,double Eh);
113
114 void findMaxXS(EvtParticle *p);
115 double difgamXs(EvtParticle* p); //differential cross section for gamma + hadrons
116 double difgamXs(double mhds,double sintheta);
117 double Mhad_sampling(double *x,double *y);
118 double ISR_ang_integrate(double x,double theta);
119 double ISR_ang_sampling(double x);
121 void SetP4(EvtParticle *part, double mhdr,double xeng, double theta); //set the gamma and gamma* momentum according sampled results
122 void SetP4Rvalue(EvtParticle *part, double mhdr,double xeng, double theta); //set the gamma and gamma* momentum according sampled results
123 bool gam_sampling(EvtParticle *p);
124 bool xs_sampling(double xs);
125 bool xs_sampling(double xs,double xs1);
126 bool baryon_sampling(EvtVector4R pcm, EvtVector4R pi);//baryon angular distri. 1+cos^2\theta
127 bool meson_sampling(EvtVector4R pcm, EvtVector4R pi); //meson angular distri. sin^2\theta
128 bool VP_sampling(EvtVector4R pcm, EvtVector4R pi); //VP ang. dist. 1+cos^2theta
129 bool angularSampling(EvtParticle* part);
130 bool photonSampling(EvtParticle* part);
131 double baryonAng(double mx);
132 double Rad1(double s, double x);
133 double Rad2(double s, double x);
134 double Rad2difXs(EvtParticle *p);
135 double Rad2difXs(double s, double x);
136 double Rad2difXs(double s, double x, EvtXsection* myxsection);
137 double Rad1difXs(EvtParticle *p);
138 double Ros_xs(double mx, double bree,EvtId pid);
140 static double _cms; //energy of CMS of ee beam
141 static double XS_max;// maxium of cross section in experiment
142 static double SetMthr;
143
144 static int getMode;
145 double Li2(double x);
146 double SoftPhoton_xs(double s,double b);
147 double lgr(double *x,double *y,int n,double t);
148 bool islgr(double *x,double *y,int n,double t);
149 double LLr(double *x,double *y,int n,double t);
150 int selectMode(std::vector<int> vmod, double mhds);
151 void findMaxXS(double mhds );
152 bool gam_sampling(double mhds,double sintheta);
153 void resetResMass();
154 void getResMass();
155 bool checkdecay(EvtParticle* p);
156 double sumExc(double mx);
157 void showResMass();
158 int getNdaugs(){return _ndaugs;}
159 EvtId* getDaugId(){return daugs;}
160 int getSelectedMode(){return _selectedMode;}
162 double narrowRXS(double mxL,double mxH);
163 double selectMass();
164 double addNarrowRXS(double mhi, double binwidth);
165 void ReadVP();
166 double getVP(double cms);
167 void mk_VXS(double Esig,double Egamcut,double EgamH,int midx); //make a set of observed cross section for exclusive processes,including narrow resonance
168 int get_mode_index(int mode);
169 double getObsXsection(double mhds,int mode);
170 double Egam2Mhds(double Egam);
171 std::vector<EvtId> get_mode(int mode);
172 void writeDecayTabel();
173 void checkEvtRatio();
174 int getModeIndex(int m);
175 std::string commandName();
176 void command(std::string cmd);
177 std::vector<std::string> split(std::string str,std::string pattern);
178 void InitPars();
179 double energySpread(double mu,double sigma);
180 void calAF(double myecms);
181 void OutStaISR();
182 double trapezoid(double s, double a, double b, int n);//integration with trapezoid method
183 double trapezoid(double s, double El,double Eh,int n, EvtXsection* myxs);
184 static double mlow,mup;
185private:
186
187 int _mode,_ndaugs,radflag,testflag;
188 EvtId daugs[10],gamId;//daugs[0]~dagus[_ndaugs-1] are hadrons, daugs[_ndaugs] is ISR gamma
189 static double _xs0,_xs1; //cross section for 0 and 1-photon processes
190 static double _er0,_er1; //cross section for 0 and 1-photon processes
191 static int _nevt;
192 std::vector<double> ISRXS,ISRM;
193 std::vector<bool> ISRFLAG;
194 EvtParticle* gamH;
195 double maxXS;//maximum of diffrential cross section respective to cos\theta and mhds for ee->gamma hadrons
196 double differ,differ2,Rad2Xs;
197 std::string _unit;
198 std::vector<double> BR_ee;
199 std::vector<EvtId > ResId,ISRID;
200
201 double Egamcut;
202 //-- for deguggint to make root file
203 TFile *myfile;
204 Double_t pgam[4],phds[4],ph1[4],ph2[4],mhds,sumxs;
205 Double_t mass1,mass2,costheta,selectmode;
206 Double_t cosp,cosk;
207 Int_t imode;
208 TTree *xs;
209 bool mydbg; //handler w/o debugging
210 TGraphErrors *mygr;
211 TH1F* myth,*Xobs,*Xsum;
212 // for calulate the correction factor
213 int pdgcode;
214 std::string file;
215 EvtId son[10],pid;
216 int nson;
217 double vph; //for vaccuam polarization calculation
218 static double AF[600],AA[600],MH[600];
219 double RadXS[600],EgamH;
220 std::vector<double> myFisr;
221
222 double mjsi,mpsip,mpsipp,mphi,momega,mrho0,mrho3s,momega2s;
223 double wjsi,wpsip,wpsipp,wphi,womega,wrho0,wrho3s,womega2s;
224 double _mhdL;
225 double cmsspread;
226 int _selectedMode;
227 std::vector<int> _modeFlag;
228 bool VISR;
229 std::vector<int > vmode, vmd;
230 static std::vector<std::vector <double> > VXS;
231 std::vector<double> vpx,vpr,vpi;
232 double Mthr;
233 EvtParticle *theparent;
234
235 static int nconexcdecays;
236 static EvtDecayBasePtr* conexcdecays;
237 static int ntable;
238
239 static int ncommand;
240 static int lcommand;
241 static std::string* commands;
242 void store(EvtDecayBase* jsdecay);
243 //-- parameter list in user's decay card by ConExcPar
244 double threshold, beamEnergySpread;
245};
246
247#endif
248
const Int_t n
EvtDecayBase * EvtDecayBasePtr
Definition: EvtConExc.hh:86
XmlRpcServer s
Definition: HelloServer.cpp:11
bool checkdecay(EvtParticle *p)
Definition: EvtConExc.cc:3123
double Li2(double x)
Definition: EvtConExc.cc:2771
int getNdaugs()
Definition: EvtConExc.hh:158
void findMaxXS(EvtParticle *p)
Definition: EvtConExc.cc:2390
static int getMode
Definition: EvtConExc.hh:144
static int conexcmode
Definition: EvtConExc.hh:161
double addNarrowRXS(double mhi, double binwidth)
Definition: EvtConExc.cc:3284
void init()
Definition: EvtConExc.cc:230
int getSelectedMode()
Definition: EvtConExc.hh:160
double narrowRXS(double mxL, double mxH)
Definition: EvtConExc.cc:3250
bool VP_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition: EvtConExc.cc:2516
void command(std::string cmd)
Definition: EvtConExc.cc:3555
void init_Br_ee()
Definition: EvtConExc.cc:2645
double gamHXSection_er(double El, double Eh)
Definition: EvtConExc.cc:2372
bool islgr(double *x, double *y, int n, double t)
Definition: EvtConExc.cc:2792
void showResMass()
Definition: EvtConExc.cc:3112
double lgr(double *x, double *y, int n, double t)
Definition: EvtConExc.cc:2777
void ReadVP()
Definition: EvtConExc.cc:3339
double baryonAng(double mx)
Definition: EvtConExc.cc:3209
void InitPars()
Definition: EvtConExc.cc:3611
double Ros_xs(double mx, double bree, EvtId pid)
Definition: EvtConExc.cc:2677
void OutStaISR()
Definition: EvtConExc.cc:3698
double Rad1(double s, double x)
Definition: EvtConExc.cc:2527
static EvtXsection * staxsection
Definition: EvtConExc.hh:139
static EvtXsection * myxsection
Definition: EvtConExc.hh:139
void SetP4Rvalue(EvtParticle *part, double mhdr, double xeng, double theta)
Definition: EvtConExc.cc:2917
int getModeIndex(int m)
Definition: EvtConExc.cc:3541
bool meson_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition: EvtConExc.cc:2505
static int multimode
Definition: EvtConExc.hh:161
bool photonSampling(EvtParticle *part)
Definition: EvtConExc.cc:3219
double ISR_ang_integrate(double x, double theta)
Definition: EvtConExc.cc:2851
static double SetMthr
Definition: EvtConExc.hh:142
bool xs_sampling(double xs)
Definition: EvtConExc.cc:2476
int selectMode(std::vector< int > vmod, double mhds)
Definition: EvtConExc.cc:2961
double gamHXSection(EvtParticle *p, double El, double Eh, int nmc=100000)
Definition: EvtConExc.cc:2245
double Rad1difXs(EvtParticle *p)
Definition: EvtConExc.cc:2617
double sumExc(double mx)
Definition: EvtConExc.cc:3137
void init_mode(int mode)
Definition: EvtConExc.cc:710
bool baryon_sampling(EvtVector4R pcm, EvtVector4R pi)
Definition: EvtConExc.cc:2488
int get_mode_index(int mode)
Definition: EvtConExc.cc:3401
double LLr(double *x, double *y, int n, double t)
Definition: EvtConExc.cc:2807
double Rad2difXs(EvtParticle *p)
Definition: EvtConExc.cc:2563
double SoftPhoton_xs(double s, double b)
Definition: EvtConExc.cc:2746
bool angularSampling(EvtParticle *part)
Definition: EvtConExc.cc:3173
EvtId * getDaugId()
Definition: EvtConExc.hh:159
double difgamXs(EvtParticle *p)
Definition: EvtConExc.cc:2435
double ISR_ang_sampling(double x)
Definition: EvtConExc.cc:2869
void checkEvtRatio()
Definition: EvtConExc.cc:3513
void initProbMax()
Definition: EvtConExc.cc:1716
double Mhad_sampling(double *x, double *y)
Definition: EvtConExc.cc:2823
static double _cms
Definition: EvtConExc.hh:140
void writeDecayTabel()
Definition: EvtConExc.cc:3429
double energySpread(double mu, double sigma)
Definition: EvtConExc.cc:3629
std::vector< EvtId > get_mode(int mode)
Definition: EvtConExc.cc:1210
static double mlow
Definition: EvtConExc.hh:184
void resetResMass()
Definition: EvtConExc.cc:3041
double getObsXsection(double mhds, int mode)
Definition: EvtConExc.cc:3410
void mk_VXS(double Esig, double Egamcut, double EgamH, int midx)
Definition: EvtConExc.cc:3362
void calAF(double myecms)
Definition: EvtConExc.cc:3647
bool hadron_angle_sampling(EvtVector4R ppi, EvtVector4R pcm)
Definition: EvtConExc.cc:2217
virtual ~EvtConExc()
Definition: EvtConExc.cc:183
void getResMass()
Definition: EvtConExc.cc:3076
bool gam_sampling(EvtParticle *p)
Definition: EvtConExc.cc:2462
double Rad2(double s, double x)
Definition: EvtConExc.cc:2539
double selectMass()
Definition: EvtConExc.cc:3293
double getVP(double cms)
Definition: EvtConExc.cc:3318
double trapezoid(double s, double a, double b, int n)
Definition: EvtConExc.cc:3712
void getName(std::string &name)
Definition: EvtConExc.cc:217
void decay(EvtParticle *p)
Definition: EvtConExc.cc:1722
std::vector< std::string > split(std::string str, std::string pattern)
Definition: EvtConExc.cc:3590
std::string commandName()
Definition: EvtConExc.cc:3549
static double XS_max
Definition: EvtConExc.hh:141
double Egam2Mhds(double Egam)
Definition: EvtConExc.cc:3423
static double mup
Definition: EvtConExc.hh:184
EvtDecayBase * clone()
Definition: EvtConExc.cc:223
void SetP4(EvtParticle *part, double mhdr, double xeng, double theta)
Definition: EvtConExc.cc:2893
Definition: EvtId.hh:27
int t()
Definition: t.c:1