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